fusch.online

git / lists / casts

git.fusch.online/planner

Generate static pages from a list of links
git clone git://git.fusch.online/planner
Log / Files / Readme / Issues

commit 46f29585e310d0265249b851f1de0a17d3ebf2d7
parent 203e1397025ef64d0d78ecb6dc5638fb30b40cdf
Author: hbkk <tschugg@posteo.de>
Date:   Wed,  3 Apr 2019 03:07:54 +0200

style

Diffstat:
MREADME.md | 4++--
Mplanner | 19++++++++++---------
Mstyles.css | 8+++++++-
3 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/README.md b/README.md @@ -1,6 +1,6 @@ # planner -Generate a static page from a list of links +Generate static pages from a list of links ## example @@ -14,7 +14,7 @@ This will write all files to a directory named ./planner_html. ## links.tsv -### Format +### format date url tags title diff --git a/planner b/planner @@ -6,6 +6,7 @@ site=planner_html offline=false dateformat="+%a, %d %b %Y %H:%M:%S %z" builddate=$(date "$dateformat") +baseurl=${BASEURL:-example.com} print_html_head() { @@ -14,20 +15,20 @@ print_html_head() { <html lang="en"> <head> <meta charset="utf-8"> - <title>planner#${1:-tutti}</title> + <title>planner/$1</title> <link rel="stylesheet" href="./styles.css"> </head> <body> <div class="header"> - <a class="read new" href="https://git.fusch.online">git</a> - <a class="read new" href="https://planner.fusch.online">planner</a> - <a href="https://fusch.online"> - <h1>fusch.online</h1> + <a class="read new" href="https://git.$baseurl">git</a> + <a class="read new" href="https://planner.$baseurl">planner</a> + <a href="https://$baseurl"> + <h1>$baseurl</h1> </a> <a href="./"> - <h1>planner</h1> + <h2>planner</h2> </a> - <p>#${1:-tutti}<p> + <p>$1<p> </div> EOF } @@ -46,7 +47,7 @@ EOF print_html_link_head() { cat << EOF <div class="entry"> - <h2><a class="$class" href="$2">$1</a></h2> + <h2><a class="$3" href="$2">$1</a></h2> <a class="link" href="$2">$2</a> EOF } @@ -156,7 +157,7 @@ while read -r line; do true > $site/link.html - print_html_link_head "$title" "$link" >> $site/link.html + print_html_link_head "$title" "$link" "$class" >> $site/link.html for tag in $tags; do [[ $tag == read ]] && continue diff --git a/styles.css b/styles.css @@ -9,12 +9,18 @@ body { } h1 { - font-size: larger; + font-size: x-large; color: black; } h2 { + font-size: medium; + color: black; +} + +h3 { font-size: small; + color: black; } .entry {