Skip to content

Commit

Permalink
(platenioGH-35) Inject CSS into body of _default/baseof.html
Browse files Browse the repository at this point in the history
This commit modifies the `_default/baseof.html` template to inject
a CSS class into the `body` tag, enabling Platen site maintainers
to override the styling for any page(s) via this mechanism.

This is a patch on top of the `layouts/_default/baseof.html` file
from the usptream project (alex-shpak/hugo-book). If the upstream
file is updated, we will need to replace our copy of the template
with the newer version and then cherry-pick this commit on top.
  • Loading branch information
binarystargames authored and michaeltlombardi committed Feb 11, 2022
1 parent ee73faf commit 7af4fe7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{{ partial "docs/html-head" . }}
{{ partial "docs/inject/head" . }}
</head>
<body dir="{{ default "ltr" .Site.Language.LanguageDirection }}">
{{ $injectedClass := partial "platen/getCssClass.html" . }}
<body dir="{{ default "ltr" .Site.Language.LanguageDirection }} class="{{ $injectedClass }}">
<input type="checkbox" class="hidden toggle" id="menu-control" />
<input type="checkbox" class="hidden toggle" id="toc-control" />
<main class="container flex">
Expand Down

0 comments on commit 7af4fe7

Please sign in to comment.