append url pathname to logoText
This commit is contained in:
parent
345c1cb020
commit
153e94ecc0
3 changed files with 11 additions and 1 deletions
|
@ -20,3 +20,10 @@ menuTrigger &&
|
||||||
);
|
);
|
||||||
|
|
||||||
window.addEventListener("resize", isMobileMenu);
|
window.addEventListener("resize", isMobileMenu);
|
||||||
|
|
||||||
|
const logo = document.querySelector(".logo__pathname");
|
||||||
|
if(logo){
|
||||||
|
window.onload = () => {
|
||||||
|
logo.textContent += window.location.pathname.substring(1);
|
||||||
|
};
|
||||||
|
}
|
|
@ -138,6 +138,8 @@ disableHugoGeneratorInject = false
|
||||||
# logoCursorColor = "#67a2c9"
|
# logoCursorColor = "#67a2c9"
|
||||||
# Set to a valid CSS time value to change the animation duration, "0s" to disable.
|
# Set to a valid CSS time value to change the animation duration, "0s" to disable.
|
||||||
# logoCursorAnimate = "2s"
|
# logoCursorAnimate = "2s"
|
||||||
|
# Append the current url pathname to logoText
|
||||||
|
# logoCursorPathname = true
|
||||||
|
|
||||||
# Commento is more than just a comments widget you can embed —
|
# Commento is more than just a comments widget you can embed —
|
||||||
# it’s a return to the roots of the internet.
|
# it’s a return to the roots of the internet.
|
||||||
|
|
|
@ -4,7 +4,8 @@
|
||||||
<img src="{{ .Site.Params.Logo.path }}" alt="{{ .Site.Params.Logo.alt }}" />
|
<img src="{{ .Site.Params.Logo.path }}" alt="{{ .Site.Params.Logo.alt }}" />
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<span class="logo__mark">{{ with .Site.Params.Logo.logoMark }}{{ . }}{{ else }}>{{ end }}</span>
|
<span class="logo__mark">{{ with .Site.Params.Logo.logoMark }}{{ . }}{{ else }}>{{ end }}</span>
|
||||||
<span class="logo__text">{{ with .Site.Params.Logo.logoText }}{{ . }}{{ else }}hello{{ end }}</span>
|
<span class="logo__text {{ with.Site.Params.Logo.logoCursorPathname}}logo__pathname{{ end }}">
|
||||||
|
{{ with .Site.Params.Logo.logoText }}{{ . }}{{ else }}hello{{ end }}</span>
|
||||||
<span class="logo__cursor" style=
|
<span class="logo__cursor" style=
|
||||||
"{{ with.Site.Params.Logo.logoCursorDisabled }}visibility:hidden;{{ end }}
|
"{{ with.Site.Params.Logo.logoCursorDisabled }}visibility:hidden;{{ end }}
|
||||||
{{ with.Site.Params.Logo.logoCursorColor }}background-color:{{ . }};{{ end }}
|
{{ with.Site.Params.Logo.logoCursorColor }}background-color:{{ . }};{{ end }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue