Skip to content

Commit

Permalink
post layouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsnes committed Jun 12, 2024
1 parent 5e5ca5e commit 8a0d067
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {

import classes from './layout.module.css';

export const Layout = ({ children }: { children: React.ReactNode }) => {
const Layout = ({ children }: { children: React.ReactNode }) => {
return (
<div>
<Banner color='red'>
Expand All @@ -29,3 +29,5 @@ export const Layout = ({ children }: { children: React.ReactNode }) => {
</div>
);
};

export default Layout;
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { PencilIcon } from '@navikt/aksel-icons';

import { Meta } from '@components';
import { Layout } from '@blog';
import { BlogCard } from './_components';
import { BlogCard } from '../_components';

export default ({ children }) => <Layout>{children}</Layout>;
export default ({ children }) => <>{children}</>;

<Meta
title='Bloggen'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { BlogArticleLayout } from '@layouts';
import { ResponsiveIframe, Image } from '@components';
import { Contributors } from '../../_components';
import { Contributors, PostLayout } from '../../_components';

export default ({ children }) => (
<BlogArticleLayout
<PostLayout
content={children}
heading='Derfor trenger vi et felles designsystem'
ingress='Høsten 2023 arrangerte vi en åpen presentasjon og mini-workshop om felles designsystem. Over 200 deltok og vi fikk 440 tilbakemeldinger på gevinster og utfordringer.'
Expand Down
5 changes: 2 additions & 3 deletions apps/storefront/app/bloggen/2024/altinn-studio/page.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Card, CardContent } from '@digdir/designsystemet-react';

import { BlogArticleLayout } from '@layouts';
import { Image } from '@components';
import { Contributors } from '../../_components';
import { Contributors, PostLayout } from '../../_components';

export default ({ children }) => (
<BlogArticleLayout
<PostLayout
content={children}
heading='Hvordan Altinn Studio bruker Designsystemet'
ingress='Altinn Studio benytter seg av Designsystemet ved hjelp av fasademønsteret. Lær mer om hvordan!'
Expand Down
5 changes: 2 additions & 3 deletions apps/storefront/app/bloggen/2024/bachelor-temavelger/page.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { BlogArticleLayout } from '@layouts';
import { ResponsiveIframe } from '@components';
import { Contributors } from '../../_components';
import { Contributors, PostLayout } from '../../_components';

export default ({ children }) => (
<BlogArticleLayout
<PostLayout
content={children}
heading='Temabygger som bacheloroppgave'
ingress='Hvordan kan vi gjøre det enklere å ta i bruk Designsystemet? Det har blitt utforsket i en bacheloroppgave!'
Expand Down
5 changes: 2 additions & 3 deletions apps/storefront/app/bloggen/2024/fluid-typography/page.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { BlogArticleLayout } from '@layouts';
import { ResponsiveIframe, Image } from '@components';
import { Contributors } from '../../_components';
import { Contributors, PostLayout } from '../../_components';

export default ({ children }) => (
<BlogArticleLayout
<PostLayout
content={children}
heading='Dynamiske tekst-størrelser og hvorfor vi gikk bort fra det'
ingress='Det er mulig å bruke dynamiske tekst-størrelser uten breakpoints, men det medfører noen ulemper. '
Expand Down
5 changes: 0 additions & 5 deletions apps/storefront/app/bloggen/2024/layout.tsx

This file was deleted.

5 changes: 2 additions & 3 deletions apps/storefront/app/bloggen/2024/v1rc1/page.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Link } from '@digdir/designsystemet-react';

import { BlogArticleLayout } from '@layouts';
import { PostLayout, Contributors } from '../../_components';
import { ResponsiveIframe, CodeSnippet } from '@components';
import { Contributors } from '../../_components';

export default ({ children }) => (
<BlogArticleLayout
<PostLayout
content={children}
heading='Dette kommer i V1!'
ingress='Vi nærmer oss den første versjonen av Designsystemet uten betamerke! Versjon 1 skal være mer stabil, mer fleksibel og støtte flerdimensjonal tematisering.'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
'use client';
import type * as React from 'react';
import { Heading, Ingress, Paragraph } from '@digdir/designsystemet-react';

import { Container, MdxContent, Image, Meta } from '../../components';
import { Link } from '../../components/Link/Link';
import { Container, MdxContent, Image, Meta } from '../../../../components';
import { Link } from '../../../../components/Link/Link';
import { Figures } from '../Figures';

import classes from './BlogArticleLayout.module.css';
import { Figures } from './components/Figures';
import classes from './PostLayout.module.css';

type BlogArticleLayoutProps = {
content: React.ReactNode;
Expand All @@ -22,7 +21,7 @@ type BlogArticleLayoutProps = {

const FIGURE_COUNT = 4;

const BlogArticleLayout = ({
const PostLayout = ({
content,
heading,
ingress,
Expand Down Expand Up @@ -104,4 +103,4 @@ const BlogArticleLayout = ({
);
};

export { BlogArticleLayout };
export { PostLayout };
3 changes: 2 additions & 1 deletion apps/storefront/app/bloggen/_components/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { BlogCard } from './Card/BlogCard';
export { Contributors } from './Contributors/Contributors';
export { Layout } from './Layout/blog-layout';
export { PostLayout } from './PostLayout/PostLayout';
export { Figures } from './Figures';
1 change: 0 additions & 1 deletion apps/storefront/layouts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ export * from './PageLayout/PageLayout';
export * from './MenuPageLayout/MenuPageLayout';
export * from './NavPageLayout/NavPageLayout';
export * from './NavMenuPageLayout/NavMenuPageLayout';
export * from './BlogArticleLayout/BlogArticleLayout';

0 comments on commit 8a0d067

Please sign in to comment.