Skip to content
This repository was archived by the owner on Jul 30, 2023. It is now read-only.
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: yummy-recipes/yummy
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f469a0f9189cc208f1c710795a52a245a5fc13d6
Choose a base ref
..
head repository: yummy-recipes/yummy
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6ffa259ec789495b29c389c4a2955fc96185f7ac
Choose a head ref
Showing with 198 additions and 210 deletions.
  1. BIN .yarn/cache/@msgpackr-extract-msgpackr-extract-darwin-x64-npm-2.1.2-38b67e4894-8.zip
  2. BIN .yarn/cache/@msgpackr-extract-msgpackr-extract-darwin-x64-npm-2.2.0-da0607f423-8.zip
  3. BIN .yarn/cache/@msgpackr-extract-msgpackr-extract-linux-x64-npm-2.1.2-774a67e0e8-8.zip
  4. BIN .yarn/cache/@msgpackr-extract-msgpackr-extract-linux-x64-npm-2.2.0-abf3435a2e-8.zip
  5. BIN ...f6807f-48d8b2813d.zip → @pmmmwh-react-refresh-webpack-plugin-npm-0.5.9-0fbd6fff59-446c0add9e.zip}
  6. BIN ...che/{core-js-npm-3.26.0-bb48de0ef9-0149eb9d39.zip → core-js-npm-3.26.1-42575888f8-0a01149f51.zip}
  7. BIN ...js-pure-npm-3.26.0-b0ecbfc28e-bbf5fa65cf.zip → core-js-pure-npm-3.26.1-d78c7431c6-d88c40e5e2.zip}
  8. BIN .yarn/cache/loader-utils-npm-2.0.4-ba3800585b-a5281f5fff.zip
  9. BIN ...der-utils-npm-3.2.0-02250d00d7-c7b9a8dc4b.zip → loader-utils-npm-3.2.1-76ae2fd253-4e3ea054cd.zip}
  10. BIN .yarn/cache/msgpackr-extract-npm-2.1.2-835f3f1850-bf068baa69.zip
  11. BIN .yarn/cache/msgpackr-extract-npm-2.2.0-5d37dbba1f-43f63377e0.zip
  12. BIN .yarn/cache/msgpackr-npm-1.7.2-423e3b48bc-156cf89386.zip
  13. BIN .yarn/cache/msgpackr-npm-1.8.0-ae604ffe63-7fa2486c54.zip
  14. +9 −0 apps/blog/src/components/page/index.jsx
  15. +9 −10 apps/blog/src/templates/blog-post-list-content.jsx
  16. +3 −3 apps/blog/src/templates/blog-post-list.jsx
  17. +39 −41 apps/blog/src/templates/blog-post-page/index.jsx
  18. +1 −3 apps/blog/src/templates/error-404.jsx
  19. +0 −4 apps/blog/src/templates/error.module.css
  20. +1 −1 apps/blog/src/templates/{page.jsx → metadata.jsx}
  21. +0 −20 apps/blog/src/templates/page.module.css
  22. +3 −3 apps/blog/src/templates/post-list-by-category.jsx
  23. +5 −5 apps/blog/src/templates/post-list-by-tag.jsx
  24. +10 −10 apps/blog/src/templates/post-list-content.jsx
  25. +1 −1 apps/blog/src/templates/post-list.jsx
  26. +60 −63 apps/blog/src/templates/post-page/index.jsx
  27. +57 −46 yarn.lock
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
9 changes: 9 additions & 0 deletions apps/blog/src/components/page/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react'

export default function Page({ children }) {
return (
<div className="flex flex-col max-w-[1400px] mx-auto px-1 md:px-3 md:flex-row relative">
<section className="shrink-0 grow-0 basis-full">{children}</section>
</div>
)
}
19 changes: 9 additions & 10 deletions apps/blog/src/templates/blog-post-list-content.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'
import BlogPostCard from '../components/blog-post-card'
import Paginator from '../components/paginator'
import Page from '../components/page'

import * as styles from './page.module.css'

@@ -21,15 +22,13 @@ export default function BlogPostListContent({
})

