Skip to content

Commit 25baa02

Browse files
committed
feat: URLアニメーション
1 parent c3234ab commit 25baa02

File tree

1 file changed

+99
-2
lines changed

1 file changed

+99
-2
lines changed

Diff for: src/pages/index.astro

+99-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const recentPosts = await getFormatedCollection('posts', 3);
8181

8282
.recent-section {
8383
max-width: 1200px;
84-
text-align: center;
84+
action-align: center;
8585

8686
& > div {
8787
display: grid;
@@ -92,7 +92,7 @@ const recentPosts = await getFormatedCollection('posts', 3);
9292
}
9393

9494
.more {
95-
text-decoration: none;
95+
action-decoration: none;
9696
color: $primary-200;
9797
font-size: 1.2rem;
9898
transition: all 0.3s;
@@ -108,3 +108,100 @@ const recentPosts = await getFormatedCollection('posts', 3);
108108
height: 100%;
109109
}
110110
</style>
111+
112+
<script>
113+
const emojis = [
114+
'🐧',
115+
'-🐧',
116+
'--🐧',
117+
'---🐧',
118+
'----🐧',
119+
'-----🐧',
120+
'------🐧🐻',
121+
'-----🐧..🐻',
122+
'----🐧!!...🐻',
123+
'----🐧!!....🐻',
124+
'----🐧!!.....🐻',
125+
'----🐧!!.....🐻',
126+
'----🐧.......🐻',
127+
'----🐧💣......🐻',
128+
'----🐧💣.......🐻',
129+
'----🐧💣.......🐻',
130+
'----🐧💣.......🐻',
131+
'----🐧...💣....🐻',
132+
'----🐧....💣...🐻',
133+
'----🐧.....💣..🐻',
134+
'----🐧......💣.🐻',
135+
'----🐧........✨🔥',
136+
'----🐧........🔥✨',
137+
'----🐧........✨🔥',
138+
'----🐧........🔥✨',
139+
'----🐧........✨🔥',
140+
'----🐧........🔥✨',
141+
'----🐧........✨🔥',
142+
'----🐧........🔥✨',
143+
'----🐧.........🐻',
144+
'----🐧.........🐻',
145+
'----🐧.........🐻',
146+
'----🐧.........🐻',
147+
'----🐧.........🐻',
148+
'----🐧.........🐻',
149+
'----🐧.........🐻',
150+
'----🐧........🍎🐻',
151+
'----🐧........🍎🐻',
152+
'----🐧........🍎🐻',
153+
'----🐧........🍎🐻',
154+
'----🐧.....🍎...🐻',
155+
'----🐧....🍎....🐻',
156+
'----🐧...🍎.....🐻',
157+
'----🐧..🍎......🐻',
158+
'----🐧.🍎.......🐻',
159+
'----🐧🍎........🐻',
160+
'----🍏💫........🐻',
161+
'--💫🐧.........🐻',
162+
'----🍏💫........🐻',
163+
'--💫🐧.........🐻',
164+
'----🍏💫........🐻',
165+
'--💫🐧.........🐻',
166+
'----🐧..........🐻',
167+
'----🐧..........🐻',
168+
'----🐧..........🐻',
169+
'----🐧..........🐻',
170+
'----🐧..........🐻',
171+
'----🐧..........🐻',
172+
'---🚀🐧..........🐻',
173+
'---🚀🐧..........🐻',
174+
'---🚀🐧..........🐻',
175+
'---🚀🐧...........🐻',
176+
'---🚀🐧............🐻',
177+
'---🚀🐧.............🐻',
178+
'-----🚀..............🐻',
179+
'-------🚀.............🐻',
180+
'----------🚀...........🐻',
181+
'-------------🚀.........🐻',
182+
'-----------------🚀......🐻',
183+
'--------------------🚀....🐻',
184+
'-----------------------🚀..🐻',
185+
'----------------------------🚀',
186+
'--------------------------------🚀',
187+
'-------------------------------------🚀',
188+
'-------------------------------------------🚀',
189+
'----------------------------------------------------🚀',
190+
'--------------------------------------------------------------🚀',
191+
'-----------------------------------------------------------------------✨🪐',
192+
'-----------------------------------------------------------------------✨🪐',
193+
'-----------------------------------------------------------------------✨🪐',
194+
'-----------------------------------------------------------------------✨🪐',
195+
'-----------------------------------------------------------------------✨🪐',
196+
'',
197+
];
198+
199+
const loop = (arr: string[], count = 0, time = 200) => {
200+
if (count >= arr.length) return;
201+
202+
location.hash = arr[count % arr.length];
203+
setTimeout(loop.bind(this, arr, count + 1, time), time);
204+
};
205+
206+
setTimeout(() => loop(emojis), 60_000);
207+
</script>

0 commit comments

Comments
 (0)