aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2024-01-01 23:28:24 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2024-01-01 23:28:24 +0100
commit317d81c65dafae1949588cb4a9412d9bdc483a7c (patch)
tree972523a30f184d4fff8708c9b31948a2422a6826
parent96c6f2154007649c32fa5c29e04bb686df00dfff (diff)
downloadcats-radio-node-317d81c65dafae1949588cb4a9412d9bdc483a7c.tar.gz
cats-radio-node-317d81c65dafae1949588cb4a9412d9bdc483a7c.tar.bz2
cats-radio-node-317d81c65dafae1949588cb4a9412d9bdc483a7c.zip
Improve sidebar
-rw-r--r--build.rs2
-rw-r--r--static/style.css2
-rw-r--r--style.css22
-rw-r--r--templates/foot.html3
-rw-r--r--templates/head.html54
5 files changed, 33 insertions, 50 deletions
diff --git a/build.rs b/build.rs
index f875b2b..fdc9ce7 100644
--- a/build.rs
+++ b/build.rs
@@ -1,5 +1,5 @@
fn main() {
- println!("cargo:rerun-if-changed=templates/");
+ println!("cargo:rerun-if-changed=templates/*");
let dir: String = std::env::var("CARGO_MANIFEST_DIR").unwrap();
let input = format!("{dir}/style.css");
diff --git a/static/style.css b/static/style.css
index 63ea9ac..0998844 100644
--- a/static/style.css
+++ b/static/style.css
@@ -1 +1 @@
-/*! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }html{font-family:sans-serif}.flex{display:flex}.h-full{height:100%}.w-60{width:15rem}.items-center{align-items:center}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem*var(--tw-space-x-reverse));margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-gray-300>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(209 213 219/var(--tw-divide-opacity))}.rounded-md{border-radius:.375rem}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.p-2{padding:.5rem}.p-3{padding:.75rem}.pb-4{padding-bottom:1rem}.pt-2{padding-top:.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}h1{font-size:1.125rem;line-height:1.75rem}h1,h2{font-weight:700}.toplevelbtn{border-radius:.375rem;border-width:2px;--tw-border-opacity:1;border-color:rgb(63 63 70/var(--tw-border-opacity));padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.toplevelbtn:hover{background-color:rgb(55 65 81/var(--tw-bg-opacity))}.toplevelbtn:hover,.toplevelbtn_active{--tw-bg-opacity:1;--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.toplevelbtn_active{background-color:rgb(17 24 39/var(--tw-bg-opacity))}.fieldset{margin:.25rem;border-radius:.375rem;border-width:2px;--tw-border-opacity:1;border-color:rgb(212 212 216/var(--tw-border-opacity));padding:.25rem;font-size:.875rem;line-height:1.25rem;font-weight:400;--tw-text-opacity:1;color:rgb(63 63 70/var(--tw-text-opacity));outline-style:solid;outline-color:#3b82f61a}.fieldset:hover{outline-color:#3b82f64d}.fieldset-legend{width:-moz-max-content;width:max-content;--tw-bg-opacity:1;background-color:rgb(244 244 245/var(--tw-bg-opacity));padding:.25rem;font-variant:small-caps;transform:translatey(-60%);margin:.1em} \ No newline at end of file
+/*! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }html{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));font-family:sans-serif}.flex{display:flex}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-60{width:15rem}.flex-auto{flex:1 1 auto}.flex-none{flex:none}.items-center{align-items:center}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.75rem*var(--tw-space-x-reverse));margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-gray-300>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(209 213 219/var(--tw-divide-opacity))}.rounded-md{border-radius:.375rem}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.pb-4{padding-bottom:1rem}.pt-2{padding-top:.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}h1{font-size:1.125rem;line-height:1.75rem}h1,h2{font-weight:700} \ No newline at end of file
diff --git a/style.css b/style.css
index bd59995..aefbef1 100644
--- a/style.css
+++ b/style.css
@@ -1,6 +1,7 @@
@tailwind base;
html {
+ @apply bg-white;
font-family: sans-serif;
}
@@ -15,25 +16,4 @@ h2 {
@apply font-bold;
}
-.toplevelbtn {
- @apply border border-2 border-zinc-700 text-gray-800 rounded-md px-3 py-2 text-sm font-medium;
- @apply hover:bg-gray-700 hover:text-white;
-}
-
-.toplevelbtn_active {
- @apply bg-gray-900 text-white;
-}
-
-
-.fieldset {
- @apply rounded-md border border-2 border-zinc-300 m-1 p-1 text-sm font-normal text-zinc-700;
- @apply outline outline-blue-500/10 hover:outline-blue-500/30
-}
-
-.fieldset-legend {
- @apply bg-zinc-100 w-max p-1;
- font-variant: small-caps;
- transform: translatey(-60%);
- margin: 0.1em;
-}
diff --git a/templates/foot.html b/templates/foot.html
index c3aa9b4..18992e3 100644
--- a/templates/foot.html
+++ b/templates/foot.html
@@ -1,4 +1,5 @@
- </main>
+ </main>
+ </div>
</body>
</html>
{# vi:set et sw=2 ts=2: #}
diff --git a/templates/head.html b/templates/head.html
index 49beebd..0d7d2bc 100644
--- a/templates/head.html
+++ b/templates/head.html
@@ -9,32 +9,34 @@
<!-- <script src="/static/index.js" defer></script> -->
</head>
<body>
- <nav>
- <div class="h-full p-3 space-y-2 w-60 bg-white text-gray-800">
- <div class="h-full p-3 space-y-2 bg-white text-gray-800">
- <p class="text-lg font-semibold">CATS Radio Node {{ callsign }}</p>
- </div>
+ <div class="flex">
+ <nav class="flex-none">
+ <div class="h-full min-h-screen p-3 space-y-2 w-60 bg-gray-100 text-gray-800">
+ <div class="p-3 space-y-2 bg-gray-100 text-gray-800">
+ <p class="text-lg">CATS Radio Node</p>
+ <p class="text-lg font-semibold">{{ callsign }}</p>
+ </div>
- <div class="divide-y divide-gray-300">
- <ul class="pt-2 pb-4 space-y-1 text-sm">
- <li class="{% if page == ActivePage::Dashboard %} bg-gray-100 text-gray-900 {% endif %}">
- <a href="/" class="flex items-center p-2 space-x-3 rounded-md">
- <i class="fa fa-home" aria-hidden="true"></i><span>Dashboard</span>
- </a>
- </li>
- <li class="{% if page == ActivePage::Incoming %} bg-gray-100 text-gray-900 {% endif %}">
- <a href="/incoming" class="flex items-center p-2 space-x-3 rounded-md">
- <i class="fa fa-inbox" aria-hidden="true"></i><span>Incoming</span>
- </a>
- </li>
- <li class="{% if page == ActivePage::Send %} bg-gray-100 text-gray-900 {% endif %}">
- <a href="/send" class="flex items-center p-2 space-x-3 rounded-md">
- <i class="fa fa-paper-plane-o" aria-hidden="true"></i><span>Send</span>
- </a>
- </li>
- </ul>
+ <div class="divide-y divide-gray-300">
+ <ul class="pt-2 pb-4 space-y-1 text-sm">
+ <li class="{% if page == ActivePage::Dashboard %} bg-gray-200 text-gray-900 {% endif %}">
+ <a href="/" class="flex items-center p-2 space-x-3 rounded-md">
+ <i class="fa fa-home" aria-hidden="true"></i><span>Dashboard</span>
+ </a>
+ </li>
+ <li class="{% if page == ActivePage::Incoming %} bg-gray-200 text-gray-900 {% endif %}">
+ <a href="/incoming" class="flex items-center p-2 space-x-3 rounded-md">
+ <i class="fa fa-inbox" aria-hidden="true"></i><span>Incoming</span>
+ </a>
+ </li>
+ <li class="{% if page == ActivePage::Send %} bg-gray-200 text-gray-900 {% endif %}">
+ <a href="/send" class="flex items-center p-2 space-x-3 rounded-md">
+ <i class="fa fa-paper-plane-o" aria-hidden="true"></i><span>Send</span>
+ </a>
+ </li>
+ </ul>
+ </div>
</div>
- </div>
- </nav>
- <main>
+ </nav>
+ <main class="flex-auto p-4">
{# vi:set et sw=2 ts=2: #}