themes/sourcehut: add CalDAV views
This commit is contained in:
parent
93e988855f
commit
5364221dd4
2 changed files with 90 additions and 0 deletions
53
themes/sourcehut/calendar.html
Normal file
53
themes/sourcehut/calendar.html
Normal file
|
@ -0,0 +1,53 @@
|
|||
{{template "head.html"}}
|
||||
{{template "nav.html" .Global}}
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12 header-tabbed">
|
||||
<h2>{{.Time.Format "January 2006"}}</h2>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="/calendar">Calendar</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid mailbox-container">
|
||||
<div class="row">
|
||||
<div class="col-md-2 mailboxes-column">
|
||||
<ul class="nav flex-column">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="/calendar">{{.Calendar.Name}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-10 messages-column">
|
||||
{{if .Events}}
|
||||
<ul class="nav flex-column">
|
||||
{{range .Events}}
|
||||
{{$event := index .Data.Events 0}}
|
||||
<li class="nav-item">
|
||||
<a
|
||||
class="nav-link"
|
||||
href="/calendar/{{$event.UID | pathescape}}"
|
||||
>
|
||||
{{$event.Summary}}
|
||||
({{$event.StartDate | formatdate}} — {{$event.EndDate | formatdate}})
|
||||
</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
{{else}}
|
||||
<p>No events.</p>
|
||||
{{end}}
|
||||
|
||||
<p>
|
||||
<a href="/calendar?month={{.PrevPage}}">Previous month</a>
|
||||
· <a href="/calendar?month={{.NextPage}}">Next month</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{template "foot.html"}}
|
37
themes/sourcehut/event.html
Normal file
37
themes/sourcehut/event.html
Normal file
|
@ -0,0 +1,37 @@
|
|||
{{template "head.html"}}
|
||||
{{template "nav.html" .Global}}
|
||||
|
||||
{{$event := index .Event.Data.Events 0}}
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12 header-tabbed">
|
||||
<h2>{{$event.Summary}}</h2>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#">View</a>
|
||||
</li>
|
||||
<li class="mr-auto d-none d-sm-flex"></li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/calendar">
|
||||
<span class="icon icon-caret-left">
|
||||
{{template "caret-left.html"}}
|
||||
</span>
|
||||
Back
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<ul>
|
||||
<li><strong>Start date</strong>: {{$event.StartDate | formatdate}}</li>
|
||||
<li><strong>End date</strong>: {{$event.EndDate | formatdate}}</li>
|
||||
</ul>
|
||||
|
||||
<pre>{{$event.Description}}</pre>
|
||||
</div>
|
||||
|
||||
{{template "foot.html"}}
|
Loading…
Reference in a new issue