mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
added new header
This commit is contained in:
@@ -62,9 +62,6 @@ window.addEventListener("DOMContentLoaded", (event) => {
|
|||||||
var updateMeta = () => {
|
var updateMeta = () => {
|
||||||
var elem, style;
|
var elem, style;
|
||||||
elem = document.querySelector('body');
|
elem = document.querySelector('body');
|
||||||
console.log(elem)
|
|
||||||
style = getComputedStyle(elem);
|
style = getComputedStyle(elem);
|
||||||
console.log(style.backgroundColor)
|
|
||||||
|
|
||||||
document.querySelector('meta[name="theme-color"]').setAttribute('content', style.backgroundColor);
|
document.querySelector('meta[name="theme-color"]').setAttribute('content', style.backgroundColor);
|
||||||
}
|
}
|
||||||
@@ -24,7 +24,7 @@ disableImageOptimization = false
|
|||||||
# smartTOCHideUnfocusedChildren = true
|
# smartTOCHideUnfocusedChildren = true
|
||||||
|
|
||||||
[header]
|
[header]
|
||||||
layout = "basic" # valid options: basic, fixed, fixed-fill
|
layout = "basic" # valid options: basic, fixed, fixed-fill, fixed-fill-blur
|
||||||
|
|
||||||
[footer]
|
[footer]
|
||||||
showMenu = true
|
showMenu = true
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ smartTOC = true
|
|||||||
smartTOCHideUnfocusedChildren = true
|
smartTOCHideUnfocusedChildren = true
|
||||||
|
|
||||||
[header]
|
[header]
|
||||||
layout = "fixed" # valid options: basic, fixed, fixed-fill
|
layout = "fixed" # valid options: basic, fixed, fixed-fill, fixed-fill-blur
|
||||||
|
|
||||||
[footer]
|
[footer]
|
||||||
showMenu = true
|
showMenu = true
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||||||
|
|
||||||
| Name | Default | Description |
|
| Name | Default | Description |
|
||||||
| --------------- | --------- | --------------------------------------------------------------------------------- |
|
| --------------- | --------- | --------------------------------------------------------------------------------- |
|
||||||
| `header.layout` | `"basic"` | Defines the header for the entire site, supported values are `basic`, `fixed`, and `fixed-fill`. |
|
| `header.layout` | `"basic"` | Defines the header for the entire site, supported values are `basic`, `fixed`, `fixed-fill`, and `fixed-fill-blur`. |
|
||||||
### Footer
|
### Footer
|
||||||
|
|
||||||
| Name | Default | Description |
|
| Name | Default | Description |
|
||||||
|
|||||||
14
layouts/partials/header/fixed-fill-blur.html
Normal file
14
layouts/partials/header/fixed-fill-blur.html
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<div class="min-h-[148px]"></div>
|
||||||
|
<div class="fixed inset-x-0 pl-[24px] pr-[24px]" style="z-index:100">
|
||||||
|
<div id="menu-blur" class="absolute opacity-0 inset-x-0 top-0 h-full single_hero_background nozoom bg-neutral dark:bg-neutral-800"></div>
|
||||||
|
<div class="relative max-w-[64rem] ml-auto mr-auto">
|
||||||
|
{{ partial "partials/header/basic.html" . }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
window.addEventListener('scroll', function (e) {
|
||||||
|
var scroll = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
|
||||||
|
var background_blur = document.getElementById('menu-blur');
|
||||||
|
background_blur.style.opacity = (scroll / 300);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user