return (
<div className={styles.layout}>
<section className={styles.main}>
<div className={styles.blogPosts}>{BlogPosts}</div>
<Paginator
currentPage={pageInfo.currentPage}
totalPages={pageInfo.totalPages}
currentPath={location.pathname}
/>
</section>
</div>
<Page>
<div className={styles.blogPosts}>{BlogPosts}</div>
<Paginator
currentPage={pageInfo.currentPage}
totalPages={pageInfo.totalPages}
currentPath={location.pathname}
/>
</Page>
)
}
6 changes: 3 additions & 3 deletions apps/blog/src/templates/blog-post-list.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { graphql } from 'gatsby'

import Page from './page'
import Metadata from './metadata'
import BlogPostListContent from './blog-post-list-content'

export default function BlogPostListPage({ data, pageContext, location }) {
@@ -11,13 +11,13 @@ export default function BlogPostListPage({ data, pageContext, location }) {
}

return (
<Page siteUrl={data.site.siteMetadata.siteUrl}>
<Metadata siteUrl={data.site.siteMetadata.siteUrl}>
<BlogPostListContent
allPostsData={data.allStrapiArticle}
pageInfo={pageInfo}
location={location}
/>
</Page>
</Metadata>
)
}

80 changes: 39 additions & 41 deletions apps/blog/src/templates/blog-post-page/index.jsx
Original file line number Diff line number Diff line change
@@ -1,60 +1,58 @@
import React from 'react'
import { graphql } from 'gatsby'
import { Helmet } from 'react-helmet'
import Page from '../page'
import Metadata from '../metadata'
import Page from '../../components/page'
import Breadcrumbs from '../../components/breadcrumbs'

import * as pageStyles from '../page.module.css'
import * as postStyles from './blog-post.module.css'

export default function BlogPostPage({ data }) {
const { strapiArticle: post } = data

// TODO: should it be setting all of this meta data? Some of it lives within the Page element itself
return (
<Page siteUrl={data.site.siteMetadata.siteUrl}>
<div className={pageStyles.layout}>
<Helmet>
<title>{post.html_title}</title>
<meta name="description" content={post.html_title} />
{/* <meta property='og:image' content={data.site.siteMetadata.siteUrl + post.featured_image.childImageSharp.fluid.src} /> */}
<meta property="og:type" content="article" />
<meta property="article:section" content="blog" />
{/* {(recipe.tags || []).map((tag, index) => <meta property='article:tag' content={tag} key={index}/>)} */}
</Helmet>
<Metadata siteUrl={data.site.siteMetadata.siteUrl}>
<Helmet>
<title>{post.html_title}</title>
<meta name="description" content={post.html_title} />
{/* <meta property='og:image' content={data.site.siteMetadata.siteUrl + post.featured_image.childImageSharp.fluid.src} /> */}
<meta property="og:type" content="article" />
<meta property="article:section" content="blog" />
{/* {(recipe.tags || []).map((tag, index) => <meta property='article:tag' content={tag} key={index}/>)} */}
</Helmet>

<section className={pageStyles.main}>
<article className={postStyles.post}>
<div className={postStyles.postIntro}>
<div className={postStyles.postNavigation}>
<Breadcrumbs subsectionName="blog" subsectionSlug="blog" />
</div>
<Page>
<article className={postStyles.post}>
<div className={postStyles.postIntro}>
<div className={postStyles.postNavigation}>
<Breadcrumbs subsectionName="blog" subsectionSlug="blog" />
</div>

<h1 className={postStyles.postTitle}>{post.title}</h1>
<h1 className={postStyles.postTitle}>{post.title}</h1>

{/*TODO: can be a component since it's used on both pages*/}
<span className={postStyles.datePublished}>
{post.published_at}
</span>
{/*TODO: can be a component since it's used on both pages*/}
<span className={postStyles.datePublished}>
{post.published_at}
</span>

<div
className={postStyles.postHeadline}
dangerouslySetInnerHTML={{
__html: post.parsedHeadline.childMarkdownRemark.html,
}}
></div>
</div>
<div className={postStyles.postBody}>
<div
dangerouslySetInnerHTML={{
__html: post.parsedContent.childMarkdownRemark.html,
}}
></div>
</div>
</article>
</section>
</div>
</Page>
<div
className={postStyles.postHeadline}
dangerouslySetInnerHTML={{
__html: post.parsedHeadline.childMarkdownRemark.html,
}}
></div>
</div>
<div className={postStyles.postBody}>
<div
dangerouslySetInnerHTML={{
__html: post.parsedContent.childMarkdownRemark.html,
}}
></div>
</div>
</article>
</Page>
</Metadata>
)
}

