diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-03-15 16:42:55 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-03-15 16:42:55 +0100 |
commit | aa33cacb62ef25cbab7c6ee1b253ed58072e6e44 (patch) | |
tree | cc9ef82c2026e109f288884c9e36efc15f3c8dab | |
parent | 0c74c79b18d77e4ca9032e92a652e51932f40aa4 (diff) | |
download | volse-hubzilla-aa33cacb62ef25cbab7c6ee1b253ed58072e6e44.tar.gz volse-hubzilla-aa33cacb62ef25cbab7c6ee1b253ed58072e6e44.tar.bz2 volse-hubzilla-aa33cacb62ef25cbab7c6ee1b253ed58072e6e44.zip |
style hashtags, mentions and categories. hide expand-aside button if not needed. css and class fixes
-rw-r--r-- | include/text.php | 10 | ||||
-rw-r--r-- | include/widgets.php | 12 | ||||
-rw-r--r-- | view/css/conversation.css | 9 | ||||
-rw-r--r-- | view/css/mod_mail.css | 4 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 5 | ||||
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 7 | ||||
-rw-r--r-- | view/theme/redbasic/php/style.php | 4 | ||||
-rwxr-xr-x | view/tpl/common_tabs.tpl | 4 | ||||
-rwxr-xr-x | view/tpl/conv_item.tpl | 17 | ||||
-rw-r--r-- | view/tpl/item_categories.tpl | 6 |
10 files changed, 35 insertions, 43 deletions
diff --git a/include/text.php b/include/text.php index 9d76f9d78..2d1bc4222 100644 --- a/include/text.php +++ b/include/text.php @@ -1460,10 +1460,7 @@ function format_hashtags(&$item) { if(strpos($item['body'], $t['url'])) continue; - if($s) - $s .= ' '; - - $s .= '#<a href="' . zid($t['url']) . '" >' . $term . '</a>'; + $s .= '<span class="badge badge-pill badge-info"><i class="fa fa-hashtag"></i> <a class="text-white" href="' . zid($t['url']) . '" >' . $term . '</a></span> '; } } @@ -1484,10 +1481,7 @@ function format_mentions(&$item) { if(strpos($item['body'], $t['url'])) continue; - if($s) - $s .= ' '; - - $s .= '@<a href="' . zid($t['url']) . '" >' . $term . '</a>'; + $s .= '<span class="badge badge-pill badge-success"><i class="fa fa-at"></i> <a class="text-white" href="' . zid($t['url']) . '" >' . $term . '</a></span> '; } } diff --git a/include/widgets.php b/include/widgets.php index f05c7c0ee..f247470b3 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -1480,12 +1480,12 @@ function widget_forums($arr) { if($r1) { $o .= '<div class="widget">'; - $o .= '<h3>' . t('Forums') . '</h3><ul class="nav nav-pills nav-stacked">'; + $o .= '<h3>' . t('Forums') . '</h3><ul class="nav nav-pills flex-column">'; foreach($r1 as $rr) { if($unseen && (! intval($rr['unseen']))) continue; - $o .= '<li><a href="network?f=&pf=1&cid=' . $rr['abook_id'] . '" ><span class="badge pull-right">' . ((intval($rr['unseen'])) ? intval($rr['unseen']) : '') . '</span><img src="' . $rr['xchan_photo_s'] . '" style="width: 16px; height: 16px;" /> ' . $rr['xchan_name'] . '</a></li>'; + $o .= '<li class="nav-item"><a class="nav-link" href="network?f=&pf=1&cid=' . $rr['abook_id'] . '" ><span class="badge badge-default float-right">' . ((intval($rr['unseen'])) ? intval($rr['unseen']) : '') . '</span><img class ="dropdown-menu-img-xs" src="' . $rr['xchan_photo_s'] . '" /> ' . $rr['xchan_name'] . '</a></li>'; } $o .= '</ul></div>'; } @@ -1537,10 +1537,10 @@ function widget_activity($arr) { if($arr) { $o .= '<div class="widget">'; - $o .= '<h3>' . t('Activity','widget') . '</h3><ul class="nav nav-pills nav-stacked">'; + $o .= '<h3>' . t('Activity','widget') . '</h3><ul class="nav nav-pills flex-column">'; foreach($arr as $rv) { - $o .= '<li><a href="network?f=&xchan=' . urlencode($rv['author_xchan']) . '" ><span class="badge pull-right">' . ((intval($rv['total'])) ? intval($rv['total']) : '') . '</span><img src="' . $rv['author']['xchan_photo_s'] . '" style="width: 16px; height: 16px;" /> ' . $rv['author']['xchan_name'] . '</a></li>'; + $o .= '<li class="nav-item"><a class="nav-link" href="network?f=&xchan=' . urlencode($rv['author_xchan']) . '" ><span class="badge badge-default float-right">' . ((intval($rv['total'])) ? intval($rv['total']) : '') . '</span><img src="' . $rv['author']['xchan_photo_s'] . '" style="width: 16px; height: 16px;" /> ' . $rv['author']['xchan_name'] . '</a></li>'; } $o .= '</ul></div>'; } @@ -1582,7 +1582,7 @@ function widget_helpindex($arr) { if(! $level_0) $level_0 = get_help_content('toc'); - $level_0 = preg_replace('/\<ul(.*?)\>/','<ul class="nav nav-pills nav-stacked">',$level_0); + $level_0 = preg_replace('/\<ul(.*?)\>/','<ul class="nav nav-pills flex-column">',$level_0); $levels = array(); @@ -1595,7 +1595,7 @@ function widget_helpindex($arr) { if(! $y) $y = get_help_content($path . 'toc'); if($y) - $levels[] = preg_replace('/\<ul(.*?)\>/','<ul class="nav nav-pills nav-stacked">',$y); + $levels[] = preg_replace('/\<ul(.*?)\>/','<ul class="nav nav-pills flex-column">',$y); } } diff --git a/view/css/conversation.css b/view/css/conversation.css index 9f9c1fd42..b167e3961 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -90,10 +90,6 @@ /* conv_item */ -.wall-item-head { - line-height: 1.2; -} - .wall-item-head-new { border-top: 3px solid #0275d8; } @@ -122,6 +118,7 @@ a.wall-item-name-link { text-overflow: ellipsis; } +.wall-item-ago, .wall-item-ago i { font-size: 0.75rem; } @@ -151,10 +148,6 @@ a.wall-item-name-link { word-wrap: break-word; } -.body-tags { - margin-top: 5px; -} - .item-tool { cursor: pointer; } diff --git a/view/css/mod_mail.css b/view/css/mod_mail.css index 3ca75d0e4..6a98267f0 100644 --- a/view/css/mod_mail.css +++ b/view/css/mod_mail.css @@ -1,7 +1,3 @@ -.mail-conv-detail { - line-height: 1.2; -} - .mail-conv-sender { float: left; margin-right: 10px; diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index d81c8a75d..ba12bf3bd 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1292,7 +1292,7 @@ img.mail-conv-sender-photo { } .wall-item-footer { - font-size: $body_font_size; + font-size: 0.75rem; margin-top: 2em; } @@ -1367,8 +1367,7 @@ img.mail-conv-sender-photo { .mail-conv-body, .page-body, .chat-item-text, -.chat-item-text-self, -#doco-content { +.chat-item-text-self { font-size: $font_size; clear: both; } diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 4686e93db..45d80186d 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -16,6 +16,8 @@ $(document).ready(function() { } $('#css3-calc').remove(); // Remove the test element + + if($(window).width() > 767) { $('#left_aside_wrapper').stick_in_parent({ offset_top: $('nav').outerHeight(true) + 10, @@ -24,6 +26,11 @@ $(document).ready(function() { }); } + if($('#region_1 .widget').length > 0) + $('#expand-aside').show(); + else + $('#expand-aside').hide(); + $('#expand-aside').on('click', toggleAside); $('section').on('click', function() { diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 6e8a43a47..08efcda4c 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -134,11 +134,11 @@ if (! $shadow) if (! $converse_width) $converse_width = '790'; if(! $top_photo) - $top_photo = '2.2rem'; + $top_photo = '2.3rem'; if(! $comment_indent) $comment_indent = '0px'; if(! $reply_photo) - $reply_photo = '2.2rem'; + $reply_photo = '2.3rem'; if($nav_min_opacity === false || $nav_min_opacity === '') { $nav_float_min_opacity = 1.0; $nav_percent_min_opacity = 100; diff --git a/view/tpl/common_tabs.tpl b/view/tpl/common_tabs.tpl index e78f54a3c..65a8b6a9e 100755 --- a/view/tpl/common_tabs.tpl +++ b/view/tpl/common_tabs.tpl @@ -5,8 +5,8 @@ {{/foreach}} </ul> </div> -<div class="hidden-md-up dropdown clearfix" style="position:fixed; right:7px; top:4.5rem; z-index:1020"> - <button type="button" class="btn btn-outline-secondary btn-sm float-right" data-toggle="dropdown"> +<div class="hidden-md-up dropup clearfix" style="position:fixed; right:7px; bottom:2rem; z-index:1020"> + <button type="button" class="btn btn-outline-success btn-sm float-right" data-toggle="dropdown"> <i class="fa fa-bars"></i> </button> <div class="dropdown-menu dropdown-menu-right"> diff --git a/view/tpl/conv_item.tpl b/view/tpl/conv_item.tpl index 8eb2cf754..6f42521ae 100755 --- a/view/tpl/conv_item.tpl +++ b/view/tpl/conv_item.tpl @@ -19,14 +19,14 @@ </div> {{/if}} {{if $item.title && !$item.event}} - <div class="p-2{{if $item.is_new}} bg-primary text-white{{/if}} wall-item-title h3{{if !$item.photo}} rounded-top{{/if}}" id="wall-item-title-{{$item.id}}" title="{{$item.title}}"> + <div class="p-2{{if $item.is_new}} bg-primary text-white{{/if}} wall-item-title h3{{if !$item.photo}} rounded-top{{/if}}" id="wall-item-title-{{$item.id}}"> {{if $item.title_tosource}}{{if $item.plink}}<a href="{{$item.plink.href}}" title="{{$item.title}} ({{$item.plink.title}})">{{/if}}{{/if}}{{$item.title}}{{if $item.title_tosource}}{{if $item.plink}}</a>{{/if}}{{/if}} </div> {{if ! $item.is_new}} <hr class="m-0"> {{/if}} {{/if}} - <div class="p-2 wall-item-head{{if $item.is_new && !$item.title && !$item.event && !$item.is_comment}} wall-item-head-new rounded-top{{/if}}"> + <div class="p-2 wall-item-head{{if $item.is_new && !$item.title && !$item.event && !$item.is_comment}} wall-item-head-new rounded-top{{/if}} clearfix"> <div class="wall-item-info" id="wall-item-info-{{$item.id}}" > <div class="wall-item-photo-wrapper{{if $item.owner_url}} wwfrom{{/if}} h-card p-author" id="wall-item-photo-wrapper-{{$item.id}}"> <a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-photo-link u-url" id="wall-item-photo-link-{{$item.id}}"><img src="{{$item.thumb}}" class="wall-item-photo{{$item.sparkle}} u-photo p-name" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" /></a> @@ -45,19 +45,22 @@ <div class="wall-item-ago" id="wall-item-ago-{{$item.id}}"> {{if $item.verified}}<i class="fa fa-check item-verified" title="{{$item.verified}}"></i> {{elseif $item.forged}}<i class="fa fa-exclamation item-forged" title="{{$item.forged}}"></i> {{/if}}{{if $item.location}}<span class="wall-item-location p-location" id="wall-item-location-{{$item.id}}">{{$item.location}}, </span>{{/if}}<span class="autotime" title="{{$item.isotime}}"><time class="dt-published" datetime="{{$item.isotime}}">{{$item.localtime}}</time>{{if $item.editedtime}} {{$item.editedtime}}{{/if}}{{if $item.expiretime}} {{$item.expiretime}}{{/if}}</span>{{if $item.editedtime}} <i class="fa fa-pencil"></i>{{/if}} {{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}} </div> - <div class="clear"></div> </div> {{if $item.body}} - <div class="p-2 wall-item-content" id="wall-item-content-{{$item.id}}"> + <div class="p-2 wall-item-content clearfix" id="wall-item-content-{{$item.id}}"> <div class="wall-item-body e-content" id="wall-item-body-{{$item.id}}" > {{$item.body}} </div> - <div class="clear"></div> </div> {{/if}} {{if $item.has_tags}} - <div class="p-2 wall-item-tools"> + <div class="p-2 wall-item-tools clearfix"> + + <div class="body-tags"> + <span class="tag">{{$item.mentions}}{{$item.tags}}{{$item.categories}}</span> + </div> + {{** {{if $item.mentions}} <div class="body-tags" id="item-mentions"> <span class="tag">{{$item.mentions}}</span> @@ -73,12 +76,12 @@ <span class="tag p-category">{{$item.categories}}</span> </div> {{/if}} + **}} {{if $item.folders}} <div class="body-tags" id="item-folders"> <span class="tag">{{$item.folders}}</span> </div> {{/if}} - <div class="clear"></div> </div> {{/if}} <div class="p-2 clearfix wall-item-tools"> diff --git a/view/tpl/item_categories.tpl b/view/tpl/item_categories.tpl index 9ff291747..e1b183c0d 100644 --- a/view/tpl/item_categories.tpl +++ b/view/tpl/item_categories.tpl @@ -1,8 +1,8 @@ {{if $categories}} -<div class="categorytags"> +<!--div class="categorytags"--> {{foreach $categories as $cat}} -<span class="item-category"><i class="fa fa-asterisk cat-icons"></i>{{if $cat.url}}<a href="{{$cat.url}}">{{$cat.term}}</a>{{else}}{{$cat.term}}{{/if}}</span> +<span class="item-category badge badge-pill badge-warning"><i class="fa fa-asterisk"></i> {{if $cat.url}}<a class="text-white" href="{{$cat.url}}">{{$cat.term}}</a>{{else}}{{$cat.term}}{{/if}}</span> {{/foreach}} -</div> +<!--/div--> {{/if}} |