mirror of
https://github.com/sergeyyarkov/yarkov.tech.git
synced 2026-10-11 10:29:21 +03:00
added some microdata
This commit is contained in:
parent
09dcb4df2c
commit
2ce791412d
@ -13,14 +13,14 @@ export const ArticleItem: Component<ArticleItemProps> = (props) => {
|
||||
const isNonDefaultLanguage = props.data.lang && props.data.lang !== props.lang;
|
||||
const hrefLangPrefix = props.data.lang && props.data.lang !== DEFAULT_LANGUAGE ? `/${props.data.lang}` : "";
|
||||
return (
|
||||
<article class="article-item">
|
||||
<article itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting" class="article-item">
|
||||
<a
|
||||
href={`${hrefLangPrefix}/blog/${new Date(props.data.published_at).toLocaleDateString("en-CA")}/${
|
||||
props.data.slug
|
||||
}/`}
|
||||
>
|
||||
<div class="flex">
|
||||
<h3>{props.data.title}</h3>
|
||||
<h3 itemprop="headline">{props.data.title}</h3>
|
||||
{isNonDefaultLanguage && <sup>{props.data.lang.toLocaleUpperCase()}</sup>}
|
||||
</div>
|
||||
<p>
|
||||
|
||||
@ -72,7 +72,7 @@ const ArticlesList: Component<ArticlesListProps> = (props) => {
|
||||
<>
|
||||
<SearchInput count={getLength()} placeholder={props.i18n["input.search"]} />
|
||||
<TagsList data={props.data.tags} />
|
||||
<div class="articles-list">
|
||||
<div itemscope itemtype="http://schema.org/Blog" class="articles-list">
|
||||
{isEmpty() ? (
|
||||
<div class="articles-list__empty">
|
||||
<p>{props.i18n["articles.empty"]}</p>
|
||||
|
||||
@ -19,12 +19,13 @@ const { pathname } = Astro.url;
|
||||
{name}
|
||||
</TranslatedLink>
|
||||
</div>
|
||||
<nav>
|
||||
<nav itemscope itemtype="http://schema.org/SiteNavigationElement">
|
||||
<ul>
|
||||
{
|
||||
nav.map((link) => (
|
||||
<li>
|
||||
<TranslatedLink
|
||||
itemprop="url"
|
||||
class={pathname.includes(removeSlashes(link.url)) && pathname.split("/").length < 5 && "active"}
|
||||
to={link.url}
|
||||
>
|
||||
|
||||
@ -26,7 +26,7 @@ const isEmpty = recent.length === 0;
|
||||
</TranslatedLink>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div itemscope itemtype="http://schema.org/Blog">
|
||||
{!isEmpty ? recent.slice(0, length).map((article) => <ArticleItem lang={lang} data={article} />) : <EmptyList />}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user