JS Naked Day 2024

This commit is contained in:
Ayo Ayco 2024-04-23 20:10:39 +02:00
parent 765b495dd6
commit 1be187bed4
5 changed files with 59 additions and 47 deletions

View file

@ -73,32 +73,34 @@
rel="stylesheet"
/>
<script type="module">
import {
getMentions,
renderMentions,
} from "/assets/js/webmention-utils.mjs";
<!-- JS Naked Day 2024
<script type="module">
import {
getMentions,
renderMentions,
} from "/assets/js/webmention-utils.mjs";
const ignorePaths = [
"/",
"/categories/",
"/about/",
"/technology/",
"/personal/",
"/projects/",
"/talks/",
"/productivity/",
"/motivational/",
];
const url = new URL(
document.URL.replace("http://localhost:4000", "https://ayos.blog")
);
if (!ignorePaths.includes(url.pathname)) {
const mentions = getMentions(url.toString())
.then((mentions) => {
renderMentions(mentions, ".blog-post__web-mentions");
})
.catch((err) => console.log("err", err));
}
</script>
const ignorePaths = [
"/",
"/categories/",
"/about/",
"/technology/",
"/personal/",
"/projects/",
"/talks/",
"/productivity/",
"/motivational/",
];
const url = new URL(
document.URL.replace("http://localhost:4000", "https://ayos.blog")
);
if (!ignorePaths.includes(url.pathname)) {
const mentions = getMentions(url.toString())
.then((mentions) => {
renderMentions(mentions, ".blog-post__web-mentions");
})
.catch((err) => console.log("err", err));
}
</script>
-->
</head>

View file

@ -47,20 +47,23 @@
>
Read the full message &raquo;
</button>
<script>
var hiddenMessage = document.getElementById("hidden-message-wrapper");
var showButton = document.getElementById("show-btn");
showButton.style.display = "block"; // only show when JS enabled
function toggleMessage() {
if (hiddenMessage.style.display === "none") {
hiddenMessage.style.display = "block";
showButton.innerHTML = "&laquo; Read less...";
} else {
hiddenMessage.style.display = "none";
showButton.innerHTML = "Read the full message &raquo;";
window.scrollTo(0, 0);
<!-- JS Naked Day 2024
<script>
var hiddenMessage = document.getElementById("hidden-message-wrapper");
var showButton = document.getElementById("show-btn");
showButton.style.display = "block"; // only show when JS enabled
function toggleMessage() {
if (hiddenMessage.style.display === "none") {
hiddenMessage.style.display = "block";
showButton.innerHTML = "&laquo; Read less...";
} else {
hiddenMessage.style.display = "none";
showButton.innerHTML = "Read the full message &raquo;";
window.scrollTo(0, 0);
}
}
}
</script>
</script>
-->
</div>

View file

@ -24,11 +24,13 @@
</div>
<div class="side-panel side-panel-bottom" id="donate-form">
<div class="tip-jar">
<script src='https://ko-fi.com/widgets/widget_2.js'></script>
<script>
kofiwidget2.init('Buy me a coffee', '#ee4a03', 'ayoayco');
kofiwidget2.draw();
</script>
<!-- JS Naked Day 2024
<script src='https://ko-fi.com/widgets/widget_2.js'></script>
<script>
kofiwidget2.init('Buy me a coffee', '#ee4a03', 'ayoayco');
kofiwidget2.draw();
</script>
-->
</div>
</div>
<div>

View file

@ -18,4 +18,6 @@ I keep a thread open on [Mastodon](https://social.ayco.io/@ayo/11063972899041691
<iframe src="https://social.ayco.io/@ayo/110685362953465106/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe>
<script src="https://social.ayco.io/embed.js" async="async"></script>
<!-- JS Naked Day 2024
<script src="https://social.ayco.io/embed.js" async="async"></script>
-->

View file

@ -23,7 +23,10 @@ But maybe the biggest thing that made me want to stay and invest in this is the
So when the December holidays came, I spent some time and resources to set up [my own Mastodon instance](https://social.ayco.io).
<iframe src="https://fosstodon.org/@ayo/109545132022543467/embed" class="mastodon-embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe>
<!-- JS Naked Day 2024
<script src="https://social.ayco.io/embed.js" async="async"></script>
-->
## It Didn't Stop There