A webmail client. Forked from https://git.sr.ht/~migadu/alps
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

85 lines
2.8 KiB

  1. {{template "head.html" .}}
  2. {{template "nav.html" .}}
  3. <div class="page-wrap">
  4. <aside>
  5. <a href="/calendar/create" class="new">New event</a>
  6. <!-- TODO: fetch list of address books -->
  7. <a href="#" class="active">{{.Calendar.Name}}</a>
  8. <a href="#">Personal</a>
  9. </aside>
  10. <div class="container">
  11. <main class="calendar">
  12. <section class="actions">
  13. {{ template "calendar-header.html" . }}
  14. </section>
  15. <section class="dates">
  16. <h4 class="weekday sunday-top">Sunday</h4>
  17. <h4 class="weekday monday-top">Monday</h4>
  18. <h4 class="weekday tuesday-top">Tuesday</h4>
  19. <h4 class="weekday wednesday-top">Wednesday</h4>
  20. <h4 class="weekday thursday-top">Thursday</h4>
  21. <h4 class="weekday friday-top">Friday</h4>
  22. <h4 class="weekday saturday-top">Saturday</h4>
  23. {{$base := .}}
  24. {{range .Dates}}
  25. <div class="date
  26. {{if ne $base.Time.Month .Month}}extra{{end}}
  27. {{if and (eq $base.Now.Month .Month) (eq $base.Now.Day .Day)}}active{{end}}
  28. ">
  29. {{if eq $base.Time.Month .Month}}
  30. <a href="/calendar/date?date={{.Format "2006-01-02"}}" class="date-link"></a>
  31. {{end}}
  32. <div class="events">
  33. {{$events := (call $base.EventsForDate .)}}
  34. {{if $events}}
  35. <ul>
  36. {{$overflow := 0}}
  37. {{if gt (len $events) 3}}
  38. {{$overflow = call $base.Sub (len $events) 3}}
  39. {{$events = slice $events 0 3}}
  40. {{end}}
  41. {{range $events}}
  42. {{$event := index .Data.Events 0}}
  43. <li>
  44. <span class="start-time">
  45. {{($event.DateTimeStart nil).Format "15:04"}}
  46. </span>
  47. {{$event.Props.Text "SUMMARY"}}
  48. </li>
  49. {{end}}
  50. {{if ne $overflow 0}}
  51. <li class="overflow">...and {{$overflow}} more</li>
  52. {{end}}
  53. </ul>
  54. {{end}}
  55. </div>
  56. <h4>
  57. <span class="mo">{{.Format "Jan"}}</span>
  58. <span class="da">{{.Format "2"}}{{call $base.DaySuffix .Day}}</span>
  59. </h4>
  60. </div>
  61. {{end}}
  62. <h4 class="weekday sunday-bottom">Sunday</h4>
  63. <h4 class="weekday monday-bottom">Monday</h4>
  64. <h4 class="weekday tuesday-bottom">Tuesday</h4>
  65. <h4 class="weekday wednesday-bottom">Wednesday</h4>
  66. <h4 class="weekday thursday-bottom">Thursday</h4>
  67. <h4 class="weekday friday-bottom">Friday</h4>
  68. <h4 class="weekday saturday-bottom">Saturday</h4>
  69. </section>
  70. <section class="actions">
  71. {{ template "calendar-header.html" . }}
  72. </section>
  73. </main>
  74. </div>
  75. </div>
  76. {{template "foot.html"}}