style hashtags, mentions and categories. hide expand-aside button if not needed. css and class fixes

This commit is contained in:
Mario Vavti 2017-03-15 16:42:55 +01:00
parent 0c74c79b18
commit aa33cacb62
10 changed files with 35 additions and 43 deletions

View File

@ -1460,10 +1460,7 @@ function format_hashtags(&$item) {
if(strpos($item['body'], $t['url'])) if(strpos($item['body'], $t['url']))
continue; continue;
if($s) $s .= '<span class="badge badge-pill badge-info"><i class="fa fa-hashtag"></i>&nbsp;<a class="text-white" href="' . zid($t['url']) . '" >' . $term . '</a></span> ';
$s .= '&nbsp';
$s .= '#<a href="' . zid($t['url']) . '" >' . $term . '</a>';
} }
} }
@ -1484,10 +1481,7 @@ function format_mentions(&$item) {
if(strpos($item['body'], $t['url'])) if(strpos($item['body'], $t['url']))
continue; continue;
if($s) $s .= '<span class="badge badge-pill badge-success"><i class="fa fa-at"></i>&nbsp;<a class="text-white" href="' . zid($t['url']) . '" >' . $term . '</a></span> ';
$s .= '&nbsp';
$s .= '@<a href="' . zid($t['url']) . '" >' . $term . '</a>';
} }
} }

View File

@ -1480,12 +1480,12 @@ function widget_forums($arr) {
if($r1) { if($r1) {
$o .= '<div class="widget">'; $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) { foreach($r1 as $rr) {
if($unseen && (! intval($rr['unseen']))) if($unseen && (! intval($rr['unseen'])))
continue; 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>'; $o .= '</ul></div>';
} }
@ -1537,10 +1537,10 @@ function widget_activity($arr) {
if($arr) { if($arr) {
$o .= '<div class="widget">'; $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) { 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>'; $o .= '</ul></div>';
} }
@ -1582,7 +1582,7 @@ function widget_helpindex($arr) {
if(! $level_0) if(! $level_0)
$level_0 = get_help_content('toc'); $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(); $levels = array();
@ -1595,7 +1595,7 @@ function widget_helpindex($arr) {
if(! $y) if(! $y)
$y = get_help_content($path . 'toc'); $y = get_help_content($path . 'toc');
if($y) 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);
} }
} }

View File

@ -90,10 +90,6 @@
/* conv_item */ /* conv_item */
.wall-item-head {
line-height: 1.2;
}
.wall-item-head-new { .wall-item-head-new {
border-top: 3px solid #0275d8; border-top: 3px solid #0275d8;
} }
@ -122,6 +118,7 @@ a.wall-item-name-link {
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.wall-item-ago,
.wall-item-ago i { .wall-item-ago i {
font-size: 0.75rem; font-size: 0.75rem;
} }
@ -151,10 +148,6 @@ a.wall-item-name-link {
word-wrap: break-word; word-wrap: break-word;
} }
.body-tags {
margin-top: 5px;
}
.item-tool { .item-tool {
cursor: pointer; cursor: pointer;
} }

View File

