diff options
| author | Felix Hanley <felix@userspace.com.au> | 2020-03-31 10:25:34 +0000 |
|---|---|---|
| committer | Felix Hanley <felix@userspace.com.au> | 2020-03-31 10:25:34 +0000 |
| commit | ec84e5226503f4c1a4ec8658f9db52abf9674c99 (patch) | |
| tree | d42f5c3224e26342fa05b5c38d976f9c1d0e7d8a /tmpl | |
| parent | 7a5dc7b8b58d869fe7f0fb57c1c7b8462afb4e81 (diff) | |
| download | sws-ec84e5226503f4c1a4ec8658f9db52abf9674c99.tar.gz sws-ec84e5226503f4c1a4ec8658f9db52abf9674c99.tar.bz2 | |
Filter style updates
Diffstat (limited to 'tmpl')
| -rw-r--r-- | tmpl/filter.tmpl | 22 | ||||
| -rw-r--r-- | tmpl/hitView.tmpl | 10 | ||||
| -rw-r--r-- | tmpl/site.tmpl | 21 |
3 files changed, 24 insertions, 29 deletions
diff --git a/tmpl/filter.tmpl b/tmpl/filter.tmpl index e039281..750d1b3 100644 --- a/tmpl/filter.tmpl +++ b/tmpl/filter.tmpl @@ -1,6 +1,6 @@ {{ define "filter" }} <div class="filter tags field is-grouped"> - <span>Filters:</span> + <span class="control">Filter:</span> {{ if .QuerySetContains "bots" }} {{ $bots := .Query.Get "bots" }} {{ if eq $bots "0" }} @@ -22,14 +22,14 @@ {{ else }} <div class="control"> <span class="tags has-addons"> - <a class="tag is-info" href="?{{ .QuerySetEncode "bots" "0" }}">bots</a> - <a class="tag is-light" href="?{{ .QuerySetEncode "bots" "0" }}">without</a> + <a class="tag is-info" href="?{{ .QuerySetEncode "bots" "0" }}">no</a> + <a class="tag is-light" href="?{{ .QuerySetEncode "bots" "0" }}">bots</a> </span> </div> <div class="control"> <span class="tags has-addons"> - <a class="tag is-info" href="?{{ .QuerySetEncode "bots" "1" }}">bots</a> - <a class="tag is-light" href="?{{ .QuerySetEncode "bots" "1" }}">only</a> + <a class="tag is-info" href="?{{ .QuerySetEncode "bots" "1" }}">only</a> + <a class="tag is-light" href="?{{ .QuerySetEncode "bots" "1" }}">bots</a> </span> </div> {{ end }} @@ -75,20 +75,20 @@ {{ else }} <div class="control"> <span class="tags has-addons"> - <a class="tag is-info" href="?{{ datetimeRelative "-24h" | .QuerySetEncode "begin" }}">days</a> - <a class="tag is-light" href="?{{ datetimeRelative "-24h" | .QuerySetEncode "begin" }}">1</a> + <a class="tag is-info" href="?{{ datetimeRelative "-24h" | .QuerySetEncode "begin" }}">1</a> + <a class="tag is-light" href="?{{ datetimeRelative "-24h" | .QuerySetEncode "begin" }}">day</a> </span> </div> <div class="control"> <span class="tags has-addons"> - <a class="tag is-info" href="?{{ datetimeRelative "-168h" | .QuerySetEncode "begin" }}">days</a> - <a class="tag is-light" href="?{{ datetimeRelative "-168h" | .QuerySetEncode "begin" }}">7</a> + <a class="tag is-info" href="?{{ datetimeRelative "-168h" | .QuerySetEncode "begin" }}">7</a> + <a class="tag is-light" href="?{{ datetimeRelative "-168h" | .QuerySetEncode "begin" }}">days</a> </span> </div> <div class="control"> <span class="tags has-addons"> - <a class="tag is-info" href="?{{ datetimeRelative "-720h" | .QuerySetEncode "begin" }}">days</a> - <a class="tag is-light" href="?{{ datetimeRelative "-720h" | .QuerySetEncode "begin" }}">30</a> + <a class="tag is-info" href="?{{ datetimeRelative "-720h" | .QuerySetEncode "begin" }}">30</a> + <a class="tag is-light" href="?{{ datetimeRelative "-720h" | .QuerySetEncode "begin" }}">days</a> </span> </div> {{ end }} diff --git a/tmpl/hitView.tmpl b/tmpl/hitView.tmpl index f7d4dcb..6e7b5c8 100644 --- a/tmpl/hitView.tmpl +++ b/tmpl/hitView.tmpl @@ -11,7 +11,7 @@ {{ template "timeBarChart" .Hits }} </figure> {{ else }} - <p>No hits yet</p> + <p>No hits</p> {{ end }} </div> </section> @@ -41,7 +41,7 @@ {{ end }} </table> {{ else }} - <p>No page views yet</p> + <p>No page views</p> {{ end }} </div> </section> @@ -68,7 +68,7 @@ {{ end }} </table> {{ else }} - <p>No page views yet</p> + <p>No page views</p> {{ end }} </div> </section> @@ -92,7 +92,7 @@ {{ end }} </table> {{ else }} - <p>No referrers yet</p> + <p>No referrers</p> {{ end }} </div> </section> @@ -118,7 +118,7 @@ </tr> {{ end }} </table> - {{ else }} <p>No browsers visits yet</p> + {{ else }} <p>No browsers visits</p> {{ end }} </div> </section> diff --git a/tmpl/site.tmpl b/tmpl/site.tmpl index c44f8f0..d4deeb1 100644 --- a/tmpl/site.tmpl +++ b/tmpl/site.tmpl @@ -1,19 +1,14 @@ {{ define "content" }} {{ if .Site.ID }} - <header class="header header--site"> - <div class="header__title"> - {{ with .Site }} - <h1 class="title title--site">{{ .Name }}</h1> - {{ end }} - </div> - {{ if .Site.ID }} - {{ template "filter" . }} - {{ end }} - </header> + {{ with .Site }} + <h1 class="title title--site">{{ .Name }}</h1> + {{ end }} {{ else }} - <header class="header header--site"> - <h1 class="title--site">New Site</h1> - </header> + <h1 class="title title--newsite">New Site</h1> + {{ end }} + + {{ if .Site.ID }} + {{ template "filter" . }} {{ end }} {{ template "siteSummary" . }} |
