themes/sourcehut: add CardDAV templates, improve nav

This commit is contained in:
Simon Ser 2020-02-12 00:40:23 +01:00
parent 30a26051aa
commit 6115ce7b1d
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
5 changed files with 102 additions and 11 deletions

View file

@ -0,0 +1,46 @@
{{template "head.html"}}
{{template "nav.html"}}
<div class="container-fluid">
<div class="row">
<div class="col-md-12 header-tabbed">
<h2>Contacts</h2>
</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="/contacts">{{.AddressBook.Name}}</a>
</li>
</ul>
</div>
<div class="col-md-10 messages-column">
<div class="nav flex-column">
<form method="get" action="">
<input type="text" name="query" value="{{.Query}}"
class="form-control" placeholder="Search" autofocus>
</form>
</div>
{{if .AddressObjects}}
<ul class="nav flex-column">
{{range .AddressObjects}}
<li class="nav-item">
<a
class="nav-link"
href="/contacts/{{.Card.Value "UID" | pathescape}}"
>{{.Card.Value "FN"}}</a>
</li>
{{end}}
</ul>
{{else}}
<p>No contact.</p>
{{end}}
</div>
</div>
</div>
{{template "foot.html"}}

View file

@ -0,0 +1,39 @@
{{template "head.html"}}
{{template "nav.html"}}
{{$fn := .AddressObject.Card.Value "FN"}}
<div class="container-fluid">
<div class="row">
<div class="col-md-12 header-tabbed">
<h2>{{$fn}}</h2>
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active" href="#">View contact</a>
</li>
<li class="mr-auto d-none d-sm-flex"></li>
<li class="nav-item">
<a class="nav-link" href="/contacts">
<span class="icon icon-caret-left">
{{template "caret-left.html"}}
</span>
Back
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<ul>
<li><strong>Name</strong>: {{$fn}}</li>
{{range .AddressObject.Card.Values "EMAIL"}}
<li><strong>E-mail</strong>:
<a href="/compose?to={{.}}">{{.}}</a>
</li>
{{end}}
</ul>
</div>
{{template "foot.html"}}

View file

@ -7,14 +7,11 @@
<h2>Compose</h2>
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link" href="/mailbox/INBOX" >Mail</a>
<a class="nav-link" href="/mailbox/INBOX" >Messages</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="/compose">Compose</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/settings">Settings</a>
</li>
</ul>
</div>
</div>

View file

@ -11,14 +11,11 @@
<a
class="nav-link active"
href="/mailbox/{{.Mailbox.Name | pathescape }}"
>Mail</a>
>Messages</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/compose">Compose</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/settings">Settings</a>
</li>
</ul>
</div>
</div>
@ -46,7 +43,7 @@
<div class="nav flex-column">
<form method="get" action="">
<input type="text" name="query" value="{{.Query}}"
class="form-control" placeholder="Search">
class="form-control" placeholder="Search" autofocus>
</form>
</div>

View file

@ -1,13 +1,25 @@
<nav class="container-fluid navbar navbar-light navbar-expand-sm">
<!-- TODO: show active plugin name -->
<a class="navbar-brand" href="/">
koushin
<span class="text-danger">webmail</span>
<span class="text-danger">mail</span>
</a>
<ul class="navbar-nav mr-auto d-none d-sm-flex">
<!-- TODO: Does anything go here? -->
<li class="nav-item active">
<a href="/" class="nav-link">mail</a>
</li>
<!-- TODO: only show these links if plugins are loaded -->
<li class="nav-item">
<a href="/contacts" class="nav-link">contacts</a>
</li>
<li class="nav-item">
<a href="/calendar" class="nav-link">calendar</a>
</li>
</ul>
<div class="login">
<span class="navbar-text">
<a href="/settings">Settings</a>
<a href="/logout">Log out</a>
</span>
</div>