@ -1,7 +1,3 @@
.mail-conv-detail {
line-height: 1.2;
}
.mail-conv-sender { .mail-conv-sender {
float: left; float: left;
margin-right: 10px; margin-right: 10px;

View File

@ -1292,7 +1292,7 @@ img.mail-conv-sender-photo {
} }
.wall-item-footer { .wall-item-footer {
font-size: $body_font_size; font-size: 0.75rem;
margin-top: 2em; margin-top: 2em;
} }
@ -1367,8 +1367,7 @@ img.mail-conv-sender-photo {
.mail-conv-body, .mail-conv-body,
.page-body, .page-body,
.chat-item-text, .chat-item-text,
.chat-item-text-self, .chat-item-text-self {
#doco-content {
font-size: $font_size; font-size: $font_size;
clear: both; clear: both;
} }

View File

@ -16,6 +16,8 @@ $(document).ready(function() {
} }
$('#css3-calc').remove(); // Remove the test element $('#css3-calc').remove(); // Remove the test element
if($(window).width() > 767) { if($(window).width() > 767) {
$('#left_aside_wrapper').stick_in_parent({ $('#left_aside_wrapper').stick_in_parent({
offset_top: $('nav').outerHeight(true) + 10, 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); $('#expand-aside').on('click', toggleAside);
$('section').on('click', function() { $('section').on('click', function() {

View File

@ -134,11 +134,11 @@ if (! $shadow)
if (! $converse_width) if (! $converse_width)
$converse_width = '790'; $converse_width = '790';
if(! $top_photo) if(! $top_photo)
$top_photo = '2.2rem'; $top_photo = '2.3rem';
if(! $comment_indent) if(! $comment_indent)
$comment_indent = '0px'; $comment_indent = '0px';
if(! $reply_photo) if(! $reply_photo)
$reply_photo = '2.2rem'; $reply_photo = '2.3rem';
if($nav_min_opacity === false || $nav_min_opacity === '') { if($nav_min_opacity === false || $nav_min_opacity === '') {
$nav_float_min_opacity = 1.0; $nav_float_min_opacity = 1.0;
$nav_percent_min_opacity = 100; $nav_percent_min_opacity = 100;

View File

@ -5,8 +5,8 @@
{{/foreach}} {{/foreach}}
</ul> </ul>
</div> </div>
<div class="hidden-md-up dropdown clearfix" style="position:fixed; right:7px; top:4.5rem; z-index:1020"> <div class="hidden-md-up dropup clearfix" style="position:fixed; right:7px; bottom:2rem; z-index:1020">
<button type="button" class="btn btn-outline-secondary btn-sm float-right" data-toggle="dropdown"> <button type="button" class="btn btn-outline-success btn-sm float-right" data-toggle="dropdown">
<i class="fa fa-bars"></i> <i class="fa fa-bars"></i>
</button> </button>
<div class="dropdown-menu dropdown-menu-right"> <div class="dropdown-menu dropdown-menu-right">

View File

@ -19,14 +19,14 @@
</div> </div>
{{/if}} {{/if}}
{{if $item.title && !$item.event}} {{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}} {{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> </div>
{{if ! $item.is_new}} {{if ! $item.is_new}}
<hr class="m-0"> <hr class="m-0">
{{/if}} {{/if}}
{{/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-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}}"> <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> <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}}"> <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>&nbsp;{{elseif $item.forged}}<i class="fa fa-exclamation item-forged" title="{{$item.forged}}"></i>&nbsp;{{/if}}{{if $item.location}}<span class="wall-item-location p-location" id="wall-item-location-{{$item.id}}">{{$item.location}},&nbsp;</span>{{/if}}<span class="autotime" title="{{$item.isotime}}"><time class="dt-published" datetime="{{$item.isotime}}">{{$item.localtime}}</time>{{if $item.editedtime}}&nbsp;{{$item.editedtime}}{{/if}}{{if $item.expiretime}}&nbsp;{{$item.expiretime}}{{/if}}</span>{{if $item.editedtime}}&nbsp;<i class="fa fa-pencil"></i>{{/if}}&nbsp;{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}} {{if $item.verified}}<i class="fa fa-check item-verified" title="{{$item.verified}}"></i>&nbsp;{{elseif $item.forged}}<i class="fa fa-exclamation item-forged" title="{{$item.forged}}"></i>&nbsp;{{/if}}{{if $item.location}}<span class="wall-item-location p-location" id="wall-item-location-{{$item.id}}">{{$item.location}},&nbsp;</span>{{/if}}<span class="autotime" title="{{$item.isotime}}"><time class="dt-published" datetime="{{$item.isotime}}">{{$item.localtime}}</time>{{if $item.editedtime}}&nbsp;{{$item.editedtime}}{{/if}}{{if $item.expiretime}}&nbsp;{{$item.expiretime}}{{/if}}</span>{{if $item.editedtime}}&nbsp;<i class="fa fa-pencil"></i>{{/if}}&nbsp;{{if $item.app}}<span class="item.app">{{$item.str_app}}</span>{{/if}}
</div> </div>
<div class="clear"></div>
</div> </div>
{{if $item.body}} {{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}}" > <div class="wall-item-body e-content" id="wall-item-body-{{$item.id}}" >
{{$item.body}} {{$item.body}}
</div> </div>
<div class="clear"></div>
</div> </div>
{{/if}} {{/if}}
{{if $item.has_tags}} {{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}} {{if $item.mentions}}
<div class="body-tags" id="item-mentions"> <div class="body-tags" id="item-mentions">
<span class="tag">{{$item.mentions}}</span> <span class="tag">{{$item.mentions}}</span>
@ -73,12 +76,12 @@
<span class="tag p-category">{{$item.categories}}</span> <span class="tag p-category">{{$item.categories}}</span>
</div> </div>
{{/if}} {{/if}}
**}}
{{if $item.folders}} {{if $item.folders}}
<div class="body-tags" id="item-folders"> <div class="body-tags" id="item-folders">
<span class="tag">{{$item.folders}}</span> <span class="tag">{{$item.folders}}</span>
</div> </div>
{{/if}} {{/if}}
<div class="clear"></div>
</div> </div>
{{/if}} {{/if}}
<div class="p-2 clearfix wall-item-tools"> <div class="p-2 clearfix wall-item-tools">

View File

@ -1,8 +1,8 @@
{{if $categories}} {{if $categories}}
<div class="categorytags"> <!--div class="categorytags"-->
{{foreach $categories as $cat}} {{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>&nbsp;{{if $cat.url}}<a class="text-white" href="{{$cat.url}}">{{$cat.term}}</a>{{else}}{{$cat.term}}{{/if}}</span>
{{/foreach}} {{/foreach}}
</div> <!--/div-->
{{/if}} {{/if}}