Compare commits

..

No commits in common. "73dd71f2f0bf9f6e772b656c00acfd11f0e6ed6c" and "eedd954a11a597f22910278ff6f388d65c4f9082" have entirely different histories.

3 changed files with 13 additions and 23 deletions

View File

@ -4,27 +4,27 @@
<!--% PERL %-->
$Template::Stash::PRIVATE = undef; # Allow . in tag
<!--% END %-->
<!--% USE String %-->
<!--% uniq_tag_count = 0 %-->
<!--% comma_re = '(?x)(?:^|,\s*)(?:"((?>[^"]*)(?:""[^"]*)*)"|([^",]*))'; %-->
<!--# 'Moka5,interview, "computer science"' -->
<!--% FOREACH episode IN DBI.query(query_tags);
ep_id = episode.id;
ep_tags = episode.tags;
FOREACH tag_str IN ep_tags.csv_parse;
FOREACH tag_str IN ep_tags.split(comma_re);
NEXT UNLESS tag_str;
NEXT IF tag_str == '';
tag = tag_str.lower;
tag_index = String.new(tag).push('_');
first_char = tag.substr(0,1);
IF first_char == '.';
first_char = '&#x0002E;'; # Unicode .
END;
IF all_tags.${first_char}.exists(tag_index);
all_tags.${first_char}.${tag_index}.count = all_tags.${first_char}.${tag_index}.count + 1;
all_tags.${first_char}.${tag_index}.urls.push(ep_id);
IF all_tags.${first_char}.exists(tag);
all_tags.${first_char}.${tag}.count = all_tags.${first_char}.${tag}.count + 1;
all_tags.${first_char}.${tag}.urls.push(ep_id);
ELSE;
all_tags.${first_char}.${tag_index}.count = 1;
all_tags.${first_char}.${tag}.count = 1;
uniq_tag_count = uniq_tag_count + 1;
all_tags.${first_char}.${tag_index}.urls = [ep_id];
all_tags.${first_char}.${tag}.urls = [ep_id];
END;
END;
END %-->
@ -53,7 +53,7 @@ END %-->
<ul class="columns3">
<!--% FOREACH first_char IN all_first %-->
<!--% IF all_tags.${first_char} %-->
<li><a href="<!--% absolute_path(baseurl) %-->tags.html#<!--% tag_to_id(String.new(all_tags.${first_char}.keys.sort.first).chop) %-->"><strong><!--% first_char %--></strong></a></li>
<li><a href="<!--% absolute_path(baseurl) %-->tags.html#<!--% all_tags.${first_char}.keys.sort.first %-->"><strong><!--% first_char %--></strong></a></li>
<!--% END %-->
<!--% END %-->
</ul>
@ -63,12 +63,11 @@ END %-->
<p class="ralign"><a href="<!--% absolute_path(baseurl) %-->tags.html#TOP">&UpArrow; Go to index</a></p>
<h3>Tags beginning with '<!--% first_char %-->'</h3>
<ul>
<!--% FOREACH tag_index IN all_tags.${first_char}.keys.sort %-->
<!--% tag = String.new(tag_index).chop; tag_id = String.new(tag_index).chop; %-->
<!--% FOREACH tag IN all_tags.${first_char}.keys.sort %-->
<li>
<a id="<!--% tag_to_id(tag_id) %-->"><strong><!--% tag %--></strong></a>:
<a id="<!--% tag %-->"><strong><!--% tag %--></strong></a>:
<!--% ep_links = [] %-->
<!--% FOREACH ep_id IN all_tags.${first_char}.${tag_index}.urls.nsort;
<!--% FOREACH ep_id IN all_tags.${first_char}.${tag}.urls.nsort;
ep_links.push("<a href=\"${absolute_path(baseurl)}eps/hpr" _ zero_pad_left(ep_id) _ '/index.html"'
' target="_blank" aria-label="' _ tag _
' - show ' _ ep_id _ '">' _ ep_id _ '</a>');

View File

@ -14,7 +14,7 @@ from the series <em><a href="<!--% baseurl %-->series/<!--% zero_pad_left(series
<!--% MACRO display_tags(tags) BLOCK %-->
<span><label>Tags:</label> <em>
<!--% FOREACH tag IN tags.csv_parse %-->
<a href="<!--% absolute_path(baseurl) %-->tags.html#<!--% tag_to_id(tag) %-->"><!--% tag %--></a><!--% IF loop.count == loop.size %-->.<!--% ELSE %-->,<!--% END %-->
<a href="<!--% absolute_path(baseurl) %-->tags.html#<!--% tag.lower %-->"><!--% tag %--></a><!--% IF loop.count == loop.size %-->.<!--% ELSE %-->,<!--% END %-->
<!--% END %--></em>
</span>
<!--% END %-->

View File

@ -49,15 +49,6 @@
<!--% iso8601_date.format(date_to_format) %-->
<!--% END %-->
<!--% MACRO tag_to_id(tag, is_index) BLOCK %-->
<!--% tag = tag.replace('\s+','_') %-->
<!--% IF is_index %-->
<!--% tag.upper %-->
<!--% ELSE %-->
<!--% tag.lower %-->
<!--% END %-->
<!--% END %-->
<!--% MACRO absolute_url(base, path) BLOCK %-->
<!--% UNLESS base.empty %-->
<!--% UNLESS base.substr(-1) == '/' %-->