File tree Expand file tree Collapse file tree
client/packages/lowcoder/src/pages/ApplicationV2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,7 +128,6 @@ export function NewsLayout() {
128128 return (
129129 < Col xs = { 24 } sm = { 12 } md = { 12 } lg = { 8 } key = { `blog-${ idx } ` } >
130130 < Card
131- hoverable
132131 cover = {
133132 < a href = { url } target = "_blank" rel = "noreferrer" >
134133 < CardImage src = { coverImage } alt = { htmlTitle } loading = "lazy" />
@@ -177,15 +176,22 @@ export function NewsLayout() {
177176 < Row gutter = { [ 16 , 16 ] } >
178177 { youTubeData . map ( ( item , idx ) => {
179178 const s = item . snippet ;
179+ const videoUrl = `https://www.youtube.com/watch?v=${ item . id . videoId } ` ;
180180 return (
181181 < Col xs = { 24 } sm = { 12 } md = { 8 } lg = { 6 } key = { `yt-${ idx } ` } >
182182 < Card
183183 hoverable
184- cover = {
185- < a href = { `https://www.youtube.com/watch?v=${ item . id . videoId } ` } target = "_blank" rel = "noreferrer" >
186- < CardImage src = { s . thumbnails . high . url } alt = { s . title } />
187- </ a >
188- }
184+ role = "link"
185+ tabIndex = { 0 }
186+ aria-label = { s . title }
187+ onClick = { ( ) => window . open ( videoUrl , "_blank" , "noopener,noreferrer" ) }
188+ onKeyDown = { ( event ) => {
189+ if ( event . key === "Enter" ) {
190+ event . preventDefault ( ) ;
191+ event . currentTarget . click ( ) ;
192+ }
193+ } }
194+ cover = { < CardImage src = { s . thumbnails . high . url } alt = { s . title } /> }
189195 >
190196 < Card . Meta
191197 title = { s . title }
@@ -213,7 +219,6 @@ export function NewsLayout() {
213219 return (
214220 < Col xs = { 24 } sm = { 12 } md = { 12 } lg = { 8 } key = { `gh-${ idx } ` } >
215221 < Card
216- hoverable
217222 title = { `${ c . tag_name } (${ c . name } )` }
218223 extra = { < a href = { c . html_url } target = "_blank" rel = "noreferrer" > View</ a > }
219224 >
You can’t perform that action at this time.
0 commit comments