From 73ef84047e4b0121e4d1edb33ebe145bb97b4e4c Mon Sep 17 00:00:00 2001 From: Nat Lasseter Date: Tue, 24 Jun 2025 22:00:00 +0100 Subject: [links] redo with breaking --- cgi/user.cgi | 14 +++++++------- static/styles.css | 29 +++++++++++++++++------------ 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/cgi/user.cgi b/cgi/user.cgi index 1357d65..5150157 100755 --- a/cgi/user.cgi +++ b/cgi/user.cgi @@ -11,13 +11,13 @@ def link(href, text, remote = false) end def toplinks - $cgi.table(class: "toplinks") { - $cgi.tr { - $cgi.td { link("/" , "Home" ) } + - $cgi.td { link("/bins" , "Bins" ) } + - $cgi.td { link("/eamit.html" , "eamit" , true) } + - $cgi.td { link("https://git.4574.co.uk/", "Git" , true) } + - $cgi.td { link("/stuff-i-want" , "Stuff I Want" ) } + $cgi.nav(class: "toplinks") { + $cgi.ul { + $cgi.li { link("/" , "Home" ) } + + $cgi.li { link("/bins" , "Bins" ) } + + $cgi.li { link("/eamit.html" , "eamit" , true) } + + $cgi.li { link("https://git.4574.co.uk/", "Git" , true) } + + $cgi.li { link("/stuff-i-want" , "Stuff I Want" ) } } } end diff --git a/static/styles.css b/static/styles.css index 4f0b453..a0d23f9 100644 --- a/static/styles.css +++ b/static/styles.css @@ -30,19 +30,24 @@ div { padding: 1em; } -table.toplinks { - width: 100%; - td { - width: 1%; +nav.toplinks { + ul { + margin: 0; + padding: 0; text-align: center; - a { - font-size: 1.75em; - color: green; - text-decoration: none; - } - a:hover { - color: darkgreen; - filter: blur(2px); + list-style-type: none; + li { + padding: 1em; + display: inline-block; + a { + font-size: 1.75em; + color: green; + text-decoration: none; + } + a:hover { + color: darkgreen; + filter: blur(2px); + } } } } -- cgit v1.2.3