pricecharts

track prices of consumer electronics
Log | Files | Refs | README

commit d6aa7134c0fa7157d1977e512bfee9c14fdd01f5
parent a5a0d5cafb69a477041d5efe0112595eb4e84dc4
Author: Kyle Milz <kyle@getaddrinfo.net>
Date:   Thu, 19 Mar 2015 17:56:39 -0600

gen_static: pass some extra variables

Diffstat:
Mgen_static | 4+++-
Mtt/chart_list.tt | 3++-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/gen_static b/gen_static @@ -89,7 +89,9 @@ sub gen_link_page scalar @$part_nums) if ($args{v}); my $vars = { - name => $dir_prefix, + name => $result, + name_lc => $result_lc, + num_products => scalar @$part_nums, products => $part_nums, }; $template->process("chart_list.tt", $vars, diff --git a/tt/chart_list.tt b/tt/chart_list.tt @@ -1,5 +1,6 @@ [% WRAPPER wrapper.tt %] - <h1>[% name %]</h1> + <h1><img class="logo" src="/logo/[% name_lc %].svg"></img> + ([% num_products %] total)</h1> [% FOREACH part_num IN products %] <div class="product"> <img class="logo_small" src="/logo/[% part_num.1 %].svg"></img>