forked from timwis/jkan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.html
94 lines (74 loc) · 3.73 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
---
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="#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="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="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>