-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmapsTable.html
202 lines (201 loc) · 10.3 KB
/
mapsTable.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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
---
title: Community Maps
layout: default
permalink: /mapsTable
---
<link href="https://unpkg.com/[email protected]/dist/bootstrap-table.min.css" rel="stylesheet" >
<script>
function nameFormatter(value, row) {
return '<a href="/maps?view=' + row.yamlName + '">' + value + '</a>'
}
</script>
<style>
.mapCard-image-board.icon {
width:2.5rem;
height:2.5rem;
padding:4px;
}
.mapCard-image-background.icon {
width:2.5rem;
height:2.5rem;
}
</style>
<main role="main">
<!--- Main -->
<section class="jumbotron text-center">
<div class="container">
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container-fluid">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" aria-current="page" href="/">Home</a>
</li>
</ul></div>
</div>
</nav>
</div>
</section>
<section class="jumbotron text-center">
<div class="container">
<h1 class="jumbotron-heading">Community Maps</h1>
<p class="lead text-muted">{{ site.maps | size }} user submitted maps available for download.</p>
<p>
<a href="/maps" class="btn btn-secondary my-2">Cards</a>
<a href="/mapsTable" class="btn btn-primary my-2">Table</a>
<a href="{% link mapHelp.md %}" class="btn btn-secondary my-2">How to upload a Map</a>
</p>
</div>
</section>
<!--- Maps -->
<div class="album">
<div class="container-fluid">
<table class="table"
data-toggle="table"
data-search="true"
data-show-columns="true">
<thead>
<tr>
<th scope="col">Screenshot</th>
<th scope="col" data-field="yamlName" data-sortable="true" data-switchable="true" data-visible="false">Yaml File Name</th>
<th scope="col" data-field="folderName" data-sortable="true" data-switchable="true" data-visible="false">Folder Name</th>
<th scope="col" data-field="name" data-sortable="true" data-switchable="true" data-formatter="nameFormatter">Name</th>
<th scope="col" data-field="ruleSet" data-sortable="true" data-switchable="true" data-visible="true" >Rules</th>
<th scope="col" data-field="theme" data-sortable="true" data-switchable="true" data-visible="true" >Theme</th>
<th scope="col" data-field="background" data-sortable="true" data-switchable="true" data-visible="false">Background</th>
<th scope="col" data-field="initialCash" data-sortable="true" data-switchable="true" data-visible="true" >Initial Cash</th>
<th scope="col" data-field="targetAmount" data-sortable="true" data-switchable="true" data-visible="true" >Target Amount</th>
<th scope="col" data-field="baseSalary" data-sortable="true" data-switchable="true" data-visible="false">Base Salary</th>
<th scope="col" data-field="salaryIncrement" data-sortable="true" data-switchable="true" data-visible="false">Salary Increment</th>
<th scope="col" data-field="maxDiceRoll" data-sortable="true" data-switchable="true" data-visible="true" >Max Dice Roll</th>
<th scope="col" data-field="states" data-sortable="true" data-switchable="true" data-visible="false">Map States</th>
<th scope="col" data-field="tags" data-sortable="true" data-switchable="true" data-visible="true" >Tags</th>
<th scope="col" data-field="customBackground" data-sortable="true" data-switchable="true" data-visible="false">Custom Background</th>
<th scope="col" data-field="customMusic" data-sortable="true" data-switchable="true" data-visible="false">Custom Music</th>
<th scope="col" data-field="version" data-sortable="true" data-switchable="true" data-visible="false">Version</th>
<th scope="col" data-field="authors" data-sortable="true" data-switchable="true" data-visible="true" >Authors</th>
<th scope="col">Download</th>
<th scope="col">Repo</th>
</tr>
</thead>
<tbody>
{%- assign sorted_maps = site.maps | sort_natural: "name" -%}
{%- for map in sorted_maps -%}
{%- include getMapImage.liquid map=map number=0 %}
{%- assign mapUrl0 = gp_mapUrl %}
{%- if map.frbFile4 -%}
{%- capture frbFiles -%}
{{ map.frbFile1 }},{{map.frbFile2}},{{map.frbFile3}},{{map.frbFile4}}
{%- endcapture -%}
{%- elsif map.frbFile3 -%}
{%- capture frbFiles -%}
{{ map.frbFile1 }},{{map.frbFile2}},{{map.frbFile3}}
{%- endcapture -%}
{%- elsif map.frbFile2 -%}
{%- capture frbFiles -%}
{{ map.frbFile1 }},{{map.frbFile2}}
{%- endcapture -%}
{%- else -%}
{%- capture frbFiles -%}
{{ map.frbFile1 }}
{%- endcapture -%}
{%- endif -%}
{%- assign background = site.data.backgrounds | where: "background", map.background | first %}
<tr>
<td>
<div class="relative-container">
<a class="map-state" href="/maps?view={%- include renderMapSlug.liquid map=map -%}">
<img class="card-img-top mapCard-image-board icon" src="{{ mapUrl0 }}" loading="lazy">
</a>
<img class="card-img-top mapCard-image-background icon" src="{%- include renderMapBackground.liquid map=map -%}" loading="lazy">
</div>
</td>
<td>{%- include renderMapSlug.liquid map=map -%}</td>
<td>{{- gd_directory_name -}}</td>
<td>{{- map.name.en -}}</td>
<td>{{- map.ruleSet -}}</td>
<td>{{- map.theme -}}</td>
<td>{{- map.background -}}</td>
<td>{{- map.initialCash -}}</td>
<td>{{- map.targetAmount -}}</td>
<td>{{- map.baseSalary -}}</td>
<td>{{- map.salaryIncrement -}}</td>
<td>{{- map.maxDiceRoll -}}</td>
<td>{{- frbFiles | split: "," | uniq | size -}}</td>
<td>{{- map.tags | join: ", " -}}</td>
<td>
{%- if background.download -%}
Yes
{%- else -%}
No
{%- endif -%}
</td>
<td>
{%- if map.music -%}
Yes
{%- else -%}
No
{%- endif -%}
</td>
<td>
{%- if map.changelog -%}
{%- assign firstChange = map.changelog | first -%}
{{ firstChange.version }}
{%- endif -%}
</td>
<td>{{ map.authors | map: "name" | join: ", "}}</td>
<td>
{% if background.download or map.music.download -%}
<div class="btn-group" role="group">
{%- endif %}
<button class="btn btn-primary" onclick="GitZip.zipRepo('{%- include renderMapDownloadUrl.liquid map=map -%}');">Map</button>
{%- if background.download -%}
{% if background.download.first -%}
<div class="btn-group" role="group">
<button id="btnGroupBgDrop-{%- include renderMapSlugClass.liquid map=map -%}" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
Background
</button>
<ul class="dropdown-menu" aria-labelledby="btnGroupBgDrop-{%- include renderMapSlugClass.liquid map=map -%}">
{% for download in background.download -%}
<li><a class="dropdown-item" href="{{ download }}">{{ download | remove:'https://' | remove:'http://' | split:'/' | first }}</a></li>
{% endfor -%}
</ul>
</div>
{% else -%}
<a class="btn btn-primary" href="{{ background.download }}">Background</a>
{% endif -%}
{%- endif %}
{%- if map.music.download -%}
{% if map.music.download.first -%}
<div class="btn-group" role="group">
<button id="btnGroupMusicDrop-{%- include renderMapSlugClass.liquid map=map -%}" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
Music
</button>
<ul class="dropdown-menu" aria-labelledby="btnGroupMusicDrop-{%- include renderMapSlugClass.liquid map=map -%}">
{% for download in map.music.download -%}
<li><a class="dropdown-item" href="{{ download }}">{{ download | remove:'https://' | remove:'http://' | split:'/' | first }}</a></li>
{% endfor -%}
</ul>
</div>
{% else -%}
<a class="btn btn-primary" href="{{ map.music.download }}">Music</a>
{% endif -%}
{% endif -%}
{% if background.download or map.music.download -%}
</div>
{%- endif %}
</td>
<td><a href="{%- include renderMapDownloadUrl.liquid map=map -%}">View in Repository</a></td>
</tr>
{%- endfor -%}
</tbody>
</table>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<script src="https://unpkg.com/[email protected]/dist/bootstrap-table.min.js"></script>
</main>