Skip to content

Commit

Permalink
update flotiq react components
Browse files Browse the repository at this point in the history
  • Loading branch information
KarolNet committed Apr 20, 2022
1 parent b7505dd commit 8c5fd96
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 21 deletions.
11 changes: 6 additions & 5 deletions src/components/RecipeSteps.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ const RecipeSteps = ({ additionalClass, steps }) => (
>
{steps.map((step, index) => (
<div key={step.step} className="w-full px-4 md:px-10">
<Paragraph
text={`Step ${index + 1}`}
additionalClasses={['font-semibold underline mr-2 !p-0']}
/>
<Paragraph text={step.step} additionalClasses={['!p-0 mb-5']} />
<Paragraph additionalClasses={['font-semibold underline mr-2 !p-0']}>
{`Step ${index + 1}`}
</Paragraph>
<Paragraph additionalClasses={['!p-0 mb-5']}>
{step.step}
</Paragraph>
{step.image && step.image[0]
&& (
<GatsbyImage
Expand Down
2 changes: 1 addition & 1 deletion src/pages/404.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const NotFoundPage = () => (
<Helmet>
<title>Page not found</title>
</Helmet>
<Header text="Page not found, sorry" />
<Header>Page not found, sorry</Header>
<div className="text-center mt-5 pt-5">
{/* Example usage of button */}
<Link to="/"><Button label="Go back to index" /></Link>
Expand Down
2 changes: 1 addition & 1 deletion src/sections/RecipeCards.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const RecipeCards = ({ recipes, headerText, compact = false }) => (
? 'max-w-7xl mt-6 mb-6 mx-auto px-4 py-4 sm:px-6 lg:px-8'
: 'max-w-7xl mt-6 mb-6 mx-auto px-4 py-4 sm:px-6 lg:px-8 xl:px-0'}
>
{headerText && <Header additionalClasses={['basis-1 mb-2 !text-3xl !font-medium']} text={headerText} />}
{headerText && <Header additionalClasses={['basis-1 mb-2 !text-3xl !font-medium']}>{headerText}</Header>}
<div className={compact ? 'grid md:grid-cols-2 lg:grid-cols-3 gap-6' : 'flex flex-col'}>
{recipes.map((recipe) => (
<RecipeCard
Expand Down
13 changes: 7 additions & 6 deletions src/templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ const announcementText = 'This is the Blog where you can find any kind of inform
const IndexPage = ({ data, pageContext }) => {
// Extracting data from GraphQL query, the query is on the bottom of this file
const recipes = data.allRecipe.nodes;
const categoryTabs = [
{ name: 'Breakfast', href: '#', current: true },
{ name: 'Dinner', href: '#', current: false },
{ name: 'Dessert', href: '#', current: false },
{ name: 'Lunch', href: '#', current: false },
];
// Uncomment this to add categories to your recipes
// const categoryTabs = [
// { name: 'Breakfast', href: '#', current: true },
// { name: 'Dinner', href: '#', current: false },
// { name: 'Dessert', href: '#', current: false },
// { name: 'Lunch', href: '#', current: false },
// ];
return (
<Layout additionalClass={['font-karla']}>
{/* Content of <head> tag */}
Expand Down
17 changes: 9 additions & 8 deletions src/templates/recipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ const RecipeTemplate = ({ data }) => {
<Header
additionalClasses={['text-xl md:text-4xl text-white !font-semibold '
+ 'uppercase tracking-wider !p-0']}
text={recipe.name}
/>
>
{recipe.name}
</Header>
<div className="flex flex-wrap justify-start text-xs text-primary font-light
space-x-5 pb-3 mt-5"
>
Expand All @@ -51,15 +52,15 @@ const RecipeTemplate = ({ data }) => {
<span className="text-sm">{recipe.servings}</span>
</p>
</div>
<Paragraph text={recipe.description} additionalClasses={['mt-5']} />
<Paragraph additionalClasses={['mt-5']}>
{recipe.description}
</Paragraph>
<div className="absolute bottom-0 right-0 h-6 md:h-12 w-6 md:w-12 bg-white" />
</div>
<div className="bg-white px-4 md:px-10 py-5">
<Header
level={2}
additionalClasses={['mt-5 pl-7 !text-2xl']}
text={ingredientsHeaderText}
/>
<Header level={2} additionalClasses={['mt-5 pl-7 !text-2xl']}>
{ingredientsHeaderText}
</Header>
<fieldset className="space-y-5">
<div>
{recipe.ingredients.map((ingredient) => (
Expand Down

0 comments on commit 8c5fd96

Please sign in to comment.