Author: nick Date: 2006-06-15 15:55:54 +0100 (Thu, 15 Jun 2006) New Revision: 811
Modified: trunk/templates/display_metadata.tt trunk/templates/node.tt trunk/templates/node_history.tt trunk/templates/recent_changes.tt Log: Microformat fun - support hCard, hReview and geo microformats where possible
Modified: trunk/templates/display_metadata.tt =================================================================== --- trunk/templates/display_metadata.tt 2006-06-14 21:27:32 UTC (rev 810) +++ trunk/templates/display_metadata.tt 2006-06-15 14:55:54 UTC (rev 811) @@ -1,14 +1,16 @@ [% USE CGI %] <!-- METADATA STARTS -->
-<div id="metadata"> +<div id="metadata" class="vcard"> + <!--- For the vcard ---> + <span class="fn" style="display:none">[% node_name %]</span> [% IF phone OR fax OR address OR postcode OR formatted_website_text OR hours_text OR map_link %] <ul id="general_metadata">
[% IF phone %] <li class="telephone"> - <span class="metadata_label">Telephone:</span> [% CGI.escapeHTML(phone) %] + <span class="metadata_label">Telephone:</span> <span class="tel">[% CGI.escapeHTML(phone) %]</span> </li> [% END %] [% IF fax %] @@ -19,7 +21,7 @@ [% IF address %] <li class="address"> <span class="metadata_label">Address:</span> - [% CGI.escapeHTML(address) %]<!--, [% default_city %] --> [%# uncomment at left to show city %] + <span class="adr"><span class="street-address">[% CGI.escapeHTML(address) %]</span></span><!--, [% default_city %] --> [%# uncomment at left to show city %] [% IF map_link %] <a href="[% map_link %]">(map of this place)</a> [% END %] @@ -32,12 +34,12 @@ [% IF postcode %] <li class="postcode"> <span class="metadata_label">Postcode:</span> - [% CGI.escapeHTML(postcode) %] + <span class="adr"><span class="postal-code">[% CGI.escapeHTML(postcode) %]</span></span> </li> [% END %] [% IF formatted_website_text %] <li class="website_link"> - <span class="metadata_label">Website:</span> [% formatted_website_text %] + <span class="metadata_label">Website:</span> <span class="url">[% formatted_website_text %]</span> </li> [% END %] [% IF hours_text %] @@ -56,7 +58,7 @@ <li class="categories_list"> <span class="metadata_label">Categories:</span> [% FOREACH category = categories %] - <a href="[% category.url %]">[% category.name %]</a>[%- "," UNLESS loop.last %] + <a href="[% category.url %]" class="category">[% category.name %]</a>[%- "," UNLESS loop.last %] [% END %] </li> [% END %] @@ -65,7 +67,7 @@ <li class="locales_list"> <span class="metadata_label">Locales:</span> [% FOREACH locale = locales %] - <a href="[% locale.url %]">[% locale.name %]</a>[%- "," UNLESS loop.last %] + <a href="[% locale.url %]" class="addr locality">[% locale.name %]</a>[%- "," UNLESS loop.last %] [% END %] </li> [% END %]
Modified: trunk/templates/node.tt =================================================================== --- trunk/templates/node.tt 2006-06-14 21:27:32 UTC (rev 810) +++ trunk/templates/node.tt 2006-06-15 14:55:54 UTC (rev 811) @@ -3,7 +3,7 @@ [% INCLUDE banner.tt %] <div id="content"> [% INCLUDE navbar.tt %] -<div id="maincontent"> +<div id="maincontent" class="hreview"> [% IF oldid %] <div id="redirect_message">(redirected from <a href="[% full_cgi_url %]?id=[% oldid %];redirect=0">[% oldid.replace('_', ' ') %]</a>)</div> [% END %] @@ -14,7 +14,7 @@ //<![CDATA[ var map = new GMap(document.getElementById("map")); map.addControl(new GSmallMapControl()); - map.centerAndZoom(new GPoint([% longitude %], [% latitude %]), 3); + map.centerAndZoom(new GPoint([% wgs84_long %], [% wgs84_lat %]), 3); var point0 = new GPoint([% wgs84_long %], [% wgs84_lat %]); var marker0 = new GMarker(point0,baseIcon); GEvent.addListener(marker0, "click", function() { @@ -45,7 +45,9 @@ [% INCLUDE display_metadata.tt %]
<!-- NODE CONTENT STARTS --> +<div id="content_text" class="description"> [% content %] +</div> <!-- NODE CONTENT ENDS -->
[% TRY %] @@ -72,21 +74,34 @@ </div> [% END %] [% IF (latitude AND longitude) OR (os_x AND os_y) OR (osie_x AND osie_y) %] -<div id="coordinates"> +<div id="coordinates" class="geo"> [% END %] [% IF os_x AND os_y %] - <small>OS X co-ord: [% CGI.escapeHTML(os_x) %]</small> + <small>OS X co-ord: + <abbr class="osgb_x" title="[% CGI.escapeHTML(os_x) %]">[% CGI.escapeHTML(os_x) %]</abbr> + </small> - <small>OS Y co-ord: [% CGI.escapeHTML(os_y) %]</small> + <small>OS Y co-ord: + <abbr class="osgb_y" title="[% CGI.escapeHTML(os_y) %]">[% CGI.escapeHTML(os_y) %]</abbr> + </small> [% ELSIF osie_x AND osie_y %] - <small>OS IE X co-ord: [% CGI.escapeHTML(osie_x) %]</small> + <small>OS IE X co-ord: + <abbr class="osie_x" title="[% CGI.escapeHTML(osie_x) %]">[% CGI.escapeHTML(osie_x) %]</abbr> + </small> - <small>OS IE Y co-ord: [% CGI.escapeHTML(osie_y) %]</small> + <small>OS IE Y co-ord: + <abbr class="osie_y" title="[% CGI.escapeHTML(osie_y) %]">[% CGI.escapeHTML(osie_y) %]</abbr> + </small> [% END %] [% IF latitude AND longitude %] - <small>(Latitude: [% latitude %] Longitude: [% longitude %])</small> + <small> + (Latitude: + <abbr class="latitude" title="[% wgs84_lat %]">[% latitude %]</abbr> + Longitude: + <abbr class="longitude" title="[% wgs84_long %]">[% longitude %]</abbr>) + </small> [% END %] [% IF (latitude AND longitude) OR (os_x AND os_y) OR (osie_x AND osie_y)%] </div> @@ -111,7 +126,8 @@ <a href="[% cgi_url %]?id=[% node_param %];version=[% version - 1 %];diffversion=[% version %]">diff</a>). [% END %] [% ELSE %] - This is version [% version %] (as of [% last_modified %]). + This is version <span class="version">[% version %]</span> + (as of [% last_modified %]). <a href="[% cgi_url %]?[% node_param %]">View current version.</a> [% END %] [% IF version AND version > 1 %]
Modified: trunk/templates/node_history.tt =================================================================== --- trunk/templates/node_history.tt 2006-06-14 21:27:32 UTC (rev 810) +++ trunk/templates/node_history.tt 2006-06-15 14:55:54 UTC (rev 811) @@ -38,4 +38,11 @@ <a href="[% cgi_url %]?[% node_param %]">View current revision</a> </p>
+<p> + This list is available as a + <a href="[% cgi_url %]?action=list_all_versions;format=rss;id=[% node_param %]">rss feed</a> + and as an + <a href="[% cgi_url %]?action=list_all_versions;format=atom;id=[% node_param %]">atom feed</a>. +</p> + [% INCLUDE footer.tt %]
Modified: trunk/templates/recent_changes.tt =================================================================== --- trunk/templates/recent_changes.tt 2006-06-14 21:27:32 UTC (rev 810) +++ trunk/templates/recent_changes.tt 2006-06-15 14:55:54 UTC (rev 811) @@ -80,4 +80,11 @@ [% END %]
</div> + +<p> + This list is available as a + <a href="[% cgi_url %]?action=rc;format=rss">rss feed</a> + and as an + <a href="[% cgi_url %]?action=rc;format=atom">atom feed</a>. +</p> [% INCLUDE footer.tt %]
openguides-commits@lists.openguides.org