File tree Expand file tree Collapse file tree 4 files changed +20
-26
lines changed
Expand file tree Collapse file tree 4 files changed +20
-26
lines changed Original file line number Diff line number Diff line change 1313 position : relative;
1414}
1515
16- .slot {
17- height : 100% ;
18- border-radius : 4px ;
19- z-index : 10 ;
20- width : 100% ;
21- display : flex;
22- box-sizing : border-box;
23- flex-direction : column;
24- justify-content : space-evenly;
25- align-items : center;
16+ .slot , .context {
17+ border-radius : inherit;
18+ position : absolute;
19+ z-index : 10 ;
20+ width : 100% ;
21+ height : 100% ;
22+ display : flex;
23+ box-sizing : border-box;
24+ flex-direction : column;
25+ justify-content : space-evenly;
26+ align-items : center;
2627}
2728
2829.slot > div {
7879 animation-delay : 0s ;
7980}
8081
81- /* copy code from here */
8282.bubble_square li : nth-child (2 ) {
8383 left : 10% ;
8484 width : 20px ;
183183 animation-duration : 11s ;
184184}
185185
186- /* copy code till here */
187-
188186@keyframes animate {
189187 0% {
190188 transform : translateY (0 ) rotate (0deg );
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ import "@/assets/styles/poem-dialog.css";
8585 await ensureVoicesLoaded ();
8686
8787 if (availableVoices .length === 0 ) {
88- audioToggle .textContent = " 🚫 " ;
88+ audioToggle .innerHTML = ` <svg id="audio-icon"viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 9.3345 19.8412 6.93964 18 5.29168M5.63605 5.63605L18.364 18.364" stroke-width="1.5" stroke-linecap="round"></path> </g></svg> ` ;
8989 return ;
9090 }
9191
@@ -98,7 +98,7 @@ import "@/assets/styles/poem-dialog.css";
9898 availableVoices [0 ];
9999
100100 if (! selectedVoice ) {
101- audioToggle .textContent = " 🚫 " ;
101+ audioToggle .innerHTML = ` <svg id="audio-icon"viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <path d="M12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 9.3345 19.8412 6.93964 18 5.29168M5.63605 5.63605L18.364 18.364" stroke-width="1.5" stroke-linecap="round"></path> </g></svg> ` ;
102102 return ;
103103 }
104104
@@ -116,6 +116,7 @@ import "@/assets/styles/poem-dialog.css";
116116 currentText = lines .join (" " );
117117 currentLang = " en-US" ;
118118 await ensureVoicesLoaded ();
119+ modal .showModal ();
119120 } ;
120121
121122 audioToggle.onclick = () => {
@@ -133,12 +134,5 @@ import "@/assets/styles/poem-dialog.css";
133134 resetSpeakerButton ();
134135 } ;
135136
136- window.addEventListener("click", (e) => {
137- if (e .target === modal ) {
138- modal .close ();
139- resetSpeakerButton ();
140- }
141- } );
142-
143137 ensureVoicesLoaded();
144138</script >
Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ import "@/assets/styles/bubble.css";
44
55<div class =" bubble__container" >
66 <div class =" bubble__board" >
7- <div class =" slot" ><slot name =" bobble-context" /></div >
7+ <div class =" slot" >
8+ <slot name =" bobble-context" />
9+ </div >
810 <div class =" bubble__area" >
911 <ul class =" bubble_square" >
1012 { Array .from ({ length: 10 }, (_ , i ) => <li data-id = { i + 1 } />)}
You can’t perform that action at this time.
0 commit comments