Page backgrounds

This commit is contained in:
Vince 2021-02-22 10:36:01 +11:00
parent b9dc483a8f
commit 0c8dc7caff
10 changed files with 24 additions and 20 deletions

View File

@ -127,6 +127,7 @@ body {
.pagination {
display: flex;
justify-content: center;
border-radius: 15px;
li {
&:first-child {

View File

@ -30,7 +30,7 @@ export default function Layout({ children }: Props) {
return (
<div
style={{ height: '100vh', width: '100%' }}
className="relative flex flex-col justify-between bg-alt text-primary"
className="relative flex flex-col justify-between overflow-hidden bg-alt text-primary"
>
<Header />

View File

@ -90,7 +90,7 @@ function Page({
<Roadmap />
) : (
<>
<div className="aspect-w-16 aspect-h-10">
<div className="aspect-w-16 aspect-h-10 bg-gradient-to-bl from-hyper to-blush">
<img
style={{ maxHeight: '90%' }}
src={page?.hero?.imageUrl}
@ -138,7 +138,7 @@ function Roadmap() {
</h2>
<img
style={{ maxHeight: '90%' }}
src={'img/session-roadmap.png'}
src={'img/session-roadmap.jpg'}
className="w-full rounded-md"
/>
</div>
@ -149,7 +149,7 @@ function Roadmap() {
</h2>
<img
style={{ maxHeight: '90%' }}
src={'img/lokinet-roadmap.png'}
src={'img/lokinet-roadmap.jpg'}
className="w-full rounded-md"
/>
</div>

View File

@ -63,7 +63,6 @@ function App({ Component, pageProps }: AppProps) {
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1"
></meta>
s
</Head>
<Layout>

View File

@ -19,23 +19,27 @@ export async function getStaticPaths() {
let foundAllPosts = false;
// Contentful only allows 100 at a time
while (!foundAllPosts) {
const { posts: _posts } = await api.fetchBlogEntries(100, page);
try {
while (!foundAllPosts) {
const { posts: _posts } = await api.fetchBlogEntries(100, page);
if (_posts.length === 0) {
foundAllPosts = true;
continue;
if (_posts.length === 0) {
foundAllPosts = true;
continue;
}
posts = [...posts, ..._posts];
page++;
}
posts = [...posts, ..._posts];
page++;
const paths: IPath[] = posts.map(item => ({
params: { slug: item.slug },
}));
return { paths, fallback: true };
} catch (e) {
return { paths: [], fallback: true };
}
const paths: IPath[] = posts.map(item => ({
params: { slug: item.slug },
}));
return { paths, fallback: true };
}
export async function getStaticProps({ params }) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

View File

@ -9,8 +9,8 @@ dotenv.config();
describe('getStaticPaths', () => {
test('', async () => {
const { paths } = await getStaticPaths();
const { paths: postPaths } = await getStaticPaths();
console.log('getStaticPaths.test ➡️ paths:', paths);
console.log('getStaticPaths.test ➡️ postPaths:', postPaths);
});
});