diff --git a/assets/src/styles/style.css b/assets/src/styles/style.css index 5b0fc32..e85bb0a 100644 --- a/assets/src/styles/style.css +++ b/assets/src/styles/style.css @@ -33,9 +33,41 @@ opacity: 1; } } + + @property --bg-angle { + inherits: false; + initial-value: 0deg; + syntax: ""; + } + + @keyframes spin { + to { + --bg-angle: 360deg; + } + } + + .border-rainbow { + animation: spin 2.5s infinite linear; + background: + linear-gradient( + to bottom, + oklch(0.1 0.2 240 / 0.95), + oklch(0.1 0.2 240 / 0.95) + ) + padding-box, + conic-gradient( + from var(--bg-angle) in oklch longer hue, + oklch(0.85 0.37 0) 0 0 + ) + border-box; + border-style: solid; + border-color: transparent; + } } @layer components { + + .progress-alert { @apply bg-base-200 text-accent border-accent border shadow-md py-4 rounded-box popin; diff --git a/services/web/helper.go b/services/web/helper.go index 8b546b8..759d15c 100644 --- a/services/web/helper.go +++ b/services/web/helper.go @@ -79,6 +79,19 @@ func NewHelper(c *cli.Context) *Helper { } } +func (s *Helper) TimeBetween(from string, to string) bool { + ft, err := time.Parse(time.DateTime, from) + if err != nil { + panic(err) + } + tt, err := time.Parse(time.DateTime, to) + if err != nil { + panic(err) + } + now := time.Now() + return now.After(ft) && now.Before(tt) +} + func (s *Helper) HasAds(c *claims.Data) bool { if c == nil { return false diff --git a/templates/partials/extend_base.html b/templates/partials/extend_base.html index 514c812..b2b9428 100644 --- a/templates/partials/extend_base.html +++ b/templates/partials/extend_base.html @@ -3,4 +3,6 @@ {{ define "get_extra" }} {{ end }} {{ define "embed_extra" }} -{{ end }} \ No newline at end of file +{{ end }} +{{ define "promo" }} +{{ end }} diff --git a/templates/views/index.html b/templates/views/index.html index f825630..31cbdaa 100644 --- a/templates/views/index.html +++ b/templates/views/index.html @@ -10,7 +10,8 @@
{{ .Err | log | shortErr }}
ok -{{ end }} +{{ end }} +{{ template "promo" . }} {{ with .Data }} {{ if has . "Job" }}