Restore verified programmer archive with search, provenance and legacy URLs
Build and deploy / deploy (push) Successful in 1m5s
Build and deploy / deploy (push) Successful in 1m5s
This commit is contained in:
1 parent
089b949f4d
commit
681502465a
82 files changed
+8142
-5566
No files matched your search
+3
-51
@@ -1,51 +1,3 @@
|
||||
import Link from 'next/link';
|
||||
import { formatDate, getArticles } from '../lib/articles';
|
||||
|
||||
export default function HomePage() {
|
||||
const articles = getArticles();
|
||||
|
||||
return (
|
||||
<main>
|
||||
<section className="site-hero">
|
||||
<div className="site-hero__inner">
|
||||
<p className="eyebrow">Личный блог программиста</p>
|
||||
<h1>ProgCode.Ru</h1>
|
||||
<p className="site-description">
|
||||
PHP, Bitrix, JavaScript, D, Windows и практические заметки из ежедневной разработки.
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="articles-shell" aria-label="Список статей">
|
||||
<div className="articles-header">
|
||||
<div>
|
||||
<p className="eyebrow">Материалы</p>
|
||||
<h2>Статьи</h2>
|
||||
</div>
|
||||
<span>{articles.length} записей</span>
|
||||
</div>
|
||||
|
||||
<div className="article-grid">
|
||||
{articles.map((article) => (
|
||||
<Link key={article.slug} className="article-card" href={`/articles/${encodeURIComponent(article.slug)}/`}>
|
||||
<img src={article.cover} alt="" />
|
||||
<div className="article-card__body">
|
||||
<div className="meta-line">
|
||||
<time dateTime={article.date}>{formatDate(article.date)}</time>
|
||||
<span>{article.readingMinutes} мин</span>
|
||||
</div>
|
||||
<h3>{article.title}</h3>
|
||||
<p>{article.excerpt}</p>
|
||||
<div className="tag-list">
|
||||
{article.categories.map((category) => (
|
||||
<span key={category}>{category}</span>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
import Catalog from './Catalog';
|
||||
import {getArticles} from '../lib/articles';
|
||||
export default function Home(){return <main><section className="site-hero"><div className="site-hero__inner"><p className="eyebrow">Код. Опыт. История.</p><h1>Записки<br/>программиста</h1><p className="site-description">D, PHP, Bitrix и JavaScript — практические задачи, небольшие открытия и архив разработки 2017–2019.</p><a className="hero-link" href="#catalog">Читать архив ↓</a></div><div className="hero-code" aria-hidden="true"><span>// знания остаются</span><br/>while (curious) {<br/> read();<br/> try();<br/> understand();<br/>}</div></section><Catalog articles={getArticles()}/></main>}
|
||||
Reference in new issue
Block a user