From 0fa850a7d8f77440c69c7f88a03865604026aeb5 Mon Sep 17 00:00:00 2001
From: Casey Rodarmor
Date: Mon, 19 Oct 2026 21:41:24 -0700
Subject: [PATCH] Move shortcuts link to top nav bar
---
justfile | 2 +-
src/templates/item.rs | 6 ------
src/templates/page.rs | 29 +++++++++++++++++++++++------
static/item.css | 16 ----------------
static/page.css | 21 ++++++++++++++++++++-
static/page.js | 2 +-
templates/item.html | 1 -
templates/page.html | 8 +++-----
8 files changed, 48 insertions(+), 37 deletions(-)
diff --git a/justfile b/justfile
index d62b7ef6..ac69e450 100644
--- a/justfile
+++ b/justfile
@@ -18,7 +18,7 @@ build:
cargo lbuild
serve: build
- ./target/debug/filepack serve --address localhost --http-port 8000
+ ./target/debug/filepack --unstable serve --address localhost --http-port 8000
open:
open http://localhost:8000
diff --git a/src/templates/item.rs b/src/templates/item.rs
index 4304b52b..f9347364 100644
--- a/src/templates/item.rs
+++ b/src/templates/item.rs
@@ -364,7 +364,6 @@ mod tests {
-
"
),
@@ -402,7 +401,6 @@ mod tests {
-
"
),
@@ -430,7 +428,6 @@ mod tests {
-
"
),
@@ -465,7 +462,6 @@ mod tests {
-
"
),
@@ -493,7 +489,6 @@ mod tests {
-
"
),
@@ -524,7 +519,6 @@ mod tests {
-
"
)),
diff --git a/src/templates/page.rs b/src/templates/page.rs
index 07fd221a..623a948f 100644
--- a/src/templates/page.rs
+++ b/src/templates/page.rs
@@ -33,12 +33,10 @@ impl PageHtml {
shortcuts.extend(self.content.shortcuts());
- if !shortcuts.is_empty() {
- shortcuts.push(Shortcut {
- description: "toggle shortcuts",
- key: '?',
- });
- }
+ shortcuts.push(Shortcut {
+ description: "toggle shortcuts",
+ key: '?',
+ });
shortcuts
}
@@ -161,6 +159,7 @@ mod tests {
Packages
Book
GitHub
+
@@ -213,11 +212,17 @@ mod tests {
Packages
Book
GitHub
+
foo
+
+
+ - ?
- toggle shortcuts
+
+