diff options
author | Simon Ser <contact@emersion.fr> | 2020-02-12 00:40:23 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-02-12 00:40:23 +0100 |
commit | 6115ce7b1dfe77dbcc3c89a6c66ef8ddbdc4f696 (patch) | |
tree | 2f929c7206b168b795e5fff7839fada778d44e07 /themes | |
parent | 30a26051aae3b6edc9dc4ee115d47b3febc625b1 (diff) | |
download | alps-6115ce7b1dfe77dbcc3c89a6c66ef8ddbdc4f696.tar.gz alps-6115ce7b1dfe77dbcc3c89a6c66ef8ddbdc4f696.zip |
themes/sourcehut: add CardDAV templates, improve nav
Diffstat (limited to 'themes')
-rw-r--r-- | themes/sourcehut/address-book.html | 46 | ||||
-rw-r--r-- | themes/sourcehut/address-object.html | 39 | ||||
-rw-r--r-- | themes/sourcehut/compose.html | 5 | ||||
-rw-r--r-- | themes/sourcehut/mailbox.html | 7 | ||||
-rw-r--r-- | themes/sourcehut/nav.html | 16 |
5 files changed, 102 insertions, 11 deletions
diff --git a/themes/sourcehut/address-book.html b/themes/sourcehut/address-book.html new file mode 100644 index 0000000..4becfda --- /dev/null +++ b/themes/sourcehut/address-book.html @@ -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"}} diff --git a/themes/sourcehut/address-object.html b/themes/sourcehut/address-object.html new file mode 100644 index 0000000..4e4f2de --- /dev/null +++ b/themes/sourcehut/address-object.html @@ -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"}} diff --git a/themes/sourcehut/compose.html b/themes/sourcehut/compose.html index 35eb611..2433553 100644 --- a/themes/sourcehut/compose.html +++ b/themes/sourcehut/compose.html @@ -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> diff --git a/themes/sourcehut/mailbox.html b/themes/sourcehut/mailbox.html index b53f8bd..313b89d 100644 --- a/themes/sourcehut/mailbox.html +++ b/themes/sourcehut/mailbox.html @@ -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> diff --git a/themes/sourcehut/nav.html b/themes/sourcehut/nav.html index 7b4d19d..d41ccd8 100644 --- a/themes/sourcehut/nav.html +++ b/themes/sourcehut/nav.html @@ -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> |