summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2014-12-28 13:12:05 +0100
committerKevin Chabowski <kevin@kch42.de>2014-12-28 13:12:05 +0100
commit7f87916725053f237464237e65fd673b86f65df2 (patch)
tree9997a2c7e313d2cfc0b57153f69af0b449083c60
parentef9ce0a225b28a873dc7bbb55fad52da6c9ecb65 (diff)
downloadstartpage-7f87916725053f237464237e65fd673b86f65df2.tar.gz
startpage-7f87916725053f237464237e65fd673b86f65df2.tar.bz2
startpage-7f87916725053f237464237e65fd673b86f65df2.zip
Don't show link container when no links available
-rw-r--r--template.html16
1 files changed, 9 insertions, 7 deletions
diff --git a/template.html b/template.html
index e23a7f3..2e502d3 100644
--- a/template.html
+++ b/template.html
@@ -67,13 +67,15 @@
<a href="{{ .Weather.URL }}"><img src="{{ .Weather.Icon }}" alt="" /></a>
<span id="temp">{{ .Weather.Temp.Value }}°</span>
</div>
- <div id="links">
- <ul>
- {{ range .Links }}
- <li><a href="{{ .URL }}">{{ .Title }}</a></li>
- {{ end }}
- </ul>
- </div>
+ {{ if .Links }}
+ <div id="links">
+ <ul>
+ {{ range .Links }}
+ <li><a href="{{ .URL }}">{{ .Title }}</a></li>
+ {{ end }}
+ </ul>
+ </div>
+ {{ end }}
<span id="earthporninfo">
<a href="http://reddit.com{{ .Porn.Permalink }}">{{ .Porn.Title }}</a>
|