From 8002766378b1153e749297ed1d01ba221ee72b41 Mon Sep 17 00:00:00 2001
From: Alan Pearce
Date: Wed, 19 Jun 2024 13:51:24 +0200
Subject: style external nav menu links
---
internal/builder/homepage.templ | 2 +-
internal/builder/page.templ | 11 ++++++++++-
internal/config/config.go | 2 +-
3 files changed, 12 insertions(+), 3 deletions(-)
(limited to 'internal')
diff --git a/internal/builder/homepage.templ b/internal/builder/homepage.templ
index df5bc32..848b9ed 100644
--- a/internal/builder/homepage.templ
+++ b/internal/builder/homepage.templ
@@ -33,7 +33,7 @@ templ homepage(config config.Config, posts []content.Post, content string) {
for _, link := range config.Menus["me"] {
- { link.Name }
+ { link.Name }
}
diff --git a/internal/builder/page.templ b/internal/builder/page.templ
index 7b3380f..9a2be2f 100644
--- a/internal/builder/page.templ
+++ b/internal/builder/page.templ
@@ -20,6 +20,15 @@ func extendClasses(cs string, attrs templ.Attributes) string {
}
}
+templ menuItem(item config.MenuItem) {
+ { item.Name }
+}
+
templ page(site config.Config, page PageSettings) {
@@ -38,7 +47,7 @@ templ page(site config.Config, page PageSettings) {
diff --git a/internal/config/config.go b/internal/config/config.go
index df69bce..4477ad4 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -16,7 +16,7 @@ type Taxonomy struct {
type MenuItem struct {
Name string
- URL string `toml:"url"`
+ URL URL `toml:"url"`
}
type URL struct {
--
cgit 1.4.1