From fa287d08587aa6172149460eae4b243e78eb7494 Mon Sep 17 00:00:00 2001 From: anoduck <11767-anoduck@users.noreply.gitgud.io> Date: Sat, 14 Sep 2024 00:05:22 -0400 Subject: updated theme colors --- config/_default/params.toml | 6 ++--- content/persons/_index.md | 24 ------------------ hugo_stats.json | 2 +- layouts/shortcodes/navbar.html | 55 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 59 insertions(+), 28 deletions(-) create mode 100644 layouts/shortcodes/navbar.html 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 @@ + + +{{ $error := false }} + + +{{ if partial "utilities/IsInvalidArgs.html" (dict "structure" "navbar" "args" .Params "group" "shortcode") }} + {{ errorf "Invalid arguments: %s" .Position -}} + {{ $error = true }} +{{ end }} + + +{{- $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 "" -}} + + +{{ 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 -- cgit v1.2.3