diff --git a/LICENSE b/LICENSE index 9614d19..139e89d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2022 Derek Stevens +Copyright 2024 Iris LIghtshard Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/archetype/eureka.go b/archetype/eureka.go index 4bfb2d0..5486b7e 100644 --- a/archetype/eureka.go +++ b/archetype/eureka.go @@ -77,9 +77,10 @@ func (self *EurekaAdapter) ListPages() map[string]string { } pages := map[string]string{} + pages["meta.nav.htm"] = "NAVIGATION" for _, file := range files { filename := file.Name() - if strings.HasSuffix(filename, ".htm") { + if strings.HasSuffix(filename, ".htm") && filename != "meta.nav.htm" { pages[filename] = strings.Replace( strings.TrimSuffix(filename, ".htm"), "_", " ", -1) } @@ -195,7 +196,7 @@ func (self *EurekaAdapter) FormattingHelp() string { func (self *EurekaAdapter) CreatePage(slug, title, content string) error { // eureka creates titles from slugs, so we transform the title into the slug - slug = strings.ReplaceAll(title, " ", "_") + ".htm" + slug = strings.ToLower(strings.ReplaceAll(title, " ", "_")) + ".htm" path := filepath.Join(self.Root, "inc", slug) if strings.Contains(slug, "../") || strings.Contains(slug, "..\\") { @@ -217,7 +218,7 @@ func (self *EurekaAdapter) CreatePage(slug, title, content string) error { func (self *EurekaAdapter) SavePage(oldSlug, newSlug, title, content string) error { // eureka creates titles from slugs, so we transform the title into the slug - newSlug = strings.ReplaceAll(title, " ", "_") + ".htm" + newSlug = strings.ToLower(strings.ReplaceAll(title, " ", "_")) + ".htm" if strings.Contains(newSlug, "../") || strings.Contains(newSlug, "..\\") || strings.Contains(oldSlug, "../") || strings.Contains(oldSlug, "..\\") { diff --git a/static/favicon.png b/static/favicon.png new file mode 100644 index 0000000..87a844b Binary files /dev/null and b/static/favicon.png differ diff --git a/templates/cms_list.html b/templates/cms_list.html index e0cf286..d84c5ce 100644 --- a/templates/cms_list.html +++ b/templates/cms_list.html @@ -11,7 +11,14 @@
    {{ range $slug, $title := $pages }} + {{ if eq $title "NAVIGATION" }}
  • {{$title}}
  • + {{ end }} + {{ end }} + {{ range $slug, $title := $pages }} + {{ if ne $title "NAVIGATION" }} +
  • {{$title}}
  • + {{ end }} {{ end }}
diff --git a/templates/header.html b/templates/header.html index 66750c0..e6c6c33 100644 --- a/templates/header.html +++ b/templates/header.html @@ -6,6 +6,7 @@ + Nirvash — CMS @@ -20,4 +21,4 @@
  • Logout
  • -{{end}} \ No newline at end of file +{{end}}