Skip to content

Commit

Permalink
Add components library script.
Browse files Browse the repository at this point in the history
  • Loading branch information
SilasBerger committed Jan 4, 2024
1 parent 853f333 commit 27728fd
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ My teaching website, built with [Docusaurus](https://docusaurus.io/).

For more examples, check out the CI workflows in `.github`.

### Where do I start?
A good place to start is to run `SITE=drafts yarn start` and then visit http://localhost:3000/default/Components/.

## General configuration
### Environment variables
- `SITE`: Which site should be built; must correspond to an entry in `config/siteProperties/site-properties.ts`.
Expand Down
3 changes: 2 additions & 1 deletion config/scriptsConfigs/drafts.scriptsConfigs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"draft": 0
},
"mappings": [
{"section": "/index.md", "material": "/ScriptLandingPages/wip.md"}
{"section": "index.md", "material": "ScriptLandingPages/drafts.md"},
{"section": "01-Components", "material": "Components-Gallery"}
]
}
}
33 changes: 33 additions & 0 deletions content/material/Components-Gallery/02-tiles.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import {TileGrid, Layout} from "@site/src/components/tiles/TileGrid/TileGrid";
import {Tile} from "@site/src/components/tiles/Tile/Tile";

# Tiles
## Tile types
<TileGrid>
<Tile title="Title"></Tile>
<Tile title="Title and body">This tile has a title and a body</Tile>
<Tile title="Title, body, link" href="#">This tile has a title, a body, and a link</Tile>
<Tile title="Title and link" href="#"></Tile>

</TileGrid>

## Larger tiles
<TileGrid layout={Layout.LARGE_TILES}>
<Tile title="Alpha">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt</Tile>
<Tile title="Bravo">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt</Tile>
<Tile title="Charlie">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt</Tile>
<Tile title="Delta">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt</Tile>
</TileGrid>

## Smaller tiles (and without grow-on-hover)
<TileGrid layout={Layout.SMALL_TILES} preventGrowOnHover={true}>
<Tile title="Alpha">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt</Tile>
<Tile title="Bravo">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt</Tile>
<Tile title="Charlie">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt</Tile>
<Tile title="Delta">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt</Tile>
<Tile title="Echo">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt</Tile>
<Tile title="Foxtrot">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt</Tile>
<Tile title="Golf">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt</Tile>
<Tile title="Hotel">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt</Tile>
</TileGrid>

5 changes: 5 additions & 0 deletions content/material/Components-Gallery/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import {TileGrid, Layout} from "@site/src/components/tiles/TileGrid/TileGrid";
import {Tile} from "@site/src/components/tiles/Tile/Tile";

# Components
A gallery and development sandbox for React components.
6 changes: 6 additions & 0 deletions content/material/ScriptLandingPages/drafts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
sidebar_position: 0
---

# ✍🏽 Drafts
A place to develop everything that should not yet be published to a real script.

0 comments on commit 27728fd

Please sign in to comment.