diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-06-09 00:46:16 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-06-09 00:46:16 +0200 |
commit | 60daaff65a306082d335feac58c52ec39bf36f85 (patch) | |
tree | 11b3fb8274d190c822c8a55914ec69c1f060e682 | |
parent | 3701a2c84534fc6c4a00a0466ff2cc36874d4328 (diff) |
Add pages for specific denominations
-rwxr-xr-x | build | 108 | ||||
-rw-r--r-- | src/de/euro/coin-denom-nav.html | 10 | ||||
-rw-r--r-- | src/de/euro/coins-denom.template.html | 35 | ||||
-rw-r--r-- | src/de/euro/index.html | 31 | ||||
-rw-r--r-- | src/de/euro/note-nav.html | 14 | ||||
-rw-r--r-- | src/en/euro/coin-denom-nav.html | 10 | ||||
-rw-r--r-- | src/en/euro/coins-denom.template.html | 35 | ||||
-rw-r--r-- | src/en/euro/index.html | 31 | ||||
-rw-r--r-- | src/en/euro/note-nav.html | 14 | ||||
-rw-r--r-- | src/pt/euro/coin-denom-nav.html | 10 | ||||
-rw-r--r-- | src/pt/euro/coins-denom.template.html | 35 | ||||
-rw-r--r-- | src/pt/euro/index.html | 31 | ||||
-rw-r--r-- | src/pt/euro/note-nav.html | 14 | ||||
-rw-r--r-- | src/style.css | 4 |
14 files changed, 333 insertions, 49 deletions
@@ -35,11 +35,12 @@ compile_for_lang() { s|<html lang=XX>|<html lang=$1>| '" \ | while read file; do - xfsub '<!-- NAV-BAR -->' $od/nav-bar.html $file - xfsub '<!-- COIN-NAV -->' $od/euro/coin-nav.html $file - xfsub '<!-- NOTE-NAV -->' $od/euro/note-nav.html $file - xfsub '<!-- FOOTER -->' $od/footer.html $file - xfsub '<!-- TABLE-KEY -->' $od/table-key.html $file + xfsub '<!-- NAV-BAR -->' $od/nav-bar.html $file + xfsub '<!-- COIN-NAV -->' $od/euro/coin-nav.html $file + xfsub '<!-- NOTE-NAV -->' $od/euro/note-nav.html $file + xfsub '<!-- COIN-DENOM-NAV -->' $od/euro/coin-denom-nav.html $file + xfsub '<!-- FOOTER -->' $od/footer.html $file + xfsub '<!-- TABLE-KEY -->' $od/table-key.html $file done for file in `find $od -name 'index.html'`; do @@ -178,11 +179,11 @@ compile_for_lang() { done for denom in `grep -Eo '^[0-9]+' data/notes | uniq`; do - nod=$od/euro/$denom + nod=$od/euro/${denom}e mkdir -p $nod cp $od/euro/notes.template.html $nod/index.html sed -Ei " - /<nav>/,\\|</nav>|s|<a href=/../euro/$denom>([^<]*)</a>|<div class=selected>\\1</div>| + /<nav>/,\\|</nav>|s|<a href=/../euro/${denom}e>([^<]*)</a>|<div class=selected>\\1</div>| " $nod/index.html sed -i "s/<!-- DENOM -->/$denom/" $nod/index.html @@ -306,6 +307,98 @@ compile_for_lang() { | xfsub '<!-- EUROPA-TABLE-BODY -->' - $nod/index.html done + # We will need this later… + { for CC in `grep -Eo '^[A-Z]{2}' data/coins | uniq`; do + grep "^$CC " data/country-info.$1 | cut -f1,3 + done } | sort >data/tmp-data.$1 + + + for denom in 1 2 5 10 20 50 100 200; do + if [ $denom -eq 100 -o $denom -eq 200 ]; then + denom_=${denom%00}e + else + denom_=${denom}c + fi + nod=$od/euro/$denom_ + mkdir -p $nod + cp $od/euro/coins-denom.template.html $nod/index.html + sed -Ei " + /<nav>/,\\|</nav>|s|<a href=/../euro/${denom_}>([^<]*)</a>|<div class=selected>\\1</div>| + " $nod/index.html + if [ $denom -eq 100 -o $denom -eq 200 ]; then + sed -i "s/<!-- DENOM -->/${denom%00}.00/" $nod/index.html + else + sed -i "s/<!-- DENOM -->/0.`printf '%02d' $denom`/" $nod/index.html + fi + + for CC in `cut -f1 data/tmp-data.$1`; do + gawk -v CC=$CC -v lang=$1 -v denom=$denom ' + @include "scripts/getcls.awk" + + FILENAME ~ /data\/tmp-data\.[a-z]{2}/ && $1 == CC { + gsub(/^.../, "") + print "<section class=\"cl-section slant-down\">" + print "<div>" + print "<table class=coin-table cellspacing=0>" + print "<thead><tr><th>" $0 "</th></tr></thead>" + print "<tbody>" + } + + $1 == CC && /.. start/ { + sub(/.. start/, "") + printf "<tr class=new-design><th>%s</th></tr>\n", $0 + next + } + + $1 == CC { + y = $10 + if ($11 != "") + y_ = $11 + printf "<trX>" + + if (denom == 1) i = 2 + else if (denom == 2) i = 3 + else if (denom == 5) i = 4 + else if (denom == 10) i = 5 + else if (denom == 20) i = 6 + else if (denom == 50) i = 7 + else if (denom == 100) i = 8 + else if (denom == 200) i = 9 + + # Greece 2002 needs special handling + if (CC == "GR" && $10 == 2002 && $11 == "MM") { + if (i <= 5) + y_ = "F" + else if (i <= 7) + y_ = "E" + else + y_ = "S" + } + + if ($i != "/") { + if ($11 != "") { + printf "<td class=%s>%s <sup>%s</sup></td>", + getcls($i), y, y_ + } else + printf "<td class=%s>%s</td>", getcls($i), y + } + print "</tr>" + } + + END { + print "MARKER LOL" + print "</tbody></table></div></section>" + print "MARKER LMAO" + } + ' data/tmp-data.$1 data/coins \ + | last-of-design.sed \ + | sed -E 's|(<td class=not-minted>)[^<]*(<sup>[^<]*</sup>)?(</td>)|\1\3|g' \ + | fsub '<!-- DENOM-TABLE -->' - $nod/index.html \ + | sed 's/MARKER LMAO/<!-- DENOM-TABLE -->/' \ + | sponge $nod/index.html + done + done + for file in `find $od -name '*.html'`; do path=${file#out/??} path=${path%/*.html} @@ -319,3 +412,4 @@ done wait find out -name '*.html' -and -not -name 'index.html' -delete +rm data/tmp-data.?? diff --git a/src/de/euro/coin-denom-nav.html b/src/de/euro/coin-denom-nav.html new file mode 100644 index 0000000..82532b8 --- /dev/null +++ b/src/de/euro/coin-denom-nav.html @@ -0,0 +1,10 @@ +<ul> + <li><a href=/XX/euro/1c>0,01 €</a></li> + <li><a href=/XX/euro/2c>0,02 €</a></li> + <li><a href=/XX/euro/5c>0,05 €</a></li> + <li><a href=/XX/euro/10c>0,10 €</a></li> + <li><a href=/XX/euro/20c>0,20 €</a></li> + <li><a href=/XX/euro/50c>0,50 €</a></li> + <li><a href=/XX/euro/1e>1,00 €</a></li> + <li><a href=/XX/euro/2e>2,00 €</a></li> +</ul> diff --git a/src/de/euro/coins-denom.template.html b/src/de/euro/coins-denom.template.html new file mode 100644 index 0000000..64e8cf7 --- /dev/null +++ b/src/de/euro/coins-denom.template.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html lang=XX> + <head> + <meta charset=UTF-8 /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <title><!-- DENOM --> € Coins</title> + <link rel="shortcut icon" type="image/svg" href="/favicon.svg" /> + <link rel="stylesheet" type="text/css" href="/style.css" /> + </head> + + <body> + <nav> + <!-- NAV-BAR --> + <!-- COIN-DENOM-NAV --> + </nav> + + <main> + <section> + <header> + <h1><!-- DENOM --> € Coins</h1> + </header> + </section> + + <br /><br /> + + <section><!-- TABLE-KEY --></section> + + <br /><br /> + + <!-- DENOM-TABLE --> + + <section><!-- FOOTER --></section> + </main> + </body> +</html> diff --git a/src/de/euro/index.html b/src/de/euro/index.html index 99bf9f7..bf5c374 100644 --- a/src/de/euro/index.html +++ b/src/de/euro/index.html @@ -78,6 +78,23 @@ </tr> </tbody> </table> + + <table class=country-table> + <tbody> + <tr class=last-of-design> + <td><a href=1c>€0.01</a></td> + <td><a href=2c>€0.02</a></td> + <td><a href=5c>€0.05</a></td> + <td><a href=10c>€0.10</a></td> + </tr> + <tr class=last-of-design> + <td><a href=20c>€0.20</a></td> + <td><a href=50c>€0.50</a></td> + <td><a href=1e>€1.00</a></td> + <td><a href=2e>€2.00</a></td> + </tr> + </tbody> + </table> </div> </section> @@ -87,15 +104,15 @@ <table class=country-table> <tbody> <tr> - <td><a href=5>€5</a></td> - <td><a href=10>€10</a></td> - <td><a href=20>€20</a></td> - <td><a href=50>€50</a></td> + <td><a href=5e>€5</a></td> + <td><a href=10e>€10</a></td> + <td><a href=20e>€20</a></td> + <td><a href=50e>€50</a></td> </tr> <tr> - <td><a href=100>€100</a></td> - <td><a href=200>€200</a></td> - <td><a href=500>€500</a></td> + <td><a href=100e>€100</a></td> + <td><a href=200e>€200</a></td> + <td><a href=500e>€500</a></td> <td><a href=tn>Test Notes</a></td> </tr> </tbody> diff --git a/src/de/euro/note-nav.html b/src/de/euro/note-nav.html index 1043191..386cf3e 100644 --- a/src/de/euro/note-nav.html +++ b/src/de/euro/note-nav.html @@ -1,10 +1,10 @@ <ul> - <li><a href=/XX/euro/5>€5</a></li> - <li><a href=/XX/euro/10>€10</a></li> - <li><a href=/XX/euro/20>€20</a></li> - <li><a href=/XX/euro/50>€50</a></li> - <li><a href=/XX/euro/100>€100</a></li> - <li><a href=/XX/euro/200>€200</a></li> - <li><a href=/XX/euro/500>€500</a></li> + <li><a href=/XX/euro/5e>€5</a></li> + <li><a href=/XX/euro/10e>€10</a></li> + <li><a href=/XX/euro/20e>€20</a></li> + <li><a href=/XX/euro/50e>€50</a></li> + <li><a href=/XX/euro/100e>€100</a></li> + <li><a href=/XX/euro/200e>€200</a></li> + <li><a href=/XX/euro/500e>€500</a></li> <li><a href=/XX/euro/tn>Test Notes</a></li> </ul> diff --git a/src/en/euro/coin-denom-nav.html b/src/en/euro/coin-denom-nav.html new file mode 100644 index 0000000..1064759 --- /dev/null +++ b/src/en/euro/coin-denom-nav.html @@ -0,0 +1,10 @@ +<ul> + <li><a href=/XX/euro/1c>€0.01</a></li> + <li><a href=/XX/euro/2c>€0.02</a></li> + <li><a href=/XX/euro/5c>€0.05</a></li> + <li><a href=/XX/euro/10c>€0.10</a></li> + <li><a href=/XX/euro/20c>€0.20</a></li> + <li><a href=/XX/euro/50c>€0.50</a></li> + <li><a href=/XX/euro/1e>€1.00</a></li> + <li><a href=/XX/euro/2e>€2.00</a></li> +</ul> diff --git a/src/en/euro/coins-denom.template.html b/src/en/euro/coins-denom.template.html new file mode 100644 index 0000000..3ed260d --- /dev/null +++ b/src/en/euro/coins-denom.template.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html lang=XX> + <head> + <meta charset=UTF-8 /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <title>€<!-- DENOM --> Coins</title> + <link rel="shortcut icon" type="image/svg" href="/favicon.svg" /> + <link rel="stylesheet" type="text/css" href="/style.css" /> + </head> + + <body> + <nav> + <!-- NAV-BAR --> + <!-- COIN-DENOM-NAV --> + </nav> + + <main> + <section> + <header> + <h1>€<!-- DENOM --> Coins</h1> + </header> + </section> + + <br /><br /> + + <section><!-- TABLE-KEY --></section> + + <br /><br /> + + <!-- DENOM-TABLE --> + + <section><!-- FOOTER --></section> + </main> + </body> +</html> diff --git a/src/en/euro/index.html b/src/en/euro/index.html index 5d39d4f..622cfcd 100644 --- a/src/en/euro/index.html +++ b/src/en/euro/index.html @@ -74,6 +74,23 @@ </tr> </tbody> </table> + + <table class=country-table> + <tbody> + <tr class=last-of-design> + <td><a href=1c>€0.01</a></td> + <td><a href=2c>€0.02</a></td> + <td><a href=5c>€0.05</a></td> + <td><a href=10c>€0.10</a></td> + </tr> + <tr class=last-of-design> + <td><a href=20c>€0.20</a></td> + <td><a href=50c>€0.50</a></td> + <td><a href=1e>€1.00</a></td> + <td><a href=2e>€2.00</a></td> + </tr> + </tbody> + </table> </div> </section> @@ -83,15 +100,15 @@ <table class=country-table> <tbody> <tr> - <td><a href=5>€5</a></td> - <td><a href=10>€10</a></td> - <td><a href=20>€20</a></td> - <td><a href=50>€50</a></td> + <td><a href=5e>€5</a></td> + <td><a href=10e>€10</a></td> + <td><a href=20e>€20</a></td> + <td><a href=50e>€50</a></td> </tr> <tr> - <td><a href=100>€100</a></td> - <td><a href=200>€200</a></td> - <td><a href=500>€500</a></td> + <td><a href=100e>€100</a></td> + <td><a href=200e>€200</a></td> + <td><a href=500e>€500</a></td> <td><a href=tn>Test Notes</a></td> </tr> </tbody> diff --git a/src/en/euro/note-nav.html b/src/en/euro/note-nav.html index 1043191..386cf3e 100644 --- a/src/en/euro/note-nav.html +++ b/src/en/euro/note-nav.html @@ -1,10 +1,10 @@ <ul> - <li><a href=/XX/euro/5>€5</a></li> - <li><a href=/XX/euro/10>€10</a></li> - <li><a href=/XX/euro/20>€20</a></li> - <li><a href=/XX/euro/50>€50</a></li> - <li><a href=/XX/euro/100>€100</a></li> - <li><a href=/XX/euro/200>€200</a></li> - <li><a href=/XX/euro/500>€500</a></li> + <li><a href=/XX/euro/5e>€5</a></li> + <li><a href=/XX/euro/10e>€10</a></li> + <li><a href=/XX/euro/20e>€20</a></li> + <li><a href=/XX/euro/50e>€50</a></li> + <li><a href=/XX/euro/100e>€100</a></li> + <li><a href=/XX/euro/200e>€200</a></li> + <li><a href=/XX/euro/500e>€500</a></li> <li><a href=/XX/euro/tn>Test Notes</a></li> </ul> diff --git a/src/pt/euro/coin-denom-nav.html b/src/pt/euro/coin-denom-nav.html new file mode 100644 index 0000000..1064759 --- /dev/null +++ b/src/pt/euro/coin-denom-nav.html @@ -0,0 +1,10 @@ +<ul> + <li><a href=/XX/euro/1c>€0.01</a></li> + <li><a href=/XX/euro/2c>€0.02</a></li> + <li><a href=/XX/euro/5c>€0.05</a></li> + <li><a href=/XX/euro/10c>€0.10</a></li> + <li><a href=/XX/euro/20c>€0.20</a></li> + <li><a href=/XX/euro/50c>€0.50</a></li> + <li><a href=/XX/euro/1e>€1.00</a></li> + <li><a href=/XX/euro/2e>€2.00</a></li> +</ul> diff --git a/src/pt/euro/coins-denom.template.html b/src/pt/euro/coins-denom.template.html new file mode 100644 index 0000000..3ed260d --- /dev/null +++ b/src/pt/euro/coins-denom.template.html @@ -0,0 +1,35 @@ +<!DOCTYPE html> +<html lang=XX> + <head> + <meta charset=UTF-8 /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <title>€<!-- DENOM --> Coins</title> + <link rel="shortcut icon" type="image/svg" href="/favicon.svg" /> + <link rel="stylesheet" type="text/css" href="/style.css" /> + </head> + + <body> + <nav> + <!-- NAV-BAR --> + <!-- COIN-DENOM-NAV --> + </nav> + + <main> + <section> + <header> + <h1>€<!-- DENOM --> Coins</h1> + </header> + </section> + + <br /><br /> + + <section><!-- TABLE-KEY --></section> + + <br /><br /> + + <!-- DENOM-TABLE --> + + <section><!-- FOOTER --></section> + </main> + </body> +</html> diff --git a/src/pt/euro/index.html b/src/pt/euro/index.html index 99bf9f7..bf5c374 100644 --- a/src/pt/euro/index.html +++ b/src/pt/euro/index.html @@ -78,6 +78,23 @@ </tr> </tbody> </table> + + <table class=country-table> + <tbody> + <tr class=last-of-design> + <td><a href=1c>€0.01</a></td> + <td><a href=2c>€0.02</a></td> + <td><a href=5c>€0.05</a></td> + <td><a href=10c>€0.10</a></td> + </tr> + <tr class=last-of-design> + <td><a href=20c>€0.20</a></td> + <td><a href=50c>€0.50</a></td> + <td><a href=1e>€1.00</a></td> + <td><a href=2e>€2.00</a></td> + </tr> + </tbody> + </table> </div> </section> @@ -87,15 +104,15 @@ <table class=country-table> <tbody> <tr> - <td><a href=5>€5</a></td> - <td><a href=10>€10</a></td> - <td><a href=20>€20</a></td> - <td><a href=50>€50</a></td> + <td><a href=5e>€5</a></td> + <td><a href=10e>€10</a></td> + <td><a href=20e>€20</a></td> + <td><a href=50e>€50</a></td> </tr> <tr> - <td><a href=100>€100</a></td> - <td><a href=200>€200</a></td> - <td><a href=500>€500</a></td> + <td><a href=100e>€100</a></td> + <td><a href=200e>€200</a></td> + <td><a href=500e>€500</a></td> <td><a href=tn>Test Notes</a></td> </tr> </tbody> diff --git a/src/pt/euro/note-nav.html b/src/pt/euro/note-nav.html index bcbef8f..c5547b2 100644 --- a/src/pt/euro/note-nav.html +++ b/src/pt/euro/note-nav.html @@ -1,10 +1,10 @@ <ul> - <li><a href=/XX/euro/5>5 €</a></li> - <li><a href=/XX/euro/10>10 €</a></li> - <li><a href=/XX/euro/20>20 €</a></li> - <li><a href=/XX/euro/50>50 €</a></li> - <li><a href=/XX/euro/100>100 €</a></li> - <li><a href=/XX/euro/200>200 €</a></li> - <li><a href=/XX/euro/500>500 €</a></li> + <li><a href=/XX/euro/5e>5 €</a></li> + <li><a href=/XX/euro/10e>10 €</a></li> + <li><a href=/XX/euro/20e>20 €</a></li> + <li><a href=/XX/euro/50e>50 €</a></li> + <li><a href=/XX/euro/100e>100 €</a></li> + <li><a href=/XX/euro/200e>200 €</a></li> + <li><a href=/XX/euro/500e>500 €</a></li> <li><a href=/XX/euro/tn>Test Notes</a></li> </ul> diff --git a/src/style.css b/src/style.css index f804ecd..4868b3f 100644 --- a/src/style.css +++ b/src/style.css @@ -481,6 +481,10 @@ main section { border-radius: 0 0 8px 8px; } +div .country-table:not(:first-child) { + margin-top: 3rem; +} + .country-table { background-color: var(--tertiary-color); border-radius: 16px; |