Compare commits

..

11 Commits

Author SHA1 Message Date
6d786905ec file shortcode 2025-10-12 22:46:28 +00:00
c854afa1ee fix 2025-07-11 23:15:29 +00:00
fe2768af8c visual 2025-07-11 23:05:56 +00:00
702211b68a styles 2025-07-09 06:59:02 +00:00
f2b9fcb884 margins 2025-04-15 22:50:39 +00:00
6fac717306 change config format 2025-04-15 21:44:14 +00:00
dca9541eee section buttons layou 2024-12-08 20:15:08 +00:00
8681ac60cc section buttons layou 2024-12-08 20:14:08 +00:00
6654b9665c chmod 2024-12-07 17:09:37 +00:00
bcc7736af2 signer script 2024-12-07 16:42:27 +00:00
f91c80ddaf vault page 2024-12-07 16:06:52 +00:00
13 changed files with 113 additions and 46 deletions

View File

@@ -15,6 +15,7 @@ sections:
link: # /<section>/ link: # /<section>/
icon: # localpath from assets/icons/ w/o ext icon: # localpath from assets/icons/ w/o ext
# ... # ...
vaultPageLink: # /<somename.md>/
notice: notice:
# generator settings, no need to edit # generator settings, no need to edit

View File

@@ -25,10 +25,12 @@ h1,h2,h3,h4,h5,h6 {
} }
html { html {
font-size: 16px; font-size: 16px;
font-family: system-ui;
height: 100%; height: 100%;
scroll-behavior: smooth; scroll-behavior: smooth;
scrollbar-color: $color-fg-accent-op-m transparent; scrollbar-color: $color-fg-accent-op-m transparent;
line-height: 1.3; line-height: 1.3;
color-scheme: only dark;
} }
body { body {
height: 100%; height: 100%;
@@ -127,7 +129,7 @@ article {
object-fit: contain; object-fit: contain;
display: block; display: block;
width: 100%; width: 100%;
max-height: 30rem; max-height: 25rem;
border: 1px solid $color-bg-accent-light; border: 1px solid $color-bg-accent-light;
} }
figcaption { figcaption {
@@ -156,7 +158,7 @@ article {
ol { ol {
padding-left: 2rem; padding-left: 2rem;
li { li {
margin: 0.5em 0; margin: 0.25em 0;
line-height: 1.5; line-height: 1.5;
} }
} }
@@ -170,6 +172,13 @@ article {
h4, h4,
h5, h5,
h6 { h6 {
margin: 1.5em 0 0.5em 0; margin: 2em 0 0.5em 0;
}
h1 + h2,
h2 + h3,
h3 + h4,
h4 + h5,
h5 + h6 {
margin: 1em 0 0.5em 0 !important;
} }
} }

View File

@@ -76,7 +76,7 @@
/* section specific - single of classic */ /* section specific - single of classic */
.classic-layout-container header .content.post { .classic-layout-container header .content.post {
.pub-date { .status {
color: $color-fg-op-m; color: $color-fg-op-m;
margin: 1em 0; margin: 1em 0;
} }
@@ -110,7 +110,7 @@
} }
} }
.main-container { .main-container {
margin: $margin-base-y * 2 $margin-base-x $margin-base-y $margin-base-x; margin: $margin-base-y * 2 $margin-base-x;
} }
} }
} }

View File

@@ -91,30 +91,27 @@
flex-wrap: wrap; flex-wrap: wrap;
gap: 0.5rem; gap: 0.5rem;
.section-item { .section-item {
flex: 1;
white-space: nowrap; white-space: nowrap;
text-decoration: none; text-decoration: none;
box-shadow: 0 0 0.25rem rgba(0,0,0,0.5); box-shadow: 0 0 0.25rem rgba(0,0,0,0.5);
border-radius: 1rem;
border: 1px solid $color-fg-op-m;
&:hover { &:hover {
border: 1px solid $color-fg-accent; border: 1px solid $color-fg-accent;
} }
display: block; display: flex;
flex: 1 0 30%; justify-content: center;
border: 1px solid $color-fg-op-m; align-items: center;
border-radius: 1rem;
text-align: center;
padding: 1rem;
.icon { .icon {
height: 2.5rem; height: 2.5rem;
width: 2.5rem; width: 2.5rem;
vertical-align: middle;
color: $color-fg-op-m; color: $color-fg-op-m;
} }
.label { .label {
font-size: 1.3rem; font-size: 1.3rem;
font-weight: bold; font-weight: bold;
color: $color-fg-dark; color: $color-fg-dark;
vertical-align: middle;
margin: 0 0 0 0.75rem;
} }
} }
} }
@@ -133,6 +130,18 @@
flex-basis: 100%; flex-basis: 100%;
} }
} }
.home-layout-container .content.home .section-list {
.section-item {
flex-wrap: wrap;
padding: 1rem 0.75rem;
.icon {
flex-basis: 100%;
}
.label {
margin: 0.25rem 0 0 0;
}
}
}
} }
@mixin media--home-content-about_vert_middle { @mixin media--home-content-about_vert_middle {
.home-layout-container { .home-layout-container {
@@ -143,10 +152,14 @@
} }
} }
.home-layout-container .content.home .section-list { .home-layout-container .content.home .section-list {
.section-item .label { .section-item {
padding: 1rem;
.label {
margin: 0 0 0 0.75rem;
font-size: 1.6rem; font-size: 1.6rem;
} }
} }
}
} }
@mixin media--home-content-about_vert_middle_wide { @mixin media--home-content-about_vert_middle_wide {
.home-layout-container .content.home .section-list { .home-layout-container .content.home .section-list {

View File

@@ -1,4 +1,12 @@
@import "variables.scss"; $color-fg: #{{ .Site.Data.theme.color.fg }};
$color-fg-dark: #{{ .Site.Data.theme.color.fg_dark }};
$color-fg-accent: #{{ .Site.Data.theme.color.fg_accent }};
$color-bg: #{{ .Site.Data.theme.color.bg }};
$color-bg-accent-light: #{{ .Site.Data.theme.color.bg_accent_light }};
$color-bg-accent-dark: #{{ .Site.Data.theme.color.bg_accent_dark }};
$opacity-low: {{ .Site.Data.theme.opacity.low }};
$opacity-mid: {{ .Site.Data.theme.opacity.med }};
@import "basic.scss"; @import "basic.scss";
@import "classic-layout.scss"; @import "classic-layout.scss";
@import "home-layout.scss"; @import "home-layout.scss";

View File

@@ -1,9 +0,0 @@
$color-fg: #ffffff;
$color-fg-dark: #b8bcc1;
$color-fg-accent: #9988ff;
$color-bg: #0d1117;
$color-bg-accent-light: #510079;
$color-bg-accent-dark: #020030;
$opacity-low: 0.2;
$opacity-mid: 0.55;

21
data/theme.json Normal file
View File

@@ -0,0 +1,21 @@
{
"color": {
"fg": "ffffff",
"fg_dark": "b8bcc1",
"fg_accent": "9988ff",
"bg": "0d1117",
"bg_accent_light":"510079",
"bg_accent_dark":"020030"
},
"opacity": {
"low": 0.2,
"med": 0.55,
"high": 0.85
},
"font": {
"name_regular": "Roboto",
"name_mono": "Roboto Mono",
"size_base_pt": 12,
"size_step_pt": 1.5
}
}

13
init/import-environment.sh Normal file → Executable file
View File

@@ -1,14 +1,5 @@
#!/bin/sh #!/bin/sh
set -e set -e
cd "$(dirname "$0")/.." cd "$(dirname "$0")"
if [ ! -f "../../themes/yrzam/init/import-environment.sh" ]; then
echo "Wrong path" >&2
exit 1;
fi
VARS=$(printenv | \ cp ~/.config/theme.json ../data/theme.json
grep -E 'THEME_.*' | \
sed -e 's/[= ].*//g' | sed -e 's/^/\$/' | tr '\n' ' '
)
envsubst "$VARS" < "./assets/css/variables.scss.tmpl" > "./assets/css/variables.scss"

15
init/sign.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
set -e
cd "$(dirname "$0")/.."
[ -d ../../themes ] && cd ../..
rm -rf public
hugo
cd public
find . -type f -exec sha256sum {} \; | \
sed -E 's/(\w*) \.\//\1 /' | \
gpg -so index.sig --batch --yes
cp -f index.sig ../static

View File

@@ -1,7 +1,6 @@
{{ $hook_ctx := . }}
{{ with .Page.Resources.Get .Destination | resources.Copy (replaceRE "([^/]*)$" "_$1" (path.Join .Page.Path .Destination)) | fingerprint }} {{ with .Page.Resources.Get .Destination | resources.Copy (replaceRE "([^/]*)$" "_$1" (path.Join .Page.Path .Destination)) | fingerprint }}
<figure> <figure>
<a href="{{ .RelPermalink }}"><img src="{{ .RelPermalink }}"></a> <a href="{{ .RelPermalink }}"><img src="{{ .RelPermalink }}"></a>
{{- with $hook_ctx.Text }}<figcaption>{{ . }}</figcaption>{{ end -}} {{- with $.Text }}<figcaption>{{ . }}</figcaption>{{ end -}}
</figure> </figure>
{{ end }} {{ end }}

View File

@@ -6,7 +6,7 @@
<!-- prettier-ignore --> <!-- prettier-ignore -->
<title>{{ if not .IsHome }}{{ .LinkTitle | humanize }} - {{ end }}{{ .Site.Title }}</title> <title>{{ if not .IsHome }}{{ .LinkTitle | humanize }} - {{ end }}{{ .Site.Title }}</title>
{{ $opts := dict "transpiler" "libsass" "targetPath" "_style.css" }} {{ $opts := dict "transpiler" "libsass" "targetPath" "_style.css" }}
{{ with resources.Get "css/index.scss" | toCSS $opts | minify | fingerprint }} {{ with resources.Get "css/index.scss" | resources.ExecuteAsTemplate "" . | toCSS $opts | minify | fingerprint }}
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" /> <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" />
{{ end }} {{ end }}
{{ range resources.Match "favicon/*.png" }} {{ range resources.Match "favicon/*.png" }}

View File

@@ -4,10 +4,13 @@
{{ if .Title }}<h1>{{ .Title }}</h1>{{ end }} {{ if .Title }}<h1>{{ .Title }}</h1>{{ end }}
{{ if .Description }}<p>{{ .Description }}</p>{{ end }} {{ if .Description }}<p>{{ .Description }}</p>{{ end }}
{{ partial "taxo_of_single.html" . }} {{ partial "taxo_of_single.html" . }}
<div class="pub-date"> {{ if .Lastmod }}
mtime={{ .Lastmod.Format .Site.Params.dateFormat }} <div class="status">
mtime=<span class="mtime">{{ .Lastmod.Format .Site.Params.dateFormat }}</span>
archived={{ default false .Params.archived }} archived={{ default false .Params.archived }}
words={{ .WordCount }}
</div> </div>
{{ end }}
</div> </div>
{{- end -}} {{- end -}}
@@ -30,8 +33,11 @@
{{- end -}} {{- end -}}
{{- define "footer" -}} {{- define "footer" -}}
<!--div class="content post"> <div class="content post">
<a href="">download</a> | {{ with .Site.GetPage .Site.Home.Params.vaultPageLink}}
<a href="{{ relURL "/verification/" }}">verify</a> {{ if not (.Eq $.Page) }}
</div--> <a href="{{ .RelPermalink }}">save or verify</a>
{{ end }}
{{ end }}
</div>
{{- end -}} {{- end -}}

View File

@@ -0,0 +1,13 @@
{{- if gt ( len .Params ) 1 -}}
{{- $.Scratch.Set "format" ( .Get 1 ) -}}
{{- else -}}
{{- $splits := ( split ( .Get 0 ) "." ) -}}
{{- $splitsLength := ( len $splits ) -}}
{{- $format := ( index $splits ( sub $splitsLength 1 ) ) -}}
{{- $.Scratch.Set "format" $format -}}
{{- end -}}
{{- $file := ( .Get 0 ) -}}
{{- $format := ( $.Scratch.Get "format" ) -}}
{{- ( print "```" $format "\n" ( readFile $file ) "\n" "```" ) | markdownify -}}