2021-09-19 01:30:41 +02:00
|
|
|
import classNames from 'classnames';
|
2021-02-12 01:06:54 +01:00
|
|
|
import React from 'react';
|
2021-02-04 06:42:15 +01:00
|
|
|
import { IPost } from '../../types/cms';
|
2021-02-12 01:06:54 +01:00
|
|
|
import { ArticleContained } from '../ArticleContained';
|
2021-02-02 06:28:00 +01:00
|
|
|
import { Contained } from '../Contained';
|
2021-09-19 01:30:41 +02:00
|
|
|
import EmailSignup from '../EmailSignup';
|
2021-02-12 01:38:09 +01:00
|
|
|
import { Spacer } from '../Spacer';
|
2021-02-12 01:06:54 +01:00
|
|
|
import { TagRow } from '../TagRow';
|
2021-01-22 03:43:42 +01:00
|
|
|
import { ArticleSectionContent } from './sections/ArticleSectionContent';
|
2021-02-12 01:06:54 +01:00
|
|
|
import { ArticleSectionFeatureImage } from './sections/ArticleSectionFeatureImage';
|
2021-01-22 03:43:42 +01:00
|
|
|
import { ArticleSectionTitle } from './sections/ArticleSectionTitle';
|
|
|
|
import { ArticleSubtitleSection } from './sections/ArticleSubtitleSection';
|
2021-02-02 06:28:00 +01:00
|
|
|
import { ArticleWidgetAuthor } from './widgets/ArticleWidgetAuthor';
|
2021-01-22 03:43:42 +01:00
|
|
|
|
2021-01-29 03:50:49 +01:00
|
|
|
export function Article(props: IPost) {
|
2021-02-12 01:06:54 +01:00
|
|
|
const {
|
|
|
|
title,
|
|
|
|
subtitle,
|
|
|
|
author,
|
|
|
|
tags,
|
|
|
|
publishedDate,
|
|
|
|
featureImage,
|
|
|
|
description,
|
|
|
|
} = props;
|
2021-01-22 03:43:42 +01:00
|
|
|
|
2021-02-12 01:06:54 +01:00
|
|
|
// const { isMobile } = useContext(ScreenContext);
|
2021-01-22 03:43:42 +01:00
|
|
|
|
|
|
|
return (
|
|
|
|
<article>
|
2021-02-12 01:38:09 +01:00
|
|
|
<div className="flex flex-col items-center mt-10 mb-16 space-y-4">
|
2021-06-29 09:50:18 +02:00
|
|
|
<ArticleSectionFeatureImage featureImage={featureImage} title={title} />
|
2021-01-22 03:43:42 +01:00
|
|
|
|
2021-02-12 01:06:54 +01:00
|
|
|
<ArticleContained>
|
|
|
|
<div className="flex flex-col mb-6 space-y-6">
|
|
|
|
<ArticleSectionTitle title={title} />
|
|
|
|
<ArticleSubtitleSection subtitle={subtitle} />
|
2021-01-22 03:43:42 +01:00
|
|
|
|
2021-02-12 01:06:54 +01:00
|
|
|
<ArticleWidgetAuthor
|
|
|
|
author={author}
|
|
|
|
publishedDate={publishedDate}
|
|
|
|
/>
|
|
|
|
|
2021-03-02 06:16:24 +01:00
|
|
|
{/* Brendan requested that descriptions are only shown on cards. -t 2nd Mar 2021 */}
|
|
|
|
{/* <ArticleCallout>{description}</ArticleCallout> */}
|
2021-02-12 01:06:54 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<ArticleSectionContent {...props} />
|
|
|
|
|
2021-02-12 01:38:09 +01:00
|
|
|
<Spacer spaceY={4} />
|
2021-02-12 01:06:54 +01:00
|
|
|
<TagRow tags={tags} size="medium" />
|
2021-09-19 01:30:41 +02:00
|
|
|
<EmailSignup classes={classNames('mt-12', 'tablet:mt-12')} />
|
2021-02-12 01:06:54 +01:00
|
|
|
</ArticleContained>
|
2021-02-02 06:28:00 +01:00
|
|
|
</div>
|
2021-01-22 03:43:42 +01:00
|
|
|
</article>
|
|
|
|
);
|
|
|
|
}
|