]> git.mxchange.org Git - friendica.git/commitdiff
Add response active support to vier theme
authorHypolite Petovan <ben.lort@gmail.com>
Sun, 25 Sep 2016 15:08:12 +0000 (11:08 -0400)
committerHypolite Petovan <ben.lort@gmail.com>
Sun, 25 Sep 2016 15:08:12 +0000 (11:08 -0400)
- Add active class to wall_thread.tpl, search_item.tpl, photo_item.tpl
- Add style
Note: because of an !important in the Dark variant stylesheet, the
active links won't show up

view/theme/vier/style.css
view/theme/vier/templates/photo_item.tpl
view/theme/vier/templates/search_item.tpl
view/theme/vier/templates/wall_thread.tpl

index d53c2f393f09504116eb740c5b31c6173a965a15..67bab16a1958b22e3e9112ddd8eefddabebfaabf 100644 (file)
@@ -1583,6 +1583,11 @@ section.minimal {
   margin-right: 1em;
   cursor: pointer;
 }
+.wall-item-container .wall-item-actions-social a.active,
+.wall-item-container .wall-item-actions-isevent a.active {
+       color: #36C;
+}
+
 .wall-item-container .wall-item-actions-tools {
   float: right;
   width: 80px;
@@ -1638,7 +1643,7 @@ section.minimal {
   max-width: calc(100% - 1px);
 }
 
-.children .wall-item-comment-wrapper textarea, 
+.children .wall-item-comment-wrapper textarea,
 .wall-item-container.thread_level_3 .wall-item-comment-wrapper textarea,
 .wall-item-container.thread_level_4 .wall-item-comment-wrapper textarea,
 .wall-item-container.thread_level_5 .wall-item-comment-wrapper textarea,
index 84783ae303bc272d6ec8bebdb5f097b98ccd18c2..bc77eaa9cd93ea182978902cd51ebb5552b01502 100644 (file)
@@ -8,7 +8,7 @@
                        </div>
                </div>
                <div class="wall-item-actions-author">
-                       <a href="{{$profile_url}}" target="redir" title="{{$linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$sparkle}}">{{$name}}</span></a> 
+                       <a href="{{$profile_url}}" target="redir" title="{{$linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$sparkle}}">{{$name}}</span></a>
                        <span class="wall-item-ago">
                                {{if $plink}}<a class="link" title="{{$plink.title}}" href="{{$plink.href}}" style="color: #999">{{$ago}}</a>{{else}} {{$ago}} {{/if}}
                                {{if $lock}}<span class="fakelink" style="color: #999" onclick="lockview(event,{{$id}});">{{$lock}}</span> {{/if}}
                </div>
                <div class="wall-item-actions">
 
-                       <div class="wall-item-location">{{$location}}&nbsp;</div>       
-                       
+                       <div class="wall-item-location">{{$location}}&nbsp;</div>
+
                        <div class="wall-item-actions-social">
                        {{if $star}}
                                <a href="#" id="star-{{$id}}" onclick="dostar({{$id}}); return false;"  class="{{$star.classdo}}"  title="{{$star.do}}">{{$star.do}}</a>
                                <a href="#" id="unstar-{{$id}}" onclick="dostar({{$id}}); return false;"  class="{{$star.classundo}}"  title="{{$star.undo}}">{{$star.undo}}</a>
                                <a href="#" id="tagger-{{$id}}" onclick="itemTag({{$id}}); return false;" class="{{$star.classtagger}}" title="{{$star.tagger}}">{{$star.tagger}}</a>
                        {{/if}}
-                       
+
                        {{if $vote}}
-                               <a href="#" id="like-{{$id}}" title="{{$vote.like.0}}" onclick="dolike({{$id}},'like'); return false">{{$vote.like.1}}</a>
-                               <a href="#" id="dislike-{{$id}}" title="{{$vote.dislike.0}}" onclick="dolike({{$id}},'dislike'); return false">{{$vote.dislike.1}}</a>
+                               <a href="#" id="like-{{$id}}"{{if $item.responses.like.self}} class="active"{{/if}} title="{{$vote.like.0}}" onclick="dolike({{$id}},'like'); return false">{{$vote.like.1}}</a>
+                               <a href="#" id="dislike-{{$id}}"{{if $item.responses.dislike.self}} class="active"{{/if}} title="{{$vote.dislike.0}}" onclick="dolike({{$id}},'dislike'); return false">{{$vote.dislike.1}}</a>
                        {{/if}}
-                                               
+
                        {{if $vote.share}}
                                <a href="#" id="share-{{$id}}" title="{{$vote.share.0}}" onclick="jotShare({{$id}}); return false">{{$vote.share.1}}</a>
-                       {{/if}}                 
+                       {{/if}}
                        </div>
-                       
+
                        <div class="wall-item-actions-tools">
 
                                {{if $drop.pagedrop}}
                                        <a class="icon edit s16" href="{{$edpost.0}}" title="{{$edpost.1}}"></a>
                                {{/if}}
                        </div>
-                       
+
                </div>
        </div>
        <div class="wall-item-bottom">
                <div class="wall-item-links"></div>
                <div class="wall-item-like" id="wall-item-like-{{$id}}">{{$like}}</div>
-               <div class="wall-item-dislike" id="wall-item-dislike-{{$id}}">{{$dislike}}</div>        
+               <div class="wall-item-dislike" id="wall-item-dislike-{{$id}}">{{$dislike}}</div>
        </div>
 </div>
index 73e37e5613deb499c3e359dcf8d2b02978675d1d..27ab78af2351af5d475dd217feef9cb9c6170afd 100644 (file)
@@ -2,7 +2,7 @@
 
 <div class="wall-item-decor">
        {{if $item.star}}<span class="icon star {{$item.isstarred}}" id="starred-{{$item.id}}" title="{{$item.star.starred}}">{{$item.star.starred}}</span>{{/if}}
-       {{if $item.lock}}<span class="icon lock fakelink" onclick="lockview(event,{{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}}   
+       {{if $item.lock}}<span class="icon lock fakelink" onclick="lockview(event,{{$item.id}});" title="{{$item.lock}}">{{$item.lock}}</span>{{/if}}
        <img id="like-rotator-{{$item.id}}" class="like-rotator" src="images/rotator.gif" alt="{{$item.wait}}" title="{{$item.wait}}" style="display: none;" />
 </div>
 
@@ -10,7 +10,7 @@
        <div class="wall-item-item">
                <div class="wall-item-info">
                        <div class="contact-photo-wrapper">
-                               <!-- onmouseover="if (typeof t{{$item.id}} != 'undefined') clearTimeout(t{{$item.id}}); openMenu('wall-item-photo-menu-button-{{$item.id}}')" 
+                               <!-- onmouseover="if (typeof t{{$item.id}} != 'undefined') clearTimeout(t{{$item.id}}); openMenu('wall-item-photo-menu-button-{{$item.id}}')"
                                onmouseout="t{{$item.id}}=setTimeout('closeMenu(\'wall-item-photo-menu-button-{{$item.id}}\'); closeMenu(\'wall-item-photo-menu-{{$item.id}}\');',200)"> -->
                                <!-- <a href="{{$item.profile_url}}" target="redir" title="{{$item.linktitle}}" class="wall-item-photo-link" id="wall-item-photo-link-{{$item.id}}"></a> -->
                                        <img src="{{$item.thumb}}" class="contact-photo{{$item.sparkle}}" id="wall-item-photo-{{$item.id}}" alt="{{$item.name}}" />
                                <ul role="menu" aria-haspopup="true" class="wall-item-menu menu-popup" id="wall-item-photo-menu-{{$item.id}}">
                                {{$item.item_photo_menu}}
                                </ul>
-                               
+
                        </div>
                </div>
                <div class="wall-item-actions-author">
-                       <a href="{{$item.profile_url}}" target="redir" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}">{{$item.name}}</span></a> 
+                       <a href="{{$item.profile_url}}" target="redir" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}">{{$item.name}}</span></a>
                        <span class="wall-item-ago">
                                {{if $item.plink}}<a class="link" title="{{$item.plink.title}}" href="{{$item.plink.href}}" style="color: #999">{{$item.ago}}</a>{{else}} {{$item.ago}} {{/if}}
                                {{if $item.lock}}<span class="fakelink" style="color: #999" onclick="lockview(event,{{$item.id}});">{{$item.lock}}</span> {{/if}}
                </div>
                <div class="wall-item-actions">
 
