Skip to content

Commit 28e8978

Browse files
authored
Redesign UI: side-by-side cards layout, updated start screen
1 parent b03b453 commit 28e8978

1 file changed

Lines changed: 21 additions & 14 deletions

File tree

โ€Žindex.htmlโ€Ž

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,19 @@
2020
.logo-btn:active { transform: scale(0.95); }
2121
.logo-btn.rolling { animation: shake 0.5s ease; }
2222
.start-hint { margin-top: 24px; font-size: 14px; color: #666; letter-spacing: 3px; text-transform: uppercase; }
23-
#result-screen { display: none; flex-direction: column; align-items: center; text-align: center; padding: 20px; max-width: 500px; width: 100%; }
24-
.result-card { background: linear-gradient(145deg, #1a1a2e, #0f0f1a); border: 1px solid rgba(255,255,255,0.08); border-radius: 24px; padding: 40px 30px; width: 100%; margin-bottom: 20px; opacity: 0; transform: translateY(30px); }
23+
#result-screen { display: none; flex-direction: column; align-items: center; text-align: center; padding: 20px; max-width: 900px; width: 100%; }
24+
.cards-row { display: flex; gap: 20px; width: 100%; justify-content: center; flex-wrap: wrap; }
25+
.result-card { background: linear-gradient(145deg, #1a1a2e, #0f0f1a); border: 1px solid rgba(255,255,255,0.08); border-radius: 24px; padding: 40px 30px; flex: 1; min-width: 280px; max-width: 420px; opacity: 0; transform: translateY(30px); }
2526
.result-card.show { animation: slideUp 0.6s ease forwards; }
2627
.result-card.delay { animation-delay: 0.2s; }
2728
.card-emoji { font-size: 48px; margin-bottom: 16px; }
2829
.card-label { font-size: 12px; color: #667eea; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 12px; font-weight: 700; }
2930
.card-title { font-size: 24px; font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
3031
.card-desc { font-size: 14px; color: #999; line-height: 1.7; }
31-
.music-link { display: inline-block; margin-top: 14px; padding: 10px 24px; background: rgba(102,126,234,0.15); border: 1px solid rgba(102,126,234,0.3); border-radius: 50px; color: #667eea; text-decoration: none; font-size: 13px; font-weight: 700; transition: all 0.3s ease; }
32-
.music-link:hover { background: rgba(102,126,234,0.3); }
33-
.reroll-btn { margin-top: 10px; padding: 16px 40px; border-radius: 50px; background: transparent; border: 1.5px solid rgba(255,255,255,0.2); color: #fff; font-family: 'Noto Sans KR', sans-serif; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.3s ease; letter-spacing: 1px; opacity: 0; animation: fadeIn 0.5s ease 0.5s forwards; }
32+
.music-artist { font-size: 14px; color: #999; margin-top: 4px; }
33+
.bottom-area { margin-top: 30px; opacity: 0; animation: fadeIn 0.5s ease 0.6s forwards; display: flex; flex-direction: column; align-items: center; gap: 16px; }
34+
.add-prompt { font-size: 14px; color: #888; letter-spacing: 0.5px; line-height: 1.6; padding: 14px 28px; border: 1px dashed rgba(255,255,255,0.15); border-radius: 16px; background: rgba(255,255,255,0.03); }
35+
.reroll-btn { padding: 16px 40px; border-radius: 50px; background: transparent; border: 1.5px solid rgba(255,255,255,0.2); color: #fff; font-family: 'Noto Sans KR', sans-serif; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.3s ease; letter-spacing: 1px; }
3436
.reroll-btn:hover { border-color: #667eea; color: #667eea; transform: scale(1.05); }
3537
.reroll-btn:active { transform: scale(0.95); }
3638
.bg-glow { position: fixed; width: 300px; height: 300px; border-radius: 50%; filter: blur(120px); opacity: 0.08; pointer-events: none; z-index: 0; }
@@ -39,23 +41,28 @@
3941
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
4042
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
4143
@keyframes shake { 0%,100%{transform:rotate(0)} 20%{transform:rotate(-15deg) scale(1.1)} 40%{transform:rotate(15deg) scale(1.1)} 60%{transform:rotate(-10deg) scale(1.05)} 80%{transform:rotate(10deg) scale(1.05)} }
42-
@media (min-width:768px) and (orientation:landscape) { body{overflow-y:auto} .tagline{font-size:32px;margin-bottom:40px} .logo-btn{width:180px;height:180px} #result-screen{flex-direction:row;flex-wrap:wrap;justify-content:center;gap:20px;max-width:900px;padding:15px} .result-card{flex:1;min-width:300px;max-width:420px;margin-bottom:10px;padding:30px 25px} .reroll-btn{width:100%;max-width:300px;padding:18px 50px;font-size:17px} .start-hint{font-size:16px;margin-top:30px} }
43-
@media (max-width:600px) { .tagline{font-size:20px;margin-bottom:35px} .logo-btn{width:120px;height:120px} .card-title{font-size:20px} .result-card{padding:30px 24px} }
44+
@media (min-width:768px) and (orientation:landscape) { body{overflow-y:auto} .tagline{font-size:32px;margin-bottom:40px} .logo-btn{width:180px;height:180px} #result-screen{padding:15px} .cards-row{flex-wrap:nowrap} .start-hint{font-size:16px;margin-top:30px} }
45+
@media (max-width:600px) { .tagline{font-size:20px;margin-bottom:35px} .logo-btn{width:120px;height:120px} .card-title{font-size:20px} .result-card{padding:30px 24px} .cards-row{flex-direction:column;align-items:center} }
4446
</style>
4547
</head>
4648
<body>
4749
<div class="logo">OFF '<br>REST</div>
4850
<div class="bg-glow glow-1"></div><div class="bg-glow glow-2"></div>
4951
<div id="start-screen">
50-
<div class="tagline">์˜ค๋Š˜์˜ ํœด์‹์„<br>์ถ”์ฒœํ•ด ๋“œ๋ฆฝ๋‹ˆ๋‹ค.</div>
52+
<div class="tagline">์˜ค๋Š˜์˜ ํœด์‹<br>์ •ํ•˜๊ธฐ</div>
5153
<button class="logo-btn" id="diceBtn" onclick="roll()"><img src="/icons/icon-512.png" alt="OFFREST"></button>
52-
<div class="start-hint">tap to start</div>
54+
<div class="start-hint">TAP TO OFFREST</div>
5355
</div>
5456
<div id="result-screen">
55-
<div class="result-card" id="restCard"><div class="card-emoji" id="restEmoji"></div><div class="card-label">์˜ค๋Š˜์˜ ํœด์‹</div><div class="card-title" id="restTitle"></div><div class="card-desc" id="restDesc"></div></div>
56-
<div class="result-card delay" id="musicCard"><div class="card-emoji">๐ŸŽต</div><div class="card-label">์ถ”์ฒœ ์Œ์•…</div><div class="card-title" id="musicTitle"></div><div class="card-desc" id="musicArtist"></div><a class="music-link" id="musicLink" href="#" target="_blank">โ–ถ ๋“ฃ๊ธฐ</a></div>
57-
<button class="reroll-btn" onclick="reroll()">๐ŸŽฒ ํ•œ๋ฒˆ ๋” ๋Œ๋ฆฌ๊ธฐ</button>
57+
<div class="cards-row">
58+
<div class="result-card" id="restCard"><div class="card-emoji" id="restEmoji"></div><div class="card-label">์˜ค๋Š˜์˜ ํœด์‹</div><div class="card-title" id="restTitle"></div><div class="card-desc" id="restDesc"></div></div>
59+
<div class="result-card delay" id="musicCard"><div class="card-emoji">๐ŸŽต</div><div class="card-label">์ถ”์ฒœ ์Œ์•…</div><div class="card-title" id="musicTitle"></div><div class="music-artist" id="musicArtist"></div></div>
60+
</div>
61+
<div class="bottom-area">
62+
<div class="add-prompt">ํœด์‹๋ฐฉ๋ฒ•๊ณผ ์Œ์•…์„ ์นด๋“œ์— ์ ์–ด ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”</div>
63+
<button class="reroll-btn" onclick="reroll()">๐ŸŽฒ ํ•œ๋ฒˆ ๋” ๋Œ๋ฆฌ๊ธฐ</button>
64+
</div>
5865
</div>
59-
<script>const R=[{e:"๐Ÿง˜",t:"5๋ถ„ ๋ช…์ƒํ•˜๊ธฐ",d:"๋ˆˆ์„ ๊ฐ๊ณ  ํ˜ธํก์— ์ง‘์ค‘ํ•ด๋ณด์„ธ์š”. ๋“ค์ˆจ๊ณผ ๋‚ ์ˆจ์„ ์ฒœ์ฒœํžˆ ๋А๋ผ๋ฉฐ ๋งˆ์Œ์„ ๋น„์›Œ๋ณด์„ธ์š”."},{e:"๐Ÿšถ",t:"์‚ฐ์ฑ… ๋‚˜๊ฐ€๊ธฐ",d:"๊ฐ€๊นŒ์šด ๊ณต์›์ด๋‚˜ ๊ณจ๋ชฉ๊ธธ์„ ๊ฑธ์–ด๋ณด์„ธ์š”. ๋ฐ”๋žŒ๊ณผ ํ–‡์‚ด์ด ๊ธฐ๋ถ„์„ ์ „ํ™˜์‹œ์ผœ ์ค„ ๊ฑฐ์˜ˆ์š”."},{e:"โ˜•",t:"๋”ฐ๋œปํ•œ ์ฐจ ํ•œ ์ž”",d:"์ข‹์•„ํ•˜๋Š” ์ฐจ๋ฅผ ์ฒœ์ฒœํžˆ ์šฐ๋ ค๋‚ด๋ฉฐ ์—ฌ์œ ๋ฅผ ์ฆ๊ฒจ๋ณด์„ธ์š”."},{e:"๐Ÿ“–",t:"์ฑ… ํ•œ ํŽ˜์ด์ง€ ์ฝ๊ธฐ",d:"์–ด๋ ต์ง€ ์•Š์€ ์ฑ…์„ ํŽด๊ณ  ํ•œ ํŽ˜์ด์ง€๋งŒ ์ฝ์–ด๋ณด์„ธ์š”."},{e:"๐ŸŽจ",t:"๋‚™์„œ ๊ทธ๋ฆฌ๊ธฐ",d:"์ข…์ด ์œ„์— ์ž์œ ๋กญ๊ฒŒ ๊ทธ๋ฆผ์„ ๊ทธ๋ ค๋ณด์„ธ์š”."},{e:"๐ŸŒฟ",t:"์‹๋ฌผ ๋Œ๋ณด๊ธฐ",d:"ํ™”๋ถ„์— ๋ฌผ์„ ์ฃผ๊ณ  ์žŽ์„ ๋‹ฆ์•„์ฃผ์„ธ์š”."},{e:"๐Ÿ›",t:"๋”ฐ๋œปํ•œ ์ƒค์›Œํ•˜๊ธฐ",d:"๋”ฐ๋œปํ•œ ๋ฌผ๋กœ ๋ชธ์„ ๊ฐ์‹ธ๋ฉฐ ํ•˜๋ฃจ์˜ ํ”ผ๋กœ๋ฅผ ์”ฌ์–ด๋‚ด ๋ณด์„ธ์š”."},{e:"๐ŸŒ…",t:"ํ•˜๋Š˜ ๋ฐ”๋ผ๋ณด๊ธฐ",d:"์ฐฝ๋ฌธ ๋ฐ– ํ•˜๋Š˜์„ 5๋ถ„๋งŒ ๋ฐ”๋ผ๋ณด์„ธ์š”."},{e:"๐Ÿ˜ด",t:"10๋ถ„ ๋‚ฎ์ž  ์ž๊ธฐ",d:"์•Œ๋žŒ์„ 10๋ถ„ ํ›„๋กœ ๋งž์ถ”๊ณ  ํŽธํ•˜๊ฒŒ ๋ˆˆ์„ ๊ฐ์•„๋ณด์„ธ์š”."},{e:"๐ŸŽง",t:"์ข‹์•„ํ•˜๋Š” ๋…ธ๋ž˜ ๋”ฐ๋ผ ๋ถ€๋ฅด๊ธฐ",d:"์ด์–ดํฐ์„ ๋ผ๊ณ  ์ข‹์•„ํ•˜๋Š” ๋…ธ๋ž˜๋ฅผ ์ž‘๊ฒŒ ๋”ฐ๋ผ ๋ถˆ๋Ÿฌ๋ณด์„ธ์š”."},{e:"โœ๏ธ",t:"๊ฐ์‚ฌํ•œ ๊ฒƒ 3๊ฐ€์ง€ ์ ๊ธฐ",d:"์ž‘์€ ๊ฒƒ์ด๋ผ๋„ ๊ดœ์ฐฎ์•„์š”. ๊ฐ์‚ฌํ•œ ๊ฒƒ์„ ์ ๋‹ค ๋ณด๋ฉด ๋งˆ์Œ์ด ๋”ฐ๋œปํ•ด์ง‘๋‹ˆ๋‹ค."},{e:"๐Ÿงธ",t:"์ข‹์•„ํ•˜๋Š” ์˜์ƒ ๋ณด๊ธฐ",d:"์งง์€ ํž๋ง ์˜์ƒ์„ ๋ณด๋ฉฐ ์ž ์‹œ ์›ƒ์–ด๋ณด์„ธ์š”."},{e:"๐Ÿ’†",t:"์…€ํ”„ ๋งˆ์‚ฌ์ง€ํ•˜๊ธฐ",d:"๊ด€์ž๋†€์ด์™€ ๋ชฉ, ์–ด๊นจ๋ฅผ ์ฒœ์ฒœํžˆ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”."},{e:"๐ŸŒ™",t:"์กฐ์šฉํ•œ ์Œ์•… ๋“ฃ๊ธฐ",d:"์•„๋ฌด ์ƒ๊ฐ ์—†์ด ์กฐ์šฉํ•œ ์Œ์•…์— ๊ท€๋ฅผ ๊ธฐ์šธ์—ฌ๋ณด์„ธ์š”."}];const M=[{t:"Weightless",a:"Marconi Union",u:"https://www.youtube.com/results?search_query=Marconi+Union+Weightless"},{t:"Clair de Lune",a:"Debussy",u:"https://www.youtube.com/results?search_query=Debussy+Clair+de+Lune"},{t:"Sunset Lover",a:"Petit Biscuit",u:"https://www.youtube.com/results?search_query=Petit+Biscuit+Sunset+Lover"},{t:"River Flows in You",a:"Yiruma",u:"https://www.youtube.com/results?search_query=Yiruma+River+Flows+in+You"},{t:"Experience",a:"Ludovico Einaudi",u:"https://www.youtube.com/results?search_query=Ludovico+Einaudi+Experience"},{t:"Bloom",a:"The Paper Kites",u:"https://www.youtube.com/results?search_query=The+Paper+Kites+Bloom"},{t:"Gymnop\u00e9die No.1",a:"Erik Satie",u:"https://www.youtube.com/results?search_query=Erik+Satie+Gymnopedie"},{t:"Kiss the Rain",a:"Yiruma",u:"https://www.youtube.com/results?search_query=Yiruma+Kiss+the+Rain"},{t:"Nuvole Bianche",a:"Ludovico Einaudi",u:"https://www.youtube.com/results?search_query=Ludovico+Einaudi+Nuvole+Bianche"},{t:"Blue",a:"Keshi",u:"https://www.youtube.com/results?search_query=Keshi+Blue"},{t:"Snowfall",a:"\u00d8neheart",u:"https://www.youtube.com/results?search_query=Oneheart+Snowfall"},{t:"Dandelions",a:"Ruth B.",u:"https://www.youtube.com/results?search_query=Ruth+B+Dandelions"},{t:"\uBD04\uB0A0",a:"BTS",u:"https://www.youtube.com/results?search_query=BTS+%EB%B4%84%EB%82%A0"},{t:"Through the Night",a:"IU",u:"https://www.youtube.com/results?search_query=IU+%EB%B0%A4%ED%8E%B8%EC%A7%80"}];let lr=-1,lm=-1,iT=null;function rT(){if(iT)clearTimeout(iT);iT=setTimeout(()=>{const s=document.getElementById('start-screen'),r=document.getElementById('result-screen');if(r.style.display==='flex'){r.style.display='none';s.style.display='flex';s.style.animation='none';void s.offsetWidth;s.style.animation='fadeIn 1s ease'}},30000)}['click','touchstart','keydown','mousemove','scroll'].forEach(e=>document.addEventListener(e,rT,{passive:true}));function gi(a,l){let i;do{i=Math.floor(Math.random()*a.length)}while(i===l&&a.length>1);return i}function roll(){const b=document.getElementById('diceBtn');b.classList.add('rolling');setTimeout(()=>{b.classList.remove('rolling');show()},500)}function show(){const s=document.getElementById('start-screen'),r=document.getElementById('result-screen');const i=gi(R,lr),j=gi(M,lm);lr=i;lm=j;const re=R[i],mu=M[j];document.getElementById('restEmoji').textContent=re.e;document.getElementById('restTitle').textContent=re.t;document.getElementById('restDesc').textContent=re.d;document.getElementById('musicTitle').textContent=mu.t;document.getElementById('musicArtist').textContent=mu.a;document.getElementById('musicLink').href=mu.u;s.style.display='none';r.style.display='flex';rT();r.querySelectorAll('.result-card').forEach(c=>{c.classList.remove('show');void c.offsetWidth;c.classList.add('show')});const rb=r.querySelector('.reroll-btn');rb.style.animation='none';void rb.offsetWidth;rb.style.animation='fadeIn 0.5s ease 0.5s forwards';rb.style.opacity='0'}function reroll(){const r=document.getElementById('result-screen');const i=gi(R,lr),j=gi(M,lm);lr=i;lm=j;const re=R[i],mu=M[j];rT();const cards=r.querySelectorAll('.result-card');cards.forEach(c=>c.classList.remove('show'));setTimeout(()=>{document.getElementById('restEmoji').textContent=re.e;document.getElementById('restTitle').textContent=re.t;document.getElementById('restDesc').textContent=re.d;document.getElementById('musicTitle').textContent=mu.t;document.getElementById('musicArtist').textContent=mu.a;document.getElementById('musicLink').href=mu.u;cards.forEach(c=>{void c.offsetWidth;c.classList.add('show')})},300)}</script>
66+
<script>const R=[{e:"๐Ÿง˜",t:"5๋ถ„ ๋ช…์ƒํ•˜๊ธฐ",d:"๋ˆˆ์„ ๊ฐ๊ณ  ํ˜ธํก์— ์ง‘์ค‘ํ•ด๋ณด์„ธ์š”. ๋“ค์ˆจ๊ณผ ๋‚ ์ˆจ์„ ์ฒœ์ฒœํžˆ ๋А๋ผ๋ฉฐ ๋งˆ์Œ์„ ๋น„์›Œ๋ณด์„ธ์š”."},{e:"๐Ÿšถ",t:"์‚ฐ์ฑ… ๋‚˜๊ฐ€๊ธฐ",d:"๊ฐ€๊นŒ์šด ๊ณต์›์ด๋‚˜ ๊ณจ๋ชฉ๊ธธ์„ ๊ฑธ์–ด๋ณด์„ธ์š”. ๋ฐ”๋žŒ๊ณผ ํ–‡์‚ด์ด ๊ธฐ๋ถ„์„ ์ „ํ™˜์‹œ์ผœ ์ค„ ๊ฑฐ์˜ˆ์š”."},{e:"โ˜•",t:"๋”ฐ๋œปํ•œ ์ฐจ ํ•œ ์ž”",d:"์ข‹์•„ํ•˜๋Š” ์ฐจ๋ฅผ ์ฒœ์ฒœํžˆ ์šฐ๋ ค๋‚ด๋ฉฐ ์—ฌ์œ ๋ฅผ ์ฆ๊ฒจ๋ณด์„ธ์š”."},{e:"๐Ÿ“–",t:"์ฑ… ํ•œ ํŽ˜์ด์ง€ ์ฝ๊ธฐ",d:"์–ด๋ ต์ง€ ์•Š์€ ์ฑ…์„ ํŽด๊ณ  ํ•œ ํŽ˜์ด์ง€๋งŒ ์ฝ์–ด๋ณด์„ธ์š”."},{e:"๐ŸŽจ",t:"๋‚™์„œ ๊ทธ๋ฆฌ๊ธฐ",d:"์ข…์ด ์œ„์— ์ž์œ ๋กญ๊ฒŒ ๊ทธ๋ฆผ์„ ๊ทธ๋ ค๋ณด์„ธ์š”."},{e:"๐ŸŒฟ",t:"์‹๋ฌผ ๋Œ๋ณด๊ธฐ",d:"ํ™”๋ถ„์— ๋ฌผ์„ ์ฃผ๊ณ  ์žŽ์„ ๋‹ฆ์•„์ฃผ์„ธ์š”."},{e:"๐Ÿ›",t:"๋”ฐ๋œปํ•œ ์ƒค์›Œํ•˜๊ธฐ",d:"๋”ฐ๋œปํ•œ ๋ฌผ๋กœ ๋ชธ์„ ๊ฐ์‹ธ๋ฉฐ ํ•˜๋ฃจ์˜ ํ”ผ๋กœ๋ฅผ ์”ฌ์–ด๋‚ด ๋ณด์„ธ์š”."},{e:"๐ŸŒ…",t:"ํ•˜๋Š˜ ๋ฐ”๋ผ๋ณด๊ธฐ",d:"์ฐฝ๋ฌธ ๋ฐ– ํ•˜๋Š˜์„ 5๋ถ„๋งŒ ๋ฐ”๋ผ๋ณด์„ธ์š”."},{e:"๐Ÿ˜ด",t:"10๋ถ„ ๋‚ฎ์ž  ์ž๊ธฐ",d:"์•Œ๋žŒ์„ 10๋ถ„ ํ›„๋กœ ๋งž์ถ”๊ณ  ํŽธํ•˜๊ฒŒ ๋ˆˆ์„ ๊ฐ์•„๋ณด์„ธ์š”."},{e:"๐ŸŽง",t:"์ข‹์•„ํ•˜๋Š” ๋…ธ๋ž˜ ๋”ฐ๋ผ ๋ถ€๋ฅด๊ธฐ",d:"์ด์–ดํฐ์„ ๋ผ๊ณ  ์ข‹์•„ํ•˜๋Š” ๋…ธ๋ž˜๋ฅผ ์ž‘๊ฒŒ ๋”ฐ๋ผ ๋ถˆ๋Ÿฌ๋ณด์„ธ์š”."},{e:"โœ๏ธ",t:"๊ฐ์‚ฌํ•œ ๊ฒƒ 3๊ฐ€์ง€ ์ ๊ธฐ",d:"์ž‘์€ ๊ฒƒ์ด๋ผ๋„ ๊ดœ์ฐฎ์•„์š”. ๊ฐ์‚ฌํ•œ ๊ฒƒ์„ ์ ๋‹ค ๋ณด๋ฉด ๋งˆ์Œ์ด ๋”ฐ๋œปํ•ด์ง‘๋‹ˆ๋‹ค."},{e:"๐Ÿงธ",t:"์ข‹์•„ํ•˜๋Š” ์˜์ƒ ๋ณด๊ธฐ",d:"์งง์€ ํž˜๋ง ์˜์ƒ์„ ๋ณด๋ฉฐ ์ž ์‹œ ์›ƒ์–ด๋ณด์„ธ์š”."},{e:"๐Ÿ’†",t:"์…€ํ”„ ๋งˆ์‚ฌ์ง€ํ•˜๊ธฐ",d:"๊ด€์ž๋†€์ด์™€ ๋ชฉ, ์–ด๊นจ๋ฅผ ์ฒœ์ฒœํžˆ ๋ˆŒ๋Ÿฌ์ฃผ์„ธ์š”."},{e:"๐ŸŒ™",t:"์กฐ์šฉํ•œ ์Œ์•… ๋“ฃ๊ธฐ",d:"์•„๋ฌด ์ƒ๊ฐ ์—†์ด ์กฐ์šฉํ•œ ์Œ์•…์— ๊ท€๋ฅผ ๊ธฐ์šธ์—ฌ๋ณด์„ธ์š”."}];const M=[{t:"Weightless",a:"Marconi Union"},{t:"Clair de Lune",a:"Debussy"},{t:"Sunset Lover",a:"Petit Biscuit"},{t:"River Flows in You",a:"Yiruma"},{t:"Experience",a:"Ludovico Einaudi"},{t:"Bloom",a:"The Paper Kites"},{t:"Gymnopรฉdie No.1",a:"Erik Satie"},{t:"Kiss the Rain",a:"Yiruma"},{t:"Nuvole Bianche",a:"Ludovico Einaudi"},{t:"Blue",a:"Keshi"},{t:"Snowfall",a:"ร˜neheart"},{t:"Dandelions",a:"Ruth B."},{t:"๋ด„๋‚ ",a:"BTS"},{t:"Through the Night",a:"IU"}];let lr=-1,lm=-1,iT=null;function rT(){if(iT)clearTimeout(iT);iT=setTimeout(()=>{const s=document.getElementById('start-screen'),r=document.getElementById('result-screen');if(r.style.display==='flex'){r.style.display='none';s.style.display='flex';s.style.animation='none';void s.offsetWidth;s.style.animation='fadeIn 1s ease'}},30000)}['click','touchstart','keydown','mousemove','scroll'].forEach(e=>document.addEventListener(e,rT,{passive:true}));function gi(a,l){let i;do{i=Math.floor(Math.random()*a.length)}while(i===l&&a.length>1);return i}function roll(){const b=document.getElementById('diceBtn');b.classList.add('rolling');setTimeout(()=>{b.classList.remove('rolling');show()},500)}function show(){const s=document.getElementById('start-screen'),r=document.getElementById('result-screen');const i=gi(R,lr),j=gi(M,lm);lr=i;lm=j;const re=R[i],mu=M[j];document.getElementById('restEmoji').textContent=re.e;document.getElementById('restTitle').textContent=re.t;document.getElementById('restDesc').textContent=re.d;document.getElementById('musicTitle').textContent=mu.t;document.getElementById('musicArtist').textContent=mu.a;s.style.display='none';r.style.display='flex';rT();r.querySelectorAll('.result-card').forEach(c=>{c.classList.remove('show');void c.offsetWidth;c.classList.add('show')});const ba=r.querySelector('.bottom-area');ba.style.animation='none';void ba.offsetWidth;ba.style.animation='fadeIn 0.5s ease 0.6s forwards';ba.style.opacity='0'}function reroll(){const r=document.getElementById('result-screen');const i=gi(R,lr),j=gi(M,lm);lr=i;lm=j;const re=R[i],mu=M[j];rT();const cards=r.querySelectorAll('.result-card');cards.forEach(c=>c.classList.remove('show'));setTimeout(()=>{document.getElementById('restEmoji').textContent=re.e;document.getElementById('restTitle').textContent=re.t;document.getElementById('restDesc').textContent=re.d;document.getElementById('musicTitle').textContent=mu.t;document.getElementById('musicArtist').textContent=mu.a;cards.forEach(c=>{void c.offsetWidth;c.classList.add('show')})},300)}</script>
6067
</body>
61-
</html>
68+
</html>

0 commit comments

Comments
ย (0)