diff options
author | Volpeon <git@volpeon.ink> | 2021-01-02 16:47:15 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2021-01-02 16:47:15 +0100 |
commit | 14375c5289e84690cacd0ec9b511cefef088f0a5 (patch) | |
tree | 6465075e5255be2851a7678d1a629ed23cd810b3 /assets | |
parent | Small design revisions (diff) | |
download | volpeon.ink-14375c5289e84690cacd0ec9b511cefef088f0a5.tar.gz volpeon.ink-14375c5289e84690cacd0ec9b511cefef088f0a5.tar.bz2 volpeon.ink-14375c5289e84690cacd0ec9b511cefef088f0a5.zip |
Use Pygments for syntax highlighting, design adjustments, preload fonts
Diffstat (limited to 'assets')
-rw-r--r-- | assets/css/_basics.scss | 4 | ||||
-rw-r--r-- | assets/css/components/_page-header.scss | 5 | ||||
-rw-r--r-- | assets/css/components/_page.scss | 7 | ||||
-rw-r--r-- | assets/css/scopes/_code.scss | 22 | ||||
-rw-r--r-- | assets/css/style.scss | 1 |
5 files changed, 36 insertions, 3 deletions
diff --git a/assets/css/_basics.scss b/assets/css/_basics.scss index 0b785d5..05d2974 100644 --- a/assets/css/_basics.scss +++ b/assets/css/_basics.scss | |||
@@ -44,8 +44,8 @@ code { | |||
44 | } | 44 | } |
45 | 45 | ||
46 | pre { | 46 | pre { |
47 | margin: 0; | 47 | margin: ($line-height * 1em) 0 0; |
48 | overflow: hidden; | 48 | overflow-x: auto; |
49 | color: var(--code-block--fg); | 49 | color: var(--code-block--fg); |
50 | font-size: $code-block--font-size; | 50 | font-size: $code-block--font-size; |
51 | line-height: $code-block--line-height; | 51 | line-height: $code-block--line-height; |
diff --git a/assets/css/components/_page-header.scss b/assets/css/components/_page-header.scss index 7cf2aa1..e97aaf7 100644 --- a/assets/css/components/_page-header.scss +++ b/assets/css/components/_page-header.scss | |||
@@ -18,6 +18,11 @@ | |||
18 | line-height: $code-block--line-height; | 18 | line-height: $code-block--line-height; |
19 | } | 19 | } |
20 | 20 | ||
21 | &__pre { | ||
22 | margin-top: 0; | ||
23 | overflow: hidden; | ||
24 | } | ||
25 | |||
21 | @media (max-width: map-get($breakpoints, 'sm')) { | 26 | @media (max-width: map-get($breakpoints, 'sm')) { |
22 | margin-left: 0; | 27 | margin-left: 0; |
23 | padding-left: 0; | 28 | padding-left: 0; |
diff --git a/assets/css/components/_page.scss b/assets/css/components/_page.scss index 21969d7..c9a4650 100644 --- a/assets/css/components/_page.scss +++ b/assets/css/components/_page.scss | |||
@@ -7,6 +7,11 @@ | |||
7 | } | 7 | } |
8 | } | 8 | } |
9 | 9 | ||
10 | &__code { | ||
11 | padding-left: calc(#{$subcontent--indent} - 2px); | ||
12 | border-left: 2px solid var(--obj); | ||
13 | } | ||
14 | |||
10 | &__prefixed { | 15 | &__prefixed { |
11 | position: relative; | 16 | position: relative; |
12 | margin-left: -1 * $page--item-prefix--width; | 17 | margin-left: -1 * $page--item-prefix--width; |
@@ -44,9 +49,9 @@ | |||
44 | &--pre { | 49 | &--pre { |
45 | $scale-factor: $font-size / $code-block--font-size; | 50 | $scale-factor: $font-size / $code-block--font-size; |
46 | 51 | ||
47 | margin-top: $line-height * 1em; | ||
48 | // margin-left: calc(#{-1 * $page--item-prefix--width} * #{$scale-factor}); | 52 | // margin-left: calc(#{-1 * $page--item-prefix--width} * #{$scale-factor}); |
49 | // padding-left: calc(#{$page--item-prefix--width} * #{$scale-factor}); | 53 | // padding-left: calc(#{$page--item-prefix--width} * #{$scale-factor}); |
54 | border-left: 0; | ||
50 | 55 | ||
51 | &::before { | 56 | &::before { |
52 | content: str-repeat('``\A', 40); | 57 | content: str-repeat('``\A', 40); |
diff --git a/assets/css/scopes/_code.scss b/assets/css/scopes/_code.scss new file mode 100644 index 0000000..cdc9425 --- /dev/null +++ b/assets/css/scopes/_code.scss | |||
@@ -0,0 +1,22 @@ | |||
1 | .s-code { | ||
2 | pre { | ||
3 | overflow-x: auto; | ||
4 | color: var(--fg-lo); | ||
5 | font-size: 1em; | ||
6 | line-height: $line-height; | ||
7 | } | ||
8 | |||
9 | .c { | ||
10 | color: var(--fg-hi); | ||
11 | } | ||
12 | |||
13 | .nt, | ||
14 | .kt, | ||
15 | .k, | ||
16 | .kr, | ||
17 | .o, | ||
18 | .si, | ||
19 | .p { | ||
20 | color: var(--fg); | ||
21 | } | ||
22 | } | ||
diff --git a/assets/css/style.scss b/assets/css/style.scss index 7986bd9..e89cbd6 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | @import 'layouts/container'; | 11 | @import 'layouts/container'; |
12 | 12 | ||
13 | @import 'scopes/code'; | ||
13 | @import 'scopes/page'; | 14 | @import 'scopes/page'; |
14 | 15 | ||
15 | @import 'utils'; | 16 | @import 'utils'; |