Implement ProgCode identity and real shared reading UI kit
Build and deploy / deploy (push) Successful in 2m39s

This commit is contained in:
huncode committed 2026-10-27 15:19:49 +03:00
1 parent 99c848189e
commit 12562baeb5
2040 files changed
+184656 -181

No files matched your search

@@ -0,0 +1,7 @@
import Link from 'next/link';
import {articleGenre} from '../model/editorial';
import {Tag} from '../../../shared/ui';
import {formatDate} from '../../../shared/lib';
export function ArticleListItem({article,onSelect,shortDate=true}){
return <article className="index-entry"><div className="index-date"><time dateTime={article.date}>{formatDate(article.date,shortDate?{month:'short',day:'numeric'}:undefined)}</time><Tag>{articleGenre(article)} · {article.categories.join(' · ')}</Tag></div><Link onClick={onSelect} href={'/articles/'+encodeURIComponent(article.slug)+'/'}><h3>{article.title}</h3><p>{article.excerpt}</p></Link>{Number.isFinite(article.readingMinutes)&&article.readingMinutes>0&&<span className="index-duration">{article.readingMinutes} мин <b aria-hidden="true">↗</b></span>}</article>;
}
@@ -0,0 +1,4 @@
import {formatDate} from '../../../shared/lib';
export function ArticleMeta({article,short=false,showAuthor=true,className=''}){
return <div className={['article-meta',className].filter(Boolean).join(' ')}><time dateTime={article.date}>{formatDate(article.date,short?{month:'short',day:'numeric'}:undefined)}</time>{Number.isFinite(article.readingMinutes)&&article.readingMinutes>0&&<span>{article.readingMinutes} мин чтения</span>}{showAuthor&&article.author&&<span>Публикация: {article.author}</span>}</div>;
}
@@ -0,0 +1,2 @@
import {TextLink} from '../../../shared/ui';
export function EditorialNote({article}){const greeting=article.slug==='привет-мир';return <p className="editorial-note">{greeting?'Редакционный пересказ исторической записи: речь от первого лица здесь не является дословной цитатой автора.':'Редакционная версия: формулировки, структура и примеры могут отличаться от архивной страницы.'}{' '}<TextLink href={article.source}>Сверить с архивным снимком →</TextLink></p>}