This file contains hidden or 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
| @media (max-width: 640px) { | |
| .banner_bottom { | |
| height: unset !important; | |
| } | |
| .banner_top { | |
| height: unset !important; | |
| } | |
| } |
This file contains hidden or 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
| @media (max-width: 425px) { | |
| .banner_centered { | |
| width: 100% !important; | |
| max-width: 100% !important; | |
| height: 100% !important; | |
| max-height: 100% !important; | |
| } | |
| } |
This file contains hidden or 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
| const defaultPageSize = 2; | |
| export async function getRecipesData(page = 1, pageSize = defaultPageSize) { | |
| const response = await butter.page.list("recipe", { | |
| page_size: pageSize, | |
| page: page, | |
| locale: "en", | |
| }); | |
| return { |
This file contains hidden or 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
| import { getRecipesData } from "@/lib/api"; | |
| // ... | |
| export async function getStaticProps({ params }) { | |
| const page = parseInt(params.page, 10); | |
| const { recipes, prevPage, nextPage } = await getRecipesData(page); | |
| return { | |
| props: { recipes, prevPage, nextPage }, |
This file contains hidden or 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
| export function getUTCDateNoTime(date) { | |
| return new Date( | |
| Date.UTC(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0) | |
| ); | |
| } |
NewerOlder