|
@@ -1,88 +1,40 @@
|
1
|
1
|
+++
|
2
|
|
-title = "{{ replace .TranslationBaseName "-" " " | title }}"
|
3
|
|
-date = {{ .Date }}
|
|
2
|
+title = "Help {{ .Site.Data.theme.latest.version }}"
|
|
3
|
+date = {{ .Date }} # TODO: Remove?
|
4
|
4
|
expirydate = {{ .Date }}
|
5
|
|
-description = "Thank you for choosing After Dark. Please customize your installation."
|
6
|
5
|
noindex = true
|
7
|
6
|
toc = true
|
|
7
|
+type = "help"
|
|
8
|
+layout = "help"
|
|
9
|
+[installation]
|
|
10
|
+ sha512 = "{{ strings.TrimLeft "sha512-" .Site.Data.theme.latest.dist.integrity }}"
|
8
|
11
|
+++
|
9
|
12
|
|
10
|
|
-{{< hackcss-form name="validate" action="/post/welcome/" >}}
|
|
13
|
+{{< hackcss-form name="validate" action="/help/" >}}
|
11
|
14
|
{{< hackcss-formgroup name="validation" >}}
|
12
|
|
- {{< hackcss-label for="pgp" >}}
|
13
|
|
- 64-bit <abbr title="Pretty Good Privacy">PGP</abbr> key:
|
|
15
|
+ {{< hackcss-label for="sha512" >}}
|
|
16
|
+ <abbr title="Secure Hash Algorithm">SHA-512</abbr> Digest:
|
14
|
17
|
{{< /hackcss-label >}}
|
15
|
18
|
{{< hackcss-textinput
|
16
|
19
|
required="true"
|
17
|
20
|
autofocus="true"
|
18
|
21
|
autocomplete="off"
|
19
|
|
- value="BB73 67EE 9A70 A631"
|
20
|
|
- type="text" id="pgp" name="pgp"
|
21
|
|
- pattern="^(?:[A-Za-z0-9+/]{4}\s){3}(?:[A-Za-z0-9+/]{4})$" >}}
|
|
22
|
+ type="text" id="sha512" name="sha512"
|
|
23
|
+ pattern="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" >}}
|
22
|
24
|
{{< hackcss-helpblock >}}
|
23
|
|
- Submit with key to verify installation.
|
|
25
|
+ Submit with digest to validate installation.
|
24
|
26
|
{{< /hackcss-helpblock >}}
|
25
|
27
|
{{< /hackcss-formgroup >}}
|
26
|
28
|
{{< /hackcss-form >}}
|
27
|
29
|
|
28
|
|
-<script>
|
29
|
|
- (function (window, document, undefined) {
|
30
|
|
- "use strict";
|
31
|
|
- const key = 'BB73 67EE 9A70 A631';
|
32
|
|
- const confirm = fragment => {
|
33
|
|
- document.body.insertBefore(fragment, document.body.firstChild);
|
34
|
|
- const form = document.forms.validate;
|
35
|
|
- form.pgp.value = key;
|
36
|
|
- form.validation.classList.add('form-success');
|
37
|
|
- form.validation.disabled = true;
|
38
|
|
- const message = "Key verified. Valid installation detected."
|
39
|
|
- form.querySelector('.help-block').innerHTML = message;
|
40
|
|
- };
|
41
|
|
- const validate = (search, form) => {
|
42
|
|
- search.includes(key.replace(/\s/g,'+')) ? confirm(form) : challenge(form);
|
43
|
|
- };
|
44
|
|
- const challenge = fragment => {
|
45
|
|
- const body = document.body;
|
46
|
|
- if (body.firstChild === document.forms.validate) return;
|
47
|
|
- while (body.firstChild) body.removeChild(body.firstChild);
|
48
|
|
- body.insertBefore(fragment, body.firstChild);
|
49
|
|
- const form = document.forms.validate;
|
50
|
|
- const check = () => {
|
51
|
|
- const classes = form.validation.classList;
|
52
|
|
- if (form.checkValidity()) {
|
53
|
|
- classes.add('form-success');
|
54
|
|
- classes.remove('form-warning');
|
55
|
|
- } else {
|
56
|
|
- classes.add('form-warning');
|
57
|
|
- classes.remove('form-success');
|
58
|
|
- }
|
59
|
|
- };
|
60
|
|
- form.oninput = check;
|
61
|
|
- document.location.pathname !== '/' && (() => {
|
62
|
|
- form.validation.classList.add('form-error');
|
63
|
|
- document.title = "Please try again…";
|
64
|
|
- const help = form.querySelector('.help-block');
|
65
|
|
- help.innerHTML = help.innerHTML.replace(
|
66
|
|
- 'key', `<mark><b>${key}</b></mark>`
|
67
|
|
- );
|
68
|
|
- help.innerHTML = help.innerHTML.replace(' installation', '');
|
69
|
|
- })();
|
70
|
|
- };
|
71
|
|
- const initialize = () => {
|
72
|
|
- const fragment = document.createDocumentFragment();
|
73
|
|
- fragment.appendChild(document.forms.validate);
|
74
|
|
- (document.location.search.replace('?pgp=','').length)
|
75
|
|
- ? validate(location.search, fragment)
|
76
|
|
- : challenge(fragment);
|
77
|
|
- };
|
78
|
|
- document.onreadystatechange = () => {
|
79
|
|
- document.readyState === 'interactive' && initialize();
|
80
|
|
- };
|
81
|
|
- })(window, document);
|
82
|
|
-</script>
|
83
|
|
-
|
84
|
30
|
<!--more-->
|
85
|
31
|
|
|
32
|
+Welcome to the Online Help for After Dark. Here you will find instructions for configuring your site. Use the [Table of Contents](#TableOfContents) to quickly jump to any section.
|
|
33
|
+
|
|
34
|
+If you're unable to find what you're looking for, or just need a helping hand, please join the private telegram chatroom and ask for help. Active chatroom link can be found at the top of the `README` in the latest version of the theme.
|
|
35
|
+
|
|
36
|
+To return to this documentation at anytime use `hugo serve --buildExpired`.
|
|
37
|
+
|
86
|
38
|
# Module System
|
87
|
39
|
|
88
|
40
|
After Dark includes a custom module system and provides a number of prebuilt modules. Modules use Hugo [Theme Components](https://gohugo.io/themes/theme-components/) and are packaged using NPM for convenience. A summary of available modules can be found in the following table.
|