Init
This commit is contained in:
commit
d0187f94d7
23 changed files with 2489 additions and 0 deletions
25
templates/index.html
Normal file
25
templates/index.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Spitfire Mod Store - Search</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Spitfire Mod Store</h1>
|
||||
<form action="/search" method="GET">
|
||||
<input type="text" name="q" placeholder="Search add-ons" required>
|
||||
<br><br>
|
||||
<label for="filter">Search Type:</label>
|
||||
<select name="filter" id="filter">
|
||||
<option value="">All</option>
|
||||
<option value="addon">Extension</option>
|
||||
<option value="theme">Theme</option>
|
||||
<option value="bundle">Bundle</option>
|
||||
<option value="layout">Layout</option>
|
||||
<option value="config">Configuration</option>
|
||||
</select>
|
||||
<br><br>
|
||||
<input type="submit" value="Search">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
54
templates/store.html
Normal file
54
templates/store.html
Normal file
|
@ -0,0 +1,54 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Search Results</title>
|
||||
<style>
|
||||
.theme-background {
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
padding: 20px;
|
||||
color: rgb(37, 37, 37);
|
||||
}
|
||||
.addon-icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
vertical-align: middle;
|
||||
margin-right: 8px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Search Results</h1>
|
||||
<ul>
|
||||
{{range .}}
|
||||
{{if eq .type "addon"}}
|
||||
<!-- AMO add-on / extension: icon shown before the name -->
|
||||
<li>
|
||||
<img src="{{.icon}}" alt="{{.name}} icon" class="addon-icon">
|
||||
<strong>{{.name}}</strong> [{{.type}}]
|
||||
<!-- <a href="/install?slug={{.slug}}">Install</a> -->
|
||||
<a href="{{.url}}" target="_blank">View</a>
|
||||
</li>
|
||||
{{else if eq .type "statictheme"}}
|
||||
<!-- Theme: background set to the last screenshot -->
|
||||
<li class="theme-background" style="background-image: url('{{last .screenshots}}');">
|
||||
<strong>{{.name}}</strong> [{{.type}}]
|
||||
<a href="{{.url}}" target="_blank">View</a>
|
||||
</li>
|
||||
{{else}}
|
||||
<!-- SPM items -->
|
||||
<li>
|
||||
<strong>{{.name}}</strong> [{{.release}} - {{.type}}]
|
||||
<a href="{{.downloadURL}}" target="_blank">Download</a>
|
||||
({{.os}}/{{.arch}})
|
||||
</li>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<li>No add-ons found.</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
|
||||
<a href="/">Back to Search</a>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue