|
5 | 5 | --- |
6 | 6 | {% include breadcrumbs.html %} |
7 | 7 |
|
8 | | -<div class="alert alert-success" role="alert" data-hook="alert-success" style="display: none;"> |
9 | | - These settings have been <a href="#" data-hook="commit-url">saved</a> and the site is currently regenerating. |
10 | | -</div> |
| 8 | +<ul class="nav nav-tabs" role="tablist"> |
| 9 | + <li role="presentation" class="active"><a href="#general" aria-controls="general" role="tab" data-toggle="tab">General</a></li> |
| 10 | + <li role="presentation"><a href="#authentication" aria-controls="authentication" role="tab" data-toggle="tab">Authentication</a></li> |
| 11 | + <li role="presentation"><a href="#categories" aria-controls="categories" role="tab" data-toggle="tab">Categories</a></li> |
| 12 | + <li role="presentation"><a href="#maintenance" aria-controls="maintenance" role="tab" data-toggle="tab">Maintenance</a></li> |
| 13 | +</ul> |
11 | 14 |
|
12 | | -<div class="alert alert-danger" role="alert" data-hook="alert-error" style="display: none;"> |
13 | | - There was an error saving this page |
14 | | -</div> |
| 15 | +<div class="tab-content"> |
| 16 | + <div role="tabpanel" class="tab-pane active" id="general"> |
| 17 | + <h2>General</h2> |
| 18 | + <form data-component="admin-form" data-file-path="_config.yml"> |
| 19 | + |
| 20 | + <fieldset> |
| 21 | + |
| 22 | + <div class="form-group"> |
| 23 | + <label for="title">Site Title</label> |
| 24 | + <input type="text" class="form-control" id="title" name="title" value="{{ site.title }}"> |
| 25 | + </div> |
15 | 26 |
|
16 | | -<h1>Administration</h1> |
17 | | -<form data-component="admin-form" data-file-path="_config.yml"> |
| 27 | + <div class="form-group"> |
| 28 | + <label for="description">Site Description</label> |
| 29 | + <textarea class="form-control" id="description" name="description">{{ site.description }}</textarea> |
| 30 | + </div> |
18 | 31 |
|
19 | | - <fieldset> |
| 32 | + <div class="form-group"> |
| 33 | + <label for="baseurl">Base URL</label> |
| 34 | + <input type="text" class="form-control" id="baseurl" name="baseurl" value="{{ site.baseurl }}" placeholder="ie. /JKAN"> |
| 35 | + </div> |
20 | 36 |
|
21 | | - <div class="form-group"> |
22 | | - <label for="title">Site Title</label> |
23 | | - <input type="text" class="form-control" id="title" name="title" value="{{ site.title }}"> |
24 | | - </div> |
| 37 | + <button type="submit" class="btn btn-primary">Submit</button> |
25 | 38 |
|
26 | | - <div class="form-group"> |
27 | | - <label for="description">Site Description</label> |
28 | | - <textarea class="form-control" id="description" name="description">{{ site.description }}</textarea> |
29 | | - </div> |
| 39 | + </fieldset> |
30 | 40 |
|
31 | | - <div class="form-group"> |
32 | | - <label for="baseurl">Base URL</label> |
33 | | - <input type="text" class="form-control" id="baseurl" name="baseurl" value="{{ site.baseurl }}" placeholder="ie. /JKAN"> |
34 | | - </div> |
| 41 | + </form> |
| 42 | + </div> |
35 | 43 |
|
36 | | - <h3>Authentication</h3> |
| 44 | + <div role="tabpanel" class="tab-pane" id="authentication"> |
| 45 | + <h2>Authentication</h2> |
| 46 | + <form data-component="admin-form" data-file-path="_config.yml"> |
37 | 47 |
|
38 | | - <div class="form-group"> |
39 | | - <label for="github_client_id">GitHub Client ID</label> |
40 | | - <input type="text" class="form-control" id="github_client_id" name="github_client_id" value="{{ site.github_client_id }}" placeholder="ie. 9098sdf876sdfs768az"> |
41 | | - <p class="help-block"><a href="https://github.com/settings/applications/new">Register a Github application</a> to get a Client ID</p> |
42 | | - </div> |
| 48 | + <fieldset> |
43 | 49 |
|
44 | | - <div class="form-group"> |
45 | | - <label for="gatekeeper_host">Gatekeeper Host</label> |
46 | | - <input type="text" class="form-control" id="gatekeeper_host" name="gatekeeper_host" value="{{ site.gatekeeper_host }}" placeholder="ie. http://jkan-gatekeeper.herokuapp.com"> |
47 | | - <p class="help-block">Authentication server you deployed</p> |
48 | | - </div> |
| 50 | + <div class="form-group"> |
| 51 | + <label for="github_client_id">GitHub Client ID</label> |
| 52 | + <input type="text" class="form-control" id="github_client_id" name="github_client_id" value="{{ site.github_client_id }}" placeholder="ie. 9098sdf876sdfs768az"> |
| 53 | + <p class="help-block"><a href="https://github.com/settings/applications/new">Register a Github application</a> to get a Client ID</p> |
| 54 | + </div> |
49 | 55 |
|
50 | | - <button type="submit" class="btn btn-primary">Submit</button> |
| 56 | + <div class="form-group"> |
| 57 | + <label for="gatekeeper_host">Gatekeeper Host</label> |
| 58 | + <input type="text" class="form-control" id="gatekeeper_host" name="gatekeeper_host" value="{{ site.gatekeeper_host }}" placeholder="ie. http://jkan-gatekeeper.herokuapp.com"> |
| 59 | + <p class="help-block">Authentication server you deployed</p> |
| 60 | + </div> |
51 | 61 |
|
52 | | - <h3>Site Maintenance</h3> |
| 62 | + <button type="submit" class="btn btn-primary">Submit</button> |
53 | 63 |
|
54 | | - <div class="form-group"> |
55 | | - <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> |
56 | | - </div> |
| 64 | + </fieldset> |
57 | 65 |
|
58 | | - </fieldset> |
| 66 | + </form> |
| 67 | + </div> |
59 | 68 |
|
60 | | -</form> |
| 69 | + <div role="tabpanel" class="tab-pane" id="categories"> |
| 70 | + <h2>Categories</h2> |
| 71 | + {% assign category_fields = site.data.schemas[site[schema]].category_fields %} |
| 72 | + <form data-component="categories-form editable-list" data-file-path="_data/categories.yml" data-item-label="category"> |
| 73 | + <div data-hook="items"> |
| 74 | + {% for category in site.data.categories %} |
| 75 | + {% include admin-form-category.html %} |
| 76 | + {% endfor %} |
| 77 | + </div> |
| 78 | + <div class="form-group"> |
| 79 | + <button type="button" class="btn btn-default" data-hook="add-item-btn"><i class="fa fa-plus"></i> Add Category</button> |
| 80 | + </div> |
| 81 | + |
| 82 | + <button type="submit" class="btn btn-primary">Submit</button> |
| 83 | + |
| 84 | + <script type="text/template" data-hook="item-template"> |
| 85 | + {% include admin-form-category.html %} |
| 86 | + </script> |
| 87 | + </form> |
| 88 | + </div> |
| 89 | + |
| 90 | + <div role="tabpanel" class="tab-pane" id="maintenance"> |
| 91 | + <h2>Site Maintenance</h2> |
| 92 | + <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> |
| 93 | + </div> |
| 94 | +</div> |
0 commit comments