Skip to content

Commit

Permalink
Merge pull request #65 from myrthos/development
Browse files Browse the repository at this point in the history
Merge development to main
  • Loading branch information
myrthos authored Oct 1, 2023
2 parents 73cba23 + ebe45d6 commit 39bfbe6
Show file tree
Hide file tree
Showing 21 changed files with 271 additions and 185 deletions.
2 changes: 1 addition & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ changelog:
labels:
- Semver-Minor
- enhancement
- title: 🐛 Bug fixes
- title: 🐛 Bug Fixes
labels:
- fix
- bugfix
Expand Down
Binary file modified assets/img/gridmasonry.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/scss/common/_variables-dart.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ $enable-important-utilities: true !default;
$navbar-toggler-focus-width: 0 !default;

$font-family-sans-serif: h.$theme-font, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;
$font-size-base: h.$font-size-base !default;;
$headings-font-weight: 600 !default;
$font-weight-lighter: lighter !default;
$font-weight-light: 200 !default;
Expand Down
1 change: 1 addition & 0 deletions assets/scss/common/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $navbar-toggler-focus-width: 0 !default;

// scss-docs-start font
$font-family-sans-serif: $theme-font, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default;
$font-size-base: $font-size-base !default;;
$headings-font-weight: 600 !default;
$font-weight-lighter: lighter !default;
$font-weight-light: 200 !default;
Expand Down
2 changes: 2 additions & 0 deletions config/_default/hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,6 @@ home = ["HTML", "RSS", "REDIR"]
# path = "github.com/gethinode/mod-leaflet"
[[module.imports]]
path = "github.com/myrthos/mod-mgallery"
[[module.imports]]
path = "github.com/gethinode/mod-lottie"
# toml-docs-end modules
3 changes: 2 additions & 1 deletion config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# toml-docs-start modules
[modules]
core = ["bootstrap", "flexsearch", "fontawesome"]
optional = ["katex", "mgallery"]
optional = ["katex", "lottie", "mgallery"]
excludeSCSS = ["bootstrap"]
disableTemplate = ["katex"]
[modules.fontawesome]
Expand Down Expand Up @@ -243,6 +243,7 @@
themeFont = "asap"
# themeFontPath = "https://fonts.googleapis.com/css2?family=Inter:wght@200;300;600&display=swap" # external path
themeFontPath = "/fonts" # local path
fontSizeBase = "1rem" # assumes the browser default, typically '16px'
# toml-docs-end font
# toml-docs-start build
purge = false
Expand Down
Binary file modified content/en/blog/headless/img/masonry.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ require (
github.com/gethinode/mod-fontawesome v1.4.0 // indirect
github.com/gethinode/mod-katex v1.0.2 // indirect
github.com/myrthos/mod-mgallery v0.1.10 // indirect
github.com/gethinode/mod-lottie v1.2.0 // indirect
)
11 changes: 11 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,14 @@ github.com/myrthos/mod-mgallery v0.1.9 h1:n7uDSL+L7f3dKzukpvUWIpSsJXKo0Eb1LGPmWQ
github.com/myrthos/mod-mgallery v0.1.9/go.mod h1:VqXPYp9gY+dxGQw+TP9zVgqgEHJFvlhL8Hhzar8CZAs=
github.com/myrthos/mod-mgallery v0.1.10 h1:56wo1h07DNGtz5X2EvKWbq92iKmF4IET1gxrVhPXOdE=
github.com/myrthos/mod-mgallery v0.1.10/go.mod h1:VqXPYp9gY+dxGQw+TP9zVgqgEHJFvlhL8Hhzar8CZAs=
github.com/gethinode/mod-lottie v1.0.0 h1:1CUZMcgN5FAyjjyuP3qkaOQ6M5sv6HUAbosW4sIT5VE=
github.com/gethinode/mod-lottie v1.0.0/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=
github.com/gethinode/mod-lottie v1.0.1 h1:+IE7xtnSVQpJS56oBJq9RWKZeFEfxrOZAqE3BSrS/u0=
github.com/gethinode/mod-lottie v1.0.1/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=
github.com/gethinode/mod-lottie v1.0.2 h1:QM/PJqEl1UhNNoPx6y7pVtwev/mDxUyWNHLqDB76YzI=
github.com/gethinode/mod-lottie v1.0.2/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=
github.com/gethinode/mod-lottie v1.1.0 h1:KnfOQ45xdv1tpsKCkF5OiE3QuT29ycppBfY6o+rWl/4=
github.com/gethinode/mod-lottie v1.1.0/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=
github.com/gethinode/mod-lottie v1.2.0 h1:9S0Y4PlEO66dIvFxayatmDEf8WWxqbLNLi4z563i2gM=
github.com/gethinode/mod-lottie v1.2.0/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs=

