fix(ui): stabilize theme colors and calendar end time
This commit is contained in:
@@ -58,6 +58,7 @@ func (s *Server) handleConfig(w http.ResponseWriter, r *http.Request) {
|
||||
writeJSON(w, http.StatusOK, map[string]string{
|
||||
"siteUrl": s.cfg.Site.URL,
|
||||
"weddingDate": s.cfg.Wedding.Date.Format(time.RFC3339),
|
||||
"eventEnd": s.cfg.Wedding.EventEnd.Format(time.RFC3339),
|
||||
"ceremonyTime": s.cfg.Wedding.CeremonyTime,
|
||||
"rsvpByDate": s.cfg.Wedding.RSVPBy.Format(time.RFC3339),
|
||||
"venueName": s.cfg.Wedding.VenueName,
|
||||
|
||||
@@ -35,6 +35,7 @@ type SiteConfig struct {
|
||||
|
||||
type WeddingConfig struct {
|
||||
Date time.Time `yaml:"date"`
|
||||
EventEnd time.Time `yaml:"event_end"`
|
||||
CeremonyTime string `yaml:"ceremony_time"`
|
||||
RSVPBy time.Time `yaml:"rsvp_by"`
|
||||
VenueName string `yaml:"venue_name"`
|
||||
@@ -112,6 +113,9 @@ func Load(path string) (*Config, error) {
|
||||
if cfg.Wedding.RSVPBy.IsZero() {
|
||||
return nil, fmt.Errorf("wedding.rsvp_by is required in %s", path)
|
||||
}
|
||||
if cfg.Wedding.EventEnd.IsZero() {
|
||||
return nil, fmt.Errorf("wedding.event_end is required in %s", path)
|
||||
}
|
||||
|
||||
return &cfg, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user