Skip to content

Commit 82895e7

Browse files
authored
feat: blinking cursor (#29)
1 parent 422a74b commit 82895e7

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

assets/css/main.css

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,34 @@ blockquote {
394394
}
395395
}
396396

397+
.title_cursor {
398+
display: inline-block;
399+
width: 10px;
400+
height: 1.25rem;
401+
/* margin-left: 1px; */
402+
border-radius: 1px;
403+
background: var(--accent-color);
404+
animation: cursor 1s infinite;
405+
}
406+
407+
@media (prefers-reduced-motion: reduce) {
408+
.title_cursor {
409+
animation: none;
410+
}
411+
}
412+
413+
@keyframes cursor {
414+
0% {
415+
opacity: 0;
416+
}
417+
50% {
418+
opacity: 1;
419+
}
420+
100% {
421+
opacity: 0;
422+
}
423+
}
424+
397425
/*
398426
Dark Mode
399427
*/

layouts/partials/header.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ <h1>
55
class="header-title no-underline md:pl-4 mt-2 max-sm:mb-0 md:font-extrabold"
66
title="{{ .Title }}"
77
href="{{ .Site.BaseURL | absURL }}">
8-
{{ site.Title }}
8+
{{ site.Title }} <span class="tight title_cursor"></span>
99
</a>
1010
</h1>
1111
{{- else -}}
@@ -18,7 +18,7 @@ <h1>
1818
</a>
1919
</h1>
2020
<h3 class="hidden md:contents">
21-
&nbsp;&gt;&nbsp;{{ .Title | emojify }}
21+
&nbsp;&nbsp;{{ .Title | emojify }}&nbsp;<span class="tight title_cursor"></span>
2222
</h3>
2323
{{- end -}}
2424
{{- partial "menu.html" (dict "menuID" "main" "page" .) -}}

0 commit comments

Comments
 (0)