From 4edd2afe6b1520db8309439af2fb356d237075c6 Mon Sep 17 00:00:00 2001 From: Jeremy Meiss Date: Mon, 30 Sep 2024 17:41:07 -0500 Subject: [PATCH 1/8] config + html base changes - move favicon and description to parameters in config - simplify generation of page title and opengraph titles based on page --- config.toml | 4 ++++ layouts/_default/baseof.html | 34 ++++++++++++++++++++-------------- 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/config.toml b/config.toml index 7f96a2d..fd4dd2b 100644 --- a/config.toml +++ b/config.toml @@ -2,6 +2,10 @@ baseURL = "https://ethicalsource.dev" languageCode = "en-us" title = "Organization for Ethical Source" +[params] +description = "The Organization for Ethical Source is a global, multidisciplinary community devoted to centering justice, equity, and human rights in the practice of open source." +favicon = "/images/favicon.ico" + DefaultContentLanguage = "en" hasCJKLanguage = true EnableMissingTranslationPlaceholders = true diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index d435c6a..776a372 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -9,25 +9,31 @@ - - {{ .Site.Title }} | {{ .Title }} - + + {{/* If not home page, add use site title + page title */}} + {{ if ne page.IsHome true }} + {{ .Site.Title }} | {{ .Page.Title }}{{ else }} + {{ .Page.Title }} + {{ end }} + - {{ if .Params.title }} - - {{ else }} - - {{ end }} + {{/* setup base meta tags */}} + + + + {{/* setup opengraph meta tags - https://ogp.me/ */}} + + + + - {{ if .Params.Summary }} - - {{ else }} - - {{ end }} + + {{/* setup link tags for stylesheets and icons */}} - + + From e4e3ceae49c2c6dec95e0f7fe7bce746de0e3dbf Mon Sep 17 00:00:00 2001 From: Jeremy Meiss Date: Mon, 30 Sep 2024 17:50:42 -0500 Subject: [PATCH 2/8] add netlify config + new env --- netlify.toml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 netlify.toml diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..7e99237 --- /dev/null +++ b/netlify.toml @@ -0,0 +1,4 @@ +[build] +[build.environment] + HUGO_VERSION = "0.135.0" + GO_VERSION = "1.23.1" \ No newline at end of file From 23b9c43ac4dc3d663f81dd1c8994608c05987381 Mon Sep 17 00:00:00 2001 From: Jeremy Meiss Date: Mon, 30 Sep 2024 18:40:45 -0500 Subject: [PATCH 3/8] reduce reloading the header and footer on each build --- layouts/_default/baseof.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 776a372..2d7c5eb 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -37,11 +37,10 @@ - {{ partial "header" . }} + {{ partialCached "header" . }}
- {{ block "main" . }} - {{ end }} - {{ partial "footer" }} + {{ block "main" . }}{{ end }} + {{ partialCached "footer" }}
{{ partial "navigation" . }} From 4c27bde4ddda7958fad4ce707c72da96e8d8ddd0 Mon Sep 17 00:00:00 2001 From: Jeremy Meiss Date: Mon, 30 Sep 2024 18:44:05 -0500 Subject: [PATCH 4/8] fix cache generation for each .Section --- layouts/_default/baseof.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 2d7c5eb..c07b291 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -37,10 +37,10 @@ - {{ partialCached "header" . }} + {{ partialCached "header" . .Section }}
{{ block "main" . }}{{ end }} - {{ partialCached "footer" }} + {{ partialCached "footer" . .Section }}
{{ partial "navigation" . }} From 91cef7f68fb7684202bbdfe03b7a4e030d7a6cf7 Mon Sep 17 00:00:00 2001 From: Jeremy Meiss Date: Mon, 30 Sep 2024 18:46:04 -0500 Subject: [PATCH 5/8] rollback of cache changes --- layouts/_default/baseof.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index c07b291..776a372 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -37,10 +37,11 @@ - {{ partialCached "header" . .Section }} + {{ partial "header" . }}
- {{ block "main" . }}{{ end }} - {{ partialCached "footer" . .Section }} + {{ block "main" . }} + {{ end }} + {{ partial "footer" }}
{{ partial "navigation" . }} From ec66235cce064848be2df7bb70845da1d7623c56 Mon Sep 17 00:00:00 2001 From: Jeremy Meiss Date: Tue, 1 Oct 2024 06:16:30 -0500 Subject: [PATCH 6/8] merge nav into header partial + add css --- assets/css/main.css | 121 +++++++++++++++++++++++++++++++++++ layouts/_default/baseof.html | 2 - layouts/partials/header.html | 16 +++++ 3 files changed, 137 insertions(+), 2 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index 31057e6..196d880 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -1501,3 +1501,124 @@ ul.portraits li p { } /* end @media (min-width: 1024px) */ + +/* begin responsive nav */ + +.float-right { + float: right; +} + +.navigation { + height: 6rem; + width: 100%; + + a { + + &:hover, + &:focus { + color: $link-color; + } + } + + .navigation-list { + float: right; + list-style: none; + margin-bottom: 0; + margin-top: 0; + + @media only screen and (max-width: 768px) { + position: relative; + top: 2rem; + right: 0; + z-index: 5; + visibility: hidden; + opacity: 0; + padding: 0; + max-height: 0; + width: 100%; + background-color: $bg-color; + border-top: solid 2px $alt-bg-color; + border-bottom: solid 2px $alt-bg-color; + transition: opacity 0.25s, max-height 0.15s linear; + } + + .navigation-item { + float: left; + margin: 0; + position: relative; + + @media only screen and (max-width: 768px) { + float: none !important; + text-align: center; + + a, + span { + line-height: 5rem; + display: inline; + font-size: 1.7rem; + font-weight: 600; + } + } + + a, + span { + margin-left: 1rem; + margin-right: 1rem; + } + } + } + + + #menu-toggle { + display: none; + + @media only screen and (max-width: 768px) { + display: initial; + position: relative; + visibility: hidden; + + &:checked+label>i { + color: $alt-bg-color; + } + + &:checked+label+ul { + visibility: visible; + opacity: 1; + max-height: 100rem; + } + + &:focus-visible+label { + outline-style: auto; + } + } + } + + .menu-button { + display: none; + + @media only screen and (max-width: 768px) { + position: relative; + display: block; + font-size: 2.4rem; + font-weight: 400; + } + + i { + + &:hover, + &:focus { + color: $alt-fg-color; + } + } + } + + i { + color: $fg-color; + cursor: pointer; + + &:hover, + &:focus { + color: $link-color; + } + } +} \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 776a372..a7361b4 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -44,8 +44,6 @@ {{ partial "footer" }} - {{ partial "navigation" . }} - diff --git a/layouts/partials/header.html b/layouts/partials/header.html index caa133f..8033779 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -12,3 +12,19 @@

{{ .Params.Title }}

{{ end }} + From 8046b03cada59c23358cb0f499c807606690538d Mon Sep 17 00:00:00 2001 From: Jeremy Meiss Date: Sun, 6 Oct 2024 13:11:17 -0500 Subject: [PATCH 7/8] update css for working hamburger nav --- assets/css/main.css | 22 ++++++++++++---------- layouts/partials/header.html | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index 196d880..2086ccc 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -1327,7 +1327,7 @@ ul.portraits li p { nav { position: absolute; top: 1.5rem; - right: 4.375rem; + /* right: 4.375rem; */ } .data-list { @@ -1516,7 +1516,7 @@ ul.portraits li p { &:hover, &:focus { - color: $link-color; + color: var(--color-white); } } @@ -1536,9 +1536,9 @@ ul.portraits li p { padding: 0; max-height: 0; width: 100%; - background-color: $bg-color; - border-top: solid 2px $alt-bg-color; - border-bottom: solid 2px $alt-bg-color; + background-color: var(--color-black); + border-top: solid 2px var(--color-black); + border-bottom: solid 2px var(--color-black); transition: opacity 0.25s, max-height 0.15s linear; } @@ -1570,7 +1570,7 @@ ul.portraits li p { #menu-toggle { - display: none; + display: block; @media only screen and (max-width: 768px) { display: initial; @@ -1578,7 +1578,7 @@ ul.portraits li p { visibility: hidden; &:checked+label>i { - color: $alt-bg-color; + color: var(--color-black); } &:checked+label+ul { @@ -1595,30 +1595,32 @@ ul.portraits li p { .menu-button { display: none; + text-align: right; @media only screen and (max-width: 768px) { position: relative; display: block; font-size: 2.4rem; font-weight: 400; + fill: var(--color-gold); } i { &:hover, &:focus { - color: $alt-fg-color; + color: var(--color-light-grey); } } } i { - color: $fg-color; + color: var(--color-black); cursor: pointer; &:hover, &:focus { - color: $link-color; + color: var(--color-black); } } } \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 8033779..0db7ddc 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -15,7 +15,7 @@

{{ .Params.Title }}