summaryrefslogtreecommitdiff
path: root/main.go
diff options
from:
to:
context:
space:
mode:
authorGravatar SayaAndy <montferrat@tuta.io> 2025-08-14 04:18:31 +0700
committerGravatar SayaAndy <montferrat@tuta.io> 2025-08-14 04:18:31 +0700
commit85d4a9799ce2ce663af25be8c7e8f59f8d43761d (patch)
tree1956c3b72dfe132fe044e6b5bede460a49b5b136 /main.go
parentd15630a014e31835f66b0b50d9cc1e59ee4f203c (diff)
downloadweb-85d4a9799ce2ce663af25be8c7e8f59f8d43761d.tar.gz
web-85d4a9799ce2ce663af25be8c7e8f59f8d43761d.zip
feat: parse gallery caption as an inline markdownv0.5.7
feat: stylize href links for themes feat: adapt map palette for dark themes like night and ram feat: add popup for markers on maps feat: dump z-index from 13 to 8 for zoom on region level feat: show timezone in catalogue with colon fix: ignore empty lines inside gallery block fix: enable closing tag for gallery block with slash fix: on filter reset in catalogue default to publication date desc sort
Diffstat (limited to 'main.go')
-rw-r--r--main.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/main.go b/main.go
index a53cc8b..4dc9619 100644
--- a/main.go
+++ b/main.go
@@ -265,7 +265,7 @@ func main() {
"Link": page.Link,
"ArticleLink": "/" + lang + "/blog/" + page.FileName,
"Title": page.Metadata.Title,
- "PublishedTime": page.Metadata.PublishedTime.Format("2006-01-02 15:04:05 -0700"),
+ "PublishedTime": page.Metadata.PublishedTime.Format("2006-01-02 15:04:05 -07:00"),
"ActionDate": page.Metadata.ActionDate,
"ShortDescription": page.Metadata.ShortDescription,
"Thumbnail": page.Metadata.Thumbnail,
@@ -287,12 +287,12 @@ func main() {
case "actionDateDesc":
return strings.Compare(b["ActionDate"], a["ActionDate"])
case "publicationDateAsc":
- publishedTimeA, _ := time.Parse("2006-01-02 15:04:05 -0700", a["PublishedTime"])
- publishedTimeB, _ := time.Parse("2006-01-02 15:04:05 -0700", b["PublishedTime"])
+ publishedTimeA, _ := time.Parse("2006-01-02 15:04:05 -07:00", a["PublishedTime"])
+ publishedTimeB, _ := time.Parse("2006-01-02 15:04:05 -07:00", b["PublishedTime"])
return publishedTimeA.Compare(publishedTimeB)
case "publicationDateDesc":
- publishedTimeA, _ := time.Parse("2006-01-02 15:04:05 -0700", a["PublishedTime"])
- publishedTimeB, _ := time.Parse("2006-01-02 15:04:05 -0700", b["PublishedTime"])
+ publishedTimeA, _ := time.Parse("2006-01-02 15:04:05 -07:00", a["PublishedTime"])
+ publishedTimeB, _ := time.Parse("2006-01-02 15:04:05 -07:00", b["PublishedTime"])
return publishedTimeB.Compare(publishedTimeA)
}
return 0