Suche: HTMX + Webseite

This commit is contained in:
Simon Martens
2025-02-18 00:33:30 +01:00
parent fd2fa157b2
commit 7aac147686
18 changed files with 348 additions and 69 deletions

View File

@@ -8,7 +8,7 @@ import (
)
const (
WORKS_CATEGORY = "work"
WORK_TYPE = "work"
)
type Work struct {
@@ -21,10 +21,6 @@ type Work struct {
AnnotationNote
}
func (w Work) Name() string {
return "work"
}
type Citation struct {
XMLName xml.Name `xml:"zitation"`
Title string `xml:"title"`
@@ -37,7 +33,7 @@ func (w Work) References() xmlprovider.ResolvingMap[Work] {
refs := make(xmlprovider.ResolvingMap[Work])
for _, ref := range w.AgentRefs {
refs[ref.Name()] = append(refs[ref.Name()], xmlprovider.Resolved[Work]{
refs[ref.Type()] = append(refs[ref.Type()], xmlprovider.Resolved[Work]{
Item: &w, // Reference to the current Work item
Reference: ref.Ref, // Reference ID
Category: ref.Category, // Category of the reference
@@ -78,5 +74,5 @@ func (w Work) Readable(lib *Library) map[string]interface{} {
}
func (w Work) Type() string {
return WORKS_CATEGORY
return WORK_TYPE
}