Changeset 22 in bookmarks for trunk/list.tt


Ignore:
Timestamp:
05/22/13 16:08:09 (11 years ago)
Author:
peter
Message:
  • construct the link attributes and hrefs in the BookmarkApp instead of in the template
  • render the @links array as a list instead of hardcoded paths using the tag_query value
  • display the links whether or not there are any tag parameters
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/list.tt

    r21 r22  
    2727    border-top: 6px solid #eee; 
    2828    border-bottom: 6px solid #eee; 
     29} 
     30.alternate-links { 
     31    margin: .5em .25em; 
     32} 
     33.alternate-links li { 
     34    display: inline; 
     35} 
     36.alternate-links li+li:before { 
     37    content: ' | '; 
     38    color: #ccc; 
    2939} 
    3040.refine { 
     
    101111      [%  END %] 
    102112    </ul> 
    103     [% IF search_tags.size %] 
    104     <!-- TODO: well-formatted query strings if there is no tag query --> 
    105       <p> 
    106         <a href="?[% tag_query %]">Link</a> &middot; 
    107         <a href="?[% tag_query %]&format=json" type="application/json">JSON</a> &middot; 
    108         <a href="?[% tag_query %]&format=xbel" type="application/xml">XBEL</a> &middot; 
    109         <a href="feed?[% tag_query %]" type="application/atom+xml">Atom</a> 
    110       </p> 
    111     [% END %] 
     113    <ul class="alternate-links"> 
     114      [% FOREACH link IN links %] 
     115        <li> 
     116          <a href="[% link.href.canonical %]" type="[% link.type %]" rel="[% link.rel %]">[% link.text %]</a> 
     117        </li> 
     118      [% END %] 
     119    </ul> 
    112120    <div class="refine"> 
    113121      <form method="get" action=""> 
Note: See TracChangeset for help on using the changeset viewer.