version 3.0 of the theme -- complete overhaul
This commit is contained in:
93
doc_glossary.md
Normal file
93
doc_glossary.md
Normal file
@ -0,0 +1,93 @@
|
||||
---
|
||||
title: Glossaries
|
||||
audience: writer, designer
|
||||
tags: formatting
|
||||
keywords:
|
||||
last_updated:
|
||||
summary:
|
||||
---
|
||||
{% include linkrefs.html %}
|
||||
|
||||
You can create a glossary for your content. First create your glossary items in a data file such as glossary.yml.
|
||||
|
||||
Then create a page and use definition list formatting, like this:
|
||||
|
||||
```html
|
||||
<dl class="dl">
|
||||
|
||||
<dt id="fractious">fractious</dt>
|
||||
<dd>{{site.data.glossary.fractious}}</dd>
|
||||
|
||||
<dt id="gratuitous">gratuitous</dt>
|
||||
<dd>{{site.data.glossary.gratuitous}}</dd>
|
||||
|
||||
<dt id="haughty">haughty</dt>
|
||||
<dd>{{site.data.glossary.haughty}}</dd>
|
||||
|
||||
<dt id="gratuitous">gratuitous</dt>
|
||||
<dd>{{site.data.glossary.gratuitous}}</dd>
|
||||
|
||||
<dt id="impertinent">impertinent</dt>
|
||||
<dd>{{site.data.glossary.impertinent}}</dd>
|
||||
|
||||
<dt id="intrepid">intrepid</dt>
|
||||
<dd>{{site.data.glossary.intrepid}}</dd>
|
||||
|
||||
</dl>
|
||||
```
|
||||
|
||||
Here's what that looks like:
|
||||
|
||||
<dl class="dl">
|
||||
|
||||
<dt id="fractious">fractious</dt>
|
||||
<dd>{{site.data.glossary.fractious}}</dd>
|
||||
|
||||
<dt id="gratuitous">gratuitous</dt>
|
||||
<dd>{{site.data.glossary.gratuitous}}</dd>
|
||||
|
||||
<dt id="haughty">haughty</dt>
|
||||
<dd>{{site.data.glossary.haughty}}</dd>
|
||||
|
||||
<dt id="benchmark_id">gratuitous</dt>
|
||||
<dd>{{site.data.glossary.gratuitous}}</dd>
|
||||
|
||||
<dt id="impertinent">impertinent</dt>
|
||||
<dd>{{site.data.glossary.impertinent}}</dd>
|
||||
|
||||
<dt id="intrepid">intrepid</dt>
|
||||
<dd>{{site.data.glossary.intrepid}}</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
The glossary works well as a link in the top navigation bar.
|
||||
|
||||
## Horizontally styled definiton lists
|
||||
|
||||
You can also change the definition list (`dl`) class to `dl-horizontal`. This is a Bootstrap specific class. If you do, the styling looks like this:
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
|
||||
<dt id="fractious">fractious</dt>
|
||||
<dd>{{site.data.glossary.fractious}}</dd>
|
||||
|
||||
<dt id="gratuitous">gratuitous</dt>
|
||||
<dd>{{site.data.glossary.gratuitous}}</dd>
|
||||
|
||||
<dt id="haughty">haughty</dt>
|
||||
<dd>{{site.data.glossary.haughty}}</dd>
|
||||
|
||||
<dt id="benchmark_id">gratuitous</dt>
|
||||
<dd>{{site.data.glossary.gratuitous}}</dd>
|
||||
|
||||
<dt id="impertinent">impertinent</dt>
|
||||
<dd>{{site.data.glossary.impertinent}}</dd>
|
||||
|
||||
<dt id="intrepid">intrepid</dt>
|
||||
<dd>{{site.data.glossary.intrepid}}</dd>
|
||||
|
||||
</dl>
|
||||
|
||||
If you squish your screen small enough, at a certain breakpoint this style reverts to the regular `dl` class.
|
||||
|
||||
Although I like the side-by-side view for shorter definitions, I found it problematic with longer definitions.
|
Reference in New Issue
Block a user