From 15fae36df97658b42389e26f15c822a97b5d210b Mon Sep 17 00:00:00 2001
From: Peter Desmet
Date: Wed, 26 Apr 2023 13:12:57 +0200
Subject: [PATCH] Split examples in terms.tmpl, style as list-group if more
than one
In CSS, make the list group flush (on the left/right) with other elements in the table
---
build/terms.tmpl | 3 ++-
docs/_sass/_custom.scss | 4 ++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/build/terms.tmpl b/build/terms.tmpl
index 9cf28f1..9f5fbc2 100644
--- a/build/terms.tmpl
+++ b/build/terms.tmpl
@@ -50,13 +50,14 @@ For more information on `UseWithIRI`, see [Section 2.5 of the RDF Guide](https:/
{% endif %}
+{% set examples = term.examples.split("; ") %}
{{ term.label }} |
Identifier | {{ term.iri }} |
Definition | {{ term.definition }} |
Comments | {{ term.comments }} |
- Examples | {{ term.examples }} |
+ Examples | {% if examples | length == 1 %}{{ examples | first }}{% else %}{% for example in examples %}- {{ example }}
{% endfor %} {% endif %} |
{% endfor %}
diff --git a/docs/_sass/_custom.scss b/docs/_sass/_custom.scss
index 6124b00..a896db6 100644
--- a/docs/_sass/_custom.scss
+++ b/docs/_sass/_custom.scss
@@ -5,5 +5,9 @@
td:first-of-type {
width: 120px; // Label column, long words will still push this wider
}
+
+ .list-group-item {
+ padding: 0.5rem 0; // Examples
+ }
}
}