mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2023-12-21 10:22:58 +01:00
Ability to stick header to the top of the page
If enabled, header with top menu will be always visible regardless of scrolling.
This commit is contained in:
parent
e0fc64c43e
commit
84e941d50a
@ -1,3 +1,11 @@
|
|||||||
|
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;
|
||||||
|
@ -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…
Reference in New Issue
Block a user