Skip to content

Commit

Permalink
feat: update for Doks v1.0.0-beta.2
Browse files Browse the repository at this point in the history
  • Loading branch information
h-enk committed Jun 9, 2023
1 parent 210caaa commit 6e9806e
Show file tree
Hide file tree
Showing 12 changed files with 1,338 additions and 1,208 deletions.
16 changes: 8 additions & 8 deletions assets/scss/common/_global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,11 @@ li input[type="checkbox"]:checked {
}
}

.content .icon {
.content .svg-inline {
margin-bottom: 1.5rem;
}

.content .icon:not(.icon-custom) {
.content .svg-inline:not(.svg-inline-custom) {
height: 1.5rem;
width: 1.5rem;
stroke-width: 1.5;
Expand Down Expand Up @@ -430,24 +430,24 @@ li input[type="checkbox"]:checked {
}
}

.icon-lightmode {
.svg-lightmode {
display: block;
}

.icon-darkmode {
.svg-darkmode {
display: none;
}

.icon-monochrome path {
.svg-monochrome path {
fill: $db-bluishCyan-100;
}

@include color-mode(dark) {
.icon-lightmode {
.svg-lightmode {
display: none;
}

.icon-darkmode {
.svg-darkmode {
display: block;
}

Expand All @@ -456,7 +456,7 @@ li input[type="checkbox"]:checked {
fill: $white;
}

.icon-monochrome path {
.svg-monochrome path {
fill: $da-gray-125;
}

Expand Down
6 changes: 3 additions & 3 deletions assets/scss/components/_callouts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
margin-top: -.25rem;
}

.icon {
.svg-inline {
position: relative;
margin: -0.25rem 0 0;
}
Expand All @@ -41,8 +41,8 @@
text-transform: uppercase;
font-size: 1rem;

.icon {
margin-right: 0.5rem;
.svg-inline {
margin-right: 0.25rem;
}
}

Expand Down
20 changes: 20 additions & 0 deletions assets/scss/components/_images.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*
figure {
margin: 0 0 1rem;
display: inline-block;
Expand Down Expand Up @@ -60,6 +61,25 @@ figure.wide .figure-caption {
margin-top: 0.375rem;
margin-bottom: 1.25rem;
}
*/

img[data-sizes="auto"] {
display: block;
width: 100%;
}

.figure {
display: block;
}

.blur-up {
filter: blur(5px);
transition: filter 400ms;
}

.blur-up.lazyloaded {
filter: unset;
}

.content .gitpod-mark-monochrome.icon {
margin-bottom: 0.125rem;
Expand Down
59 changes: 59 additions & 0 deletions config/_default/module.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[[mounts]]
source = "node_modules/@hyas/doks-core/archetypes"
target = "archetypes"

[[mounts]]
source = "node_modules/@hyas/doks-core/assets"
target = "assets"

[[mounts]]
source = "node_modules/@hyas/doks-core/content"
target = "content"

[[mounts]]
source = "node_modules/@hyas/doks-core/data"
target = "data"

[[mounts]]
source = "node_modules/@hyas/doks-core/i18n"
target = "i18n"

[[mounts]]
source = "node_modules/@hyas/doks-core/layouts"
target = "layouts"

[[mounts]]
source = "node_modules/@hyas/doks-core/static"
target = "static"

[[mounts]]
source = "node_modules/flexsearch"
target = "assets/js/vendor/flexsearch"

[[mounts]]
source = "archetypes"
target = "archetypes"

[[mounts]]
source = "assets"
target = "assets"

[[mounts]]
source = "content"
target = "content"

[[mounts]]
source = "data"
target = "data"

[[mounts]]
source = "i18n"
target = "i18n"

[[mounts]]
source = "layouts"
target = "layouts"

[[mounts]]
source = "static"
target = "static"
7 changes: 6 additions & 1 deletion layouts/_default/term.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ <h1 class="text-center">{{ .Title }}</h1>
<div class="card">
{{ $image := .Resources.GetMatch (printf "**%s" (index .Params.images 0)) -}}
{{ if $image -}}
{{ partial "lazyimg" (dict "img" $image "alt" .Title "class" "img-fluid w-100 h-auto rounded-0") }}
{{ partial "picture" (dict
"ctx" .
"src" $image
"alt" .Title
"class" "img-fluid blur-up w-100 h-auto rounded-0"
)}}
{{ end -}}
<div class="card-body">
<article>
Expand Down
7 changes: 6 additions & 1 deletion layouts/blog/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ <h1 class="text-center">{{ .Title }}</h1>
<div class="card">
{{ $image := .Resources.GetMatch (printf "**%s" (index .Params.images 0)) -}}
{{ if $image -}}
{{ partial "lazyimg" (dict "img" $image "alt" .Title "class" "img-fluid w-100 h-auto rounded-0") }}
{{ partial "picture" (dict
"ctx" .
"src" $image
"alt" .Title
"class" "img-fluid blur-up w-100 h-auto rounded-0"
)}}
{{ end -}}
<div class="card-body">
<article>
Expand Down
7 changes: 6 additions & 1 deletion layouts/blog/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ <h1>{{ .Title }}</h1>
{{ $image := .Resources.GetMatch (printf "**%s" (index .Params.images 0)) -}}
{{ if $image -}}
<div class="col-md-13">
{{ partial "lazyimg" (dict "img" $image "alt" .Title "class" "img-fluid img-post-single w-100 h-auto rounded-0") }}
{{ partial "picture" (dict
"ctx" .
"src" $image
"alt" .Title
"class" "img-fluid blur-up img-post-single w-100 h-auto rounded-0"
)}}
</div>
{{ end -}}

Expand Down
7 changes: 6 additions & 1 deletion layouts/legal/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ <h1>{{ .Title }}</h1>
{{ $image := .Resources.GetMatch (printf "**%s" (index .Params.images 0)) -}}
{{ if $image -}}
<div class="col-md-13">
{{ partial "lazyimg" (dict "img" $image "alt" .Title "class" "img-fluid img-post-single w-100 h-auto rounded-0") }}
{{ partial "picture" (dict
"ctx" .
"src" $image
"alt" .Title
"class" "img-fluid blur-up img-post-single w-100 h-auto rounded-0"
)}}
</div>
{{ end -}}

Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/header/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{{ end -}}

<!-- Site title -->
<a class="navbar-brand me-auto me-lg-3" href="{{ "/" | absURL }}">{{ .Site.Params.Title }}</a>
<a class="navbar-brand me-auto me-lg-3" href="{{ "/" | absURL }}">{{ .Site.Title }}</a>

<!-- FlexSearch mobile -->
{{ partial "main/showFlexSearch" . }}
Expand Down
4 changes: 2 additions & 2 deletions layouts/shortcodes/callout.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

<div class="callout callout-{{ $css_class }} d-flex flex-{{ $flex_direction }}">
{{- if and $icon $title -}}
<div class="callout-title">{{ partial "svg" $icon }}{{ $title | safeHTML }}</div>
<div class="callout-title">{{ partial "inline-svg" (dict "src" $icon "stroke-width" "1.5") }}{{ $title | safeHTML }}</div>
{{- else if $icon -}}
<div class="callout-icon me-2">{{ partial "svg" $icon }}</div>
<div class="callout-icon me-2">{{ partial "inline-svg" (dict "src" $icon "stroke-width" "1.5") }}</div>
{{- else if $title -}}
<p class="callout-title">{{ $title | safeHTML }}</p>
{{- end -}}
Expand Down
Loading

0 comments on commit 6e9806e

Please sign in to comment.