summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--config/_default/params.toml6
-rwxr-xr-xcontent/persons/_index.md24
-rw-r--r--hugo_stats.json2
-rw-r--r--layouts/shortcodes/navbar.html55
4 files changed, 59 insertions, 28 deletions
diff --git a/config/_default/params.toml b/config/_default/params.toml
index 76ac69e..3a37c08 100644
--- a/config/_default/params.toml
+++ b/config/_default/params.toml
@@ -159,15 +159,15 @@
sizes = [16, 32, 48]
[style]
- primary = "#180D58"
- secondary = "#B84E5C"
+ primary = "#B84E5C"
+ secondary = "#180D58"
success = "#4FD323"
info = "#0E49A2"
warning = "#C68323"
danger = "#E51107"
light = "#BCF8EC"
dark = "#1B1A1F"
- themeOpacity = "100"
+ themeOpacity = "10"
darkModeShade = "20%"
darkModeTint = "40%"
themeFont = "Inter"
diff --git a/content/persons/_index.md b/content/persons/_index.md
index 71330c5..f5824cb 100755
--- a/content/persons/_index.md
+++ b/content/persons/_index.md
@@ -6,32 +6,8 @@ modules: ["mermaid"]
## Relational Entity Map
-```text
-%%{
- init: {
- 'theme': 'base',
- 'themeVariables': {
- 'darkmode': false,
- 'fontSize': '16px',
- 'background': '#CCCCCC',
- 'primaryColor': '#180D58',
- 'primaryTextColor': '#fff',
- 'primaryBorderColor': '#7C0000',
- 'lineColor': '#F8B229',
- 'secondaryColor': '#006100',
- 'tertiaryColor': '#fff'
- }
- }
-}%%
-```
-
```mermaid
-%%{
- init: {
- 'theme': 'dark',
- }
-}%%
erDiagram
abernathy["A. B. Abernathy"] {
Position Factor "Connecting Factor"
diff --git a/hugo_stats.json b/hugo_stats.json
index bb400a8..2b118a9 100644
--- a/hugo_stats.json
+++ b/hugo_stats.json
@@ -67,7 +67,7 @@
"ball",
"bg-body",
"bg-body-tertiary",
- "bg-opacity-0",
+ "bg-opacity-10",
"bg-primary",
"blockquote",
"blockquote-alert",
diff --git a/layouts/shortcodes/navbar.html b/layouts/shortcodes/navbar.html
new file mode 100644
index 0000000..0139440
--- /dev/null
+++ b/layouts/shortcodes/navbar.html
@@ -0,0 +1,55 @@
+<!--
+ Copyright © 2024 The Hinode Team / Mark Dumay. All rights reserved.
+ Use of this source code is governed by The MIT License (MIT) that can be found in the LICENSE file.
+ Visit gethinode.com/license for more details.
+-->
+
+{{ $error := false }}
+
+<!-- Validate arguments -->
+{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "navbar" "args" .Params "group" "shortcode") }}
+ {{ errorf "Invalid arguments: %s" .Position -}}
+ {{ $error = true }}
+{{ end }}
+
+<!-- Initialize arguments -->
+{{- $id := .Get "id" | default (printf "navbar-collapse-%d" (add .Ordinal 1)) -}}
+{{ $path := .Get "path" }}
+{{ $page := "" }}
+{{ if $path }}{{ $page = .Site.GetPage $path }}{{ end }}
+{{ if and $path (not $page) }}
+ {{ errorf "Cannot find page '%s': %s" $path .Position -}}
+ {{ $error = true -}}
+{{ end }}
+
+{{ $menus := .Get "menus" | default "main" -}}
+{{ $size := .Get "size" | default "md" -}}
+{{ $style := .Get "style" | default "dark" -}}
+{{ $inverseStyle := "dark" -}}
+{{ if eq $style "dark" }}{{ $inverseStyle = "light" }}{{ end -}}
+{{ $color := .Get "color" | default "" -}}
+{{ $searchParam := true -}}
+{{ if isset .Params "search" }}{{ $searchParam = partial "utilities/CastBool.html" (.Get "search") }}{{ end -}}
+{{ $modeParam := true -}}
+{{ if isset .Params "mode" }}{{ $modeParam = partial "utilities/CastBool.html" (.Get "mode") }}{{ end -}}
+{{ $logo := .Get "logo" | default "" -}}
+{{ $title := .Get "title" | default "" -}}
+{{- $class := .Get "class" | default "" -}}
+
+<!-- Main code -->
+{{ if not $error -}}
+ {{- partial "assets/navbar.html" (dict
+ "id" $id
+ "page" $page
+ "size" $size
+ "style" $style
+ "color" $color
+ "search" $searchParam
+ "mode" $modeParam
+ "menus" $menus
+ "logo" $logo
+ "title" $title
+ "class" $class
+ )
+ -}}
+{{ end -}} \ No newline at end of file