-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
209 add headingstitles to blog satellite page also add common margins…
…paddin around most pages (#236) * feat(frontend): ✨ padding and pageheader components, add to all layouts * utilize pageHeader and subtitle * wip blog posts refactor * finally fix grid responsiveness * add blocksrenderer back to blogcard * blogs styling and refactoring * fix(frontend): fix key prop warning * run prettier * refactor(frontend): ♻️ Refactor code in satellite page and move to satelliteCard component * refactor(frontend): ♻️ Run prettier --------- Co-authored-by: Lucas Tran <lucastra@stud.ntnu.no>
- Loading branch information
2 people
authored and
GitHub
committed
Apr 10, 2024
1 parent
c702a31
commit f1fcdd1
Showing
14 changed files
with
231 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import { PagePadding } from "@/components/PagePadding"; | ||
| import React from "react"; | ||
| export default function Layout({ children }: { children: React.ReactNode }) { | ||
| return <PagePadding>{children}</PagePadding>; | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import { PagePadding } from "@/components/PagePadding"; | ||
| import React from "react"; | ||
| export default function Layout({ children }: { children: React.ReactNode }) { | ||
| return <PagePadding>{children}</PagePadding>; | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import { PagePadding } from "@/components/PagePadding"; | ||
| import React from "react"; | ||
| export default function Layout({ children }: { children: React.ReactNode }) { | ||
| return <PagePadding>{children}</PagePadding>; | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import React from "react"; | ||
|
|
||
| function PageHeader({ children }: { children?: React.ReactNode }) { | ||
| return <h1 className="text-center text-4xl font-bold">{children}</h1>; | ||
| } | ||
|
|
||
| function PageSubtitle({ children }: { children?: React.ReactNode }) { | ||
| return <h2 className="text-sm text-muted-foreground">{children}</h2>; | ||
| } | ||
|
|
||
| // Component that wraps both the header and the subtitle to be used together | ||
| function PageHeaderAndSubtitle({ children }: { children?: React.ReactNode }) { | ||
| return ( | ||
| <div className="mb-4 flex flex-col items-center justify-center gap-3"> | ||
| {children} | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| export { PageHeader, PageSubtitle, PageHeaderAndSubtitle }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import React from "react"; | ||
|
|
||
| function VerticalPagePadding({ children }: { children: React.ReactNode }) { | ||
| return <div className="py-8">{children}</div>; | ||
| } | ||
|
|
||
| function HorizontalPagePadding({ children }: { children: React.ReactNode }) { | ||
| return <div className="px-8 md:px-10">{children}</div>; | ||
| } | ||
|
|
||
| function PagePadding({ children }: { children: React.ReactNode }) { | ||
| return ( | ||
| <HorizontalPagePadding> | ||
| <VerticalPagePadding>{children}</VerticalPagePadding> | ||
| </HorizontalPagePadding> | ||
| ); | ||
| } | ||
|
|
||
| export { VerticalPagePadding, HorizontalPagePadding, PagePadding }; |
Oops, something went wrong.