Skip to content

Commit 256d8a3

Browse files
committed
fix: future software is left highlighted
1 parent 02bc051 commit 256d8a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pages/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,9 @@ articles.splice(3);
134134
class="mb-3 inline-block bg-white text-black"
135135
onmouseover="document.getElementById('text-future-software')?.setAttribute('data-highlighted', '');"
136136
tabindex="0"
137-
data-highlighted={true /* enable by default then immediately disable using JS s.t. it will show with noscript */}
138137
onfocus="document.getElementById('text-future-software')?.setAttribute('data-highlighted', '');"
138+
data-highlighted={true /* enable by default then immediately disable using JS s.t. it will show with noscript */}
139+
onload="document.getElementById('text-future-software')?.removeAttribute('data-highlighted')"
139140
>未来のソフトウェア</span
140141
>を<br /><span>デザインしよう</span>
141142
</h1>
@@ -151,7 +152,6 @@ articles.splice(3);
151152
</article>
152153
<script>
153154
var text = document.getElementById("text-future-software");
154-
text?.removeAttribute("data-highlighted");
155155
document.onscroll = () => {
156156
if (!text) return;
157157
if (!document.scrollingElement) return;

0 commit comments

Comments
 (0)