Skip to content

Commit e920cda

Browse files
authored
Margin footnotes convention & cleanup (#244)
* Testing footnotes options * More fiddling * Prettified example options * Slight update to testing instructions * Adjusted testing structure * Tested unnumbered footnotes * Archived footnotes tests * Fixed footnotes -workflows & -style guide * Fixed footnotes in workflows docs * Style guide footnotes * Edited style guide for margin footnotes * Fixed broken links * Edit 2 footnotes on style guide + mobile breakpoint * No margin footnotes on mobile * Playing with announcement options * Yassified the nav links * More link & announement tweaks * Final announcement tweaks * 1st pass of modified footnotes * 2nd pass of modified footnotes * Final pass of margin footnotes * Quick edit to link hover thickness and announcement banner * Rendering site
1 parent 2e7ad9f commit e920cda

File tree

360 files changed

+8044
-5408
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

360 files changed

+8044
-5408
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ These directories may have sub-directories depending on their size and grouped s
7777
#### Supporting `site` directories
7878
- `_site` — This is where static files rendered by `quarto render` get placed.
7979
- `assets` — This is where general shared assets live (stylesheets, promotional images, etc.).
80+
- `internal` — For internal testing only.
8081
- `notebooks` — This is where notebooks retrieved from the [`developer-framework` repo](https://github.com/validmind/developer-framework) live.
8182
- `tests` — This is where test descriptions generated from the Python source in the [developer-framework repo](https://github.com/validmind/developer-framework) live.
8283
- `wip` — Work in progress files should live here, and have [the `search` flag set to `false`](https://quarto.org/docs/websites/website-search.html#disabling-search).
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: "Footnotes"
3+
subtitle: "Example styling"
4+
search: false
5+
reference-location: margin
6+
footnotes-hover: true
7+
listing:
8+
- id: footnotes
9+
type: grid
10+
grid-columns: 2
11+
max-description-length: 250
12+
sort: false
13+
fields: [title, description]
14+
contents:
15+
- hover-only.qmd
16+
- margin-only.qmd
17+
- margin-hover.qmd
18+
- text-notes.qmd
19+
---
20+
21+
> For **[SC-5288](https://app.shortcut.com/validmind/story/5288/explore-alternative-footnotes-options-for-inline-links)**:
22+
23+
- All footnotes go in the bottom section of the source page, instead of haphazardly stuck in between things as we author!
24+
- Footnotes can't involve `include` files, unfortunately, so we can't single-source definitions.
25+
- However, footnotes **can** be hyperlinks, which is handy for our inline instructional asides.
26+
- The numbering of footnotes is still manual, but at least they are collated in one section so we can tell how many there are at a glance.
27+
28+
### Defining styles
29+
- Footnote styling can be defined globally (via `_quarto.yml`) or individually in each file's YAML header.
30+
- While Quarto provides several places footnotes can live, `margin` is the only one that might work well for us as the others place them at the end of section/block/document etc. again taking readers away from the instructional text.
31+
32+
#### Syntax
33+
34+
```markdown
35+
Here is a footnote reference,[^1] and another.[^longnote]
36+
37+
[^1]: Here is the footnote.
38+
39+
[^longnote]: Here's one with multiple blocks.
40+
41+
Subsequent paragraphs are indented to show that they belong to the previous footnote.
42+
43+
{ some.code }
44+
45+
The whole paragraph can be indented, or just the first line.
46+
In this way, multi-paragraph footnotes work like multi-paragraph list items.
47+
48+
This paragraph won't be part of the note, because it isn't indented.
49+
```
50+
51+
Output
52+
: Here is a footnote reference,[^1] and another.[^longnote]
53+
54+
[^1]: Here is the footnote.
55+
56+
[^longnote]: Here's one with multiple blocks.
57+
58+
Subsequent paragraphs are indented to show that they belong to the previous footnote.
59+
60+
{ some.code }
61+
62+
The whole paragraph can be indented, or just the first line.
63+
In this way, multi-paragraph footnotes work like multi-paragraph list items.
64+
65+
This paragraph won't be part of the note, because it isn't indented.
66+
67+
## Footnote examples
68+
69+
Please vote on your favourite!
70+
71+
:::{#footnotes}
72+
:::
73+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: "Hover only"
3+
subtitle: "Footnotes"
4+
search: false
5+
reference-location: document
6+
footnotes-hover: true
7+
---
8+
9+
Hover only footnotes.
10+
11+
## Beowulf: I
12+
13+
Lesslie Hall translation[^1]:
14+
15+
> Lo! the Spear-Danes'[^2] glory through splendid achievements
16+
>
17+
> The folk-kings' former fame we have heard of,
18+
>
19+
> How princes displayed then their prowess-in-battle.
20+
>
21+
> Oft Scyld the Scefing from scathers in numbers
22+
>
23+
> From many a people their mead-benches[^3] tore.
24+
25+
Vivamus faucibus sed lorem vel dignissim. Duis ullamcorper, lorem ut cursus rutrum, elit orci lacinia nulla, in gravida lacus mauris ut sem. Vivamus urna erat, vulputate ut ex eu, pharetra lacinia velit. Quisque vehicula dolor ultricies nulla condimentum, eget auctor diam malesuada. Nullam ac nunc ultricies ligula luctus mattis. Etiam blandit, metus ac rhoncus molestie, ipsum tortor ultrices turpis, sed eleifend mauris diam ac velit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam in lorem nec felis iaculis tincidunt vitae quis lorem. Nunc sed mauris rhoncus, lacinia nunc molestie, semper orci. Morbi consequat ipsum sed diam molestie, eget facilisis lorem efficitur. Donec lorem ligula, sollicitudin quis congue eu, commodo vel ipsum. Integer tortor tortor, varius ullamcorper mattis a, ultrices ac felis. Vivamus vitae orci eget odio lobortis lacinia vitae eu purus. Fusce et feugiat ligula. Etiam orci nisl, dictum in eleifend non, iaculis in sapien.
26+
27+
Ut at ipsum lectus. Fusce nec vulputate urna. Quisque luctus metus enim, sed pulvinar augue fringilla non. Duis egestas eget ipsum eget rutrum. Cras vel nisl sit amet enim fringilla malesuada. Curabitur enim justo, ornare sit amet lacus vel, dictum auctor risus. Aenean ullamcorper eros sodales, pharetra diam non, condimentum enim.
28+
29+
Cras eu sapien aliquet, accumsan massa eget, hendrerit ante. Nullam aliquam interdum nisl[^4], vel tristique lorem convallis a. Sed tristique nisi libero, egestas lobortis enim luctus sit amet. Integer sit amet lectus dui. Vestibulum interdum mi eget fermentum hendrerit. Maecenas ac augue accumsan, faucibus tellus vitae, aliquam elit. Quisque in varius urna. Mauris eget elementum diam, nec vehicula augue. Ut id ante sed massa fermentum pulvinar id vitae nulla. Mauris ac magna et massa maximus tempor a nec neque. Maecenas ligula turpis, mattis eget sodales eget, scelerisque a diam. Praesent gravida lacus quis sapien lacinia ullamcorper. Vestibulum nec pellentesque sem.
30+
31+
::: {.callout}
32+
As you can see, this is a much cleaner experience overall both for the reader and the author.
33+
:::
34+
35+
36+
<!-- FOOTNOTES -->
37+
38+
[^1]: [The Life and Death of Scyld](https://www.owleyes.org/text/beowulf/read/i#root-23)
39+
40+
[^2]: The Danes are the residents of Denmark. The Hrothgar, Hrothulf, and Scylding dynasty of kings mentioned are actually spoken of in other Danish and Germanic sources (such as [the poem Widsith](https://en.wikipedia.org/wiki/Widsith)). <br></br>
41+
42+
Some believe that Heorot, the hall of the Danes mentioned in Beowulf, was located on the island of Sjaelland, near the modern-day city of Roskilde, Denmark.
43+
44+
[^3]: These mead-benches came from mead-halls, which were fortresses and gathering places for medieval Norse and Germanic tribes. Members of society gathered there in safety under the king's protection so that they could feast, share stories, and receive gifts. <br></br>
45+
46+
It is also notable that Valhalla and [Folkvang](https://en.wikipedia.org/wiki/F%C3%B3lkvangr), two divine mead-halls from Scandinavian mythology, are the places where dead souls go in the afterlife. The mead-hall is the center of society, making any attack on the hall, therefore, an assault upon the fabric of society itself.
47+
48+
[^4]: Random note!
49+
50+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: "Margin & hover"
3+
subtitle: "Footnotes"
4+
search: false
5+
reference-location: margin
6+
footnotes-hover: true
7+
---
8+
9+
Footnotes in the margin and with hover!
10+
11+
## Beowulf: I
12+
13+
Lesslie Hall translation[^1]:
14+
15+
> Lo! the Spear-Danes'[^2] glory through splendid achievements
16+
>
17+
> The folk-kings' former fame we have heard of,
18+
>
19+
> How princes displayed then their prowess-in-battle.
20+
>
21+
> Oft Scyld the Scefing from scathers in numbers
22+
>
23+
> From many a people their mead-benches[^3] tore.
24+
25+
Vivamus faucibus sed lorem vel dignissim. Duis ullamcorper, lorem ut cursus rutrum, elit orci lacinia nulla, in gravida lacus mauris ut sem. Vivamus urna erat, vulputate ut ex eu, pharetra lacinia velit. Quisque vehicula dolor ultricies nulla condimentum, eget auctor diam malesuada. Nullam ac nunc ultricies ligula luctus mattis. Etiam blandit, metus ac rhoncus molestie, ipsum tortor ultrices turpis, sed eleifend mauris diam ac velit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam in lorem nec felis iaculis tincidunt vitae quis lorem. Nunc sed mauris rhoncus, lacinia nunc molestie, semper orci. Morbi consequat ipsum sed diam molestie, eget facilisis lorem efficitur. Donec lorem ligula, sollicitudin quis congue eu, commodo vel ipsum. Integer tortor tortor, varius ullamcorper mattis a, ultrices ac felis. Vivamus vitae orci eget odio lobortis lacinia vitae eu purus. Fusce et feugiat ligula. Etiam orci nisl, dictum in eleifend non, iaculis in sapien.
26+
27+
Ut at ipsum lectus. Fusce nec vulputate urna. Quisque luctus metus enim, sed pulvinar augue fringilla non. Duis egestas eget ipsum eget rutrum. Cras vel nisl sit amet enim fringilla malesuada. Curabitur enim justo, ornare sit amet lacus vel, dictum auctor risus. Aenean ullamcorper eros sodales, pharetra diam non, condimentum enim.
28+
29+
Cras eu sapien aliquet, accumsan massa eget, hendrerit ante. Nullam aliquam interdum nisl[^4], vel tristique lorem convallis a. Sed tristique nisi libero, egestas lobortis enim luctus sit amet. Integer sit amet lectus dui. Vestibulum interdum mi eget fermentum hendrerit. Maecenas ac augue accumsan, faucibus tellus vitae, aliquam elit. Quisque in varius urna. Mauris eget elementum diam, nec vehicula augue. Ut id ante sed massa fermentum pulvinar id vitae nulla. Mauris ac magna et massa maximus tempor a nec neque. Maecenas ligula turpis, mattis eget sodales eget, scelerisque a diam. Praesent gravida lacus quis sapien lacinia ullamcorper. Vestibulum nec pellentesque sem.
30+
31+
::: {.callout}
32+
As you can see, this is a much cleaner experience and the notes auto-align with the section it references!
33+
:::
34+
35+
36+
<!-- FOOTNOTES -->
37+
38+
[^1]: [The Life and Death of Scyld](https://www.owleyes.org/text/beowulf/read/i#root-23)
39+
40+
[^2]: The Danes are the residents of Denmark. The Hrothgar, Hrothulf, and Scylding dynasty of kings mentioned are actually spoken of in other Danish and Germanic sources (such as [the poem Widsith](https://en.wikipedia.org/wiki/Widsith)). <br></br>
41+
42+
Some believe that Heorot, the hall of the Danes mentioned in Beowulf, was located on the island of Sjaelland, near the modern-day city of Roskilde, Denmark.
43+
44+
[^3]: These mead-benches came from mead-halls, which were fortresses and gathering places for medieval Norse and Germanic tribes. Members of society gathered there in safety under the king's protection so that they could feast, share stories, and receive gifts. <br></br>
45+
46+
It is also notable that Valhalla and [Folkvang](https://en.wikipedia.org/wiki/F%C3%B3lkvangr), two divine mead-halls from Scandinavian mythology, are the places where dead souls go in the afterlife. The mead-hall is the center of society, making any attack on the hall, therefore, an assault upon the fabric of society itself.
47+
48+
[^4]: Random note!
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: "Margin only"
3+
subtitle: "Footnotes"
4+
search: false
5+
reference-location: margin
6+
footnotes-hover: false
7+
---
8+
9+
Footnotes in the margin only, with no hover.
10+
11+
## Beowulf: I
12+
13+
Lesslie Hall translation[^1]:
14+
15+
> Lo! the Spear-Danes'[^2] glory through splendid achievements
16+
>
17+
> The folk-kings' former fame we have heard of,
18+
>
19+
> How princes displayed then their prowess-in-battle.
20+
>
21+
> Oft Scyld the Scefing from scathers in numbers
22+
>
23+
> From many a people their mead-benches[^3] tore.
24+
25+
Vivamus faucibus sed lorem vel dignissim. Duis ullamcorper, lorem ut cursus rutrum, elit orci lacinia nulla, in gravida lacus mauris ut sem. Vivamus urna erat, vulputate ut ex eu, pharetra lacinia velit. Quisque vehicula dolor ultricies nulla condimentum, eget auctor diam malesuada. Nullam ac nunc ultricies ligula luctus mattis. Etiam blandit, metus ac rhoncus molestie, ipsum tortor ultrices turpis, sed eleifend mauris diam ac velit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam in lorem nec felis iaculis tincidunt vitae quis lorem. Nunc sed mauris rhoncus, lacinia nunc molestie, semper orci. Morbi consequat ipsum sed diam molestie, eget facilisis lorem efficitur. Donec lorem ligula, sollicitudin quis congue eu, commodo vel ipsum. Integer tortor tortor, varius ullamcorper mattis a, ultrices ac felis. Vivamus vitae orci eget odio lobortis lacinia vitae eu purus. Fusce et feugiat ligula. Etiam orci nisl, dictum in eleifend non, iaculis in sapien.
26+
27+
Ut at ipsum lectus. Fusce nec vulputate urna. Quisque luctus metus enim, sed pulvinar augue fringilla non. Duis egestas eget ipsum eget rutrum. Cras vel nisl sit amet enim fringilla malesuada. Curabitur enim justo, ornare sit amet lacus vel, dictum auctor risus. Aenean ullamcorper eros sodales, pharetra diam non, condimentum enim.
28+
29+
Cras eu sapien aliquet, accumsan massa eget, hendrerit ante. Nullam aliquam interdum nisl[^4], vel tristique lorem convallis a. Sed tristique nisi libero, egestas lobortis enim luctus sit amet. Integer sit amet lectus dui. Vestibulum interdum mi eget fermentum hendrerit. Maecenas ac augue accumsan, faucibus tellus vitae, aliquam elit. Quisque in varius urna. Mauris eget elementum diam, nec vehicula augue. Ut id ante sed massa fermentum pulvinar id vitae nulla. Mauris ac magna et massa maximus tempor a nec neque. Maecenas ligula turpis, mattis eget sodales eget, scelerisque a diam. Praesent gravida lacus quis sapien lacinia ullamcorper. Vestibulum nec pellentesque sem.
30+
31+
::: {.callout}
32+
As you can see, this is a much cleaner experience and the notes auto-align with the section it references!
33+
:::
34+
35+
36+
<!-- FOOTNOTES -->
37+
38+
[^1]: [The Life and Death of Scyld](https://www.owleyes.org/text/beowulf/read/i#root-23)
39+
40+
[^2]: The Danes are the residents of Denmark. The Hrothgar, Hrothulf, and Scylding dynasty of kings mentioned are actually spoken of in other Danish and Germanic sources (such as [the poem Widsith](https://en.wikipedia.org/wiki/Widsith)). <br></br>
41+
42+
Some believe that Heorot, the hall of the Danes mentioned in Beowulf, was located on the island of Sjaelland, near the modern-day city of Roskilde, Denmark.
43+
44+
[^3]: These mead-benches came from mead-halls, which were fortresses and gathering places for medieval Norse and Germanic tribes. Members of society gathered there in safety under the king's protection so that they could feast, share stories, and receive gifts. <br></br>
45+
46+
It is also notable that Valhalla and [Folkvang](https://en.wikipedia.org/wiki/F%C3%B3lkvangr), two divine mead-halls from Scandinavian mythology, are the places where dead souls go in the afterlife. The mead-hall is the center of society, making any attack on the hall, therefore, an assault upon the fabric of society itself.
47+
48+
[^4]: Random note!
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: "Text only, no numbering"
3+
subtitle: "Margin & hover"
4+
search: false
5+
reference-location: margin
6+
footnotes-hover: true
7+
---
8+
9+
Margin and with hover (with no numbering)!
10+
11+
## Beowulf: I
12+
13+
Lesslie Hall translation^[[The Life and Death of Scyld](https://www.owleyes.org/text/beowulf/read/i#root-23)]:
14+
15+
> Lo! the Spear-Danes'^[The Danes are the residents of Denmark. The Hrothgar, Hrothulf, and Scylding dynasty of kings mentioned are actually spoken of in other Danish and Germanic sources (such as [the poem Widsith](https://en.wikipedia.org/wiki/Widsith)).<br></br>Some believe that Heorot, the hall of the Danes mentioned in Beowulf, was located on the island of Sjaelland, near the modern-day city of Roskilde, Denmark.] glory through splendid achievements
16+
>
17+
> The folk-kings' former fame we have heard of,
18+
>
19+
> How princes displayed then their prowess-in-battle.
20+
>
21+
> Oft Scyld the Scefing from scathers in numbers
22+
>
23+
> From many a people their mead-benches^[These mead-benches came from mead-halls, which were fortresses and gathering places for medieval Norse and Germanic tribes. Members of society gathered there in safety under the king's protection so that they could feast, share stories, and receive gifts. <br></br>It is also notable that Valhalla and [Folkvang](https://en.wikipedia.org/wiki/F%C3%B3lkvangr), two divine mead-halls from Scandinavian mythology, are the places where dead souls go in the afterlife. The mead-hall is the center of society, making any attack on the hall, therefore, an assault upon the fabric of society itself.] tore.
24+
25+
Vivamus faucibus sed lorem vel dignissim. Duis ullamcorper, lorem ut cursus rutrum, elit orci lacinia nulla, in gravida lacus mauris ut sem. Vivamus urna erat, vulputate ut ex eu, pharetra lacinia velit. Quisque vehicula dolor ultricies nulla condimentum, eget auctor diam malesuada. Nullam ac nunc ultricies ligula luctus mattis. Etiam blandit, metus ac rhoncus molestie, ipsum tortor ultrices turpis, sed eleifend mauris diam ac velit. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam in lorem nec felis iaculis tincidunt vitae quis lorem. Nunc sed mauris rhoncus, lacinia nunc molestie, semper orci. Morbi consequat ipsum sed diam molestie, eget facilisis lorem efficitur. Donec lorem ligula, sollicitudin quis congue eu, commodo vel ipsum. Integer tortor tortor, varius ullamcorper mattis a, ultrices ac felis. Vivamus vitae orci eget odio lobortis lacinia vitae eu purus. Fusce et feugiat ligula. Etiam orci nisl, dictum in eleifend non, iaculis in sapien.
26+
27+
Ut at ipsum lectus. Fusce nec vulputate urna. Quisque luctus metus enim, sed pulvinar augue fringilla non. Duis egestas eget ipsum eget rutrum. Cras vel nisl sit amet enim fringilla malesuada. Curabitur enim justo, ornare sit amet lacus vel, dictum auctor risus. Aenean ullamcorper eros sodales, pharetra diam non, condimentum enim.
28+
29+
Cras eu sapien aliquet, accumsan massa eget, hendrerit ante. Nullam aliquam interdum nisl^[Random note!], vel tristique lorem convallis a. Sed tristique nisi libero, egestas lobortis enim luctus sit amet. Integer sit amet lectus dui. Vestibulum interdum mi eget fermentum hendrerit. Maecenas ac augue accumsan, faucibus tellus vitae, aliquam elit. Quisque in varius urna. Mauris eget elementum diam, nec vehicula augue. Ut id ante sed massa fermentum pulvinar id vitae nulla. Mauris ac magna et massa maximus tempor a nec neque. Maecenas ligula turpis, mattis eget sodales eget, scelerisque a diam. Praesent gravida lacus quis sapien lacinia ullamcorper. Vestibulum nec pellentesque sem.
30+
31+
::: {.callout}
32+
This is not as clean of an authoring experience, as now the footnotes are bungled up within the body text instead of being neatly bunched down at the bottom (and searchable by number).
33+
:::
34+

site/_quarto.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ project:
22
type: website
33
post-render: make python-docs
44
website:
5+
announcement:
6+
content: "[**{{< fa graduation-cap >}} ValidMind Academy**](/training/training-overview.qmd) — Gain hands-on experience and explore what ValidMind has to offer with our training environment."
7+
position: below-navbar
58
favicon: validmind.png
69
title: "ValidMind"
710
cookie-consent:
@@ -20,6 +23,7 @@ website:
2023
repo-actions: [edit, issue]
2124

2225
navbar:
26+
collapse-below: xl
2327
logo: about/ValidMind-logo-color.svg
2428
background: white
2529
title: false
@@ -66,6 +70,10 @@ website:
6670
file: https://validmind.com/
6771
target: _blank
6872

73+
# COMMENT THIS OUT WHEN DONE TESTING
74+
# - text: "{{< fa flask >}} Testing"
75+
# file: internal/testing.qmd
76+
6977
sidebar:
7078
- title: "Home"
7179
style: docked
@@ -276,6 +284,19 @@ website:
276284
- text: "---"
277285
- support/troubleshooting.qmd
278286

287+
# COMMENT THIS OUT WHEN DONE TESTING
288+
# - title: "Testing"
289+
# contents:
290+
# - internal/testing.qmd
291+
# - text: "---"
292+
# - text: "EXPERIMENTS"
293+
# - file: internal/footnotes/footnotes.qmd
294+
# contents:
295+
# - internal/footnotes/hover-only.qmd
296+
# - internal/footnotes/margin-only.qmd
297+
# - internal/footnotes/margin-hover.qmd
298+
# - internal/footnotes/text-notes.qmd
299+
279300
page-footer:
280301
background: "#DE257E"
281302
left: "© Copyright 2023-2024 ValidMind Inc. All Rights Reserved."
@@ -294,6 +315,8 @@ website:
294315

295316
format:
296317
html:
318+
footnotes-hover: true
319+
reference-location: margin
297320
include-in-header:
298321
- heap-production.html
299322
code-overflow: wrap

0 commit comments

Comments
 (0)