Skip to content

Commit

Permalink
feat: add page layout template
Browse files Browse the repository at this point in the history
  • Loading branch information
tillywoodfield committed May 29, 2024
1 parent 6dccf24 commit 2870057
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/scss/base/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,13 @@ strong {
em {
font-style: italic;
}

html {
height: 100%;
}

body {
height: 100%;
display: flex;
flex-flow: column;
}
1 change: 1 addition & 0 deletions src/scss/layout/_index.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@forward "footer/footer";
@forward "header/header";
@forward "title-bar/title-bar";
@forward "page/page";
6 changes: 6 additions & 0 deletions src/scss/layout/page/_page.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@use "../../base/mixins";

.iati-main {
@include mixins.page-width-container();
flex: 1;
}
24 changes: 24 additions & 0 deletions src/scss/layout/page/page.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import type { Meta, StoryObj } from "@storybook/web-components";
import { html } from "lit";

import { Footer } from "../footer/footer.stories";
import { Header } from "../header/header.stories";
import { TitleBar } from "../title-bar/title-bar.stories";

const meta: Meta = {
title: "Layout/Page",
};

export default meta;
type Story = StoryObj;

export const Page: Story = {
render: (args) => html`
${Header.render?.call({ ...args })} ${TitleBar.render?.call({ ...args })}
<main class="iati-main">
<h1>Page heading</h1>
<p>Page contents</p>
</main>
${Footer.render?.call({ ...args })}
`,
};

0 comments on commit 2870057

Please sign in to comment.