Skip to content

Commit

Permalink
Add references page
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesdring committed Jun 21, 2024
1 parent 55147d3 commit 4c660c0
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 41 deletions.
24 changes: 24 additions & 0 deletions src/_components/layout/Grid.vto
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
css: |
ul.layout-grid {
padding: unset;
list-style: none;
display: grid;
grid-template-columns: repeat( auto-fit, minmax(15em, 1fr) );
gap: 1em;
}
ul.layout-grid > li {
display: block;
}
---
<ul class="layout-grid">
{{ for item of items -}}
<li>
{{ if renderer }}
{{ renderer(item) }}
{{ else }}
{{ item }}
{{ /if }}
</li>
{{- /for }}
</ul>
35 changes: 35 additions & 0 deletions src/_components/link/Block.vto
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
css: |
:root {
--link-block-color: black;
--link-block-background: #aaa;
--link-block-color-hover: white;
--link-block-background-hover: black;
}
a.link-block {
display: block;
box-sizing: border-box;
height: 100%;
padding: 1em;
color: var(--link-block-color);
background: var(--link-block-background);
text-decoration: none;
}
a.link-block:hover {
--link-block-color: var(--link-block-color-hover);
--link-block-background: var(--link-block-background-hover);
text-decoration: underline;
}
a.link-block > *:first-child {
margin-block-start: 0;
}
a.link-block > *:last-child {
margin-block-end: 0;
}
---
<a class="link-block" href="{{ url }}">
<p>{{ title }}</p>
{{ if description -}}
<p>{{ description }}</p>
{{- /if }}
</a>
38 changes: 0 additions & 38 deletions src/_components/link/Grid.vto

This file was deleted.

4 changes: 3 additions & 1 deletion src/_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ techniques:
- key: core
title: Core
- key: data
title: Data
title: Data
- key: references
title: Links
10 changes: 9 additions & 1 deletion src/_includes/layout/catalogue.vto
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
---
layout: ./page.vto
---
{{ comp.link.Grid({ links: catalogue }) }}

{{ if description -}}
<p>{{ description }}</p>
{{- /if }}

{{ comp.layout.Grid({
items: catalogue,
renderer: comp.link.Block
}) }}
5 changes: 5 additions & 0 deletions src/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@
--nav-page-background: black;
--nav-page-color-hover: black;
--nav-page-background-hover: white;

--link-block-color: black;
--link-block-background: #aaa;
--link-block-color-hover: white;
--link-block-background-hover: black;
}
5 changes: 4 additions & 1 deletion src/index.vto
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ title: Home

{{ for technique of search.pages('technique', 'order') }}
<h2>{{ technique.title }}</h2>
{{ comp.link.Grid({ links: technique.catalogue }) }}
{{ comp.layout.Grid({
items: technique.catalogue,
renderer: comp.link.Block
}) }}
{{ /for }}

19 changes: 19 additions & 0 deletions src/references.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
key: references
tags: [ technique ]
title: Links
order: 100
layout: layout/catalogue.vto
catalogue:
- title: Lume
url: https://lume.land/
description: |
Lume is a static site generator which uses the Deno JavaScript runtime.
We use this as the core platform for many of the sites we build.
- title: OI Lume Viz
url: https://open-innovations.github.io/oi-lume-viz/
description: |
We've packaged up some of our visualisations as a reusable Lume plugin library.
- title: DuckDB
url: https://duckdb.org/
description: |
DuckDB is a fast in-process analytical database.

0 comments on commit 4c660c0

Please sign in to comment.