-                       <div class="wall-item-location">{{$item.location}}&nbsp;</div>  
-                       
+                       <div class="wall-item-location">{{$item.location}}&nbsp;</div>
+
                        <div class="wall-item-actions-social">
                        {{if $item.star}}
                                <a href="#" id="star-{{$item.id}}" onclick="dostar({{$item.id}}); return false;"  class="{{$item.star.classdo}}"  title="{{$item.star.do}}">{{$item.star.do}}</a>
                                <a href="#" id="unstar-{{$item.id}}" onclick="dostar({{$item.id}}); return false;"  class="{{$item.star.classundo}}"  title="{{$item.star.undo}}">{{$item.star.undo}}</a>
                                <a href="#" id="tagger-{{$item.id}}" onclick="itemTag({{$item.id}}); return false;" class="{{$item.star.classtagger}}" title="{{$item.star.tagger}}">{{$item.star.tagger}}</a>
                        {{/if}}
-                       
+
                        {{if $item.vote}}
-                               <a href="#" id="like-{{$item.id}}" title="{{$item.vote.like.0}}" onclick="dolike({{$item.id}},'like'); return false">{{$item.vote.like.1}}</a>
-                               <a href="#" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.0}}" onclick="dolike({{$item.id}},'dislike'); return false">{{$item.vote.dislike.1}}</a>
+                               <a href="#" id="like-{{$item.id}}"{{if $item.responses.like.self}} class="active"{{/if}} title="{{$item.vote.like.0}}" onclick="dolike({{$item.id}},'like'); return false">{{$item.vote.like.1}}</a>
+                               <a href="#" id="dislike-{{$item.id}}"{{if $item.responses.dislike.self}} class="active"{{/if}} title="{{$item.vote.dislike.0}}" onclick="dolike({{$item.id}},'dislike'); return false">{{$item.vote.dislike.1}}</a>
                        {{/if}}
