Developed own component to wrap youtube-lite (adds placeholder when JS is off)

This commit is contained in:
Firq 2023-12-29 20:02:58 +01:00
parent cb8b53ea63
commit 5d1da2d3d8
Signed by: Firq
GPG key ID: 4DE1059A4666E89F
3 changed files with 61 additions and 16 deletions
src/pages/blog

View file

@ -6,8 +6,8 @@ description: 'Blog post talking about instant death in FGO, how you can take adv
author: 'Firq'
tags: ['fgo', 'games']
---
import { YouTube } from '@astro-community/astro-embed-youtube';
import thumbnail from "../../assets/thumbnails/UwbNp_dB_VU.jpg"
import YoutubeEmbed from "../../components/youtubeEmbed.astro"
> **Disclaimer**<br/>
> While writing this, Requiem and I faced a bit of a challenge concerning death rate calculations. Case in point is the passive "Item Construction"
@ -105,9 +105,7 @@ For other skill levels, this looks like this (_Her S1 scales from 50% to 100%_)
In the end, this resulted in the following comp that worked like a charm.
<div class="youtube-center">
<YouTube id="UwbNp_dB_VU" poster={thumbnail.src}/>
</div>
<YoutubeEmbed id="UwbNp_dB_VU" thumbnail={thumbnail.src}/>
## Conclusion