Skip to content

Commit dcbc0b2

Browse files
committed
Event layout, README updates, agenda CSS component, utility CSS updates.
1 parent 83ef653 commit dcbc0b2

File tree

22 files changed

+781
-513
lines changed

22 files changed

+781
-513
lines changed

README.md

+95
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,98 @@ More information is available in the [Debugging](https://www.11ty.dev/docs/debug
6161
## Deployment
6262

6363
[TBC]
64+
65+
## Authoring pages
66+
67+
### Page data
68+
69+
At the beginning of all pages, there's a block of data wrapped with ---. This is called frontmatter and it will follow a specific schema relative to the page you are on.
70+
71+
The frontmatter data is written in [YAML format](https://yaml.org/) using `key: value` pairs.
72+
73+
### Markdown and HTML
74+
75+
Pages can contain a mix of Markdown and HTML. This means we can intersperse basic content formatting with more bespoke HTML elements in the same file.
76+
77+
```
78+
# Page title
79+
80+
A paragraph of text, Markdown style.
81+
82+
- Markdown list items
83+
- Lists are great
84+
85+
<article class="bespoke">
86+
<h2>Stick to HTML</h2>
87+
</article>
88+
```
89+
90+
The **caveat** here is to ensure that there is always a clear break between Markdown and HTML elements. Mixing and matching the two in a single content block will not work.
91+
92+
```
93+
<!-- This won't work -->
94+
<article>
95+
## Trying for a Markdown heading (and failing)
96+
</article>
97+
98+
<!-- This will -->
99+
<article>
100+
101+
## All good here
102+
103+
</article>
104+
```
105+
106+
To learn more about what's possible in Markdown, see [Markdown Guide](https://www.markdownguide.org).
107+
108+
### Adding links
109+
110+
Linking to pages throughout the site works in the same way as linking to pages in standard HTML sites.
111+
112+
We'll most likely be using Markdown's link syntax to link to pages. The links we choose can be relative or absolute.
113+
114+
Let's use a _blog-posts_ page (`/blog/yyyy/blog-post`) as an example. If we want to link to another blog post page it can be done in two ways:
115+
116+
```md
117+
[Relative link to blog post](../blog-post/)
118+
119+
[Root relative link to blog post](/blog/yyyy/blog-post/)
120+
```
121+
122+
If we need to link to another section/page within the site we can use either method shown above. The `../` prefix can be used to traverse further up the site tree:
123+
124+
```md
125+
[Relative link to my parent](../)
126+
[Relative link to my grandparent](../../)
127+
[Relative link to a sibling of mine](../sibling-page/)
128+
```
129+
130+
Note: these don't need filename `.md`/`.html` extensions.
131+
132+
Only use absolute URLs for links out of the site:
133+
134+
```md
135+
[Absolute link to Ceph.io](https://ceph.io/)
136+
```
137+
138+
### Dynamic values
139+
140+
We can interpolate these dynamic values throughout the Markdown. For example, we can save ourselves repeating the page's `title` property for our page title heading by using the `{{ }}` syntax:
141+
142+
```md
143+
---
144+
title: Don't repeat yourself
145+
---
146+
147+
# Don't repeat yourself
148+
```
149+
150+
becomes:
151+
152+
```md
153+
---
154+
title: Don't repeat yourself
155+
---
156+
157+
# {{ title }}
158+
```

src/_includes/layouts/event.njk

+49-35
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,20 @@ layout: base
1111

1212
<div class="grid lg:grid--cols-auto-72 to-lg:grid--gap-0 lg:grid--gap-16 xl:grid--gap-20">
1313
<div>
14+
{% if links and not end | futureDate %}
15+
<div class="flex flex--gap-6 mb-8 lg:mb-10">
16+
{% if links.videos %}
17+
<a class="button" href="{{ links.videos }}" rel="noreferrer noopener" target="_blank">Watch the videos</a>
18+
{% endif %}
19+
{% if links.slides %}
20+
<a class="button" href="{{ links.slides }}" rel="noreferrer noopener" target="_blank">View presentation slides</a>
21+
{% endif %}
22+
</div>
23+
{% endif %}
1424
{% if image %}
1525
<div class="to-lg:w-full-breakout">
16-
<div class="aspect-ratio aspect-ratio--16x9 mb-8 lg:mb-10 xl:mb-12">
17-
<img alt="" class="absolute top-0" loading="lazy" src="{{ image }}" />
26+
<div class="aspect-ratio aspect-ratio--16x9 aspect-ratio--contain bg-grey-500 mb-8 lg:mb-10 xl:mb-12">
27+
<img alt="" class="absolute h-full top-0" loading="lazy" src="{{ image }}" />
1828
</div>
1929
</div>
2030
{% endif %}
@@ -23,41 +33,45 @@ layout: base
2333
</div>
2434
</div>
2535
<aside>
26-
27-
28-
<h2 class="h5">{{ 'event_details' | i18n }}</h2>
29-
30-
<p class="mb-4 standout">
31-
<time class="block "datetime="{{ date }}">{{ date | formatDateRange(end, locale) }}</time>
32-
{{ location }}
33-
</p>
34-
<p class="p">{{ venue }}</p>
35-
<a class="a" href="{{ map }}" rel="noreferrer noopener" target="_blank">View map</a>
36-
<hr class="hr">
37-
38-
<a class="button w-full" href="{{ register }}" rel="noreferrer noopener" target="_blank">Register</a>
39-
<hr class="hr">
40-
41-
{# <h2 class="h5">{{ 'event_sponsors' | i18n }}</h2> #}
42-
{% for item in sponsors %}
43-
<h2 class="h5">{{ item.label }}</h2>
44-
<ul class="grid grid--cols-2 list-none p-0">
45-
{% for item in item.list %}
46-
<li>
47-
<a href="{{ item.website }}" target="_blank" rel="noreferrer noopener">
48-
<img src="{{ item.logo }}" alt="{{ item.name }}" style="width: 50px;"/>
49-
</a>
50-
</li>
51-
{% endfor %}
52-
</ul>
53-
{% endfor %}
54-
<hr class="hr">
55-
56-
36+
<hr class="hr lg:hidden my-16">
37+
<div class="grid md-to-lg:grid--cols-2 to-md:grid--gap-14 lg:grid--gap-0 to-lg:mb-14">
38+
<div>
39+
<h2 class="h5">{{ 'event_details' | i18n }}</h2>
40+
<p class="mb-4 mt-0 standout">
41+
<time class="block "datetime="{{ date }}">{{ date | formatDateRange(end, locale) }}</time>
42+
{{ location }}
43+
</p>
44+
<p class="p">{{ venue }}</p>
45+
<a class="a" href="{{ map }}" rel="noreferrer noopener" target="_blank">View map</a>
46+
<hr class="hidden lg:block hr">
47+
</div>
48+
{% if end | futureDate %}
49+
<div>
50+
<a class="button w-full" href="{{ register }}" rel="noreferrer noopener" target="_blank">Register</a>
51+
<hr class="hidden lg:block hr">
52+
</div>
53+
{% endif %}
54+
</div>
55+
<div class="grid md-to-lg:grid--cols-2 grid--gap-0 md-to-lg:grid--gap-7 to-lg:mb-14">
56+
{% for item in sponsors %}
57+
<div>
58+
<h2 class="h5">{{ item.label }}</h2>
59+
<ul class="grid grid--cols-2 grid--gap-7 list-none mb-4 mt-0 p-0 w-3-4">
60+
{% for item in item.list %}
61+
<li>
62+
<a href="{{ item.website }}" target="_blank" rel="noreferrer noopener">
63+
<img src="{{ item.logo }}" alt="{{ item.name }}" />
64+
<span class="visually-hidden">{{ item.name }}</span>
65+
</a>
66+
</li>
67+
{% endfor %}
68+
</ul>
69+
</div>
70+
{% endfor %}
71+
</div>
72+
<hr class="hidden lg:block hr">
5773
<h2 class="h5">{{ 'share_this_article' | i18n }}</h2>
5874
{% include "components/social-shares.njk" %}
59-
60-
6175
</aside>
6276
</div>
6377
</section>

src/css/component.agenda.css

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/* ---------- COMPONENT agenda ---------- */
2+
3+
.agenda {
4+
font-size: var(--font-size-sm);
5+
line-height: var(--size-5);
6+
width: var(--size-full);
7+
}
8+
9+
.agenda__intermission {
10+
color: hsla(var(--color-gunmetal-hsl), 0.4);
11+
}
12+
13+
.agenda td {
14+
border-bottom: var(--size-px) solid var(--color-grey-500);
15+
padding: var(--size-4) 0;
16+
}
17+
18+
.agenda td:first-child {
19+
width: var(--size-20);
20+
}

src/css/main.css

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
@import "object.wrapper.css";
2727

2828
/* components */
29+
@import "component.agenda.css";
2930
@import "component.button.css";
3031
@import "component.hr.css";
3132
@import "component.link-cover.css";

src/css/object.grid.css

+8
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
--grid-gap: var(--size-0);
3333
}
3434

35+
.grid--gap-7 {
36+
--grid-gap: var(--size-7);
37+
}
38+
3539
/* columns */
3640
.grid--cols-none {
3741
grid-template-columns: var(--size-none);
@@ -123,6 +127,10 @@
123127
}
124128

125129
@media (--mq-md-to-lg) {
130+
.md-to-lg\:grid--gap-7 {
131+
--grid-gap: var(--size-7);
132+
}
133+
126134
.md-to-lg\:grid--cols-2 {
127135
grid-template-columns: repeat(2, minmax(0, 1fr));
128136
}

src/css/utilities.colors.css

+41-39
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* ---------- UTILITIES colors ---------- */
22

3-
/* ---------- background negative ---------- */
3+
/* negative */
44
.bg-black {
55
background-color: var(--color-black);
66
}
@@ -9,45 +9,40 @@
99
background-color: var(--color-white);
1010
}
1111

12-
/* ---------- background navy ---------- */
13-
.bg-navy {
14-
background-color: var(--color-navy);
12+
.border-black {
13+
border-color: var(--color-black);
1514
}
1615

17-
/* ---------- background grey ---------- */
18-
.bg-grey-300 {
19-
background-color: var(--color-grey-300);
16+
.border-white {
17+
border-color: var(--color-white);
2018
}
2119

22-
.bg-grey-500 {
23-
background-color: var(--color-grey-500);
20+
.color-black {
21+
color: var(--color-black);
2422
}
2523

26-
/* ---------- background gunmetal ---------- */
27-
.bg-gunmetal {
28-
background-color: var(--color-gunmetal);
24+
.color-white {
25+
color: var(--color-white);
2926
}
3027

31-
/* ---------- background red ---------- */
32-
.bg-red-500 {
33-
background-color: var(--color-red-500);
28+
/* navy */
29+
.bg-navy {
30+
background-color: var(--color-navy);
3431
}
3532

36-
/* ---------- background royal ---------- */
37-
.bg-royal {
38-
background-color: var(--color-royal);
33+
.color-navy {
34+
color: var(--color-navy);
3935
}
4036

41-
/* ---------- border negative ---------- */
42-
.border-black {
43-
border-color: var(--color-black);
37+
/* grey */
38+
.bg-grey-300 {
39+
background-color: var(--color-grey-300);
4440
}
4541

46-
.border-white {
47-
border-color: var(--color-white);
42+
.bg-grey-500 {
43+
background-color: var(--color-grey-500);
4844
}
4945

50-
/* ---------- border grey ---------- */
5146
.border-grey-300 {
5247
border-color: var(--color-grey-300);
5348
}
@@ -56,30 +51,37 @@
5651
border-color: var(--color-grey-500);
5752
}
5853

59-
/* ---------- text negative ---------- */
60-
.color-black {
61-
color: var(--color-black);
54+
.color-grey-300 {
55+
color: var(--color-grey-300);
6256
}
6357

64-
.color-white {
65-
color: var(--color-white);
58+
.color-grey-500 {
59+
color: var(--color-grey-500);
60+
}
61+
62+
/* gunmetal */
63+
.bg-gunmetal {
64+
background-color: var(--color-gunmetal);
6665
}
6766

6867
/* red */
69-
.color-red-500 {
70-
color: var(--color-red-500);
68+
.bg-red-500 {
69+
background-color: var(--color-red-500);
7170
}
7271

73-
/* ---------- text navy ---------- */
74-
.color-navy {
75-
color: var(--color-navy);
72+
.color-red-400 {
73+
color: var(--color-red-400);
7674
}
7775

78-
/* ---------- text grey ---------- */
79-
.color-grey-300 {
80-
color: var(--color-grey-300);
76+
.color-red-500 {
77+
color: var(--color-red-500);
8178
}
8279

83-
.color-grey-500 {
84-
color: var(--color-grey-500);
80+
/* royal */
81+
.bg-royal {
82+
background-color: var(--color-royal);
83+
}
84+
85+
.color-royal {
86+
color: var(--color-royal);
8587
}

src/css/utilities.size.css

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
width: var(--size-36);
1515
}
1616

17+
.w-3-4 {
18+
width: var(--size-3-4);
19+
}
20+
1721
.w-full {
1822
width: var(--size-full);
1923
}

0 commit comments

Comments
 (0)