menu: separate user defined footer

This commit is contained in:
Sören Weber 2025-03-15 10:23:32 +01:00
parent 6e9f056fd7
commit 566c17d000
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
3 changed files with 27 additions and 22 deletions
assets/css
layouts/partials

View file

@ -279,27 +279,33 @@ a:focus,
z-index: 100; z-index: 100;
} }
#R-sidebar .padding { #R-menu-footer {
padding: 0 1rem; margin-bottom: 1.25rem;
} }
.footerFooter { #R-menu-footer > hr:first-child {
font-size: 0.8125rem; margin-bottom: 1.25rem;
padding-top: 2rem; margin-top: 1.25rem;
padding-bottom: 0.75rem;
text-align: center;
}
.footerFooter > * {
margin: 0 auto;
} }
#R-footer { #R-footer {
color: var(--INTERNAL-MENU-SECTIONS-LINK-color); color: var(--INTERNAL-MENU-SECTIONS-LINK-color);
font-size: 0.8125rem;
margin-bottom: 1.25rem;
margin-top: 0.75rem;
text-align: center;
}
#R-footer:empty {
display: none;
}
#R-footer > * {
margin: 0 auto;
} }
#R-footer > hr:first-child { #R-footer > hr:first-child {
margin-top: 0; margin-bottom: 1.25rem;
margin-top: -0.5rem;
} }
/* increase specifity to override following #R-content-wrapper hr style */ /* increase specifity to override following #R-content-wrapper hr style */
@ -308,6 +314,10 @@ a:focus,
margin-right: 0; margin-right: 0;
} }
#R-sidebar .padding {
padding: 0 1rem;
}
#R-sidebar .R-sidebarmenu > ul { #R-sidebar .R-sidebarmenu > ul {
margin-top: 1rem; margin-top: 1rem;
} }
@ -2689,10 +2699,6 @@ body #R-logo svg :not([fill='#000000']) {
padding-top: calc(0.125rem - var(--bpx1) * 1px); padding-top: calc(0.125rem - var(--bpx1) * 1px);
} }
#R-menu-footer {
padding-bottom: 1rem;
}
article .R-taxonomy ul, article .R-taxonomy ul,
article .R-taxonomy li { article .R-taxonomy li {
list-style: none; list-style: none;

View file

@ -38,7 +38,7 @@
{{- if (ne .Site.Params.landingPageURL nil) }} {{- if (ne .Site.Params.landingPageURL nil) }}
{{- warnf "UNSUPPORTED usage of 'landingPageURL' config parameter found, remove it and optionally overwrite the `logo.html` partial to provide a link if it should not point to the project's home page; see https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/4/#4-2-0" }} {{- warnf "UNSUPPORTED usage of 'landingPageURL' config parameter found, remove it and optionally overwrite the `logo.html` partial to provide a link if it should not point to the project's home page; see https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/4/#4-2-0" }}
{{- end }} {{- end }}
{{- $title := trim (.Site.Params.landingPageName | plainify) "\n\r\t "}} {{- $title := trim (.Site.Params.landingPageName | plainify) "\n\r\t " }}
{{- $pre := "" }} {{- $pre := "" }}
{{- $post := "" }} {{- $post := "" }}
{{- if $title }} {{- if $title }}
@ -72,7 +72,8 @@
{{- $themevariants := partialCached "_relearn/themeVariants.gotmpl" . }} {{- $themevariants := partialCached "_relearn/themeVariants.gotmpl" . }}
{{- $showvariantswitch := gt (int (len $themevariants)) 1 }} {{- $showvariantswitch := gt (int (len $themevariants)) 1 }}
{{- $footer := partial "menu-footer.html" . }} {{- $footer := partial "menu-footer.html" . }}
{{- $showfooter := not (eq 0 (int (len ($footer | plainify)))) }} {{- $plainfooter := trim ($footer | plainify) "\n\r\t " }}
{{- $showfooter := not (eq 0 (int (len $plainfooter))) }}
<div class="padding footermargin footerLangSwitch footerVariantSwitch footerVisitedLinks footerFooter{{if $showlangswitch}} showLangSwitch{{end}}{{if $showvariantswitch}} showVariantSwitch{{end}}{{if $showvisitedlinks}} showVisitedLinks{{end}}{{if $showfooter}} showFooter{{end}}"></div> <div class="padding footermargin footerLangSwitch footerVariantSwitch footerVisitedLinks footerFooter{{if $showlangswitch}} showLangSwitch{{end}}{{if $showvariantswitch}} showVariantSwitch{{end}}{{if $showvisitedlinks}} showVisitedLinks{{end}}{{if $showfooter}} showFooter{{end}}"></div>
<div id="R-menu-footer"> <div id="R-menu-footer">
<hr class="padding default-animation footerLangSwitch footerVariantSwitch footerVisitedLinks footerFooter{{if $showlangswitch}} showLangSwitch{{end}}{{if $showvariantswitch}} showVariantSwitch{{end}}{{if $showvisitedlinks}} showVisitedLinks{{end}}{{if $showfooter}} showFooter{{end}}"> <hr class="padding default-animation footerLangSwitch footerVariantSwitch footerVisitedLinks footerFooter{{if $showlangswitch}} showLangSwitch{{end}}{{if $showvariantswitch}} showVariantSwitch{{end}}{{if $showvisitedlinks}} showVisitedLinks{{end}}{{if $showfooter}} showFooter{{end}}">
@ -126,10 +127,8 @@
</li> </li>
</ul> </ul>
</div> </div>
<div id="R-footer" class="footerFooter{{if $showfooter}} showFooter{{end}}">
{{- $footer }}
</div>
</div> </div>
<div id="R-footer" class="footerFooter{{if $showfooter}} showFooter{{end}}">{{- $footer }}</div>
</div> </div>
</aside> </aside>

View file

@ -1 +1 @@
7.5.0+9a020e7eadb7d8203f5b01b18756c72d94773ec9 7.5.0+6e9f056fd7ce9909fba00e8973ff439a09614879