Skip to content

Commit

Permalink
fix: test performance for fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
thedaviddias committed Aug 3, 2023
1 parent 8eb43b9 commit 3148787
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 9 deletions.
5 changes: 3 additions & 2 deletions apps/blog/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,9 @@
"posts": {
"empty": "Couldn't find any articles for that query.",
"continue": "Continue reading →",
"updated": "Updated on",
"published": "First published on",
"updated": "Updated",
"first_published": "First published on",
"published": "Published",
"tableContent": "Table of Contents",
"previous": "Previous post",
"next": "Next post"
Expand Down
5 changes: 4 additions & 1 deletion apps/blog/src/components/DatePost/DatePost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ export const DatePost: React.FC<DatePostProps> = ({ date, lastmod }) => {
<span>({t('posts.updated')}</span> <time dateTime={lastmod}>{dateUpdated})</time>
</p>
)}
<time dateTime={date}>{datePublished}</time>
<p>
<span className="sr-only">{t('posts.published')}</span>{' '}
<time dateTime={date}>{datePublished}</time>
</p>
</div>
</div>
)
Expand Down
2 changes: 2 additions & 0 deletions apps/blog/src/components/MdxComponents/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
OlHTMLAttributes,
ReactNode,
} from 'react'
import { LinkedInEmbed } from 'react-social-media-embed/dist/components/embeds/LinkedInEmbed'

import { H1, H2, H3, H4 } from '@/components/Headings'
import { Paragraph } from '@/components/Paragraph'
Expand All @@ -20,6 +21,7 @@ import { Tweet } from './tweet'
import { Sidenote } from '../Sidenote'

export const MDXComponents: any = {
LinkedInEmbed,
hr: (
props: JSX.IntrinsicAttributes & ClassAttributes<HTMLHRElement> & HTMLAttributes<HTMLHRElement>
) => <hr {...props} />,
Expand Down
2 changes: 1 addition & 1 deletion apps/blog/src/pages/articles/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ const BlogPostPage: NextPage<BlogPostPageProps> = ({

{published?.url && (
<Paragraph className="italic pt-8">
{t('posts.published')}{' '}
{t('posts.first_published')}{' '}
<CustomLink href={published.url} as="span">
{published.on}
</CustomLink>
Expand Down
2 changes: 1 addition & 1 deletion apps/blog/src/pages/projects/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ const ProjectPage: NextPage<BlogPostPageProps> = ({ frontMatter, source, permali

{published?.url && (
<Paragraph className="italic pt-8">
{t('posts.published')}{' '}
{t('posts.first_published')}{' '}
<CustomLink href={published.url} as="span">
{published.on}
</CustomLink>
Expand Down
8 changes: 4 additions & 4 deletions apps/blog/src/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
@font-face {
font-family: 'Oswald';
font-family: 'Oswald', sans-serif;
font-style: normal;
font-weight: 300 700;
src: url('/fonts/oswald.woff2') format('woff2');
font-display: swap;
}

@font-face {
font-family: 'Source Sans Pro';
font-family: 'Source Sans Pro', sans-serif;
font-style: normal;
font-weight: 700;
src: url('/fonts/SourceSansPro-Bold.woff2') format('woff2');
font-display: swap;
}

@font-face {
font-family: 'Source Sans Pro';
font-family: 'Source Sans Pro', sans-serif;
font-style: normal;
font-weight: 300;
src: url('/fonts/SourceSansPro-Light.woff2') format('woff2');
font-display: swap;
}

@font-face {
font-family: 'Source Sans Pro';
font-family: 'Source Sans Pro', sans-serif;
font-style: normal;
font-weight: 400;
src: url('/fonts/SourceSansPro-Regular.woff2') format('woff2');
Expand Down
8 changes: 8 additions & 0 deletions content/articles/ideal-desk-setup-personal-journey.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,11 @@ A few years ago, when I was living in Paris, I would spend a fortune at [Aroma Z
## And you, what is your ideal desk setup?

Everyone is different, and our needs and aspirations are different. I am curious to know - what is your ideal desk setup? What do you like to have on your desk? What do you enjoy doing? What is your dream setup?

<div style={{ display: 'flex', justifyContent: 'center' }}>
<LinkedInEmbed
url="https://www.linkedin.com/embed/feed/update/urn:li:share:7091183319584833536"
postUrl="https://www.linkedin.com/posts/thedaviddias_desksetup-homeoffice-desk-activity-7091183321329647616-TrhV?utm_source=share&utm_medium=member_desktop"
width={525}
/>
</div>

2 comments on commit 3148787

@vercel
Copy link

@vercel vercel bot commented on 3148787 Aug 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 3148787 Aug 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.