4 changes: 2 additions & 2 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@
{{ $next := . -}}
{{ with .OutputFormats.Get "html" -}}
<a class="next" href="{{ $next.RelPermalink }}">
{{- partial "assets/icon.html" (dict "icon" "fas arrow-left") }}&nbsp;{{ $next.Title }}</a>
{{- partial "assets/icon.html" (dict "icon" "fas arrow-left") }}&nbsp;{{ $next.LinkTitle }}</a>
{{- end -}}
{{ end -}}
</div>
<div class="col text-end">
{{ with .PrevInSection -}}
{{ $prev := . -}}
{{ with .OutputFormats.Get "html" -}}
<a class="previous" href="{{ $prev.RelPermalink }}">{{ $prev.Title }}&nbsp;{{- partial "assets/icon.html" (dict "icon" "fas arrow-right") }}</a>
<a class="previous" href="{{ $prev.RelPermalink }}">{{ $prev.LinkTitle }}&nbsp;{{- partial "assets/icon.html" (dict "icon" "fas arrow-right") }}</a>
{{- end -}}
{{ end -}}
</div>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/assets/breadcrumb.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
{{- range $index, $item := .Page.Ancestors.Reverse -}}
{{- $title := .Title -}}
{{- $title := .LinkTitle -}}
{{- if .IsHome }}{{ $title = T "home" }}{{ end -}}
{{- $address := or .RelPermalink (.Params.Redirect | relLangURL) -}}
{{ if $address }}
Expand All @@ -10,6 +10,6 @@
<li class="breadcrumb-item">{{ $title }}</li>
{{ end }}
{{- end -}}
<li class="breadcrumb-item active" aria-current="page">{{ .Page.Title }}</li>
<li class="breadcrumb-item active" aria-current="page">{{ .Page.LinkTitle }}</li>
</ol>
</nav>
4 changes: 2 additions & 2 deletions layouts/partials/assets/button.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@

{{- $attributes := .attributes -}}

<a aria-label="{{ or $label $title }}" {{ if ne $state "disabled" }}{{ with $href }}href="{{ . }}"{{ end }}{{ end -}}
<a aria-label="{{ (or $label $title) | safeHTML }}" {{ if ne $state "disabled" }}{{ with $href }}href="{{ . }}"{{ end }}{{ end -}}
{{- with $id }} id="{{ . }}"{{ end -}}
{{- with $target }} target="{{ . }}"{{ end }}{{ with $rel }} rel="{{ . }}"{{ end -}}
{{- with $toast }} data-toast-target="{{ $toast }}"{{ end -}}
Expand All @@ -157,7 +157,7 @@
{{- end -}}
>
<div class="d-flex justify-content-{{ $justify }}">
<div class="my-auto">{{ $title }}</div>
<div class="my-auto">{{ $title | safeHTML }}</div>
{{- with $icon }}<div class="align-self-center{{ if $title }}{{ if eq $order "first" }} order-first pe-1{{ else }} ps-1{{ end }}{{ end }}">{{ partial "assets/icon.html" (dict "icon" $icon) }}</div>{{ end }}
</div>

Expand Down
4 changes: 3 additions & 1 deletion layouts/partials/assets/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"class" Optional class attribute of the tab group, e.g. “nav-fill”.
"pane" Optional style of the panes, either "none" (default) or "persona".
"width" Optional responsive width of the tab group, either "50" or "100" (default).
"wrap" Optional flag to enable word wrapping of tab titles, defaults to false.
In addition, the following arguments are passed to the individual tabs.
"class" Optional class attribute of the tab element, e.g. “w-50”.
Expand Down Expand Up @@ -54,6 +55,7 @@
{{- $title := .title -}}
{{- $class := .class -}}
{{- $color := .color -}}
{{- $wrap := .wrap | default false -}}

