-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbrowse-list.html
More file actions
106 lines (101 loc) · 4.41 KB
/
Copy pathbrowse-list.html
File metadata and controls
106 lines (101 loc) · 4.41 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{% extends "templates/layout.html" %}
{% block styles %}
<link rel="stylesheet" type="text/css" href="{{ path_for('styles', {'filename': 'index.css'}) }}" />
<link rel="stylesheet" type="text/css" href="{{ path_for('styles', {'filename': 'stylesheet.css'}) }}" />
<link rel="stylesheet" type="text/css" href="{{ path_for('styles', {'filename': 'typeahead.css'}) }}" />
<link rel="stylesheet" type="text/css" href="{{ path_for('styles', {'filename': 'navigation.css'}) }}" />
<link rel="stylesheet" type="text/css" href="{{ path_for('styles', {'filename': 'listing.css'}) }}" />
{% endblock %}
{% block scripts %}
<script type="text/javascript">
var gameshort = "{{ gameshort }}";
var page = {{ page }};
var url = "{{ url }}";
var search = {{ search }};
</script>
<script src="{{ path_for('scripts', {'filename' : 'browse-list.js'}) }}"></script>
<script type="text/javascript">
fillBrowseList();
</script>
{% endblock %}
{% block title %}
{% if search == "true" %}
<title>Search {{ site_name }}</title>
{% else %}
<title>{{ name }} on {{ site_name }}</title>
{% endif %}
{% endblock %}
{% block search %}
<form class="navbar-form navbar-right" role="search" action="/search" method="GET" style="margin-right: 5px;">
<div class="form-group">
<input type="text" class="form-control search-box" name="query" placeholder="Search mods..." value="{{query}}">
</div>
</form>
{% endblock %}
{% block body %}
<div class="well">
<div class="container">
{% if rss %}
<a href="{{ rss }}" class="pull-right"><img src="{{ path_for('images', {'filename': 'rss.png'}) }}" height=38 /></a>
{% endif %}
{% if search == "true" %}
<a href="#" class="pull-right" data-toggle="modal" data-target="#advanced-modal">Advanced Search</a>
<h1>Search results for "{{ query }}"</h1>
{% else %}
<h1>{{ name }}</h1>
{% endif %}
</div>
</div>
<div class="container">
<p id="nosearchresult" v-if="browse.count == 0">Nothing to see here. If you're looking for a specific mod, why not ask the modder to upload it here?</p>
<div class="row" id="modcontainer">
<mod-box v-for="_mod in browse.data" v-bind:mod="url == '/browse/featured' ? _mod.mod : _mod" v-bind:currentUser="currentUser"></mod-box>
</div>
<div style="margin-top: 30px" class="row">
<div class="col-md-2">
{% if search %}
{# TODO #}
{% else %}
<a v-bind:href="url + '?page=' + (page - 1)" v-bind:disabled="page == 1" id="previous-button"
class="btn btn-lg btn-primary btn-block">
<span class="fa fa-arrow-left"></span> Previous
</a>
{% endif %}
</div>
<div class="col-md-2 col-md-offset-8">
{% if search %}
{# TODO #}
{% else %}
<a v-bind:href="url + '?page=' + (page + 1)" v-bind:disabled="page >= (mods.count / 30)" id="next-button"
class="btn btn-lg btn-primary btn-block">
Next <span class="fa fa-arrow-right"></span>
</a>
{% endif %}
</div>
</div>
</div>
<div class="modal fade" id="advanced-modal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span>×</span></button>
<h4 class="modal-title">Advanced Search</h4>
</div>
<div class="modal-body">
<p>By using special search terms, you can narrow your results. Try these:</p>
<ul>
<li><code>user:[author]</code> for mods by [author]</li>
<li><code>ksp:[version]</code> for mods compatible with [version]</li>
<li><code>downloads:>[count]</code> for mods with at least [count] downloads</li>
<li><code>downloads:<[count]</code> for mods with fewer than [count] downloads</li>
<li><code>followers:>[count]</code> for mods with at least [count] followers</li>
<li><code>followers:<[count]</code> for mods with fewer than [count] followers</li>
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Got it</button>
</div>
</div>
</div>
</div>
{% endblock %}