mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-05-29 05:55:22 -04:00
Merge 9a208addea
into 149f12cea7
This commit is contained in:
commit
0e69772a53
3 changed files with 15 additions and 2 deletions
|
@ -1,3 +1,16 @@
|
||||||
|
/* See: https://github.com/adityatelange/hugo-PaperMod/pull/979#issuecomment-1654974106 */
|
||||||
|
html.header-sticky {
|
||||||
|
scroll-padding-top: calc(var(--header-height) * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
header.header-sticky {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
background: var(--theme);
|
||||||
|
z-index: 1000;
|
||||||
|
}
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}">
|
<html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}" {{ if (site.Params.stickyHeader) }}class="header-sticky"{{ end }}>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
{{- partial "head.html" . }}
|
{{- partial "head.html" . }}
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
</script>
|
</script>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<header class="header">
|
<header class="header {{ if (site.Params.stickyHeader) }}header-sticky{{ end }}">
|
||||||
<nav class="nav">
|
<nav class="nav">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
{{- $label_text := (site.Params.label.text | default site.Title) }}
|
{{- $label_text := (site.Params.label.text | default site.Title) }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue