prettier
This commit is contained in:
parent
3b99de4972
commit
1f99dbf0fa
|
@ -24,11 +24,18 @@ export default {
|
||||||
.split("|")
|
.split("|")
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.map((customHeaderLinksArray) => {
|
.map((customHeaderLinksArray) => {
|
||||||
const [linkText, linkTitle, linkHref, device, target, keepOnScroll, locale] =
|
const [
|
||||||
customHeaderLinksArray
|
linkText,
|
||||||
.split(",")
|
linkTitle,
|
||||||
.filter(Boolean)
|
linkHref,
|
||||||
.map((x) => x.trim());
|
device,
|
||||||
|
target,
|
||||||
|
keepOnScroll,
|
||||||
|
locale,
|
||||||
|
] = customHeaderLinksArray
|
||||||
|
.split(",")
|
||||||
|
.filter(Boolean)
|
||||||
|
.map((x) => x.trim());
|
||||||
|
|
||||||
const deviceClass = `.${device}`;
|
const deviceClass = `.${device}`;
|
||||||
const linkTarget = target === "self" ? "" : "_blank";
|
const linkTarget = target === "self" ? "" : "_blank";
|
||||||
|
@ -47,10 +54,13 @@ export default {
|
||||||
anchorAttributes.target = linkTarget;
|
anchorAttributes.target = linkTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (locale !== ""
|
if (
|
||||||
&& document.documentElement.lang
|
locale !== "" &&
|
||||||
&& document.documentElement.lang !== locale
|
document.documentElement.lang &&
|
||||||
) { return ; }
|
document.documentElement.lang !== locale
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
headerLinks.push(
|
headerLinks.push(
|
||||||
h(
|
h(
|
||||||
|
|
Loading…
Reference in New Issue