Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New header and footer #18

Merged
merged 19 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
e190b1e
ci: run CI on pull_request
tillywoodfield Oct 1, 2024
8fdd13f
feat: add new header and footer components
j4-m Oct 22, 2024
c717026
feat: remove default blockquote styles, use class instead
tillywoodfield Oct 8, 2024
2c584b7
feat: remove default code styles, wrap in classes instead
tillywoodfield Sep 17, 2024
cf134eb
docs: add links to IATI website pages for header general nav
tillywoodfield Oct 22, 2024
dc5c976
docs: update capitalisation on nav items
tillywoodfield Oct 22, 2024
b9ae6d8
docs: add links to social icons
tillywoodfield Oct 22, 2024
8cd6ecc
docs: fix mobile nav story
tillywoodfield Oct 22, 2024
4788e2e
feat: add breakpoints for header
tillywoodfield Oct 22, 2024
eadb0c9
feat: expose brand background image path for consumers
tillywoodfield Oct 22, 2024
093dab5
docs: fix typo in footer block story
tillywoodfield Oct 23, 2024
9999b12
feat: consolidate button styles
tillywoodfield Oct 23, 2024
bcbbeee
docs: write custom docs page for brand-background component
tillywoodfield Oct 23, 2024
113a600
feat: add utilities to hide and display elements based on screen size
tillywoodfield Oct 24, 2024
5d4c2bd
fix: change where margin is added in footer to stop the brand marque …
tillywoodfield Nov 5, 2024
7d41ebf
build: use vite for build instead of sass
tillywoodfield Oct 24, 2024
1fea14c
feat: build javascript using vite
tillywoodfield Oct 24, 2024
edd1da7
docs: split usage instructions into multiple pages for more clarity
tillywoodfield Oct 24, 2024
251f668
docs: update header links
tillywoodfield Nov 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CI
on: [push]
on: [push, pull_request]

jobs:
build:
Expand Down
9 changes: 1 addition & 8 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
import type { StorybookConfig } from "@storybook/web-components-vite";
import { NodePackageImporter } from "sass";

const config: StorybookConfig = {
framework: "@storybook/web-components-vite",
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: ["@storybook/addon-essentials"],
staticDirs: ["../static"],
docs: {
autodocs: true,
},
async viteFinal(config) {
const { mergeConfig } = await import("vite");
return mergeConfig(config, {
css: {
preprocessorOptions: {
scss: {
pkgImporter: new NodePackageImporter(),
},
},
},
optimizeDeps: {
exclude: [
"@storybook/blocks",
Expand Down
20 changes: 18 additions & 2 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
import type { Preview } from "@storybook/web-components";

import "../src/scss/iati.scss";
import "../src/js/main.js";
import "../src/scss/main.scss";
import DocsTemplate from "./DocsTemplate.mdx";

const preview: Preview = {
parameters: {
options: {
storySort: {
order: ["Get Started", "Brand", "Core", "Components", "Layout"],
order: [
"Get Started",
"Installation",
"Usage",
"Contributing",
"Brand",
"Core",
"Components",
"Layout",
],
},
},
backgrounds: {
values: [
{ name: "light", value: "#fff" },
{ name: "dark", value: "#155366" },
],
},
docs: {
page: DocsTemplate,
source: {
Expand Down
45 changes: 3 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,11 @@

The IATI Design System is a set of reusable styles and components which should be used in IATI web products, along with guidance on how to use them.

## How do I use the IATI Design System?
## Using the IATI Design System

### CDN (Recommended)
Please see the [Storybook site](https://iati.github.io/design-system/) for instructions.

The recommended way to use the design system in an IATI product is by including the CSS from the CDN, using the url below, replacing `<VERSION>` with the version you would like to use:

```code
https://cdn.jsdelivr.net/npm/iati-design-system@<VERSION>/dist/css/iati.min.css
```

This project is versioned using [Semantic Versioning](https://semver.org/). Versions can be specified as a major, minor, or patch version e.g. `1`, `1.2`, or `1.2.3`. The latest version is shown on the [GitHub releases page](https://github.com/IATI/design-system/releases). We recommend fixing to a specific patch version so that upgrades can be checked explicitly before deployment, but as a minimum you should fix to a major version to prevent unexpected breaking changes.

To include the CSS in a HTML project, add the following code inside the `<head>` of your HTML pages:

```html
<link
href="https://cdn.jsdelivr.net/npm/iati-design-system@<VERSION>/dist/css/iati.min.css"
rel="stylesheet"
/>
```

Once this link is included, core styles will be applied, and all component and layout CSS classes will be available to apply to HTML elements, for example the `.iati-button` class:

```html
<button class="iati-button">Button</button>
```

### NPM (Optional)

It is also possible to include the design system in a [Sass](https://sass-lang.com/) project.

First install with npm:

```code
npm install iati-design-system
```

Then import the package in your `.scss` file. The [Node.js Package Importer](https://sass-lang.com/documentation/at-rules/use/#node-js-package-importer) is required to use this syntax.

```css
@use "pkg:iati-design-system";
```

## How do I contribute to the IATI Design System?
## Contributing to the IATI Design System

### Prerequisites

Expand Down
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default [
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
},
},
Expand Down
Loading