-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathhugo-encryptor.html
45 lines (41 loc) · 1.18 KB
/
hugo-encryptor.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
{{ $_hugo_config := `{ "version": 1 }` }}
{{/*
## Hugo Encrypt
### Params:
- `password`:
require param
- Simple
{{% hugo-encryptor "your password" %}}
your content
{{% /hugo-encryptor %}}
*/}}
{{/* DEFAULTS */}}
<div class="hugo-encryptor-container">
<div class="hugo-encryptor-prompt">
{{ if eq .Site.Params.hugoEncryptorLanguage "en-us" }}
<p>Part of this article is encrypted with password:</p>
{{ else }}
<p>文章的部分内容被密码保护:</p>
{{ end }}
</div>
<div class="hugo-encryptor-form">
<input
class="hugo-encryptor-input"
placeholder='{{ if eq .Site.Params.hugoEncryptorLanguage "en-us" }}Please input the password{{ else }}请输入密码{{ end }}'
/>
<input
class="hugo-encryptor-button"
type="button"
value='{{ if eq .Site.Params.hugoEncryptorLanguage "en-us" }}Click to verify{{ else }}点击验证{{ end }}'
onclick="_click_handler(this)"
/>
</div>
<div
class="hugo-encryptor-cipher-text"
data-password="{{ .Get 0 }}"
style="display: none;"
>
<span style="display: none;">--- DON'T MODIFY THIS LINE ---</span>
{{ .Inner }}
</div>
</div>