Skip to content

Commit ea839d1

Browse files
committed
Add floating mp3 player mobile
1 parent 56bf58d commit ea839d1

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

lingoanki/templates/diary_tprs_play_audio.html

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,23 @@
1515
gap: 1rem;
1616
max-width: 400px;
1717
margin: auto;
18-
box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* subtle shadow */
19-
transition: all 0.3s ease; /* smooth transition */
18+
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
19+
transition: all 0.3s ease;
20+
}
21+
22+
/* On small screens, override to fixed */
23+
@media (max-width: 768px) {
24+
.audio-player {
25+
position: fixed;
26+
top: 0;
27+
left: 0;
28+
right: 0;
29+
width: 100%;
30+
max-width: none;
31+
padding: 0.5rem;
32+
background: white;
33+
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
34+
}
2035
}
2136
</style>
2237

0 commit comments

Comments
 (0)