feat: add typo link
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
<div class="not-by-ai-image">
|
<div class="markdown-footer">
|
||||||
<a href="https://notbyai.fyi/" target="_blank" rel="noreferrer">
|
<div class="not-by-ai-image">
|
||||||
<img alt="nobyai logo" src="https://user-images.githubusercontent.com/62137266/225653923-a69103f5-b318-4e52-9ea1-95b61d388366.svg"></img>
|
<a href="https://notbyai.fyi/" target="_blank" rel="noreferrer">
|
||||||
</a>
|
<img alt="nobyai logo" src="https://user-images.githubusercontent.com/62137266/225653923-a69103f5-b318-4e52-9ea1-95b61d388366.svg"></img>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="typo-link">
|
||||||
|
<a id="typo-link" href="#" target="_blank">Typo?</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -4,8 +4,10 @@
|
|||||||
margin-bottom: var(--pico-block-spacing-vertical);
|
margin-bottom: var(--pico-block-spacing-vertical);
|
||||||
}
|
}
|
||||||
|
|
||||||
.not-by-ai-image {
|
.markdown-footer {
|
||||||
text-align: right;
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
a code {
|
a code {
|
||||||
|
24
custom.js
24
custom.js
@@ -1,3 +1,21 @@
|
|||||||
/**
|
(() => {
|
||||||
* Additional js
|
/**
|
||||||
*/
|
* @param {HTMLAnchorElement} anchorElement
|
||||||
|
*/
|
||||||
|
function setTypoLink(anchorElement) {
|
||||||
|
const fileName = window.location.pathname
|
||||||
|
.replace(".html", "")
|
||||||
|
.replaceAll("-", "_");
|
||||||
|
|
||||||
|
const gitLink = `https://git.nullndr.com/nullndr/website/src/branch/main/content${fileName}.md`;
|
||||||
|
|
||||||
|
anchorElement.href = gitLink;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {HTMLAnchorElement}
|
||||||
|
*/
|
||||||
|
const typoLink = document.getElementById("typo-link");
|
||||||
|
|
||||||
|
if (typoLink) setTypoLink(typoLink);
|
||||||
|
})();
|
||||||
|
Reference in New Issue
Block a user