diff options
Diffstat (limited to 'src/components/NewsPreviewLink.astro')
| -rw-r--r-- | src/components/NewsPreviewLink.astro | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/components/NewsPreviewLink.astro b/src/components/NewsPreviewLink.astro deleted file mode 100644 index 90cce61..0000000 --- a/src/components/NewsPreviewLink.astro +++ /dev/null @@ -1,25 +0,0 @@ ---- -import translate from '$i18n/translate'; -import tNewsPreviewLink from '$i18n/translations/components/newsPreviewLink'; -import getLocaleFromPath from '$lib/getLocaleFromPath'; -import type { CollectionEntry } from 'astro:content'; - -interface Props { - headingLevel: 'h1' | 'h2' | 'h3' | 'h4'; - newsItem: CollectionEntry<'news'>; -} - -const { headingLevel, newsItem } = Astro.props; -const locale = getLocaleFromPath(Astro.url.pathname); -const t = translate(locale); ---- - -<a class="news-index__item group-hover" href={`/${locale}/news/${newsItem.slug.replace('/', '-')}`}> - <Fragment - set:html={` - <${headingLevel}>${newsItem.data.title}</${headingLevel}> - `} - /> - <p>{newsItem.data.summary}</p> - <p class="link">{t(tNewsPreviewLink, { key: 'read-article' })}</p> -</a> |
