feat: add typo link
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
<div class="markdown-footer">
|
||||
<div class="not-by-ai-image">
|
||||
<a href="https://notbyai.fyi/" target="_blank" rel="noreferrer">
|
||||
<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>
|
||||
|
@@ -4,8 +4,10 @@
|
||||
margin-bottom: var(--pico-block-spacing-vertical);
|
||||
}
|
||||
|
||||
.not-by-ai-image {
|
||||
text-align: right;
|
||||
.markdown-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
a code {
|
||||
|
20
custom.js
20
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