File tree Expand file tree Collapse file tree 2 files changed +24
-9
lines changed Expand file tree Collapse file tree 2 files changed +24
-9
lines changed Original file line number Diff line number Diff line change 38
38
</script >
39
39
40
40
<div class ="container" bind:this ={container }>
41
- {#key $index }
42
- <Youtube id ={VIDEOS [$index ]} animations ={false } />
43
- {/ key }
41
+ <Youtube id ={VIDEOS [$index ]} animations ={false } />
42
+ {#await getYoutubeVideoTitle (VIDEOS [$index ])}
43
+ <p class =" main-title loading" >Loading Title...</p >
44
+ {:then title }
45
+ <p class ="main-title" >{title }</p >
46
+ {:catch error }
47
+ <!-- -->
48
+ {/await }
49
+ <!-- {#key $index}
50
+ {/key} -->
44
51
<div class =" grid" >
45
52
{#each VIDEOS as id }
46
53
<!-- svelte-ignore a11y-click-events-have-key-events -->
57
64
style ={` background-image: url(https://img.youtube.com/vi/${id }/0.jpg); ` }
58
65
></div >
59
66
{#await getYoutubeVideoTitle (id )}
60
- <p >Loading...</p >
67
+ <p class = " loading " >Loading Title ...</p >
61
68
{:then title }
62
69
<p >{title }</p >
63
70
{:catch error }
110
117
box-shadow : 2px 2px 8px -4px black ;
111
118
}
112
119
:global(.v__title ) {
120
+ display : none ;
113
121
text-align : left ;
114
122
font-size : 1.5rem ;
115
123
backdrop-filter : blur (4px );
116
124
background : rgba (var (--kd-color-elevate ) / 0.5 ) !important ;
117
125
padding-bottom : 0.25rem ;
118
126
text-transform : capitalize ;
119
127
}
128
+ .main-title {
129
+ font-size : 1.5rem ;
130
+ text-align : center ;
131
+ }
132
+ .loading {
133
+ color : rgb (139 , 139 , 139 );
134
+ }
120
135
121
136
@media (max-width : 768px ) {
122
137
.grid {
126
141
width : 128px ;
127
142
height : 72px ;
128
143
}
129
- p {
144
+ .thumbnail-container p {
130
145
text-align : center ;
131
146
text-transform : capitalize ;
132
147
max-width : 128px ;
Original file line number Diff line number Diff line change 98
98
{/each }
99
99
</div >
100
100
101
- <div class =" center-container " >
102
- <div class =" made-with-aj " >
103
- < h2 class = " section-title " >Made with Animated Java!</ h2 >
104
- < hr / >
101
+ <div class =" made-with-aj " >
102
+ <h2 class =" section-title " >Made with Animated Java!</ h2 >
103
+ < hr / >
104
+ < div class = " center-container " >
105
105
<Carousel ></Carousel >
106
106
</div >
107
107
</div >
You can’t perform that action at this time.
0 commit comments