{{ $supportedFlags := slice "true" "false" -}}
{{ $verticalParam := "false" -}}
Expand Down Expand Up @@ -81,7 +83,7 @@
<div class="nav{{ with $type }} nav-{{ . }}{{ end }}{{ with $class }} {{ . }}{{ end }}{{ if $vertical }} flex-column{{ end }}" id="nav-{{ $id }}" role="tablist"{{ if $vertical }} aria-orientation="vertical"{{ end }}>
{{- range $index, $item := $list -}}
{{ $show := eq $index 0}}
<button class="nav-link text-nowrap{{ if $show }} active{{ end }}" id="nav-{{ $id }}-btn-{{ $index }}" data-bs-toggle="pill" data-bs-target="#nav-{{ $id }}-{{ $index }}"
<button class="nav-link {{ if not $wrap }} text-nowrap{{ end }}{{ if $show }} active{{ end }}" id="nav-{{ $id }}-btn-{{ $index }}" data-bs-toggle="pill" data-bs-target="#nav-{{ $id }}-{{ $index }}"
type="button" role="tab" aria-controls="nav-{{ $id }}-{{ $index }}" aria-selected="{{ if eq $index 0 }}true{{ else }}false{{ end }}">
{{ $item.Title }}
</button>
Expand Down
29 changes: 16 additions & 13 deletions layouts/partials/head/stylesheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
{{- if site.Params.navigation.fixed }}{{ $navbarOffset = site.Params.navigation.offset | default "4em" }}{{ end }}
{{- $vars := dict
"theme-font" (default "Inter" site.Params.style.themeFont)
"font-size-base" (default "1rem" site.Params.style.fontSizeBase)
"primary" (default "#007bff" site.Params.style.primary)
"secondary" (default "#6c757d" site.Params.style.secondary)
"success" (default "#198754" site.Params.style.success)
Expand All @@ -48,19 +49,21 @@
{{- $options := (dict "transpiler" $transpiler "targetPath" $target "enableSourceMap" (not hugo.IsProduction) "vars" $vars) -}}
{{- $bundle := partial "utilities/bundle" (dict "match" $source "filename" (printf "scss/bundle-%d.scss" now.UnixNano) "modules" $modules "basepath" "scss" "debugging" site.Params.debugging.showSCSS) -}}

{{- $css := $bundle | resources.ExecuteAsTemplate $target . | toCSS $options -}}
{{- if gt ($bundle.Content | len) 0 }}
{{- $css := $bundle | resources.ExecuteAsTemplate $target . | toCSS $options -}}

{{ if $core }}
{{- partial "head/icons.html" (dict "css" $css) -}}
{{ end }}
{{- if site.Params.style.purge -}}
{{- $post_options := dict "config" "config" -}}
{{- $css = $css | resources.PostCSS $post_options -}}
{{- end -}}
{{ if $core }}
{{- partial "head/icons.html" (dict "css" $css) -}}
{{ end }}
{{- if site.Params.style.purge -}}
{{- $post_options := dict "config" "config" -}}
{{- $css = $css | resources.PostCSS $post_options -}}
{{- end -}}

{{- if not hugo.IsProduction -}}
<link rel="stylesheet" href="{{ if $absoluteURL }}{{ $css.Permalink }}{{ else }}{{ $css.RelPermalink }}{{ end }}">
{{- else -}}
{{- $css = $css | fingerprint | resources.PostProcess -}}
<link rel="stylesheet" href="{{ if $absoluteURL }}{{ $css.Permalink }}{{ else }}{{ $css.RelPermalink }}{{ end }}" integrity="{{ $css.Data.Integrity }}" crossorigin="anonymous">
{{- if not hugo.IsProduction -}}
<link rel="stylesheet" href="{{ if $absoluteURL }}{{ $css.Permalink }}{{ else }}{{ $css.RelPermalink }}{{ end }}">
{{- else -}}
{{- $css = $css | fingerprint | resources.PostProcess -}}
<link rel="stylesheet" href="{{ if $absoluteURL }}{{ $css.Permalink }}{{ else }}{{ $css.RelPermalink }}{{ end }}" integrity="{{ $css.Data.Integrity }}" crossorigin="anonymous">
{{- end -}}
{{- end -}}
4 changes: 2 additions & 2 deletions layouts/partials/utilities/link.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@
{{- end -}}
{{- end -}}

{{ if not $error }}
{{ if not $error -}}
<a {{ with $class }}class="{{ . }}" {{ end }}href="{{ $destination | safeURL }}"{{ with $target }} target="{{ . }}"{{ end }}{{ with $rel }} rel="{{ . }}"{{ end }}>{{ $text }}</a>
{{ end }}
{{- end }}
6 changes: 5 additions & 1 deletion layouts/shortcodes/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,15 @@
{{ $icon := .Get "icon" | default "" -}}
{{ $thumbnail := .Get "thumbnail" | default "" -}}

{{ if .Parent }}
{{ $class = (printf "h-100 %s" $class) }}
{{ end }}

{{ if not $error -}}
{{- $output := partial "assets/card.html" (dict
"path" $path
"title" $title
"class" (printf "h-100 %s" $class)
"class" $class
"gutter" $gutter
"color" $color
"padding" $padding
Expand Down
12 changes: 10 additions & 2 deletions layouts/shortcodes/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"type" Optional type of the tab group, either "tabs", "pills", or "underline".
"vertical" Optional flag to show vertical tabs instead of horizontal tabs (default).
"fade" Optional flag to make tab panes fade in.
"class": Optional class attribute of the tab group, e.g. “nav-fill”.
"class" Optional class attribute of the tab group, e.g. “nav-fill”.
"wrap" Optional flag to enable word wrapping of tab titles, defaults to false.
-->

{{- $id := printf "nav-%d" .Ordinal -}}
Expand Down Expand Up @@ -37,6 +38,13 @@
{{ errorf "Invalid value for param 'fade': %s" $fadeParam -}}
{{- end -}}

{{ $wrapParam := "false" -}}
{{- $wrap := false -}}
{{ with .Get "wrap" }}{{ $wrapParam = . }}{{ end -}}
{{ if not (in $supportedFlags $wrapParam) -}}
{{ errorf "Invalid value for param 'wrap': %s" $wrapParam -}}
{{- end -}}

{{- if and (eq $type "tabs") $vertical -}}
{{- errorf "Tabs do not support vertical layout" -}}
{{- end -}}
Expand Down Expand Up @@ -68,7 +76,7 @@
{{- range $index, $item := $items -}}
{{- $header := partial "utilities/GetVal.html" $item -}}
{{- $itemDisabled := in $disabled $index -}}
<button class="nav-link text-nowrap{{ if eq $index $showID }} active{{ end }} {{ if $itemDisabled}} disabled {{end }}" id="{{ $id }}-btn-{{ $index }}" data-bs-toggle="pill" data-bs-target="#{{ $id }}-{{ $index }}"
<button class="nav-link{{ if not $wrap }} text-nowrap{{ end }}{{ if eq $index $showID }} active{{ end }}{{ if $itemDisabled}} disabled {{end }}" id="{{ $id }}-btn-{{ $index }}" data-bs-toggle="pill" data-bs-target="#{{ $id }}-{{ $index }}"
type="button" role="tab" aria-controls="{{ $id }}-{{ $index }}" aria-selected="{{ if eq $index 0 }}true{{ else }}false{{ end }}">
{{ $header }}
</button>
Expand Down
2 changes: 1 addition & 1 deletion layouts/tags/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<p class="text-body-secondary mt-5">{{ $year }}</p>
{{ $.Scratch.Set "lastYear" $year }}
{{ end }}
<a href="{{ (path.Join .Page.RelPermalink) | relLangURL }}">{{ if .Draft }}{{ T "draft" | upper }}: {{end}}{{ .Title | .Page.RenderString }}</a>
<a href="{{ (path.Join .Page.RelPermalink) | relLangURL }}">{{ if .Draft }}{{ T "draft" | upper }}: {{ end }}{{ .Title | .Page.RenderString }}</a>
</div>
</div>
{{ end }}
Expand Down
10 changes: 5 additions & 5 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
command = "npm run build"

[build.environment]
DART_SASS_VERSION = "1.66.1"
DART_SASS_VERSION = "1.68.0"
HUGO_VERSION = "0.118.2"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
NODE_VERSION = "18.17.1"
NPM_VERSION = "9.6.7"
NODE_VERSION = "18.18.0"
NPM_VERSION = "9.8.1"
# toml-docs-end netlify

[[headers]]
Expand All @@ -25,14 +25,14 @@
style-src 'self' 'unsafe-hashes' 'report-sample' https://utteranc.es https://www.youtube.com \
'sha256-kFAIUwypIt04FgLyVU63Lcmp2AQimPh/TdYjy04Flxs=' 'sha256-XzJlZKVo+ff9ozww9Sr2p/2TbJXITZuaWMZ9p53zN1U=' \
'sha256-hqhQ1AAR6jgr9lel8hs9sNOeqSwsGx6HH+B7TkLcmyY=' 'sha256-9HupEqQsOKAA3TMVtaZh8USULhFpwYGuWFk+44sVSgg=' \
'sha256-uVrOu323DbALvO9XLsXSo1N3peMVuTC/lcentqDkW8A=' `sha256-1EpgJ5nIw5yOjtb0quQYVzvUweFMnvzELI9pm3pgbtc=';\
'sha256-uVrOu323DbALvO9XLsXSo1N3peMVuTC/lcentqDkW8A=' 'sha256-1EpgJ5nIw5yOjtb0quQYVzvUweFMnvzELI9pm3pgbtc=';\
object-src 'self'; \
base-uri 'self'; \
connect-src 'self' https://myrthos.goatcounter.com/count; \
font-src 'self' ; \
frame-src 'self' https://utteranc.es https://www.youtube-nocookie.com https://www.youtube.com; \
frame-ancestors 'none'; \
img-src 'self' data: https://i.vimeocdn.com https://i.ytimg.com https://img.youtube.com https://myrthos.goatcounter.com/count; \
img-src 'self' data: https://i.vimeocdn.com https://i.ytimg.com https://img.youtube.com https://myrthos.goatcounter.com/count https://myrthos.net; \
manifest-src 'self'; \
media-src 'self'; \
form-action 'self'; \
Expand Down
Loading

0 comments on commit 39bfbe6

Please sign in to comment.