feat: use <details> for message
This commit is contained in:
parent
1be187bed4
commit
a72b4cd565
1 changed files with 6 additions and 28 deletions
|
@ -9,6 +9,7 @@
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<h2 style="font-weight: bold">Hello there, fellow human!</h2>
|
<h2 style="font-weight: bold">Hello there, fellow human!</h2>
|
||||||
|
|
||||||
<p>Welcome to my personal blog! Glad you are here.</p>
|
<p>Welcome to my personal blog! Glad you are here.</p>
|
||||||
<p>
|
<p>
|
||||||
Like you, I have many areas of interest. And you will find here a collection
|
Like you, I have many areas of interest. And you will find here a collection
|
||||||
|
@ -16,7 +17,10 @@
|
||||||
work.
|
work.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div id="hidden-message-wrapper" style="display: none">
|
<details>
|
||||||
|
<summary style="margin-bottom: 5px; cursor: pointer">
|
||||||
|
Read the full message »
|
||||||
|
</summary>
|
||||||
<p>
|
<p>
|
||||||
There may be some topics that pop up more than others.
|
There may be some topics that pop up more than others.
|
||||||
<a href="/technology">Technology</a> posts are mostly about web
|
<a href="/technology">Technology</a> posts are mostly about web
|
||||||
|
@ -39,31 +43,5 @@
|
||||||
<li>email: ayo[at]ayco[dot]io</li>
|
<li>email: ayo[at]ayco[dot]io</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>~ <em>Ayo Ayco</em></p>
|
<p>~ <em>Ayo Ayco</em></p>
|
||||||
</div>
|
</details>
|
||||||
<button
|
|
||||||
id="show-btn"
|
|
||||||
style="cursor: pointer; display: none"
|
|
||||||
onclick="toggleMessage()"
|
|
||||||
>
|
|
||||||
Read the full message »
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- 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 = "« Read less...";
|
|
||||||
} else {
|
|
||||||
hiddenMessage.style.display = "none";
|
|
||||||
showButton.innerHTML = "Read the full message »";
|
|
||||||
window.scrollTo(0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
-->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue