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

View file

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

View file

@ -24,11 +24,13 @@
</div> </div>
<div class="side-panel side-panel-bottom" id="donate-form"> <div class="side-panel side-panel-bottom" id="donate-form">
<div class="tip-jar"> <div class="tip-jar">
<script src='https://ko-fi.com/widgets/widget_2.js'></script> <!-- JS Naked Day 2024
<script> <script src='https://ko-fi.com/widgets/widget_2.js'></script>
kofiwidget2.init('Buy me a coffee', '#ee4a03', 'ayoayco'); <script>
kofiwidget2.draw(); kofiwidget2.init('Buy me a coffee', '#ee4a03', 'ayoayco');
</script> kofiwidget2.draw();
</script>
-->
</div> </div>
</div> </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> <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). 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> <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> <script src="https://social.ayco.io/embed.js" async="async"></script>
-->
## It Didn't Stop There ## It Didn't Stop There