-                                               
+
                        {{if $item.vote.share}}
                                <a href="#" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" onclick="jotShare({{$item.id}}); return false">{{$item.vote.share.1}}</a>
-                       {{/if}}                 
+                       {{/if}}
                        </div>
-                       
+
                        <div class="wall-item-actions-tools">
 
                                {{if $item.drop.pagedrop}}
                                        <a class="icon edit s16" href="{{$item.edpost.0}}" title="{{$item.edpost.1}}"></a>
                                {{/if}}
                        </div>
-                       
+
                </div>
        </div>
        <div class="wall-item-bottom">
                <div class="wall-item-links"></div>
                <div class="wall-item-like" id="wall-item-like-{{$item.id}}">{{$item.like}}</div>
-               <div class="wall-item-dislike" id="wall-item-dislike-{{$item.id}}">{{$item.dislike}}</div>      
+               <div class="wall-item-dislike" id="wall-item-dislike-{{$item.id}}">{{$item.dislike}}</div>
        </div>
 </div>
index 1f6032f4a55d1354f75484a438ae22ab59b3fb32..23adef340478f47a7036434178bbb0cc3157d129 100644 (file)
@@ -2,12 +2,12 @@
 {{if $mode == display}}
 {{else}}
 {{if $item.comment_firstcollapsed}}
-       {{if $item.thread_level<3}} 
+       {{if $item.thread_level<3}}
                <div class="hide-comments-outer">
-                       <span id="hide-comments-total-{{$item.id}}" 
+                       <span id="hide-comments-total-{{$item.id}}"
                                class="hide-comments-total">{{$item.num_comments}}</span>
-                       <span id="hide-comments-{{$item.id}}" 
-                               class="hide-comments fakelink" 
+                       <span id="hide-comments-{{$item.id}}"
+                               class="hide-comments fakelink"
                                onclick="showHideComments({{$item.id}});">{{$item.hide_text}}</span>
                </div>
                <div id="collapsed-comments-{{$item.id}}" class="collapsed-comments" style="display: none;">
@@ -36,7 +36,7 @@
                                <ul role="menu" aria-haspopup="true" class="contact-menu menu-popup" id="wall-item-photo-menu-{{$item.id}}">
                                {{$item.item_photo_menu}}
                                </ul>
-                               
+
                        </div>
                        {{if $item.owner_url}}
                        <div aria-hidden="true" class="contact-photo-wrapper mframe wwto" id="wall-item-ownerphoto-wrapper-{{$item.id}}" >
@@ -44,7 +44,7 @@
                                        <img src="{{$item.owner_photo}}" class="contact-photo {{$item.osparkle}} p-name u-photo" id="wall-item-ownerphoto-{{$item.id}}" alt="{{$item.owner_name}}" />
                                </a>
                        </div>
-                       {{/if}}                 
+                       {{/if}}
                </div>
                <div role="heading" aria-level="{{$item.thread_level}}" class="wall-item-actions-author">
                        <a href="{{$item.profile_url}}" target="redir" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}">{{$item.name}}</span></a>
@@ -81,7 +81,7 @@
                     <span class='category p-category'>{{$cat.name}}</a>{{if $cat.removeurl}} (<a href="{{$cat.removeurl}}" title="{{$remove}}">x</a>) {{/if}} </span>
                 {{/foreach}}
                </div>
