Skip to content

Commit c07b281

Browse files
committed
Add lyric display functionality and styles for enhanced user experience
- Introduced new lyric line styles in secrets.css to improve visibility and animation effects. - Updated secrets.js to implement a lyric display system that shows lyrics in a spiral path with collision detection. - Enhanced position adjustment logic to ensure lyrics remain within screen bounds and are visually appealing. - Improved overall interactivity by allowing lyrics to fade in and out smoothly as users interact with the interface.
1 parent d616f61 commit c07b281

File tree

2 files changed

+284
-145
lines changed

2 files changed

+284
-145
lines changed

css/secrets.css

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,33 @@ svg {
9292
50% { opacity: 0.2; }
9393
}
9494

95+
/* Individual lyric line styles */
96+
.lyric-line {
97+
position: fixed;
98+
color: #f8f8f6;
99+
font-family: 'Roboto Slab', serif;
100+
font-size: 1.2em;
101+
line-height: 1.4;
102+
text-align: center;
103+
white-space: normal;
104+
opacity: 0;
105+
z-index: 10;
106+
pointer-events: none;
107+
transition: opacity 0.8s ease-in-out;
108+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
109+
max-width: 250px;
110+
word-wrap: break-word;
111+
overflow-wrap: break-word;
112+
hyphens: auto;
113+
}
114+
115+
.lyric-line.visible {
116+
opacity: 1;
117+
}
118+
95119
/* Mobile responsive */
96120
@media (max-width: 768px) {
97-
.poem-container {
121+
.poem-container, .lyric-container {
98122
max-width: 95vw;
99123
padding: 2rem;
100124
}
@@ -103,7 +127,14 @@ svg {
103127
font-size: 1.1em;
104128
}
105129

106-
.poem-text {
130+
.poem-text, .lyric-text {
107131
font-size: 1.2em;
108132
}
133+
134+
.lyric-line {
135+
font-size: 1em;
136+
max-width: 200px;
137+
word-wrap: break-word;
138+
overflow-wrap: break-word;
139+
}
109140
}

0 commit comments

Comments
 (0)