aboutsummaryrefslogtreecommitdiffstats
path: root/internal/web/theme.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/web/theme.go')
-rw-r--r--internal/web/theme.go14
1 files changed, 1 insertions, 13 deletions
diff --git a/internal/web/theme.go b/internal/web/theme.go
index 1ecd832..2853667 100644
--- a/internal/web/theme.go
+++ b/internal/web/theme.go
@@ -8,7 +8,6 @@ import (
"strconv"
"strings"
"text/template"
- "time"
"github.com/google/uuid"
)
@@ -43,7 +42,7 @@ type Theme struct {
NavHover string `json:"nav_hover"` // "" = same as NavText
ShowDates bool `json:"show_dates"`
- DateFormat string `json:"date_format"` // long | short | iso
+ DateFormat string `json:"date_format"` // long | short | iso (rendered by i18n.FormatDate)
FooterBg string `json:"footer_bg"`
FooterColor string `json:"footer_color"`
@@ -283,17 +282,6 @@ func (t Theme) JSON() json.RawMessage {
return b
}
-// FormatDate renders post dates in the blogger's chosen style.
-func (t Theme) FormatDate(at time.Time) string {
- switch t.DateFormat {
- case "short":
- return at.Format("2 Jan 2006")
- case "iso":
- return at.Format("2006-01-02")
- }
- return at.Format("2 January 2006")
-}
-
// ---- presets ----------------------------------------------------------------
// Preset is a named colour scheme; applying one touches only colours.