diff options
author | metamuffin <metamuffin@disroot.org> | 2023-06-12 23:08:50 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-06-12 23:08:50 +0200 |
commit | 161693f372ea01d945b111501c6c1af4182c283d (patch) | |
tree | fb1937816c2cf0d74342615c1a96db88700671a2 /server/src/routes | |
parent | 905ffe80fcd97b1b6b2c194181b2426b601d52d1 (diff) | |
download | jellything-161693f372ea01d945b111501c6c1af4182c283d.tar jellything-161693f372ea01d945b111501c6c1af4182c283d.tar.bz2 jellything-161693f372ea01d945b111501c6c1af4182c283d.tar.zst |
"go up" button
Diffstat (limited to 'server/src/routes')
-rw-r--r-- | server/src/routes/ui/node.rs | 3 | ||||
-rw-r--r-- | server/src/routes/ui/style/directorypage.css | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/server/src/routes/ui/node.rs b/server/src/routes/ui/node.rs index d03173b..e6f0809 100644 --- a/server/src/routes/ui/node.rs +++ b/server/src/routes/ui/node.rs @@ -64,6 +64,9 @@ markup::define! { DirectoryPage(dir: Arc<Directory>) { div.page.dir { h1 { @dir.info.name } + @if let Some(parent) = dir.lib_path.parent() { + a.dirup[href=uri!(r_library_node(&parent))] { "Go up" } + } ul.directorylisting { @for el in &dir.children { li { @match el.deref().to_owned() { diff --git a/server/src/routes/ui/style/directorypage.css b/server/src/routes/ui/style/directorypage.css index 0c04af7..083d1b1 100644 --- a/server/src/routes/ui/style/directorypage.css +++ b/server/src/routes/ui/style/directorypage.css @@ -18,6 +18,21 @@ display: block; } +.page.dir .dirup { + width: 100%; + font-size: large; + display: block; + text-align: center; + background-color: var(--background-light); + border-radius: 0.2em; + padding: 0.6em; + margin: 0.2em; + transition: filter 0.2s; +} +.page.dir .dirup:hover { + filter: brightness(120%); +} + .card { padding: 1em; height: var(--card-size); |