diff options
author | Drew DeVault <sir@cmpwn.com> | 2020-05-20 12:39:37 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-05-20 18:59:01 +0200 |
commit | 7142da950d468edd04f3fdb509634684fc28c38f (patch) | |
tree | c28278a6b0f70dc91334c30f6dffecce193998d1 /themes/alps/calendar.html | |
parent | 50cb8bef77cf2a6c2feed3a25af4871b2e6792ff (diff) | |
download | alps-7142da950d468edd04f3fdb509634684fc28c38f.tar.gz alps-7142da950d468edd04f3fdb509634684fc28c38f.zip |
alps theme: initial layout for calendar
Diffstat (limited to 'themes/alps/calendar.html')
-rw-r--r-- | themes/alps/calendar.html | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/themes/alps/calendar.html b/themes/alps/calendar.html new file mode 100644 index 0000000..5bdd6eb --- /dev/null +++ b/themes/alps/calendar.html @@ -0,0 +1,84 @@ +{{template "head.html" .}} +{{template "nav.html" .}} + +<div class="page-wrap"> + <aside> + <a href="/calendar/create" class="new">New event</a> + <!-- TODO: fetch list of address books --> + <a href="#" class="active">{{.Calendar.Name}}</a> + <a href="#">Personal</a> + </aside> + + <div class="container"> + <main class="calendar"> + <section class="actions"> + {{ template "calendar-header.html" . }} + </section> + + <section class="dates"> + <h4 class="weekday sunday-top">Sunday</h4> + <h4 class="weekday monday-top">Monday</h4> + <h4 class="weekday tuesday-top">Tuesday</h4> + <h4 class="weekday wednesday-top">Wednesday</h4> + <h4 class="weekday thursday-top">Thursday</h4> + <h4 class="weekday friday-top">Friday</h4> + <h4 class="weekday saturday-top">Saturday</h4> + + {{$base := .}} + {{range .Dates}} + <div class="date + {{if ne $base.Time.Month .Month}}extra{{end}} + {{if and (eq $base.Now.Month .Month) (eq $base.Now.Day .Day)}}active{{end}} + "> + {{if eq $base.Time.Month .Month}} + <a href="#" class="date-link"></a> + {{end}} + <div class="events"> + {{$events := (call $base.EventsForDate .)}} + {{if $events}} + <ul> + {{$overflow := 0}} + {{if gt (len $events) 3}} + {{$overflow = call $base.Sub (len $events) 3}} + {{$events = slice $events 0 3}} + {{end}} + + {{range $events}} + {{$event := index .Data.Events 0}} + <li> + <span class="start-time"> + {{($event.DateTimeStart nil).Format "15:04"}} + </span> + {{$event.Props.Text "SUMMARY"}} + </li> + {{end}} + {{if ne $overflow 0}} + <li class="overflow">...and {{$overflow}} more</li> + {{end}} + </ul> + {{end}} + </div> + <h4> + <span class="mo">{{.Format "Jan"}}</span> + <span class="da">{{.Format "2"}}{{call $base.DaySuffix .Day}}</span> + </h4> + </div> + {{end}} + + <h4 class="weekday sunday-bottom">Sunday</h4> + <h4 class="weekday monday-bottom">Monday</h4> + <h4 class="weekday tuesday-bottom">Tuesday</h4> + <h4 class="weekday wednesday-bottom">Wednesday</h4> + <h4 class="weekday thursday-bottom">Thursday</h4> + <h4 class="weekday friday-bottom">Friday</h4> + <h4 class="weekday saturday-bottom">Saturday</h4> + </section> + + <section class="actions"> + {{ template "calendar-header.html" . }} + </section> + </main> + </div> +</div> + +{{template "foot.html"}} |