forked from zincarla/go-image-board
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimageresults.html
73 lines (73 loc) · 2.56 KB
/
imageresults.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{{template "header.html" .}}
<body>
{{template "headMenu.html" .}}
<div id="BodyContent">
<div id="SideMenu" class="cellDefaultHidden">
{{template "mainSearchForm.html" .}}
{{if eq .ViewMode "stream"}}
<a href="/images?SearchTerms={{.OldQuery}}&ViewMode=grid">
Grid View
</a>
{{else}}
<a href="/images?SearchTerms={{.OldQuery}}&ViewMode=stream">
Stream View
</a>
{{end}}
<br>
<a href="#" onclick="ToggleFormDisplay('startSlideShow'); return false;">SlideShow</a>
<form method="GET" action="/images" id="startSlideShow" class="displayHidden">
<input type="hidden" value="{{.OldQuery}}" name="SearchTerms">
<input type="hidden" value="slideshow" name="ViewMode">
<label>Speed (Seconds)</label><input type="number" value="{{.SlideShowSpeed}}" name="slideshowspeed">
<input type="submit" value="Start Slideshow">
</form>
<ul>
{{$OldQuery := .OldQuery}}
{{if .Tags}}
<li><h5>Tags</h5></li>
{{range .Tags}}
{{if eq .FromUserFilter false}}
{{if .Exists}}
<li>{{if .Exclude}} - {{end}}{{.Name}} {{if ne .ID 0}}<a href="/tag?ID={{.ID}}&SearchTerms={{$OldQuery}}">?</a>{{else}}<a href="/about/tags.html?SearchTerms={{$OldQuery}}">?</a>{{end}}</li>
{{end}}
{{end}}
{{end}}
<li><h6>Filter Tags</h6></li>
{{range .Tags}}
{{if .FromUserFilter}}
{{if .Exists}}
<li>{{if .Exclude}} - {{end}}{{.Name}} {{if ne .ID 0}}<a href="/tag?ID={{.ID}}&SearchTerms={{$OldQuery}}">?</a>{{else}}<a href="/about/tags.html?SearchTerms={{$OldQuery}}">?</a>{{end}}</li>
{{end}}
{{end}}
{{end}}
<li><h5>Invalid Tags</h5></li>
{{range .Tags}}
{{if eq .Exists false}}
<li>{{if .Exclude}} - {{end}}{{.Name}}</li>
{{end}}
{{end}}
{{end}}
</ul>
</div>
<div id="ImageGridContainer">
{{$OldQuery := .OldQuery}}
{{$StreamView := eq .ViewMode "stream"}}
{{range .ImageInfo}}
{{if $StreamView}}
<div class="Full ImageResultContainer">
{{.Location | getEmbed}}
<a href="/image?ID={{.ID}}&SearchTerms={{$OldQuery}}">
Go to this post
</a>
</div>
{{else}}
<div class="ImageResultContainer"><a href="/image?ID={{.ID}}&SearchTerms={{$OldQuery}}"><img alt="Preview image of {{.Name}}" title="{{.Name}}" src="/thumbs/{{.Location}}" /><div class="imageResultOverlay overlay{{.Location | getimagetype}}"></div></a></div>
{{end}}
{{end}}
</div>
</div>
<div id="PageMenu">
{{.PageMenu}}<br>
<span id="ImageCount">{{.TotalResults}} Images!</span>
</div>
{{template "footer.html" .}}