hacked-jekyll 2.1.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +26 -17
- data/_layouts/home.html +38 -19
- data/_sass/_custom.scss +0 -0
- data/{assets/css/styles.css → _sass/_default.scss} +14 -15
- data/assets/css/styles.scss +26 -0
- metadata +16 -29
- data/_config.yml +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ba592fe39f6f44ba9ad4d91fbc85ecd2587904e82ce601faa654f499bf5416b
|
4
|
+
data.tar.gz: 23db9b8e6fe72b9c7a051d43cfd891dd7f013eeb1534902785f5761b8cd00a91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf735d4913817a341b9fc6e548d211dc051ba5a83dc130e7701035fee18441aa6c3a001ea4f08179c888e9a6cdc885f4195d266c6f34fc3e4b0ea9e301c0fb51
|
7
|
+
data.tar.gz: a9fe7ea5f9bb4f68bd3e09a91076984a5927924217093162f1046081f75157c56339559d688c28d930b3bf5fb43315d93c6b191c21cb3eb960e8e0ff24660d32
|
data/README.md
CHANGED
@@ -90,27 +90,36 @@ Finally, it is possible to render `value` as a hash, which is a list of key-valu
|
|
90
90
|
|
91
91
|
You can customize the appearance of the rendered JSON object using site variables. These have default values that can be overridden by specifying a new value in your `_config.yml` file.
|
92
92
|
|
93
|
-
| Variable
|
94
|
-
|
|
95
|
-
| `
|
96
|
-
| `
|
97
|
-
| `
|
98
|
-
| `
|
99
|
-
| `color_hover`
|
100
|
-
| `
|
101
|
-
| `
|
102
|
-
| `
|
103
|
-
|
104
|
-
|
93
|
+
| Variable | Default | Purpose |
|
94
|
+
| ------------- | :-------: | ---------------------------------------------------- |
|
95
|
+
| `color_bg` | `gray-9` | Set the background color |
|
96
|
+
| `color_punct` | `green-9` | Set the color of quotes, commas, and brackets |
|
97
|
+
| `color_key` | `green-4` | Set the color of keys |
|
98
|
+
| `color_value` | `green-4` | Set the color of values |
|
99
|
+
| `color_hover` | `green-5` | Set the color of values on hover (if they are links) |
|
100
|
+
| `quotes` | `true` | Display quote marks around keys and/or values |
|
101
|
+
| `commas` | `true` | Display commas between key-value pairs |
|
102
|
+
| `lowercase` | `true` | Transform all keys and/or values to lowercase |
|
103
|
+
| `newtab` | `false` | Open links in a new tab |
|
104
|
+
|
105
|
+
The `color_*` variables follow the Open Color library's naming convention ([read here](https://yeun.github.io/open-color/documents.html)). You can change them to any color in the library using the same convention. For example:
|
105
106
|
|
106
107
|
```yaml
|
107
|
-
color_bg:
|
108
|
-
color_punct:
|
109
|
-
|
110
|
-
|
108
|
+
color_bg: indigo-5
|
109
|
+
color_punct: teal-6
|
110
|
+
color_key: grape-7
|
111
|
+
color_value: lime-8
|
112
|
+
color_hover: cyan-9
|
111
113
|
```
|
112
114
|
|
113
|
-
|
115
|
+
The variables `quotes` and `lowercase` are true by default and can be set to false, but they can also be set to `keys` or `values` in order to restrict their effect to either keys or values. For example, the following code will display quote marks only around values and transform only keys to lowercase:
|
116
|
+
|
117
|
+
```yaml
|
118
|
+
quotes: values
|
119
|
+
lowercase: keys
|
120
|
+
```
|
121
|
+
|
122
|
+
It is possible to customize the CSS by creating a file `_sass/_custom.scss`. You can use this to define new styles as well as overwrite the theme's defaults. The file will be automatically compiled during build.
|
114
123
|
|
115
124
|
## Bugs
|
116
125
|
|
data/_layouts/home.html
CHANGED
@@ -2,13 +2,32 @@
|
|
2
2
|
layout: default
|
3
3
|
---
|
4
4
|
|
5
|
-
{%
|
6
|
-
{%
|
7
|
-
{%
|
8
|
-
{%
|
5
|
+
{% case site.quotes -%}
|
6
|
+
{% when 'keys' -%}
|
7
|
+
{% assign quote_key = '"' -%}
|
8
|
+
{% assign quote_value = '' -%}
|
9
|
+
{% when 'values' -%}
|
10
|
+
{% assign quote_key = '' -%}
|
11
|
+
{% assign quote_value = '"' -%}
|
12
|
+
{% when false -%}
|
13
|
+
{% assign quote_key = '' -%}
|
14
|
+
{% assign quote_value = '' -%}
|
15
|
+
{% else -%}
|
16
|
+
{% assign quote_key = '"' -%}
|
17
|
+
{% assign quote_value = '"' -%}
|
18
|
+
{% endcase -%}
|
19
|
+
|
20
|
+
{% if site.commas == false -%}
|
21
|
+
{% assign comma = '' -%}
|
22
|
+
{% else -%}
|
9
23
|
{% assign comma = ',' -%}
|
10
24
|
{% endif -%}
|
11
|
-
|
25
|
+
|
26
|
+
{% if site.newtab == true -%}
|
27
|
+
{% assign tab = '_blank' -%}
|
28
|
+
{% else -%}
|
29
|
+
{% assign tab = '_self' -%}
|
30
|
+
{% endif -%}
|
12
31
|
|
13
32
|
<div id="json">
|
14
33
|
{% for pair in site.data.json %}
|
@@ -19,23 +38,23 @@ layout: default
|
|
19
38
|
<span>{{ value }}</span>
|
20
39
|
{%- endfor %}
|
21
40
|
</div>
|
22
|
-
{{
|
23
|
-
{{
|
41
|
+
{{ quote_key }}<span class="key">{{ pair.key }}</span>{{ quote_key }}:
|
42
|
+
{{ quote_value }}<span class="value"><span id="typed"></span></span>{{ quote_value }}
|
24
43
|
{%- elsif pair.value.first.key -%}
|
25
|
-
{{
|
44
|
+
{{ quote_key }}<span class="key">{{ pair.key }}</span>{{ quote_key }}: [
|
26
45
|
{% for value in pair.value -%}
|
27
46
|
{% if value.url -%}
|
28
47
|
<p class="ms">
|
29
|
-
{{
|
30
|
-
{{
|
48
|
+
{{ quote_key }}<span class="key">{{ value.key }}</span>{{ quote_key }}:
|
49
|
+
{{ quote_value }}<a class="value" href="{{ value.url | relative_url }}" target="{{ tab }}">{{ value.value }}</a>{{ quote_value }}
|
31
50
|
{%- unless forloop.last -%}
|
32
51
|
{{ comma }}
|
33
52
|
{%- endunless %}
|
34
53
|
</p>
|
35
54
|
{% else -%}
|
36
55
|
<p class="ms">
|
37
|
-
{{
|
38
|
-
{{
|
56
|
+
{{ quote_key }}<span class="key">{{ value.key }}</span>{{ quote_key }}:
|
57
|
+
{{ quote_value }}<span class="value">{{ value.value }}</span>{{ quote_value }}
|
39
58
|
{%- unless forloop.last -%}
|
40
59
|
{{ comma }}
|
41
60
|
{%- endunless %}
|
@@ -44,18 +63,18 @@ layout: default
|
|
44
63
|
{%- endfor -%}
|
45
64
|
]
|
46
65
|
{%- elsif pair.value.first -%}
|
47
|
-
{{
|
66
|
+
{{ quote_key }}<span class="key">{{ pair.key }}</span>{{ quote_key }}: [
|
48
67
|
{% for value in pair.value -%}
|
49
68
|
{% if value.url -%}
|
50
69
|
<p class="ms">
|
51
|
-
{{
|
70
|
+
{{ quote_value }}<a class="value" href="{{ value.url | relative_url }}" target="{{ tab }}">{{ value.value }}</a>{{ quote_value }}
|
52
71
|
{%- unless forloop.last -%}
|
53
72
|
{{ comma }}
|
54
73
|
{%- endunless %}
|
55
74
|
</p>
|
56
75
|
{% else -%}
|
57
76
|
<p class="ms">
|
58
|
-
{{
|
77
|
+
{{ quote_value }}<span class="value">{{ value }}</span>{{ quote_value }}
|
59
78
|
{%- unless forloop.last -%}
|
60
79
|
{{ comma }}
|
61
80
|
{%- endunless %}
|
@@ -64,11 +83,11 @@ layout: default
|
|
64
83
|
{%- endfor -%}
|
65
84
|
]
|
66
85
|
{%- elsif pair.url -%}
|
67
|
-
{{
|
68
|
-
{{
|
86
|
+
{{ quote_key }}<span class="key">{{ pair.key }}</span>{{ quote_key }}:
|
87
|
+
{{ quote_value }}<a class="value" href="{{ pair.url | relative_url }}" target="{{ tab }}">{{ pair.value }}</a>{{ quote_value }}
|
69
88
|
{%- else -%}
|
70
|
-
{{
|
71
|
-
{{
|
89
|
+
{{ quote_key }}<span class="key">{{ pair.key }}</span>{{ quote_key }}:
|
90
|
+
{{ quote_value }}<span class="value">{{ pair.value }}</span>{{ quote_value }}
|
72
91
|
{%- endif -%}
|
73
92
|
{%- unless forloop.last -%}
|
74
93
|
{{ comma }}
|
data/_sass/_custom.scss
ADDED
File without changes
|
@@ -1,28 +1,25 @@
|
|
1
|
-
---
|
2
|
-
---
|
3
|
-
|
4
1
|
@font-face {
|
5
2
|
font-family: "hack";
|
6
|
-
|
3
|
+
font-display: swap;
|
7
4
|
font-style: normal;
|
8
5
|
font-weight: 400;
|
9
|
-
|
6
|
+
src: url("../webfonts/hack-regular-subset.woff2") format("woff2");
|
10
7
|
}
|
11
8
|
|
12
9
|
@font-face {
|
13
10
|
font-family: "hack";
|
14
|
-
|
11
|
+
font-display: swap;
|
15
12
|
font-style: italic;
|
16
13
|
font-weight: 400;
|
17
|
-
|
14
|
+
src: url("../webfonts/hack-italic-subset.woff2") format("woff2");
|
18
15
|
}
|
19
16
|
|
20
17
|
body {
|
21
18
|
font-family: "hack", monospace;
|
22
19
|
font-size: 16px;
|
23
20
|
font-weight: 400;
|
24
|
-
background-color:
|
25
|
-
color:
|
21
|
+
background-color: $color_bg;
|
22
|
+
color: $color_punct;
|
26
23
|
}
|
27
24
|
|
28
25
|
main {
|
@@ -59,7 +56,7 @@ a {
|
|
59
56
|
|
60
57
|
a:hover,
|
61
58
|
a:active {
|
62
|
-
color:
|
59
|
+
color: $color_hover;
|
63
60
|
}
|
64
61
|
|
65
62
|
#json {
|
@@ -87,11 +84,13 @@ a:active {
|
|
87
84
|
margin-left: 1.5rem;
|
88
85
|
}
|
89
86
|
|
87
|
+
.key {
|
88
|
+
color: $color_key;
|
89
|
+
text-transform: $transform_key;
|
90
|
+
}
|
91
|
+
|
90
92
|
.error,
|
91
|
-
.key,
|
92
93
|
.value {
|
93
|
-
|
94
|
-
text-transform:
|
95
|
-
{% endif -%}
|
96
|
-
color: {{ site.color_keyval }};
|
94
|
+
color: $color_value;
|
95
|
+
text-transform: $transform_value;
|
97
96
|
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
---
|
2
|
+
---
|
3
|
+
|
4
|
+
$color_bg: var(--oc-{{ site.color_bg | default: 'gray-9' }});
|
5
|
+
$color_punct: var(--oc-{{ site.color_punct | default: 'green-9' }});
|
6
|
+
$color_key: var(--oc-{{ site.color_key | default: 'green-4' }});
|
7
|
+
$color_value: var(--oc-{{ site.color_value | default: 'green-4' }});
|
8
|
+
$color_hover: var(--oc-{{ site.color_hover | default: 'green-5' }});
|
9
|
+
|
10
|
+
{% case site.lowercase -%}
|
11
|
+
{% when 'keys' -%}
|
12
|
+
$transform_key: lowercase;
|
13
|
+
$transform_value: none;
|
14
|
+
{% when 'values' -%}
|
15
|
+
$transform_key: none;
|
16
|
+
$transform_value: lowercase;
|
17
|
+
{% when false -%}
|
18
|
+
$transform_key: none;
|
19
|
+
$transform_value: none;
|
20
|
+
{% else -%}
|
21
|
+
$transform_key: lowercase;
|
22
|
+
$transform_value: lowercase;
|
23
|
+
{% endcase -%}
|
24
|
+
|
25
|
+
@import "default";
|
26
|
+
@import "custom";
|
metadata
CHANGED
@@ -1,63 +1,49 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hacked-jekyll
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piazzai
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: github-pages
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 4.3.3
|
19
|
+
version: '231'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 4.3.3
|
26
|
+
version: '231'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
28
|
+
name: webrick
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
31
|
- - "~>"
|
38
32
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
40
|
-
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - "~>"
|
33
|
+
version: '1.8'
|
34
|
+
- - '='
|
45
35
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: jekyll-sitemap
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '1.4'
|
36
|
+
version: 1.8.1
|
54
37
|
type: :runtime
|
55
38
|
prerelease: false
|
56
39
|
version_requirements: !ruby/object:Gem::Requirement
|
57
40
|
requirements:
|
58
41
|
- - "~>"
|
59
42
|
- !ruby/object:Gem::Version
|
60
|
-
version: '1.
|
43
|
+
version: '1.8'
|
44
|
+
- - '='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.8.1
|
61
47
|
description:
|
62
48
|
email:
|
63
49
|
- 42124135+piazzai@users.noreply.github.com
|
@@ -67,17 +53,18 @@ extra_rdoc_files: []
|
|
67
53
|
files:
|
68
54
|
- LICENSE
|
69
55
|
- README.md
|
70
|
-
- _config.yml
|
71
56
|
- _data/json.yml
|
72
57
|
- _layouts/404.html
|
73
58
|
- _layouts/default.html
|
74
59
|
- _layouts/home.html
|
60
|
+
- _sass/_custom.scss
|
61
|
+
- _sass/_default.scss
|
75
62
|
- assets/android-chrome-192x192.png
|
76
63
|
- assets/android-chrome-512x512.png
|
77
64
|
- assets/apple-touch-icon.png
|
78
65
|
- assets/css/normalize.css
|
79
66
|
- assets/css/open-color.css
|
80
|
-
- assets/css/styles.
|
67
|
+
- assets/css/styles.scss
|
81
68
|
- assets/favicon-16x16.png
|
82
69
|
- assets/favicon-32x32.png
|
83
70
|
- assets/favicon.ico
|
data/_config.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
title: ""
|
2
|
-
description: ""
|
3
|
-
baseurl: ""
|
4
|
-
url: ""
|
5
|
-
|
6
|
-
lowercase: true
|
7
|
-
color_bg: var(--oc-gray-9)
|
8
|
-
color_punct: var(--oc-green-9)
|
9
|
-
color_keyval: var(--oc-green-4)
|
10
|
-
color_hover: var(--oc-green-5)
|
11
|
-
show_quotes: true
|
12
|
-
show_commas: true
|
13
|
-
target: "_self"
|
14
|
-
|
15
|
-
plugins:
|
16
|
-
- jekyll-seo-tag
|
17
|
-
- jekyll-sitemap
|