This commit is contained in:
@@ -13,6 +13,9 @@ export default ((opts?: Options) => {
|
|||||||
const links = opts?.links ?? []
|
const links = opts?.links ?? []
|
||||||
return (
|
return (
|
||||||
<footer class={`${displayClass ?? ""}`}>
|
<footer class={`${displayClass ?? ""}`}>
|
||||||
|
<p>
|
||||||
|
Автор: <a href="https://mark.struchkov.dev">Стручков Марк</a>, если не указано иное. © {year}
|
||||||
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
{Object.entries(links).map(([text, link]) => (
|
{Object.entries(links).map(([text, link]) => (
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
@@ -60,28 +60,6 @@ export const CrawlLinks: QuartzTransformerPlugin<Partial<Options>> = (userOpts)
|
|||||||
const isExternal = isAbsoluteUrl(dest)
|
const isExternal = isAbsoluteUrl(dest)
|
||||||
classes.push(isExternal ? "external" : "internal")
|
classes.push(isExternal ? "external" : "internal")
|
||||||
|
|
||||||
if (isExternal && opts.externalLinkIcon) {
|
|
||||||
node.children.push({
|
|
||||||
type: "element",
|
|
||||||
tagName: "svg",
|
|
||||||
properties: {
|
|
||||||
"aria-hidden": "true",
|
|
||||||
class: "external-icon",
|
|
||||||
viewBox: "0 0 512 512",
|
|
||||||
},
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
type: "element",
|
|
||||||
tagName: "path",
|
|
||||||
properties: {
|
|
||||||
d: "M320 0H288V64h32 82.7L201.4 265.4 178.7 288 224 333.3l22.6-22.6L448 109.3V192v32h64V192 32 0H480 320zM32 32H0V64 480v32H32 456h32V480 352 320H424v32 96H64V96h96 32V32H160 32z",
|
|
||||||
},
|
|
||||||
children: [],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if the link has alias text
|
// Check if the link has alias text
|
||||||
if (
|
if (
|
||||||
node.children.length === 1 &&
|
node.children.length === 1 &&
|
||||||
|
|||||||
@@ -97,14 +97,6 @@ a {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.external .external-icon {
|
|
||||||
height: 1ex;
|
|
||||||
margin: 0 0.15em;
|
|
||||||
|
|
||||||
> path {
|
|
||||||
fill: var(--dark);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.desktop-only {
|
.desktop-only {
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
@use "./base.scss";
|
@use "./base.scss";
|
||||||
|
|
||||||
// put your custom CSS here!
|
a[href^=http]:not([href*=pmcf\.xyz]):after {
|
||||||
|
content: " ↗"
|
||||||
|
}
|
||||||
|
|
||||||
|
a.external {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user