HTMX + Deps Update
This commit is contained in:
@ -6,20 +6,21 @@ import (
|
||||
"io/fs"
|
||||
"net/http"
|
||||
|
||||
contentfs "goth.stack/content"
|
||||
"goth.stack/lib"
|
||||
chromahtml "github.com/alecthomas/chroma/v2/formatters/html"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/yuin/goldmark"
|
||||
highlighting "github.com/yuin/goldmark-highlighting/v2"
|
||||
"gopkg.in/yaml.v2"
|
||||
contentfs "goth.stack/content"
|
||||
"goth.stack/lib"
|
||||
)
|
||||
|
||||
type PostProps struct {
|
||||
Content template.HTML
|
||||
Name string
|
||||
Date string
|
||||
Tags []string
|
||||
Content template.HTML
|
||||
Name string
|
||||
Description string
|
||||
Date string
|
||||
Tags []string
|
||||
}
|
||||
|
||||
func Post(c echo.Context) error {
|
||||
@ -64,10 +65,11 @@ func Post(c echo.Context) error {
|
||||
}
|
||||
|
||||
props := PostProps{
|
||||
Content: template.HTML(buf.String()),
|
||||
Name: frontmatter.Name,
|
||||
Date: frontmatter.Date,
|
||||
Tags: frontmatter.Tags,
|
||||
Content: template.HTML(buf.String()),
|
||||
Name: frontmatter.Name,
|
||||
Description: frontmatter.Description,
|
||||
Date: frontmatter.Date,
|
||||
Tags: frontmatter.Tags,
|
||||
}
|
||||
|
||||
// Specify the partials used by this page
|
||||
|
@ -2,8 +2,12 @@
|
||||
GOTH Stack // Root
|
||||
{{end}}
|
||||
|
||||
{{define "headercontent"}}
|
||||
{{template "title" .}}
|
||||
{{define "description"}}
|
||||
HTMX + Golang + Go Template Starter
|
||||
{{end}}
|
||||
|
||||
{{define "navcontent"}}
|
||||
GOTH Stack // Root
|
||||
{{end}}
|
||||
|
||||
{{define "head"}}
|
||||
|
@ -6,7 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" href="/public/favicon.ico" />
|
||||
<title>{{template "title" .}}</title>
|
||||
<meta name="description" content="Just here for the vibes...">
|
||||
<meta name="description" content="{{template "description" .}}">
|
||||
{{template "head" .}}
|
||||
</head>
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="icon" href="/public/favicon.ico" />
|
||||
<title>{{.Name}}</title>
|
||||
<meta name="description" content="Just here for the vibes...">
|
||||
<title>{{template "title" .}}</title>
|
||||
<meta name="description" content="{{template "description" .}}">
|
||||
{{template "head" .}}
|
||||
</head>
|
||||
|
||||
@ -52,8 +52,8 @@
|
||||
|
||||
</article>
|
||||
</main>
|
||||
<script src="/public/js/htmx.preload.js"></script>
|
||||
<script src="/public/js/htmx.base.js"></script>
|
||||
<script src="/public/js/htmx.preload.js"></script>
|
||||
{{template "foot" .}}
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,7 +1,7 @@
|
||||
{{define "header"}}
|
||||
<header class="navbar bg-base-100">
|
||||
<div class="navbar-start">
|
||||
<a class="btn btn-ghost normal-case text-lg sm:text-xl text-white" href="/">{{template "headercontent".}}</a>
|
||||
<a class="btn btn-ghost normal-case text-lg sm:text-xl text-white" href="/">{{template "navcontent".}}</a>
|
||||
</div>
|
||||
<div class="navbar-end z-50">
|
||||
<div class="dropdown dropdown-end">
|
||||
|
@ -1,9 +1,13 @@
|
||||
{{define "title"}}
|
||||
GOTH Stack // Post
|
||||
GOTH Stack // Post // {{.Name}}
|
||||
{{end}}
|
||||
|
||||
{{define "headercontent"}}
|
||||
{{template "title" .}}
|
||||
{{define "description"}}
|
||||
{{.Description}}
|
||||
{{end}}
|
||||
|
||||
{{define "navcontent"}}
|
||||
GOTH Stack // Post // {{.Name}}
|
||||
{{end}}
|
||||
|
||||
{{define "head"}}
|
||||
|
@ -1,9 +1,13 @@
|
||||
{{define "title"}}
|
||||
GOTH Stack // Blog
|
||||
GOTH Stack // Posts
|
||||
{{end}}
|
||||
|
||||
{{define "headercontent"}}
|
||||
{{template "title" .}}
|
||||
{{define "description"}}
|
||||
Blog Posts
|
||||
{{end}}
|
||||
|
||||
{{define "navcontent"}}
|
||||
GOTH Stack // Posts
|
||||
{{end}}
|
||||
|
||||
{{define "head"}}
|
||||
|
@ -2,8 +2,12 @@
|
||||
GOTH Stack // Tools
|
||||
{{end}}
|
||||
|
||||
{{define "headercontent"}}
|
||||
{{template "title" .}}
|
||||
{{define "description"}}
|
||||
Misc. Tools for Demo Purposes
|
||||
{{end}}
|
||||
|
||||
{{define "navcontent"}}
|
||||
GOTH Stack // Tools
|
||||
{{end}}
|
||||
|
||||
{{define "head"}}
|
||||
|
@ -2,8 +2,12 @@
|
||||
GOTH Stack // Tools // Resizer
|
||||
{{end}}
|
||||
|
||||
{{define "headercontent"}}
|
||||
{{template "title" .}}
|
||||
{{define "description"}}
|
||||
A tool to re-size images.
|
||||
{{end}}
|
||||
|
||||
{{define "navcontent"}}
|
||||
GOTH Stack // Tools // Resizer
|
||||
{{end}}
|
||||
|
||||
{{define "head"}}
|
||||
|
@ -1,7 +1,13 @@
|
||||
{{define "title"}}GOTH Stack // Tools // SSE Demo{{end}}
|
||||
{{define "title"}}
|
||||
GOTH Stack // Tools // SSE Demo
|
||||
{{end}}
|
||||
|
||||
{{define "headercontent"}}
|
||||
{{template "title" .}}
|
||||
{{define "navcontent"}}
|
||||
GOTH Stack // Tools // SSE Demo
|
||||
{{end}}
|
||||
|
||||
{{define "description"}}
|
||||
A demo of an SSE implimentation.
|
||||
{{end}}
|
||||
|
||||
{{define "head"}}
|
||||
|
Reference in New Issue
Block a user