-       </div>  
+       </div>
        <div class="wall-item-bottom">
                <div class="wall-item-links">
                        {{if $item.plink}}<a role="button" title="{{$item.plink.orig_title}}" href="{{$item.plink.orig}}"><i class="icon-link icon-large"><span class="sr-only">{{$item.plink.orig_title}}</span></i></a>{{/if}}
                        {{/if}}
 
                        {{if $item.isevent}}
-                               <a role="button" id="attendyes-{{$item.id}}" title="{{$item.attend.0}}" onclick="dolike({{$item.id}},'attendyes'); return false;"><i class="icon-ok icon-large"><span class="sr-only">{{$item.attend.0}}</span></i></a>
-                               <a role="button" id="attendno-{{$item.id}}" title="{{$item.attend.1}}" onclick="dolike({{$item.id}},'attendno'); return false;"><i class="icon-remove icon-large"><span class="sr-only">{{$item.attend.1}}</span></i></a>
-                               <a role="button" id="attendmaybe-{{$item.id}}" title="{{$item.attend.2}}" onclick="dolike({{$item.id}},'attendmaybe'); return false;"><i class="icon-question icon-large"><span class="sr-only">{{$item.attend.2}}</span></i></a>
+                               <a role="button" id="attendyes-{{$item.id}}"{{if $item.responses.attendyes.self}} class="active"{{/if}} title="{{$item.attend.0}}" onclick="dolike({{$item.id}},'attendyes'); return false;"><i class="icon-ok icon-large"><span class="sr-only">{{$item.attend.0}}</span></i></a>
+                               <a role="button" id="attendno-{{$item.id}}"{{if $item.responses.attendno.self}} class="active"{{/if}} title="{{$item.attend.1}}" onclick="dolike({{$item.id}},'attendno'); return false;"><i class="icon-remove icon-large"><span class="sr-only">{{$item.attend.1}}</span></i></a>
+                               <a role="button" id="attendmaybe-{{$item.id}}"{{if $item.responses.attendmaybe.self}} class="active"{{/if}} title="{{$item.attend.2}}" onclick="dolike({{$item.id}},'attendmaybe'); return false;"><i class="icon-question icon-large"><span class="sr-only">{{$item.attend.2}}</span></i></a>
                        {{/if}}
 
                        {{if $item.vote}}
                                {{if $item.vote.like}}
-                               <a role="button" id="like-{{$item.id}}" title="{{$item.vote.like.0}}" onclick="dolike({{$item.id}},'like'); return false"><i class="icon-thumbs-up icon-large"><span class="sr-only">{{$item.vote.like.0}}</span></i></a>
+                               <a role="button" id="like-{{$item.id}}"{{if $item.responses.like.self}} class="active"{{/if}} title="{{$item.vote.like.0}}" onclick="dolike({{$item.id}},'like'); return false"><i class="icon-thumbs-up icon-large"><span class="sr-only">{{$item.vote.like.0}}</span></i></a>
                                {{/if}}{{if $item.vote.dislike}}
-                               <a role="button" id="dislike-{{$item.id}}" title="{{$item.vote.dislike.0}}" onclick="dolike({{$item.id}},'dislike'); return false"><i class="icon-thumbs-down icon-large"><span class="sr-only">{{$item.vote.dislike.0}}</span></i></a>
+                               <a role="button" id="dislike-{{$item.id}}"{{if $item.responses.dislike.self}} class="active"{{/if}} title="{{$item.vote.dislike.0}}" onclick="dolike({{$item.id}},'dislike'); return false"><i class="icon-thumbs-down icon-large"><span class="sr-only">{{$item.vote.dislike.0}}</span></i></a>
                                {{/if}}
                            {{if $item.vote.share}}
                                    <a role="button" id="share-{{$item.id}}" title="{{$item.vote.share.0}}" onclick="jotShare({{$item.id}}); return false"><i class="icon-retweet icon-large"><span class="sr-only">{{$item.vote.share.0}}</span></i></a>
                                        <a role="button" href="{{$item.edpost.0}}" title="{{$item.edpost.1}}"><i class="icon-edit icon-large"><span class="sr-only">{{$item.edpost.1}}</span></i></a>
                                {{/if}}
                        </div>
-                       
+
                </div>
        </div>
        <div class="wall-item-bottom">
                                <div class="wall-item-{{$verb}}" id="wall-item-{{$verb}}-{{$item.id}}">{{$response.output}}</div>
                        {{/foreach}}
                {{/if}}
-               
+
        </div>
-       
+
        {{if $item.threaded}}{{if $item.comment}}
        <div class="wall-item-bottom">
                <div class="wall-item-links">