upstream #1
@ -3,11 +3,11 @@ import PageTitle from '@/components/PageTitle'
|
|||||||
import SectionContainer from '@/components/SectionContainer'
|
import SectionContainer from '@/components/SectionContainer'
|
||||||
import { BlogSeo } from '@/components/SEO'
|
import { BlogSeo } from '@/components/SEO'
|
||||||
import Tag from '@/components/Tag'
|
import Tag from '@/components/Tag'
|
||||||
import siteMetdata from '@/data/siteMetadata'
|
import siteMetadata from '@/data/siteMetadata'
|
||||||
|
|
||||||
const editUrl = (fileName) => `${siteMetdata.siteRepo}/blob/master/data/blog/${fileName}`
|
const editUrl = (fileName) => `${siteMetadata.siteRepo}/blob/master/data/blog/${fileName}`
|
||||||
const discussUrl = (slug) =>
|
const discussUrl = (slug) =>
|
||||||
`https://mobile.twitter.com/search?q=${encodeURIComponent(`${siteMetdata.siteUrl}/blog/${slug}`)}`
|
`https://mobile.twitter.com/search?q=${encodeURIComponent(`${siteMetadata.siteUrl}/blog/${slug}`)}`
|
||||||
|
|
||||||
const postDateTemplate = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }
|
const postDateTemplate = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }
|
||||||
|
|
||||||
@ -16,7 +16,7 @@ export default function PostLayout({ children, frontMatter, next, prev }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<SectionContainer>
|
<SectionContainer>
|
||||||
<BlogSeo url={`${siteMetdata.siteUrl}/blog/${frontMatter.slug}`} {...frontMatter} />
|
<BlogSeo url={`${siteMetadata.siteUrl}/blog/${frontMatter.slug}`} {...frontMatter} />
|
||||||
<article>
|
<article>
|
||||||
<div className="xl:divide-y xl:divide-gray-200 xl:dark:divide-gray-700">
|
<div className="xl:divide-y xl:divide-gray-200 xl:dark:divide-gray-700">
|
||||||
<header className="pt-6 xl:pb-6">
|
<header className="pt-6 xl:pb-6">
|
||||||
@ -26,7 +26,7 @@ export default function PostLayout({ children, frontMatter, next, prev }) {
|
|||||||
<dt className="sr-only">Published on</dt>
|
<dt className="sr-only">Published on</dt>
|
||||||
<dd className="text-base font-medium leading-6 text-gray-500 dark:text-gray-400">
|
<dd className="text-base font-medium leading-6 text-gray-500 dark:text-gray-400">
|
||||||
<time dateTime={date}>
|
<time dateTime={date}>
|
||||||
{new Date(date).toLocaleDateString(siteMetdata.locale, postDateTemplate)}
|
{new Date(date).toLocaleDateString(siteMetadata.locale, postDateTemplate)}
|
||||||
</time>
|
</time>
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
@ -45,17 +45,17 @@ export default function PostLayout({ children, frontMatter, next, prev }) {
|
|||||||
<dd>
|
<dd>
|
||||||
<ul className="flex justify-center space-x-8 xl:block sm:space-x-12 xl:space-x-0 xl:space-y-8">
|
<ul className="flex justify-center space-x-8 xl:block sm:space-x-12 xl:space-x-0 xl:space-y-8">
|
||||||
<li className="flex items-center space-x-2">
|
<li className="flex items-center space-x-2">
|
||||||
<img src={siteMetdata.image} alt="avatar" className="w-10 h-10 rounded-full" />
|
<img src={siteMetadata.image} alt="avatar" className="w-10 h-10 rounded-full" />
|
||||||
<dl className="text-sm font-medium leading-5 whitespace-nowrap">
|
<dl className="text-sm font-medium leading-5 whitespace-nowrap">
|
||||||
<dt className="sr-only">Name</dt>
|
<dt className="sr-only">Name</dt>
|
||||||
<dd className="text-gray-900 dark:text-gray-100">{siteMetdata.author}</dd>
|
<dd className="text-gray-900 dark:text-gray-100">{siteMetadata.author}</dd>
|
||||||
<dt className="sr-only">Twitter</dt>
|
<dt className="sr-only">Twitter</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<Link
|
<Link
|
||||||
href={siteMetdata.twitter}
|
href={siteMetadata.twitter}
|
||||||
className="text-blue-500 hover:text-blue-600 dark:hover:text-blue-400"
|
className="text-blue-500 hover:text-blue-600 dark:hover:text-blue-400"
|
||||||
>
|
>
|
||||||
{siteMetdata.twitter.replace('https://twitter.com/', '@')}
|
{siteMetadata.twitter.replace('https://twitter.com/', '@')}
|
||||||
</Link>
|
</Link>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user