forked from timwis/jkan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.html
148 lines (120 loc) · 6.18 KB
/
admin.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
---
title: Administration
layout: default
permalink: /admin/
---
{% include breadcrumbs.html %}
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#general" aria-controls="general" role="tab" data-toggle="tab">General</a></li>
<li role="presentation"><a href="#authentication" aria-controls="authentication" role="tab" data-toggle="tab">Authentication</a></li>
<li role="presentation"><a href="#categories" aria-controls="categories" role="tab" data-toggle="tab">Categories</a></li>
<li role="presentation"><a href="#licenses" aria-controls="licenses" role="tab" data-toggle="tab">Licenses</a></li>
<li role="presentation"><a href="#theme" aria-controls="thtme" role="tab" data-toggle="tab">Theme</a></li>
<li role="presentation"><a href="#maintenance" aria-controls="maintenance" role="tab" data-toggle="tab">Maintenance</a></li>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="general">
<h2>General</h2>
<form data-component="admin-form" data-file-path="_config.yml">
<fieldset>
<div class="form-group">
<label for="title">Site Title</label>
<input type="text" class="form-control" id="title" name="title" value="{{ site.title }}">
</div>
<div class="form-group">
<label for="greeting">Site Greeting</label>
<input type="text" class="form-control" id="greeting" name="greeting" value="{{ site.greeting }}">
<p class="help-block">Displayed on the homepage</p>
</div>
<div class="form-group">
<label for="description">Site Description</label>
<textarea class="form-control" id="description" name="description">{{ site.description }}</textarea>
</div>
<div class="form-group">
<label for="baseurl">Base URL</label>
<input type="text" class="form-control" id="baseurl" name="baseurl" value="{{ site.baseurl }}" placeholder="ie. /JKAN">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</fieldset>
</form>
</div>
<div role="tabpanel" class="tab-pane" id="authentication">
<h2>Authentication</h2>
<form data-component="admin-form" data-file-path="_config.yml">
<fieldset>
<div class="form-group">
<label for="github_client_id">GitHub Client ID</label>
<input type="text" class="form-control" id="github_client_id" name="github_client_id" value="{{ site.github_client_id }}" placeholder="ie. 9098sdf876sdfs768az">
<p class="help-block"><a href="https://github.com/settings/applications/new">Register a Github application</a> to get a Client ID</p>
</div>
<div class="form-group">
<label for="gatekeeper_host">Gatekeeper Host</label>
<input type="text" class="form-control" id="gatekeeper_host" name="gatekeeper_host" value="{{ site.gatekeeper_host }}" placeholder="ie. http://jkan-gatekeeper.herokuapp.com">
<p class="help-block">Authentication server you deployed</p>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</fieldset>
</form>
</div>
<div role="tabpanel" class="tab-pane" id="categories">
<h2>Categories</h2>
{% assign category_fields = site.data.schemas[site[schema]].category_fields %}
<form data-component="categories-form editable-list" data-file-path="_data/categories.yml" data-item-label="category">
<div data-hook="items">
{% for category in site.data.categories %}
{% include admin-form-category.html %}
{% endfor %}
</div>
<div class="form-group">
<button type="button" class="btn btn-default" data-hook="add-item-btn"><i class="fa fa-plus"></i> Add Category</button>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
<script type="text/template" data-hook="item-template">
{% include admin-form-category.html %}
</script>
</form>
</div>
<div role="tabpanel" class="tab-pane" id="licenses">
<h2>Licenses</h2>
<form data-component="licenses-form editable-list" data-file-path="_data/licenses.yml" data-item-label="license">
<div data-hook="items">
{% for license in site.data.licenses %}
{% unless license[1] == 'Not Applicable' %}
{% include admin-form-license.html %}
{% endunless %}
{% endfor %}
</div>
<div class="form-group">
<button type="button" class="btn btn-default" data-hook="add-item-btn"><i class="fa fa-plus"></i> Add License</button>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
<script type="text/template" data-hook="item-template">
{% include admin-form-license.html %}
</script>
<input type="hidden" name="licenses[][license_url]" value="" />
<input type="hidden" name="licenses[][license_name]" value="Not Applicable" />
</form>
</div>
<div role="tabpanel" class="tab-pane" id="theme">
<h2>Theme</h2>
<div class="theme-gallery" data-component="theme-gallery" data-file-path="_config.yml">
{% for theme in site.data.themes %}
<div class="panel {% if site.jkan_theme == theme.name %}panel-primary{% else %}panel-default{% endif %}">
{% if theme.logo and theme.logo != empty %}<img src="{{ site.baseurl }}{{ theme.logo }}" alt="{{ theme.name }} logo">{% endif %}
<div class="panel-body">
{% if site.jkan_theme == theme.name %}
<button type="button" class="btn btn-default" disabled="disabled">Activated</button>
{% else %}
<button type="button" class="btn btn-default" data-hook="activate-btn" data-theme="{{ theme.name }}">Activate {{ theme.name }}</button>
{% endif %}
</div>
</div>
{% endfor %}
</div>
Themes provided by <a href="https://bootswatch.com/">Bootswatch</a> via <a href="https://www.bootstrapcdn.com/">BootstrapCDN</a>.
</div>
<div role="tabpanel" class="tab-pane" id="maintenance">
<h2>Site Maintenance</h2>
<a href="https://github.com/{{ site.github.owner_name }}/{{ site.github.project_title }}/compare/gh-pages...timwis:gh-pages?expand=1" class="btn btn-info">Check for updates</a>
</div>
</div>