Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
a0d492c
New 10-foot display option
krestenlaust Dec 24, 2025
816366a
Rename, restructure and restyle page
krestenlaust Dec 24, 2025
c0dde0a
fixup! Rename, restructure and restyle page
krestenlaust Dec 24, 2025
d665d0f
Adjust layout values
krestenlaust Dec 25, 2025
f3a0037
Re-adjust to make it fit better on smaller screen
krestenlaust Dec 25, 2025
a576f3b
Scale size of service card
krestenlaust Dec 25, 2025
1e3b7ca
Improve scaling of service cards
krestenlaust Dec 25, 2025
6e275ae
Reorganize
krestenlaust Dec 25, 2025
250551e
Scroll screen to card
krestenlaust Dec 25, 2025
8fc660d
Make header and footer scale properly
krestenlaust Dec 25, 2025
fa66463
Try to fix scroll issue
krestenlaust Dec 25, 2025
de1fe7c
Rename base layout files
krestenlaust Dec 25, 2025
0c50be0
Refactor keyboard navigation code
krestenlaust Dec 25, 2025
62b1e9a
Remove comments and change innerTexts
krestenlaust Dec 25, 2025
46ff484
fixup! Rename base layout files
krestenlaust Dec 25, 2025
d69c2df
Remove vspace
krestenlaust Dec 25, 2025
95df428
Rewrite to typescript
krestenlaust Dec 25, 2025
4cdc47a
Name UI components to 'menu10foot'
krestenlaust Jan 2, 2026
cf3229c
Separate menu styling
krestenlaust Jan 2, 2026
a698402
Move script into folder
krestenlaust Jan 2, 2026
8f6f7e5
Add navigation class to manage menu
krestenlaust Jan 2, 2026
169fd6b
Make Logo navigate to frontpage
krestenlaust Jan 2, 2026
a7f2213
Move tenfoot page into folder
krestenlaust Jan 2, 2026
19e0c58
Update page navigation
krestenlaust Jan 2, 2026
83bfb5a
Make logo only restore to tenfoot
krestenlaust Jan 2, 2026
29fcbfa
Merge branch 'main' into feat/10foot
krestenlaust Jan 9, 2026
bfc44cf
Rename css-classes
krestenlaust Jan 9, 2026
076969b
Introduce localStorage to store 10-foot display
krestenlaust Jan 9, 2026
2f39105
Add service icons and description to data
krestenlaust Jan 9, 2026
1f76753
fixup! Rename css-classes
krestenlaust Jan 9, 2026
f68e116
Add attempt to theme default page
krestenlaust Jan 9, 2026
aea5840
Add new base variant of style
krestenlaust Jan 10, 2026
d4df131
Only load part of file
krestenlaust Jan 10, 2026
ce284ad
Remove old menu
krestenlaust Jan 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .pugrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ module.exports = {
app_name: "Fappen",
manifest: require('./manifest.json'),
navigation: {
Frontpage: "/pages/index.pug",
Stregsystem: "/pages/stregsystem.pug",
Songbook: "/pages/songbook/index.pug",
Events: "/pages/events.pug",
Links: "/pages/links.pug",
Offline: "/pages/offline.pug"
Frontpage: ["/pages/index.pug", "🏠", "Frontpage"],
Stregsystem: ["/pages/stregsystem.pug", "💵", "Browse our collection of wares"],
Songbook: ["/pages/songbook/index.pug", "🎼", "Browser our collection of songs"],
Events: ["/pages/events.pug", "📅", "List upcoming events"],
Links: ["/pages/links.pug", "🌐", "Look at nice links"],
Offline: ["/pages/offline.pug", "✈", "Enter offline-mode"],
TenFoot: ["/pages/tenfoot/toggle.pug", "➜]", "Toggle 10-foot display"],
},
links: {
Slack: "https://fklubben.slack.com",
Discord: "https://discord.gg/6DBvANjs3g",
Facebook: "https://www.facebook.com/fklub",
Github: "https://github.com/f-klubben",
Fiki: "https://fklub.dk",
Stregsystem: "https://stregsystem.fklub.dk"

Slack: ["https://fklubben.slack.com"],
Discord: ["https://discord.gg/6DBvANjs3g"],
Facebook: ["https://www.facebook.com/fklub"],
Github: ["https://github.com/f-klubben"],
Fiki: ["https://fklub.dk"],
Stregsystem: ["https://stregsystem.fklub.dk"]
},
disable_worker: process.env.disable_worker === "true" || true,
}
Expand Down
6 changes: 5 additions & 1 deletion components/base_layout.pug → components/page_layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ html(lang="en")
ul.border-outer
each key in Object.keys(navigation)
.border-inner
a(href=navigation[key])
a(href=navigation[key][0])
li= key
button.darkmode-button darkmode
main
Expand All @@ -28,4 +28,8 @@ html(lang="en")
if hide_frit_fit !== true
p.frit-fit #fritfit (for real)
+scripts
script.
// Determine mode from localStorage (or default)
const tenFoot = localStorage.getItem('tenFoot') === '1';
if (tenFoot) document.body.classList.add('ten-foot');
block scripts
9 changes: 7 additions & 2 deletions components/service_menu.pug
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
mixin menu(links, target)
link(rel="stylesheet" href="/styles/service-menu.scss")
section.service-links.border-outer
link(rel="stylesheet" href="/styles/service-menu_10foot.scss")
section.service-menu.border-outer
each key in Object.keys(links)
a(href=links[key] target=target)
a.service-link(href=links[key][0] target=target)
if links[key].length > 1
.service-icon=links[key][1]
.border-inner
h3=key
if links[key].length > 2
.service-description=links[key][2]
40 changes: 40 additions & 0 deletions components/tenfoot_layout.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
include core

block pug_meta

- const title = typeof page_title === 'string' ? `${page_title} - ${app_name}` : app_name;

doctype html
html(lang="en")
+head(title)
link(rel="stylesheet" href="/styles/tenfoot.scss")
body
header.header-with-logo
.logo-title-container
a.logo-wrapper(href="/tenfoot/")
img.logo(src="/media/flogo_w.svg" alt="Logo")
.title-wrapper
h1= app_name
block title

main
if show_load_indicator
#loading-indicator.spinner
img(width="200" src="/media/fstjerne.svg")

.nav-hint
span Navigate with
kbd ↑
kbd ↓
kbd ←
kbd →
kbd Enter
block content

footer
if hide_frit_fit !== true
p.frit-fit #fritfit (for real)

+scripts
script(type="module" src="/scripts/tenfoot/tenfoot-navigation.ts")
block scripts
77 changes: 77 additions & 0 deletions media/flogo_w.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pages/events.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extends ../components/base_layout
extends ../components/page_layout

block pug_meta
- const page_title = "Events";
Expand Down
2 changes: 1 addition & 1 deletion pages/index.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extends ../components/base_layout
extends ../components/page_layout
include ../components/service_menu

block content
Expand Down
2 changes: 1 addition & 1 deletion pages/links.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extends ../components/base_layout
extends ../components/page_layout
include ../components/service_menu

block content
Expand Down
2 changes: 1 addition & 1 deletion pages/offline.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extends ../components/base_layout
extends ../components/page_layout

block head
link(rel="stylesheet", href="/styles/offline.scss")
Expand Down
2 changes: 1 addition & 1 deletion pages/songbook/index.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extends ../../components/base_layout.pug
extends ../../components/page_layout
block head
link(rel="stylesheet" href="/styles/songbook.scss")
script(type="module", src="/scripts/songbook.ts")
Expand Down
2 changes: 1 addition & 1 deletion pages/stregsystem.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extends ../components/base_layout
extends ../components/page_layout

block pug_meta
- const page_title = "Stregsystemet";
Expand Down
9 changes: 9 additions & 0 deletions pages/tenfoot/index.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends ../../components/tenfoot_layout

block title
h2 Welcome
.subtitle Select a service to continue

block content
link(rel="stylesheet" href="/styles/menu10foot.scss")
section.menu10foot
13 changes: 13 additions & 0 deletions pages/tenfoot/toggle.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
include ../../components/core

doctype html
html(lang="en")
body
script.
// Read current mode from localStorage
const tenFoot = localStorage.getItem('tenFoot') === '1';

localStorage.setItem('tenFoot', tenFoot ? '0' : '1');

// Redirect after flipping
window.location.href = '/';
84 changes: 84 additions & 0 deletions scripts/tenfoot/menu.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
// Keyboard navigation for 10-foot interface
interface ServiceSelected {
service: string;
}

export interface GotoPage {
navigateTo(page: string): Promise<void>;
}

export class TenFootMenu {
private cards: NodeListOf<HTMLElement>;
private nav: GotoPage;
private currentIndex: number;

constructor(navigator: GotoPage, cardContainer: Element) {
this.nav = navigator;
this.cards = cardContainer.querySelectorAll<HTMLElement>('.menu10foot-card');
this.currentIndex = 0;
this.init();
}

private init(): void {
console.log("Initialized Tenfoot Menu");
this.setupKeyboardNavigation();
this.setupClickHandlers();

// Focus first card on load
if (this.cards.length > 0) {
this.focusCard(0);
}
}

private focusCard(index: number): void {
if (index >= 0 && index < this.cards.length) {
this.cards[index].focus();
this.currentIndex = index;
}
}

private setupKeyboardNavigation(): void {
document.addEventListener('keydown', (e: KeyboardEvent) => {
switch(e.key) {
case 'ArrowRight':
e.preventDefault();
this.focusCard((this.currentIndex + 1) % this.cards.length);
break;

case 'ArrowLeft':
e.preventDefault();
this.focusCard((this.currentIndex - 1 + this.cards.length) % this.cards.length);
break;

case 'Enter':
e.preventDefault();
this.cards[this.currentIndex].click();
break;
}
});
}

private setupClickHandlers(): void {
this.cards.forEach((card: HTMLElement, index: number) => {
card.addEventListener('click', async () => {
const link = card.dataset.link || '';
const titleElement = card.querySelector('.service-title');
const title = titleElement?.textContent || '';

console.log(`Selected: ${title} (${link})`);

await this.nav.navigateTo(link);
});

card.addEventListener('focus', () => {
this.currentIndex = index;

card.scrollIntoView({
behavior: 'smooth',
inline: 'center',
block: 'nearest'
});
});
});
}
}
Loading