mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
* Affects ActionButtonFooter, ChallengeFooter, ClipboardCopy, SubscriptionForm, VideoButton components * Adds new entries for each json file: buttons.email, buttons.clipboardCopy, challenge.footer.video, challenge.footer.upvoteAnswer * Available in English and Spanish
25 lines
838 B
Plaintext
25 lines
838 B
Plaintext
---
|
|
import { getEntry } from 'astro:content';
|
|
|
|
interface Props {
|
|
lang: any;
|
|
link: string;
|
|
alt: string;
|
|
flag?: 'FR';
|
|
}
|
|
|
|
const { link, alt, flag, lang } = Astro.props;
|
|
const { data } = await getEntry('i18n', lang);
|
|
const isFR = flag === 'FR';
|
|
---
|
|
|
|
<a
|
|
href={link}
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
alt={alt}>
|
|
<svg aria-hidden="true" class="astro-yzt5nm4y astro-lq7oo3uf" width="20" height="20" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M23.5 6.2A3 3 0 0 0 21.4 4c-1.9-.5-9.4-.5-9.4-.5s-7.5 0-9.4.5A3 3 0 0 0 .5 6.3C0 8 0 12 0 12s0 4 .5 5.8A3 3 0 0 0 2.6 20c1.9.6 9.4.6 9.4.6s7.5 0 9.4-.6a3 3 0 0 0 2.1-2c.5-2 .5-5.9.5-5.9s0-4-.5-5.8zm-14 9.4V8.4l6.3 3.6-6.3 3.6z"></path></svg>
|
|
{data['challenge.footer.video']}
|
|
{isFR && <span class="flag">🇫🇷</span>}
|
|
</a>
|