diff options
author | Emile <git@emile.space> | 2024-11-06 19:03:22 +0100 |
---|---|---|
committer | Emile <git@emile.space> | 2024-11-06 19:03:22 +0100 |
commit | 31a4688f369ffb47e4884a3e5e871ef08f175f43 (patch) | |
tree | 9e5920a07193dc75c9208786b7d9bd82e8f60288 | |
parent | 4740f26d28d3b2c9b10cdaaaf1618bcd4bba84fe (diff) |
html updates
-rw-r--r-- | templates/footer.html | 1 | ||||
-rw-r--r-- | templates/head.html | 30 | ||||
-rw-r--r-- | templates/index.html | 12 | ||||
-rw-r--r-- | templates/nav.html | 8 |
4 files changed, 25 insertions, 26 deletions
diff --git a/templates/footer.html b/templates/footer.html index cb7b0c9..7c8682f 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -3,4 +3,5 @@ <br><br><hr><br> {{ . }} {{ end }} +</div> {{ end }} diff --git a/templates/head.html b/templates/head.html index 42d569c..75c3d21 100644 --- a/templates/head.html +++ b/templates/head.html @@ -8,7 +8,7 @@ <title>r2wa.rs</title> <style> -* { word-wrap:break-word !important; font-family: monospace; margin: 0; padding: 0; } +* { word-wrap:break-word; font-family: monospace; margin: 0; padding: 0; } /* light/darktheme specific foo */ @media (prefers-color-scheme: light) { @@ -26,7 +26,7 @@ h5 { margin: 1ex 0 1ex 0; width: 100%; font-size: 1em; /*background-color: #fafafa*/} .code { border-left: 1px solid #040404; margin-left: 2ex; padding-left: 1ex; } .codeline:hover { background: #eeeeee; color: #040404; } - .trhover tr:hover { border-bottom: 1px solid #dddddd; } + .trhover:hover { background: #c0c0c0; color: #040404; } /* add an outline while hovering, the !important makes hovering on checked elements still visible */ .check-with-label:checked + .label-for-check { background-color: #040404; color: #eeeeee !important; } @@ -50,14 +50,14 @@ .code { border-left: 1px solid #c0c0c0; margin-left: 2ex; padding-left: 1ex; } .codeline:hover { background: #c0c0c0; color: #040404; } .webring { -webkit-filter: invert(100%); filter: invert(100%); } - .trhover tr:hover { background: #c0c0c0; color: #040404; } + .trhover:hover { background: #c0c0c0; color: #040404; } /* add an outline while hovering, the !important makes hovering on checked elements still visible */ .check-with-label:checked + .label-for-check { background-color: #c0c0c0; color: #040404 !important; } .check-with-label:hover + .label-for-check { outline: 1px solid #c0c0c0; color: #c0c0c0; } input, textarea { background-color: #c0c0c0; } - .border { outline: 1px solid #c0c0c0; border: none; } + .border { outline: 1px solid #000000; border: none; } } /* settings for mobile devices*/ @@ -65,6 +65,12 @@ body { margin: 1ex; width: calc(100% - 2ex) !important; } img { max-width: 100% !important; max-height: 500px; } } + +/* only display the hover dropdown on non-mobile devices */ +@media only screen and (min-width: 768px) { + nav ul li:hover a + ul { display: inherit; white-space: nowrap; } +} + img { max-width: 100ex; max-height: 500px; } body { margin-left: auto; margin-right: auto; margin-top: 1ex; margin-bottom: 1ex; width: 100ex; } @@ -78,7 +84,7 @@ body a:not(h1 a, h2 a, h3 a,h4 a):not([href*="webring.xxiivv.com"]):not([class*= a[href*="//"]:not([href*="r2wa.rs"]):not([class*="icon"]):before { content: '{'; } a[href*="//"]:not([href*="r2wa.rs"]):not([class*="icon"]):after { content: '}'; } -table { width: 100%; } +/* table { width: 100ex; } */ input, textarea { width: 100%; } textarea { padding: 0.5ex; } @@ -92,11 +98,6 @@ nav ul ul { display: none; position: absolute; outline: 1px solid #040404; backg nav ul ul li { width: 100%; padding-right: 1ex; float:none; display:list-item; position: relative; } nav + ul li { display: inline-block;} -/* only display the hover dropdown on non-mobile devices */ -@media only screen and (min-width: 768px) { - nav ul li:hover a + ul { display: inherit; white-space: nowrap; } -} - /* nav bar spacing char */ nav ul li > a::after { content: " /"; } nav ul li > a:only-child::after { content: ""; } @@ -113,10 +114,13 @@ nav + ul.vert li { display: block; } .w-100 { width: 100%; } -.check-with-label { display: none; } +.check-with-label { display: none; } /* checkbox with a label */ -body table tbody tr td { padding-bottom: 0.5ex; vertical-align: top; } -body table tbody tr td:not(:last-child) { padding-right: 1ex; } +/* In tables, make the first column fit the content and the reset be relaxed */ +body table tbody { width: 100%; word-wrap: break-word; } +/* body table tbody tr>td { padding: 0.5ex 0 0.5ex !important; } */ +body table tbody tr td:nth-child(1) { width: auto; white-space: nowrap; padding-right: 1ex; } +body table tbody tr td:not(:nth-child(1)) { width: 100%; max-width: 100%; word-wrap: anywhere; } tr { text-wrap: wrap;} diff --git a/templates/index.html b/templates/index.html index ab869da..5d033c5 100644 --- a/templates/index.html +++ b/templates/index.html @@ -50,18 +50,6 @@ <br> <br> - <pre> -╭──╮ ╭──────────────────────╮ -│ _│_ │ │ -│ O O < LET THE GAMES BEGIN! │ -│ │╷ │ │ -│ ││ ╰──────────────────────╯ -│ ─╯│ -╰───╯ - </pre> - - - </body> {{ template "footer" . }} {{ end }} diff --git a/templates/nav.html b/templates/nav.html index ea1e1af..117f48a 100644 --- a/templates/nav.html +++ b/templates/nav.html @@ -16,9 +16,11 @@ <ul> {{ if .pagelink1options }} {{ range $opt := .pagelink1options }} + {{ if eq $opt.Name $.pagelink1.Name }}{{ else }} <li><a class="local" href="{{ $opt.Target }}">{{ $opt.Name }}</a></li> {{ end }} {{ end }} + {{ end }} </ul> </li> {{ end }} @@ -28,9 +30,11 @@ <ul> {{ if .pagelink2options }} {{ range $opt := .pagelink2options }} + {{ if eq $opt.Name $.pagelink2.Name }}{{ else }} <li><a class="local" href="{{ $.pagelink1.Target }}{{ $opt.Target }}">{{ $opt.Name }}</a></li> {{ end }} {{ end }} + {{ end }} </ul> </li> {{ end }} @@ -40,16 +44,18 @@ <ul> {{ if .pagelink3options }} {{ range $opt := .pagelink3options }} + {{ if eq $opt.Name $.pagelink3.Name }}{{ else }} <li><a class="local" href="{{ $.pagelink1.Target }}{{ $.pagelink2.Target }}{{ $opt.Target }}">{{ $opt.Name }}</a></li> {{ end }} {{ end }} + {{ end }} </ul> </li> {{ end }} </ul> <ul style="float: right"> <li> - <a href="https://github.com/HanEmile/r2wars-web">{{ .version }} src</a> + <a href="https://github.com/HanEmile/r2wars-web">{{if .version}}{{ .version }} src{{else}}src{{end}}</a> </li> </ul> </nav> |