pricecharts

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

commit e5e56f2bc55a966e0bc1413721a012ae88ce4509
parent 6116f0017252dc0ab7b885d9a59499b8ebbd73c9
Author: Kyle Milz <kyle@getaddrinfo.net>
Date:   Fri, 17 Apr 2015 20:50:28 -0600

initial steps toward a better looking ui

Diffstat:
MPriceChart.pm | 11++++++++++-
Mgen_html | 144++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------
Mgen_svg | 11+----------
Mlogo/best buy.svg | 73+++++++++++++++++++++++++++++++------------------------------------------
Dlogo/crucial.svg | 136-------------------------------------------------------------------------------
Mlogo/lenovo.svg | 104+++++++++++++++++++++++++++++++++----------------------------------------------
Mpricechart.css | 46+++++++++++++++++++++++++++++++++++++++++-----
Mtt/chart_list.tt | 7+++----
Att/coarse_list.tt | 49+++++++++++++++++++++++++++++++++++++++++++++++++
Dtt/link_list.tt | 23-----------------------
Mtt/wrapper.tt | 6------
11 files changed, 273 insertions(+), 337 deletions(-)

diff --git a/PriceChart.pm b/PriceChart.pm @@ -5,7 +5,7 @@ use File::Path qw(make_path); use Exporter; @ISA = ("Exporter"); -@EXPORT = qw(get_config get_dom get_log get_dbh trunc_line new_ua make_path); +@EXPORT = qw(get_config get_dom get_log get_dbh trunc_line new_ua make_path spin); sub get_config @@ -162,4 +162,13 @@ sub trunc_line return $chopped . "..."; } +my $state = 0; +sub spin +{ + my @spin_states = ("-", "\\", "|", "/"); + + print "\b"; + print $spin_states[++$state % 4]; +} + 1; diff --git a/gen_html b/gen_html @@ -4,8 +4,11 @@ use strict; use warnings; use Config::Grammar; -use Getopt::Std; +use Data::Dumper; use File::Copy; +use Getopt::Std; +use Lingua::EN::Inflect qw(PL); +use POSIX qw(ceil); use PriceChart; use Template; use Time::Piece; @@ -32,56 +35,80 @@ my $template = Template->new($config) || die "template: . " . Template->error() . "\n"; # -# manufacturers/* +# manufacturers # -my $sql = "select distinct lower(manufacturer) from products"; -my $manufacturers = $dbh->selectall_arrayref($sql); - -my ($num_manuf, $manufacturer_indexed) = (scalar @$manufacturers, 0); -print "info: gen manufacturers/ " if ($args{v}); -for (@$manufacturers) { - my ($manufacturer) = @$_; - - # merge manufacturers that are spelled the same except for casing +my $sql = "select distinct lower(manufacturer) from prices group by manufacturer " . + "having count(distinct part_num) > 1"; +my $manufacturers = $dbh->selectcol_arrayref($sql); + +my ($num_manuf, %summary, %logo_file) = (scalar @$manufacturers, (), ()); +print "info: manufacturers " if ($args{v}); +for my $manufacturer (@$manufacturers) { + spin() if ($args{v}); + + # logo graphic can have many extensions + my ($logo_file) = glob("$work_dir/logo/\"$manufacturer\".*"); + if ($logo_file) { + $logo_file = substr($logo_file, rindex($logo_file, "/") + 1); + $logo_file{$manufacturer} = $logo_file; + } + + # take a risk and choose the first manufacturer as the proper spelling $sql = "select manufacturer from products where lower(manufacturer) = ?"; my ($manufacturer_cased) = $dbh->selectrow_array($sql, undef, $manufacturer); - # must have at least one price - $sql = "select distinct manufacturer, part_num from prices where " . - "lower(manufacturer) = ?"; - my $products = $dbh->selectall_arrayref($sql, undef, $manufacturer); - $_->[2] = get_description($_->[0], $_->[1]) for (@$products); - - my $vars = { - name => $manufacturer_cased, num => scalar @$products, - products => $products, - }; - $template->process("chart_list.tt", $vars, - "manufacturers/$manufacturer.html") - || die "template: " . $template->error() . "\n"; - - $manufacturer_indexed += @$products; - $_->[1] = scalar @$products; + # must have at least one price to show up from this + $sql = qq{select distinct products.type from prices, products where + prices.part_num = products.part_num and + lower(prices.manufacturer) = lower(products.manufacturer) and + lower(prices.manufacturer) = ?}; + my $types = $dbh->selectcol_arrayref($sql, undef, $manufacturer); + + # show product charts categorized first by type and then manufacturer + for my $type (sort @$types) { + $sql = qq{select distinct manufacturer, part_num + from products where type = ? and + lower(manufacturer) = ?}; + my $products = $dbh->selectall_arrayref($sql, undef, $type, $manufacturer); + $_->[2] = get_description($_->[0], $_->[1]) for (@$products); + + my $n = scalar @$products; + $type = PL($type, $n); + my $type_link = lc($type); + $type_link =~ s/ /_/; + + $summary{$manufacturer}{$type}{num} = $n; + $summary{$manufacturer}{$type}{link} = "$manufacturer/$type_link"; + + my $vars = { + name => $manufacturer_cased, type => $type, + products => $products, logo_file => $logo_file, num => $n + }; + $template->process("chart_list.tt", $vars, + "manufacturers/$manufacturer/$type_link.html") + || die "template: " . $template->error() . "\n"; + } } -print "$num_manuf pages, $manufacturer_indexed indexed\n" if ($args{v}); +print "\n" if ($args{v}); -# -# manufacturers.html -# -print "info: gen manufacturers.html\n" if ($args{v}); - -# sort by total number of products -my @manuf_sorted = sort {$b->[1] <=> $a->[1]} @$manufacturers; -my $vars = { name => "Manufacturers", num => $num_manuf, links => \@manuf_sorted }; -$template->process("link_list.tt", $vars, "manufacturers.html") +my $vars = { name => "Manufacturers", list => \%summary, logo_file => \%logo_file }; +$template->process("coarse_list.tt", $vars, "manufacturers.html") || die "template: " . $template->error() . "\n"; +exit; + # # retailers/* # $sql = "select distinct retailer from prices"; my $retailers = $dbh->selectall_arrayref($sql); +$sql = qq{select count(distinct products.part_num), products.type + from products, prices where products.part_num = prices.part_num and + lower(products.manufacturer) = lower(prices.manufacturer) and + prices.retailer = ? group by products.type}; +my $retailer_types_sth = $dbh->prepare($sql); + my ($num_retailers, $retailer_indexed) = (scalar @$retailers, 0); print "info: gen retailers/ " if ($args{v}); for (@$retailers) { @@ -99,9 +126,21 @@ for (@$retailers) { }; $template->process("chart_list.tt", $vars, "retailers/$retailer_lc.html") || die "template: " . $template->error() . "\n"; - $retailer_indexed += @$products; - $_->[1] = scalar @$products; + + $retailer_types_sth->execute($retailer); + + $_->[1] = ""; + my $first = 1; + while (my ($count, $type) = $retailer_types_sth->fetchrow_array()) { + $_->[1] .= ", " unless ($first); + $_->[1] .= "$count " . PL($type, $count); + $first = 0; + } + + # need to quote manufacturer, knock off entire path after + my ($logo_path) = glob("$work_dir/logo/\"$retailer_lc\".*"); + $_->[2] = substr($logo_path, rindex($logo_path, "/") + 1); } print "$num_retailers pages, $retailer_indexed indexed\n" if ($args{v}); @@ -109,9 +148,7 @@ print "$num_retailers pages, $retailer_indexed indexed\n" if ($args{v}); # retailers.html # print "info: gen retailers.html\n" if ($args{v}); - -my @retailers_sorted = sort {$b->[1] <=> $a->[1]} @$retailers; -$vars = { name => "Retailers", num => $num_retailers, links => \@retailers_sorted }; +$vars = { name => "Retailers", links => $retailers }; $template->process("link_list.tt", $vars, "retailers.html") || die "template: " . $template->error() . "\n"; @@ -149,7 +186,7 @@ print "$num_types pages, $type_indexed indexed\n" if ($args{v}); print "info: gen product_types.html\n" if ($args{v}); my @types_sorted = sort {$b->[1] <=> $a->[1]} @$product_types; -$vars = { name => "Product_Types", num => $num_types, links => \@types_sorted }; +$vars = { name => "Product_Types", links => \@types_sorted }; $template->process("link_list.tt", $vars, "product_types.html") || die "template: " . $template->error() . "\n"; @@ -177,9 +214,10 @@ while (my ($part_num, $row) = each %$products) { # get a list of products added within the last week $sql = "select manufacturer, part_num from products where first_seen > ?"; my $news = $dbh->selectall_arrayref($sql, undef, time - (7 * 24 * 60 * 60)); +splice @$news, 20; -$sql = "select manufacturer, part_num from products where last_seen > ?"; -my $upds = $dbh->selectall_arrayref($sql, undef, time - (2 * 60 * 60)); +$sql = "select manufacturer, part_num from products where last_seen > ? order by last_seen"; +my $upds = $dbh->selectall_arrayref($sql, undef, time - (1 * 60 * 60)); # # index.html @@ -203,8 +241,16 @@ sub get_description "manufacturer = ? and part_num = ? order by date"; my $descriptions = $dbh->selectcol_arrayref($sql, undef, $manufacturer, $part_num); - - # for now just return the first one ever scraped - # XXX: leaving as is for cool future improvements (string interpolation!) - return $descriptions->[0]; + unless (@$descriptions) { + print "error: no descriptions for $manufacturer $part_num\n"; + } + + # pick the shortest non-zero description + my $best = $descriptions->[0]; + for (@$descriptions) { + next if ($_ eq ""); + $best = $_ if (length($_) < length($best)); + } + + return $best; } diff --git a/gen_svg b/gen_svg @@ -23,7 +23,7 @@ my $svg_dir = $cfg->{http}{chroot} . $cfg->{http}{htdocs} . "/svg"; # we don't output svg's when -n is given print "info: output dir is $svg_dir\n" if ($args{v} && !$args{n}); -my ($left, $center, $right, $top, $middle, $bottom) = (10, 950, 40, 15, 150, 20); +my ($left, $center, $right, $top, $middle, $bottom) = (3, 957, 40, 15, 150, 20); my $width = $right + $center + $left; my $height = $top + $middle + $bottom; @@ -221,15 +221,6 @@ if ($args{v}) { $dbh->disconnect(); -my $state = 0; -sub spin -{ - my @spin_states = ("-", "\\", "|", "/"); - - print "\b"; - print $spin_states[++$state % 4]; -} - sub catmullrom_to_bezier { my $pts_ref = shift; diff --git a/logo/best buy.svg b/logo/best buy.svg @@ -1,42 +1,30 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> -<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" - width="300px" height="223.76px" viewBox="-76.006 558.537 300 223.76" enable-background="new -76.006 558.537 300 223.76" - xml:space="preserve"> -<path fill="#010101" d="M18.726,598.938l-43.586,34.055l-4.878,51.686l36.158,42.294l159.266,14.924l12.041-127.77L18.726,598.938z - M-14.094,665.54c-2.451-0.232-4.248-2.418-4.017-4.869c0.24-2.452,2.419-4.249,4.87-4.017c2.451,0.23,4.248,2.409,4.016,4.869 - C-9.456,663.975-11.634,665.772-14.094,665.54z"/> -<path fill="#F6EB16" d="M19.761,601.836l-42.004,32.481l-4.862,49.326l34.858,40.457l155.587,14.89l11.479-122.263L19.761,601.836z - M-6.649,661.764c-0.365,3.884-3.809,6.726-7.686,6.36c-3.883-0.372-6.725-3.818-6.361-7.702c0.374-3.875,3.819-6.717,7.703-6.352 - C-9.117,654.442-6.276,657.887-6.649,661.764z"/> -<polygon fill="#010101" points="49.501,628.554 84.698,631.916 83.687,642.458 67.836,640.943 67.514,644.338 81.974,645.722 - 81.046,655.387 66.668,654.021 66.305,657.854 82.511,659.403 81.551,669.424 46.097,666.027 "/> -<path fill="#010101" d="M89.948,657.034l-6.659,9.823c0,0,8.365,4.496,19.969,5.506c11.585,1.027,20.083-2.294,22.808-7.841 - c2.732-5.533-0.539-11.829-5.905-13.574c-5.374-1.739-14.692-3.595-13.723-5.442c0.97-1.838,6.817-1.458,10.369,0.026 - c3.553,1.482,4.522,2.367,4.522,2.367l6.112-8.736c0,0-6.493-4.754-18.644-5.476c-12.157-0.72-21.093,5.368-21.714,11.023 - c-0.629,5.657,3.006,8.994,8.53,11.016c0,0,4.688,1.508,8.223,2.277c3.528,0.779,5.772,3.104,1.557,3.934 - C101.178,662.766,92.507,659.651,89.948,657.034z"/> -<polygon fill="#010101" points="138.322,649.434 127.961,648.446 129.121,636.247 169.022,640.057 167.863,652.256 157.494,651.263 - 155.076,676.612 136.161,674.808 "/> -<path fill="#010101" d="M52.441,671.387l18.31,1.656l-1.946,21.268c0,0-1.806,5.102,4.29,5.688c6.104,0.582,5.831-4.901,5.831-4.901 - l2.004-20.995l18.385,1.757l-2.36,24.745c0,0-2.169,13.508-24.654,11.362c-22.477-2.145-22.17-16.356-22.17-16.356L52.441,671.387z" - /> -<polygon fill="#010101" points="120.4,677.88 125.651,688.224 132.426,679.031 153.768,681.06 133.858,700.786 132.318,716.902 - 113.593,715.113 115.101,699.263 99.133,675.933 "/> -<path fill="#010101" d="M40.623,688.737c0,0,7.711-1.516,7.513-9.393c-0.199-7.884-15.935-9.838-15.935-9.838l-25.972-2.575 - l-3.544,37.606c0,0,20.729,2.179,26.765,2.667c6.038,0.479,18.204-0.034,19.405-7.811C50.047,691.611,40.623,688.737,40.623,688.737 - z M22.892,677.972c0,0,7.976-0.737,7.537,3.005c-0.447,3.734-8.025,2.047-8.025,2.047L22.892,677.972z M21.227,697.15l0.415-6.111 - c0,0,9.971-0.373,9.647,3.909C30.966,699.229,21.227,697.15,21.227,697.15z"/> -<path fill="#010101" d="M36.83,645.647c0,0,7.711-1.516,7.512-9.393c-0.199-7.874-15.934-9.846-15.934-9.846l-25.98-2.567 - l-3.536,37.606c0,0,20.729,2.18,26.758,2.659c6.037,0.497,18.203-0.024,19.404-7.803C46.254,648.521,36.83,645.647,36.83,645.647z - M19.256,634.98c0,0,7.984-0.729,7.544,3.006c-0.447,3.734-8.024,2.045-8.024,2.045L19.256,634.98z M17.6,654.17l0.414-6.121 - c0,0,9.962-0.364,9.648,3.917C27.339,656.239,17.6,654.17,17.6,654.17z"/> -<path fill="#010101" d="M153.909,684.753c0.157-1.664,1.64-2.89,3.305-2.732c1.664,0.157,2.898,1.647,2.741,3.313 - c-0.157,1.664-1.648,2.891-3.313,2.733C154.977,687.9,153.751,686.418,153.909,684.753z M159.208,685.258 - c0.141-1.415-0.786-2.534-2.045-2.649c-1.267-0.125-2.386,0.805-2.517,2.212c-0.141,1.415,0.786,2.532,2.045,2.657 - C157.958,687.595,159.076,686.675,159.208,685.258z M155.929,683.205l1.267,0.123c0.829,0.075,1.242,0.407,1.176,1.127 - c-0.058,0.588-0.422,0.837-0.986,0.837l0.778,1.581l-0.662-0.058l-0.737-1.565l-0.389-0.032l-0.142,1.473l-0.637-0.058 - L155.929,683.205z M156.426,684.729l0.555,0.059c0.38,0.033,0.711,0.016,0.753-0.448c0.042-0.396-0.315-0.496-0.646-0.528 - l-0.571-0.06L156.426,684.729z"/> -</svg> +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generator: Adobe Illustrator 12.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 51448) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [ + <!ENTITY ns_svg "http://www.w3.org/2000/svg"> + <!ENTITY ns_xlink "http://www.w3.org/1999/xlink"> +]> +<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="806.988" height="556.074" viewBox="0 0 806.988 556.074" overflow="visible" enable-background="new 0 0 806.988 556.074" xml:space="preserve"> +<g> + <g> + <polygon fill="#010101" points="18.975,132.462 188.516,0 806.988,59.08 760.152,556.074 140.646,498.025 0,333.508 "/> + <polygon fill-rule="evenodd" clip-rule="evenodd" fill="#F6EB16" points="29.154,137.616 192.541,11.274 795.682,69.196 751.031,544.768 145.831,486.848 10.244,329.482 "/> + <polygon fill-rule="evenodd" clip-rule="evenodd" fill="#010101" points="308.221,115.195 445.131,128.275 441.199,169.282 379.542,163.387 378.286,176.595 434.532,181.975 430.924,219.57 375.001,214.254 373.584,229.167 436.625,235.193 432.889,274.169 294.982,260.963 "/> + <path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M465.553,225.98l-25.9,38.206c0,0,32.536,17.491,77.67,21.419 c45.066,3.997,78.118-8.923,88.717-30.504c10.629-21.519-2.096-46.003-22.969-52.798c-20.906-6.766-57.148-13.981-53.379-21.167 c3.77-7.15,26.514-5.669,40.332,0.098c13.82,5.767,17.59,9.213,17.59,9.213l23.774-33.984c0,0-25.257-18.49-72.517-21.293 c-47.288-2.803-82.047,20.874-84.463,42.875c-2.447,22.003,11.693,34.985,33.181,42.847c0,0,18.232,5.862,31.987,8.858 c13.723,3.029,22.453,12.08,6.057,15.301C509.234,248.27,475.506,236.16,465.553,225.98z"/> + <polygon fill-rule="evenodd" clip-rule="evenodd" fill="#010101" points="653.715,196.409 613.414,192.576 617.926,145.124 773.133,159.941 768.621,207.393 728.289,203.527 718.883,302.131 645.309,295.113 "/> + <path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M319.658,281.806l71.224,6.443l-7.571,82.725 c0,0-7.022,19.844,16.687,22.131c23.743,2.256,22.682-19.069,22.682-19.069l7.793-81.663l71.514,6.829l-9.18,96.255 c0,0-8.44,52.541-95.898,44.197c-87.43-8.346-86.238-63.621-86.238-63.621L319.658,281.806z"/> + <polygon fill-rule="evenodd" clip-rule="evenodd" fill="#010101" points="584.005,307.063 604.428,347.297 630.779,311.541 713.793,319.431 636.352,396.167 630.359,458.853 557.525,451.894 563.387,390.237 501.277,299.492 "/> + <g> + <path fill-rule="evenodd" clip-rule="evenodd" fill="#010101" d="M273.688,349.294c0,0,29.993-5.896,29.219-36.531 c-0.771-30.666-61.98-38.269-61.98-38.269l-101.021-10.02l-13.788,146.284c0,0,80.631,8.472,104.113,10.371 c23.485,1.87,70.806-0.129,75.478-30.379C310.348,360.474,273.688,349.294,273.688,349.294z M204.719,307.417 c0,0,31.023-2.867,29.315,11.691c-1.741,14.529-31.216,7.957-31.216,7.957L204.719,307.417z M198.244,382.021l1.61-23.771 c0,0,38.784-1.45,37.528,15.205C236.126,390.11,198.244,382.021,198.244,382.021z"/> + </g> + <g> + <path fill="#010101" d="M258.934,181.686c0,0,29.993-5.895,29.219-36.531c-0.773-30.633-61.98-38.303-61.98-38.303 l-101.055-9.984l-13.754,146.282c0,0,80.631,8.472,104.082,10.342c23.483,1.932,70.806-0.098,75.478-30.347 C295.593,192.865,258.934,181.686,258.934,181.686z M190.577,140.195c0,0,31.055-2.835,29.347,11.693 c-1.738,14.528-31.216,7.956-31.216,7.956L190.577,140.195z M184.134,214.834l1.61-23.807c0,0,38.754-1.416,37.531,15.238 C222.019,222.888,184.134,214.834,184.134,214.834z"/> + </g> + </g> + <path fill="#010101" d="M89.813,244.373c-1.418,15.111-14.818,26.16-29.895,24.741c-15.107-1.448-26.158-14.851-24.741-29.958 c1.451-15.077,14.851-26.125,29.96-24.708C80.213,215.896,91.262,229.298,89.813,244.373z"/> + <path fill="#FFFFFF" d="M79.792,243.44c-0.899,9.535-9.371,16.526-18.94,15.623c-9.536-0.902-16.525-9.406-15.624-18.94 c0.934-9.536,9.408-16.526,18.942-15.624C73.705,225.4,80.695,233.874,79.792,243.44z"/> + <g> + <path fill="#010101" d="M714.342,333.798c0.613-6.475,6.379-11.24,12.854-10.629c6.475,0.612,11.275,6.408,10.662,12.885 c-0.61,6.475-6.411,11.243-12.886,10.631C718.497,346.041,713.729,340.273,714.342,333.798z M734.957,335.764 c0.549-5.508-3.059-9.858-7.957-10.308c-4.929-0.483-9.277,3.125-9.792,8.602c-0.547,5.508,3.062,9.855,7.956,10.339 C730.094,344.849,734.441,341.275,734.957,335.764z M722.201,327.776l4.929,0.481c3.223,0.29,4.831,1.579,4.575,4.382 c-0.225,2.288-1.643,3.255-3.833,3.255l3.027,6.152l-2.578-0.228l-2.866-6.087l-1.514-0.129l-0.549,5.734l-2.479-0.227 L722.201,327.776z M724.135,333.701l2.158,0.228c1.481,0.13,2.768,0.063,2.932-1.741c0.161-1.545-1.226-1.931-2.515-2.061 l-2.222-0.225L724.135,333.701z"/> + </g> +</g> +</svg> +\ No newline at end of file diff --git a/logo/crucial.svg b/logo/crucial.svg @@ -1,136 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - version="1.1" - width="300" - height="82.673523" - id="svg7975"> - <defs - id="defs7977"> - <clipPath - id="clipPath7593"> - <path - d="m 47.99,748.766 0,-32.215 116.734,0 0,32.215" - id="path7595" /> - </clipPath> - <clipPath - id="clipPath7599"> - <path - d="m 48,748.74 116.7,0 0,-32.16 -116.7,0 0,32.16 z" - id="path7601" - style="clip-rule:evenodd" /> - </clipPath> - <clipPath - id="clipPath7605"> - <path - d="m 0,792.03 612,0 0,-792 -612,0 0,792 z" - id="path7607" /> - </clipPath> - </defs> - <metadata - id="metadata7980"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> - </cc:Work> - </rdf:RDF> - </metadata> - <g - transform="translate(-225,-491.0254)" - id="layer1"> - <g - transform="matrix(2.5706941,0,0,-2.5706941,101.60668,2415.8069)" - id="g7589"> - <g - clip-path="url(#clipPath7593)" - id="g7591"> - <g - clip-path="url(#clipPath7599)" - id="g7597"> - <g - clip-path="url(#clipPath7605)" - id="g7603"> - <g - transform="translate(103.736,723.308)" - id="g7609"> - <path - d="m 0,0 c -5.319,0 -10.092,3.021 -10.092,7.245 0,4.226 4.773,7.25 10.13,7.25 2.329,0 4.504,-0.588 6.869,-1.907 L 5.24,10.446 c -1.516,0.733 -3.301,1.172 -5.202,1.172 -2.252,0 -4.852,-1.261 -4.852,-4.373 0,-3.11 2.562,-4.37 4.852,-4.37 1.901,0 3.725,0.381 5.277,1.057 l 1.67,-2.26 C 5.006,0.614 2.599,0 0,0" - id="path7611" - style="fill:#104076;fill-opacity:1;fill-rule:nonzero;stroke:none" /> - </g> - <g - transform="translate(134.119,723.363)" - id="g7613"> - <path - d="m 0,0 c 5.355,0 10.13,3.022 10.13,7.245 0,4.226 -4.775,7.25 -10.13,7.25 -5.357,0 -10.132,-3.024 -10.132,-7.25 C -10.132,3.022 -5.357,0 0,0 Z m 4.852,7.245 c 0,-3.11 -2.6,-4.37 -4.852,-4.37 -2.253,0 -4.852,1.26 -4.852,4.37 0,3.113 2.599,4.373 4.852,4.373 2.252,0 4.852,-1.26 4.852,-4.373" - id="path7615" - style="fill:#104076;fill-opacity:1;fill-rule:nonzero;stroke:none" /> - </g> - <g - transform="translate(146.405,723.713)" - id="g7617"> - <path - d="m 0,0 5.003,0 0,8.628 c 0,1.165 0.905,2.536 2.524,2.545 C 8.658,11.164 9.743,10.39 9.743,9.408 L 9.733,0 l 5.016,0 0,9.675 c 0,2.548 -2.732,4.675 -5.991,4.675 -0.032,0 -0.063,-0.004 -0.095,-0.005 C 8.631,14.346 8.6,14.35 8.569,14.35 7.222,14.35 5.944,13.957 4.9,13.299 4.891,13.336 4.61,14.261 0,14.261 L 0,0" - id="path7619" - style="fill:#104076;fill-opacity:1;fill-rule:nonzero;stroke:none" /> - </g> - <path - d="m 86.338,723.713 4.9009,0 0,13.791 -4.9009,0 0,-13.791 z" - id="path7621" - style="fill:#104076;fill-opacity:1;fill-rule:nonzero;stroke:none" /> - <g - transform="translate(113.058,723.713)" - id="g7623"> - <path - d="m 0,0 4.903,0 0,8.363 c 0,1.321 1.551,2.378 3.221,2.378 0.816,0 1.584,-0.163 2.229,-0.449 l 0,0 0,3.627 C 9.775,14.007 9.151,14.055 8.6,14.055 7.286,14.055 5.968,13.674 4.889,13.034 4.809,13.197 4.208,13.968 0,13.968 L 0,0" - id="path7625" - style="fill:#104076;fill-opacity:1;fill-rule:nonzero;stroke:none" /> - </g> - <g - transform="translate(76.988,729.21)" - id="g7627"> - <path - d="m 0,0 -0.001,-5.498 5.019,0 0,10.038 C 3.564,3.04 1.887,1.513 0,0" - id="path7629" - style="fill:#104076;fill-opacity:1;fill-rule:nonzero;stroke:none" /> - </g> - <g - transform="translate(82.006,733.75)" - id="g7631"> - <path - d="m 0,0 c 5.527,5.702 7.816,11.002 6.034,13.553 -1.86,2.664 -7.639,1.585 -15.13,-2.373 -0.335,-0.164 -0.632,-0.338 -0.851,-0.489 -0.362,-0.251 -0.151,-0.434 0.116,-0.337 0.274,0.099 0.586,0.219 0.938,0.392 5.615,2.663 9.995,3.141 11.707,1.282 C 5.423,9.197 0.08,-0.081 -9.172,-6.944 c -1.235,-0.916 -3.141,-2.257 -4.382,-3.002 -0.084,-0.052 -0.167,-0.103 -0.248,-0.155 -0.328,-0.215 -0.62,-0.415 -0.85,-0.595 -0.224,-0.174 -0.181,-0.451 0.223,-0.277 0.246,0.105 0.545,0.264 0.863,0.459 0.072,0.044 0.143,0.084 0.218,0.13 1.395,0.847 3.466,2.277 4.881,3.265 1.217,0.85 2.367,1.713 3.449,2.579 C -3.131,-3.027 -1.454,-1.499 0,0" - id="path7633" - style="fill:#104076;fill-opacity:1;fill-rule:nonzero;stroke:none" /> - </g> - <g - transform="translate(57.369,716.551)" - id="g7635"> - <path - d="m 0,0 5.019,0 0,5.201 C 6.391,6.012 7.78,6.901 9.145,7.832 9.452,8.043 9.724,8.253 9.921,8.433 10.246,8.73 10.011,8.883 9.76,8.751 9.502,8.615 9.197,8.431 8.867,8.221 1.114,3.262 -4.12,1.749 -6.053,4.373 -7.732,6.651 -4.98,11.055 0,16.029 L 0,4.484 c 1.413,0.48 3.083,1.245 5.018,2.321 L 5.017,17.516 6.121,15.167 c 1.21,-2.594 3.406,-4.145 6.198,-4.145 2.791,0 4.987,1.551 6.197,4.145 l 1.104,2.349 -0.001,-2.733 c 1.796,1.742 3.329,3.481 4.492,5.163 0.145,0.208 0.132,0.383 0.053,0.575 -0.774,1.615 -2.421,2.728 -4.335,2.728 -1.893,0 -3.537,-1.098 -4.325,-2.686 l -2.1,-4.455 c -0.217,-0.434 -0.617,-0.675 -1.085,-0.675 -0.467,0 -0.869,0.241 -1.086,0.675 l -2.1,4.455 c -0.4,0.807 -1.022,1.487 -1.785,1.961 1.536,1.219 3.029,2.308 4.499,3.2 0.334,0.203 0.608,0.406 0.839,0.583 0.227,0.173 0.185,0.45 -0.22,0.28 C 12.22,26.484 11.901,26.327 11.582,26.133 10.08,25.223 8.545,24.292 7.077,23.289 6.899,23.168 6.723,23.046 6.547,22.924 6.007,23.134 5.421,23.249 4.808,23.249 2.148,23.249 0,21.1 0,18.44 L 0,17.778 C -7.09,11.456 -10.812,5.196 -8.867,2.409 -7.439,0.365 -4.053,0.837 0,2.598 L 0,0" - id="path7637" - style="fill:#104076;fill-opacity:1;fill-rule:nonzero;stroke:none" /> - </g> - <g - transform="translate(163.071,736.302)" - id="g7639"> - <path - d="m 0,0 0.182,0 c 0.207,0 0.382,0.075 0.382,0.269 0,0.138 -0.1,0.276 -0.382,0.276 C 0.1,0.545 0.044,0.539 0,0.533 L 0,0 Z m 0,-0.871 -0.251,0 0,1.573 C -0.119,0.72 0.006,0.739 0.195,0.739 0.433,0.739 0.589,0.689 0.683,0.62 0.777,0.551 0.827,0.445 0.827,0.295 0.827,0.088 0.689,-0.037 0.52,-0.088 l 0,-0.012 c 0.138,-0.025 0.232,-0.151 0.263,-0.382 0.038,-0.244 0.075,-0.339 0.1,-0.389 l -0.263,0 C 0.583,-0.821 0.545,-0.677 0.514,-0.47 0.477,-0.269 0.376,-0.194 0.175,-0.194 L 0,-0.194 0,-0.871 Z M 0.263,1.14 c -0.62,0 -1.127,-0.532 -1.127,-1.19 0,-0.67 0.507,-1.196 1.133,-1.196 0.627,-0.007 1.128,0.526 1.128,1.19 0,0.664 -0.501,1.196 -1.128,1.196 l -0.006,0 z m 0.006,0.22 c 0.771,0 1.385,-0.627 1.385,-1.41 0,-0.796 -0.614,-1.416 -1.391,-1.416 -0.77,0 -1.396,0.62 -1.396,1.416 0,0.783 0.626,1.41 1.396,1.41 l 0.006,0" - id="path7641" - style="fill:#104076;fill-opacity:1;fill-rule:nonzero;stroke:none" /> - </g> - </g> - </g> - </g> - </g> - </g> -</svg> diff --git a/logo/lenovo.svg b/logo/lenovo.svg @@ -1,70 +1,52 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://web.resource.org/cc/" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="615.11798" - height="71.204002" - id="svg2210" - sodipodi:version="0.32" - inkscape:version="0.45" - sodipodi:modified="true" - version="1.0"> + version="1.0" + width="1133.8583" + height="226.41731" + id="svg10140"> <defs - id="defs2212" /> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - gridtolerance="10000" - guidetolerance="10000" - objecttolerance="10000" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="1.5265364" - inkscape:cx="307.559" - inkscape:cy="35.602002" - inkscape:document-units="px" - inkscape:current-layer="layer1" - borderlayer="true" - gridspacingx="0px" - gridspacingy="0px" - gridempspacing="0" - inkscape:object-bbox="true" - inkscape:object-points="true" - inkscape:object-nodes="true" - inkscape:grid-points="true" - inkscape:guide-points="true" - inkscape:window-width="1024" - inkscape:window-height="742" - inkscape:window-x="-4" - inkscape:window-y="-4" /> - <metadata - id="metadata2215"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - </cc:Work> - </rdf:RDF> - </metadata> + id="defs10142" /> <g - inkscape:label="Layer 1" - inkscape:groupmode="layer" - id="layer1" - transform="translate(47.559,-431.0459)"> - <path - style="fill:#003d7b;fill-rule:evenodd" - id="path5" - d="M -27.582,431.0459 L 0.445,431.0459 C -6.213,454.2269 -12.873,477.4079 -19.53,500.5899 L -47.559,500.5899 L -27.582,431.0459 L -27.582,431.0459 z M -8.227,484.7499 L -7.598,486.1169 C -7.63,491.9959 -4.564,501.9939 22.357,502.2499 C 22.357,502.2499 46.211,501.4269 53.155,497.5439 L 58.335,484.7539 L 58.429,484.5219 C 58.429,484.5219 58.294,484.5969 58.036,484.7409 L 58.335,484.7549 L 58.036,484.7549 C 55.156,486.3099 36.992,495.7429 22.275,492.2469 C 22.275,492.2469 17.946,491.5179 17.946,487.5779 L 18.197,486.1859 L 24.27,484.7539 L 67.584,474.5479 C 67.584,474.5479 78.127,451.5499 37.896,452.1039 C -2.332,452.6579 -7.599,478.1469 -8.156,483.4149 C -8.196,483.8149 -8.223,484.2619 -8.227,484.7499 L -8.227,484.7499 z M 99.185,484.7539 L 106.294,461.1259 C 106.294,461.1259 123.315,458.6859 121.087,467.4609 L 116.052,484.7539 L 111.44,500.5899 L 139.688,500.5899 L 144.415,484.7539 L 149.679,467.1189 C 149.679,467.1189 153.109,457.4849 141.062,455.0889 C 141.062,455.0889 127.986,451.4929 109.897,452.5189 C 91.809,453.5459 78.904,455.9449 78.904,455.9449 L 70.356,484.7539 L 70.356,484.7539 L 65.658,500.5899 L 94.422,500.5899 L 99.185,484.7539 L 99.185,484.7539 z M 149.922,484.7539 C 149.905,481.5339 150.878,479.1489 150.878,479.1489 C 150.878,479.1489 153.664,453.8899 194.989,452.3489 C 236.312,450.8089 232.026,472.8119 232.026,472.8119 C 232.026,472.8119 231.641,478.4309 227.143,484.7479 C 221.656,492.4559 210.038,501.2019 185.514,502.0459 C 154.836,503.1059 149.97,491.8869 149.922,484.7539 L 149.922,484.7539 z M 199.502,484.7539 C 202.431,479.1579 202.919,472.8119 202.919,472.8119 C 203.604,468.6999 204.804,461.1259 194.989,460.9519 C 185.171,460.7829 182.942,470.5839 182.942,470.5839 L 180.158,478.8079 C 179.565,481.1599 179.314,483.1239 179.314,484.7689 C 179.321,493.6829 186.715,493.1019 186.715,493.1019 C 193.225,493.2509 197.15,489.2479 199.502,484.7539 L 199.502,484.7539 z M 238.337,484.7539 L 234.596,453.8899 L 260.575,453.8899 L 264.36,484.7539 L 264.562,486.3809 L 265.69,484.7539 L 287.11,453.8899 L 314.157,453.8899 L 293.109,484.7539 L 282.308,500.5899 L 240.257,500.5899 L 238.337,484.7539 L 238.337,484.7539 z M 304.116,484.7539 C 304.095,481.5339 305.07,479.1489 305.07,479.1489 C 305.07,479.1489 307.855,453.8899 349.178,452.3489 C 390.501,450.8089 386.215,472.8119 386.215,472.8119 C 386.215,472.8119 385.835,478.4309 381.334,484.7479 C 375.845,492.4559 364.23,501.2019 339.703,502.0459 C 309.024,503.1059 304.16,491.8869 304.116,484.7539 L 304.116,484.7539 z M 353.69,484.7539 C 356.623,479.1579 357.108,472.8119 357.108,472.8119 C 357.795,468.6999 358.998,461.1259 349.178,460.9519 C 339.362,460.7829 337.133,470.5839 337.133,470.5839 L 334.347,478.8079 C 333.753,481.1599 333.503,483.1239 333.507,484.7689 C 333.51,493.6829 340.903,493.1019 340.903,493.1019 C 347.415,493.2509 351.338,489.2479 353.69,484.7539 L 353.69,484.7539 z M 420.792,500.5899 L 410.801,500.5899 L 414.524,489.0429 L 394.228,493.0839 C 394.228,493.0839 394.709,487.7619 393.743,485.5129 L 397.168,484.7539 L 398.084,484.5529 L 408.393,448.9889 L 404.216,448.9889 L 406.465,442.0869 C 406.465,442.0869 422.882,442.8919 440.128,442.0869 L 438.197,448.8289 L 435.305,448.8289 C 433.192,448.8279 422.73,492.3729 420.792,500.5899 L 420.792,500.5899 z M 450.918,484.2309 C 450.918,484.2309 450.932,484.4169 450.99,484.7609 L 450.99,484.7609 C 451.348,486.9489 453.392,495.3729 463.824,501.6119 C 463.824,501.6119 470.113,495.3269 471.881,494.8479 C 471.881,494.8479 464.067,492.9639 460.137,484.7369 L 460.126,484.7369 C 459.043,482.4479 458.256,479.6819 458.01,476.3419 L 475.254,476.3419 L 477.186,469.0959 L 458.497,469.0959 L 461.549,458.8019 L 478.15,458.8019 L 479.918,451.9009 L 470.412,451.9009 L 478.15,442.8909 C 478.15,442.8909 472.339,441.9029 469.927,439.8169 C 469.927,439.8169 463.477,449.6549 458.336,451.9009 L 453.995,439.6559 L 444.329,442.7289 C 444.329,442.7289 447.542,449.1709 448.184,452.0599 L 437.875,452.0599 L 435.783,458.9619 L 451.745,458.9619 L 448.666,469.4179 L 432.249,469.4179 L 430.137,476.5029 L 445.774,476.5029 C 445.774,476.5029 444.431,480.4469 440.425,484.7469 C 436.963,488.4549 431.514,492.4309 423.229,494.3649 C 423.229,494.3649 426.6,499.8439 426.924,501.2899 C 426.924,501.2899 441.781,496.3789 450.293,485.0889 C 450.528,484.7749 450.692,484.5449 450.918,484.2309 L 450.918,484.2309 z M 485.066,484.7539 C 485.804,483.5709 486.523,482.3159 487.169,481.0179 L 487.815,479.7129 C 487.815,479.7129 493.626,481.9829 496.678,482.3029 C 496.108,483.2839 495.495,484.2409 494.894,485.1989 C 492.385,489.1749 487.716,496.0649 484.121,498.5359 C 484.121,498.5359 479.114,494.8479 477.025,494.8479 C 477.024,494.8479 481.379,490.6259 485.066,484.7539 L 485.066,484.7539 z M 499.487,484.7539 L 500.376,481.6639 L 510.521,481.6639 L 509.588,484.7539 L 507.95,490.1679 C 507.95,490.1679 505.886,493.2399 511.672,493.5629 L 526.479,493.5629 C 526.479,493.5629 531.808,492.8989 533.257,487.1199 C 533.257,487.1199 540.192,489.8499 542.438,490.0089 L 537.434,496.9329 C 537.434,496.9329 534.221,501.2909 525.519,501.2909 L 507.471,501.2909 C 507.471,501.2909 497.805,501.1059 496.52,498.2179 C 496.52,498.2179 496.035,495.8329 497.644,491.1569 L 499.487,484.7539 L 499.487,484.7539 z M 529.043,484.7609 C 531.455,483.7079 534.457,482.9459 538.076,482.9459 C 538.076,482.9459 526.742,480.6669 516.809,484.7549 C 514.868,485.5519 513.244,486.6079 511.511,487.7629 C 511.511,487.7629 518.238,487.7839 521.157,490.9959 C 521.157,490.9949 523.625,487.1399 529.043,484.7609 L 529.043,484.7609 z M 554.195,484.7539 L 551.461,479.8689 C 551.461,479.8689 544.69,483.1059 543.565,483.4239 L 541.798,483.9099 C 541.798,483.9099 542.023,484.2139 542.402,484.7579 L 542.405,484.7579 C 544.125,487.1949 548.951,494.3339 550.154,499.3419 L 559.659,494.5259 L 554.195,484.7539 L 554.195,484.7539 z M 18.804,482.7849 L 44.825,469.6869 C 44.825,469.6869 47.395,459.5409 35.521,459.7129 C 23.648,459.8829 21.891,470.4119 21.891,470.4119 L 18.804,482.7849 L 18.804,482.7849 z M 417.576,448.8279 L 426.121,448.8279 L 424.029,455.7529 L 415.487,455.7529 L 417.576,448.8279 L 417.576,448.8279 z M 413.716,461.6919 L 422.261,461.6919 L 420.173,468.6149 L 411.631,468.6149 L 413.716,461.6919 L 413.716,461.6919 z M 410.346,474.5779 L 418.884,474.5779 L 416.775,481.8239 L 407.587,483.2669 L 410.346,474.5779 L 410.346,474.5779 z M 507.789,439.3359 L 506.022,447.3819 C 506.022,447.3819 492.364,447.7029 491.537,447.2209 L 489.261,454.4669 L 502.649,454.4669 C 502.649,454.4669 494.751,462.8119 483.478,467.0089 C 483.478,467.0089 487.333,470.8829 487.655,473.9319 C 487.655,473.9319 497.462,468.4539 501.016,465.2449 C 501.016,465.2449 498.127,475.6979 496.999,477.7869 L 507.311,477.7869 C 507.311,477.7869 509.055,468.6359 510.685,463.6389 C 510.685,463.6389 512.637,466.1819 512.797,469.2559 C 512.797,469.2559 518.238,465.0839 520.672,464.9249 C 520.672,464.9249 518.608,459.4679 513.925,454.3049 L 521.663,454.3049 L 523.748,447.0589 L 515.367,447.0589 L 517.78,439.3339 L 507.789,439.3339 L 507.789,439.3359 z M 519.708,477.1459 C 519.708,477.1459 552.244,476.3419 557.572,477.1459 C 557.572,477.1459 563.034,452.5429 567.559,441.9269 C 567.559,441.9269 530.662,442.2459 529.855,441.7659 L 519.708,477.1459 L 519.708,477.1459 z M 537.433,448.6669 L 555.484,448.6669 L 554.195,453.0249 L 535.988,453.0249 L 537.433,448.6669 L 537.433,448.6669 z M 535.023,457.3559 L 553.074,457.3559 L 551.785,461.7169 L 533.578,461.7169 L 535.023,457.3559 L 535.023,457.3559 z M 532.614,465.8629 L 550.661,465.8629 L 549.376,470.2169 L 531.168,470.2169 L 532.614,465.8629 L 532.614,465.8629 z " - clip-rule="evenodd" /> + transform="translate(-1027.2545,-6165.6178)" + id="layer1"> + <g + transform="matrix(1.6151785,0,0,1.6151785,-587.92098,-3847.6616)" + id="g161995"> + <path + d="M 1680.0624,6302.6515 L 1680.0624,6314.4996 L 1678.0751,6314.4996 L 1678.0751,6305.3681 L 1677.9494,6305.3681 L 1674.654,6314.4996 L 1672.9434,6314.4996 L 1669.6734,6305.3681 L 1669.6734,6314.4996 L 1667.6608,6314.4996 L 1667.6608,6302.6515 L 1670.6545,6302.6515 L 1673.9498,6311.9337 L 1677.0688,6302.6515 L 1680.0624,6302.6515" + id="path151697" + style="fill:#005e9d;fill-rule:nonzero;stroke:none" /> + <path + d="M 1666.3782,6302.6515 L 1666.3782,6304.3621 L 1662.5294,6304.3621 L 1662.5294,6314.4996 L 1660.5421,6314.4996 L 1660.5421,6304.3621 L 1656.6933,6304.3621 L 1656.6933,6302.6515 L 1666.3782,6302.6515" + id="path151699" + style="fill:#005e9d;fill-rule:nonzero;stroke:none" /> + <path + d="M 1616.6218,6284.9676 C 1619.6151,6275.2829 1619.6151,6269.573 1616.7476,6265.8499 C 1614.6094,6263.284 1611.4901,6262.0014 1606.7611,6262.0014 C 1596.2213,6262.0014 1590.3852,6267.9881 1585.6812,6282.9805 C 1582.6627,6292.816 1582.6627,6298.526 1585.5304,6302.2239 C 1587.5176,6304.6638 1590.813,6305.9467 1595.5169,6305.9467 C 1605.9058,6305.9467 1611.9179,6300.0859 1616.6218,6284.9676 z M 1657.8254,6263.284 C 1661.9507,6268.4408 1662.8311,6274.9813 1660.3912,6282.9805 C 1653.5491,6305.0916 1627.7402,6317.7694 1589.5048,6317.7694 C 1566.6893,6317.7694 1551.1689,6313.3423 1544.3015,6304.7896 C 1540.176,6299.6581 1539.4716,6292.9669 1541.8867,6284.9676 C 1548.7288,6262.8566 1574.5377,6250.1785 1612.773,6250.1785 C 1635.4375,6250.1785 1651.1341,6254.7315 1657.8254,6263.284" + id="path151701" + style="fill:#005e9d;fill-rule:nonzero;stroke:none" /> + <path + d="M 1515.2225,6252.3165 C 1516.5055,6252.3165 1551.7221,6252.3165 1555.7217,6252.3165 C 1553.2819,6255.5868 1509.2356,6314.7761 1508.5062,6315.7825 C 1507.2233,6315.7825 1448.3358,6315.7825 1446.3485,6315.7825 C 1446.0466,6313.921 1438.6259,6254.6058 1438.3492,6252.3165 C 1440.764,6252.3165 1474.5722,6252.3165 1476.4337,6252.3165 C 1476.7104,6254.178 1481.9929,6296.8156 1481.9929,6296.8156 C 1481.9929,6296.8156 1514.6439,6253.172 1515.2225,6252.3165" + id="path151703" + style="fill:#005e9d;fill-rule:nonzero;stroke:none" /> + <path + d="M 1389.5739,6284.9676 C 1392.5674,6275.2829 1392.7183,6269.573 1389.725,6265.8499 C 1387.7126,6263.284 1384.4424,6262.0014 1379.8893,6262.0014 C 1369.3244,6262.0014 1363.3375,6267.9881 1358.7843,6282.9805 C 1355.6401,6292.816 1355.6401,6298.526 1358.6335,6302.2239 C 1360.6207,6304.6638 1363.916,6305.9467 1368.469,6305.9467 C 1379.0341,6305.9467 1385.0211,6300.0859 1389.5739,6284.9676 z M 1430.9286,6263.284 C 1435.079,6268.4408 1435.9345,6274.9813 1433.3686,6282.9805 C 1426.5265,6305.0916 1400.6925,6317.7694 1362.6331,6317.7694 C 1339.8178,6317.7694 1324.2721,6313.3423 1317.4045,6304.7896 C 1313.2792,6299.6581 1312.4239,6292.9669 1314.839,6284.9676 C 1321.8319,6262.8566 1347.6409,6250.1785 1385.7253,6250.1785 C 1408.5407,6250.1785 1424.0864,6254.7315 1430.9286,6263.284" + id="path151705" + style="fill:#005e9d;fill-rule:nonzero;stroke:none" /> + <path + d="M 1311.7194,6260.1658 C 1313.279,6262.153 1314.1342,6264.1402 1313.7066,6267.0079 L 1297.8842,6315.9089 L 1255.951,6315.9089 L 1270.7925,6270.278 C 1271.3459,6268.2907 1270.6415,6266.5802 1269.5096,6265.2973 C 1267.4972,6262.8573 1263.2209,6261.2978 1248.5304,6262.3039 C 1248.5304,6262.3039 1231.1484,6315.2045 1230.8466,6315.9089 L 1188.9386,6315.9089 C 1189.341,6314.7769 1208.6096,6255.8894 1208.8864,6255.3108 C 1223.4511,6252.745 1242.6945,6250.3302 1262.6674,6250.3302 C 1289.7592,6250.3302 1306.286,6253.6003 1311.7194,6260.1658" + id="path151713" + style="fill:#005e9d;fill-opacity:1" /> + <path + d="M 1158.7024,6273.5733 C 1159.5577,6269.5736 1158.2748,6266.5802 1156.841,6264.8697 C 1155.2814,6262.8573 1151.8351,6260.2915 1144.7163,6260.2915 C 1134.6041,6260.2915 1127.0325,6265.1465 1124.4667,6273.2714 L 1119.486,6291.9615 L 1158.7024,6273.5733 z M 1193.9192,6273.4223 C 1193.9192,6276.4157 1193.2149,6278.9815 1192.6363,6280.1136 C 1191.3534,6280.4154 1118.2031,6296.6654 1118.2031,6296.6654 C 1118.2031,6296.6654 1117.4736,6300.2374 1120.1904,6302.0988 C 1123.7623,6304.6647 1127.611,6305.369 1134.1513,6305.6458 C 1150.2755,6306.3501 1172.11,6296.9422 1178.2226,6294.2506 C 1177.2415,6297.3698 1170.9528,6311.0792 1170.6761,6311.7835 C 1167.9594,6312.7897 1152.8413,6317.6195 1123.1838,6317.7703 C 1111.9144,6317.9213 1091.8156,6316.4874 1083.5397,6306.0734 C 1079.4143,6300.9418 1078.6848,6293.672 1081.5273,6284.5409 C 1088.2437,6262.7315 1113.3481,6250.1792 1150.1246,6250.1792 C 1170.6761,6250.1792 1184.0836,6254.0279 1190.2215,6261.5744 C 1192.6363,6264.7188 1193.9192,6268.7184 1193.9192,6273.4223" + id="path151715" + style="fill:#005e9d;fill-opacity:1" /> + <path + d="M 1051.1657,6221.3762 C 1052.876,6221.3762 1089.8037,6221.3762 1092.6712,6221.3762 C 1091.816,6224.0677 1063.869,6314.1976 1063.4162,6315.7825 C 1061.7055,6315.7825 1024.7781,6315.7825 1021.9357,6315.7825 C 1022.7908,6313.0657 1050.738,6222.9357 1051.1657,6221.3762" + id="path151717" + style="fill:#005e9d;fill-rule:nonzero;stroke:none" /> + </g> </g> </svg> diff --git a/pricechart.css b/pricechart.css @@ -15,19 +15,36 @@ p { text-align: center; } +.thirds_column { + padding-left: 2%; + padding-right: 2%; + width: 29%; + display: inline-block; +} + .column { width: 40%; padding-left: 5%; padding-right: 5%; - float: left; + /* float: left; */ + display: inline-block; } .product { - margin-bottom: 25px; - margin-top: 25px; + padding: 5px; + margin-top: 5px; + margin-bottom: 5px; + border: 1px solid gray; + border-radius: 3px; } @media (max-width: 640px) { + .thirds_column { + width: 100%; + padding-left: 0%; + padding-right: 0%; + } + .column { width: 100%; padding-left: 0%; @@ -35,6 +52,20 @@ p { } } +@media (max-width: 1280) { + .thirds_column { + width: 40%; + padding-left: 5%; + padding-right: 5%; + } +} + +@media print { + body { + width: 100%; + } +} + .logo { vertical-align: middle; padding: 5px; @@ -42,12 +73,13 @@ p { .manufacturers { height: 3em; - vertical-align: middle; - padding: 5px; } .retailers { height: 4em; +} + +.list_item { vertical-align: middle; padding: 5px; } @@ -97,3 +129,7 @@ p { .chart_data:hover { stroke-width: 2; } + +.breakdown { + font-size: 0.8em; +} diff --git a/tt/chart_list.tt b/tt/chart_list.tt @@ -3,8 +3,8 @@ my $name_lc = lc($stash->get("name")); $stash->set("name_lc", $name_lc); [% END %] - <h1><img alt="[% name %]" class="logo_small" src="/logo/[% name_lc %].svg"/> - ([% num %] total)</h1> + <h1><img alt="[% name %]" class="logo_small" src="/logo/[% logo_file %]"/> + [% num %] [% type %]</h1> [% FOREACH product IN products %] [% PERL %] my $manufacturer = $stash->get("product.0"); @@ -12,12 +12,11 @@ my $part_num = $stash->get("product.1"); $stash->set("part_lc", lc($part_num)); [% END %] - <hr> <div class="product"> <!-- make the manufacturer logo into a link --> <a href="/manufacturers/[% manufacturer_lc %].html"> <img alt="[% product.0 %]" class="logo_small" - src="/logo/[% manufacturer_lc %].svg"/></a> + src="/logo/[% logo_file %]"/></a> <!-- display the description --> [% product.2 %] diff --git a/tt/coarse_list.tt b/tt/coarse_list.tt @@ -0,0 +1,49 @@ +[% WRAPPER wrapper.tt %] +[% PERL %] + # all url references are lower case + my $dir_prefix = lc($stash->get("name")); + $stash->set("dir_prefix", $dir_prefix); + + my $total = scalar(keys %{$stash->get("list")}); + $stash->set("num", $total); + $stash->set("i", -1); + $stash->set("boundary", POSIX::ceil($total / 3)); +[% END %] + <h1>[% name %] ([% num %])</h1> + + [% FOREACH item IN list.keys.sort %] + [% PERL %] + # all url references are lower case + my $link = lc $stash->get("item"); + $stash->set("link", $link); + + my $i = $stash->get("i"); + $stash->set("i", ++$i); + [% END %] + [% IF (i % boundary) == 0 %] + [% IF i != 0 %] + </ul> + </div> + [% END %] + + <div class="thirds_column"> + <ul> + [% END %] + + <li><div class="list_item"> + <a href="/[% dir_prefix %]/[% link %].html"> + <img alt="[% item %]" class="[% dir_prefix %]" + src="/logo/[% logo_file.$item %]" /> + </a> + + <br><div class="breakdown"> + [% FOREACH type IN list.$item.keys %] + [% list.$item.$type.num %] + <a href="/[% dir_prefix %]/[% list.$item.$type.link %].html"> + [% type %]</a>, + [% END %] + </div></div> + [% END %] + </ul> + </div> +[% END %] diff --git a/tt/link_list.tt b/tt/link_list.tt @@ -1,23 +0,0 @@ -[% WRAPPER wrapper.tt %] -[% PERL %] - # all url references are lower case - my $dir_prefix = lc($stash->get("name")); - $stash->set("dir_prefix", $dir_prefix); -[% END %] - <div class="column"> - <h1>[% name %] ([% num %])</h1> - <ul> - [% FOREACH link IN links %] - [% PERL %] - # all url references are lower case - my $link_lc = lc $stash->get("link.0"); - $stash->set("link_lc", $link_lc); - [% END %] - <li><a href="/[% dir_prefix %]/[% link_lc %].html"> - <img alt="[% link.0 %]" class="[% dir_prefix %]" - src="/logo/[% link_lc %].svg" /></a> - ([% link.1 %] products) - [% END %] - </ul> - </div> -[% END %] diff --git a/tt/wrapper.tt b/tt/wrapper.tt @@ -19,13 +19,7 @@ <a href="/retailers.html">Retailers</a> <a href="/product_types.html">Product Types</a> </div> - <hr class="clear_both"> [% content %] - - <!--hr class="clear_both"> - <div id="footer"> - <a href="mailto:not_real@getaddrinfo.net">Feedback/Donate</a> - </div--> </body> </html>