From 06e214e5675769318a40abc9850bf8d5c85a7ee3 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 23 Nov 2021 09:17:04 +0000 Subject: more work on responsive aside --- Zotlabs/Module/Profiles.php | 2 +- include/contact_widgets.php | 2 +- include/text.php | 2 +- view/css/widgets.css | 6 +++--- view/theme/redbasic/css/style.css | 31 ++++++++++++------------------- view/theme/redbasic/php/style.php | 6 +++--- view/tpl/connstatus.tpl | 2 +- view/tpl/profile_vcard.tpl | 16 ++++++++++------ view/tpl/xchan_vcard.tpl | 4 ++-- 9 files changed, 34 insertions(+), 37 deletions(-) diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php index 73bae45e8..1512148b1 100644 --- a/Zotlabs/Module/Profiles.php +++ b/Zotlabs/Module/Profiles.php @@ -189,7 +189,6 @@ class Profiles extends \Zotlabs\Web\Controller { } $chan = \App::get_channel(); - profile_load($chan['channel_address'],$r[0]['id']); } } @@ -657,6 +656,7 @@ class Profiles extends \Zotlabs\Web\Controller { intval($id), intval(local_channel()) ); + if(! $r) { notice( t('Profile not found.') . EOL); return; diff --git a/include/contact_widgets.php b/include/contact_widgets.php index a5f867b0f..875a519a5 100644 --- a/include/contact_widgets.php +++ b/include/contact_widgets.php @@ -246,7 +246,7 @@ function filecategories_widget($baseurl,$selected = '') { } -function common_friends_visitor_widget($profile_uid,$cnt = 25) { +function common_friends_visitor_widget($profile_uid,$cnt = 36) { if(local_channel() == $profile_uid) return; diff --git a/include/text.php b/include/text.php index 1b3a77dba..d46c089b5 100644 --- a/include/text.php +++ b/include/text.php @@ -987,7 +987,7 @@ function contact_block() { $shown = get_pconfig(App::$profile['uid'],'system','display_friend_count'); if($shown === false) - $shown = 25; + $shown = 36; if($shown == 0) return; diff --git a/view/css/widgets.css b/view/css/widgets.css index b78725919..df77940dd 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -243,9 +243,9 @@ a.wikilist { /* contact block */ .contact-block-div .oneway-overlay { - font-size: 20px; - margin-left: -25px; - margin-top: 25px; + font-size: .9rem; + margin-left: -1.2rem; + margin-top: 2rem; opacity: 0.8; } diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index a4641b68e..aad17698b 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -24,15 +24,15 @@ body { aside#region_1 { border-right: 1px solid transparent; - width: $left_aside_widthpx; - min-width: $left_aside_widthpx; - max-width: $left_aside_widthpx; + width: $left_aside_widthrem; + min-width: $left_aside_widthrem; + max-width: $left_aside_widthrem; } aside#region_3 { - width: $right_aside_widthpx; - min-width: $left_aside_widthpx; - max-width: $right_aside_widthpx; + width: $right_aside_widthrem; + min-width: $left_aside_widthrem; + max-width: $right_aside_widthrem; } aside#left_aside_wrapper, @@ -49,7 +49,7 @@ main { #overlay { position: fixed; top: 0; - left: $left_aside_widthpx; + left: $left_aside_widthrem; width: 100vw; height: 100vh; background: rgba(0, 0, 0, .3); @@ -401,16 +401,10 @@ footer { } .vcard-card { - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; + background-color: rgba(254,254,254,0.5); } .vcard { - margin-bottom: 10px; - padding: 0px 10px 10px 10px; - background-color: rgba(254,254,254,0.5); - border: 1px solid rgba(254,254,254,0.5); - border-top: 0px; word-wrap: break-word; } @@ -563,8 +557,8 @@ footer { } .contact-block-img { - width:47px; - height:47px; + width: 2.95rem; + height: 2.95rem; margin-bottom: 3px; } @@ -1183,7 +1177,6 @@ img.mail-conv-sender-photo { .widget { background-color: rgba(254,254,254,.5); - border: 1px solid rgba(254,254,254,.5); border-radius: $radius; } @@ -1522,8 +1515,8 @@ blockquote { } main { - left: -$left_aside_widthpx; - width: calc( 100% + $left_aside_widthpx ); + left: -$left_aside_widthrem; + width: calc( 100% + $left_aside_widthrem ); } main.region_1-on { diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 3ea94f9aa..6ba0d569e 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -101,7 +101,7 @@ if (! $radius) if (! $shadow) $shadow = '0'; if (! $converse_width) - $converse_width = '790'; + $converse_width = '1250'; //unit: rem if(! $top_photo) $top_photo = '2.3rem'; if(! $reply_photo) @@ -120,8 +120,8 @@ if(file_exists('view/theme/redbasic/css/style.css')) { $x .= $schemecss; } - $left_aside_width = 288; - $right_aside_width = 288; + $left_aside_width = 21; //unit: rem + $right_aside_width = 21; //unit: rem $main_width = $left_aside_width + $right_aside_width + intval($converse_width); diff --git a/view/tpl/connstatus.tpl b/view/tpl/connstatus.tpl index 667775f3a..869345682 100644 --- a/view/tpl/connstatus.tpl +++ b/view/tpl/connstatus.tpl @@ -1 +1 @@ - + diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl index 983c79fab..487fa3959 100644 --- a/view/tpl/profile_vcard.tpl +++ b/view/tpl/profile_vcard.tpl @@ -1,11 +1,13 @@ {{if !$zcard}} -
+ +
+
-
+
{{if $editmenu}} {{/if}} - {{$profile.fullname}} + {{$profile.fullname}} {{if $editmenu}} {{/if}} @@ -44,9 +46,9 @@
-
+
{{if $profile.pdesc}} -
{{$profile.pdesc}}
+
{{$profile.pdesc}}
{{/if}} {{if $location}}
@@ -77,7 +79,7 @@
{{/if}} {{if $homepage}} -
+
{{$homepage}}
{{$profile.homepage}}
@@ -85,6 +87,8 @@
+
+ {{/if}} {{if $zcard}} diff --git a/view/tpl/xchan_vcard.tpl b/view/tpl/xchan_vcard.tpl index 2b5a6cb41..a5568f283 100644 --- a/view/tpl/xchan_vcard.tpl +++ b/view/tpl/xchan_vcard.tpl @@ -1,8 +1,8 @@
-
+
-- cgit v1.2.3