diff options
author | Kevin Chabowski <kevin@kch42.de> | 2014-12-28 13:12:05 +0100 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2014-12-28 13:12:05 +0100 |
commit | 7f87916725053f237464237e65fd673b86f65df2 (patch) | |
tree | 9997a2c7e313d2cfc0b57153f69af0b449083c60 /template.html | |
parent | ef9ce0a225b28a873dc7bbb55fad52da6c9ecb65 (diff) | |
download | startpage-7f87916725053f237464237e65fd673b86f65df2.tar.gz startpage-7f87916725053f237464237e65fd673b86f65df2.tar.bz2 startpage-7f87916725053f237464237e65fd673b86f65df2.zip |
Don't show link container when no links available
Diffstat (limited to 'template.html')
-rw-r--r-- | template.html | 16 |
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> | |