4 changes: 1 addition & 3 deletions apps/blog/src/templates/error-404.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react'

import * as styles from './error.module.css'

export default function Error404() {
return <div className={styles.layout}>Było i nie ma :(</div>
return <div className="px-[160px] text-center">Było i nie ma :(</div>
}
4 changes: 0 additions & 4 deletions apps/blog/src/templates/error.module.css

This file was deleted.

Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import appleTouchIcon from '../components/layout/assets/apple-touch-icon.png'
import safariPinnedTab from '../components/layout/assets/safari-pinned-tab.svg'
import defaultOgImage from '../components/layout/assets/default_og_image.jpg'

export default function Page({ siteUrl, children }) {
export default function Metadata({ siteUrl, children }) {
return (
<React.Fragment>
<Helmet>
20 changes: 0 additions & 20 deletions apps/blog/src/templates/page.module.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
@value breakpoints: '../components/breakpoints.css';
@value tablet-up, phone-l from breakpoints;

.layout {
display: flex;
flex-direction: column;
max-width: 1400px;
margin: 0 auto;
padding: 0 10px;
position: relative;
}

@media phone-l-up {
.layout {
padding: 0 20px;
flex-direction: row;
}
}

.main {
flex: 0 0 100%;
}

.posts {
display: flex;
flex-wrap: wrap;
6 changes: 3 additions & 3 deletions apps/blog/src/templates/post-list-by-category.jsx
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ import React from 'react'
import { graphql } from 'gatsby'
import { Helmet } from 'react-helmet'

import Page from './page'
import Metadata from './metadata'
import PostListContent from './post-list-content'

export default function PostListByCategoryPage({
@@ -16,7 +16,7 @@ export default function PostListByCategoryPage({
}

return (
<Page siteUrl={data.site.siteMetadata.siteUrl}>
<Metadata siteUrl={data.site.siteMetadata.siteUrl}>
<Helmet>
<meta
name="description"
@@ -29,7 +29,7 @@ export default function PostListByCategoryPage({
pageInfo={pageInfo}
location={location}
/>
</Page>
</Metadata>
)
}

10 changes: 5 additions & 5 deletions apps/blog/src/templates/post-list-by-tag.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { graphql } from 'gatsby'

import Page from './page'
import Metadata from './metadata'
import PostListContent from './post-list-content'

export default function PostListByTagPage({ data, pageContext, location }) {
@@ -11,23 +11,23 @@ export default function PostListByTagPage({ data, pageContext, location }) {
}

return (
<Page siteUrl={data.site.siteMetadata.siteUrl}>
<Metadata siteUrl={data.site.siteMetadata.siteUrl}>
<PostListContent
allRecipesData={data.allStrapiRecipe}
pageInfo={pageInfo}
location={location}
/>
</Page>
</Metadata>
)
}

export const pageQuery = graphql`
query blogListByTagQuery($tag: String!, $skip: Int!, $limit: Int!) {
query blogListByTagQuery($slug: String!, $skip: Int!, $limit: Int!) {
...siteMetadata
...allCategories
allStrapiRecipe(
filter: { tags: { elemMatch: { slug: { in: [$tag] } } } }
filter: { tags: { elemMatch: { slug: { in: [$slug] } } } }
sort: { order: DESC, fields: [published_at] }
limit: $limit
skip: $skip
20 changes: 10 additions & 10 deletions apps/blog/src/templates/post-list-content.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react'
import Page from '../components/page'
import PostCard from '../components/post-card'
import PostCardCover from '../components/post-card-cover'
import PostCardHeader from '../components/post-card-header'
@@ -33,15 +34,14 @@ export default function PostListContent({
})

return (
<div className={styles.layout}>
<section className={styles.main}>
<div className={styles.posts}>{Posts}</div>
<Paginator
currentPage={pageInfo.currentPage}
totalPages={pageInfo.totalPages}
currentPath={location.pathname}
/>
</section>
</div>
<Page>
<div className={styles.posts}>{Posts}</div>

<Paginator
currentPage={pageInfo.currentPage}
totalPages={pageInfo.totalPages}
currentPath={location.pathname}
/>
</Page>
)
}
2 changes: 1 addition & 1 deletion apps/blog/src/templates/post-list.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'
import { graphql } from 'gatsby'

import Page from './page'
import Page from './metadata'
import PostListContent from './post-list-content'

export default function PostListPage({ data, pageContext, location }) {
Loading