From faed1190a045eebab1be0648f66eedd575c49b6e Mon Sep 17 00:00:00 2001 From: HackerNCoder Date: Sun, 11 Jun 2023 17:04:36 +0000 Subject: [PATCH] Add body to bib.ini Signed-off-by: HackerNCoder --- assets/static/style.css | 13 +++++++++++++ content/korea/contents.lr | 6 +++++- models/bib.ini | 6 +++++- templates/bib.html | 4 +++- 4 files changed, 26 insertions(+), 3 deletions(-) diff --git a/assets/static/style.css b/assets/static/style.css index 477bfee..6dc5658 100644 --- a/assets/static/style.css +++ b/assets/static/style.css @@ -58,6 +58,19 @@ header nav ul li a:hover { color: #ADD7F6; } +.page h2 { + margin-bottom: 2rem; +} + +h2.page-title { + margin-bottom: 0; +} + +.page p { + margin-top: 0; + margin-bottom: 2rem; +} + .list-none { list-style: none; } diff --git a/content/korea/contents.lr b/content/korea/contents.lr index 7d9629a..c36b503 100644 --- a/content/korea/contents.lr +++ b/content/korea/contents.lr @@ -1,3 +1,7 @@ _model: bib --- -title: Korea \ No newline at end of file +title: Korea +--- +body: + +See also [North Korean Archives and Library](https://sites.google.com/view/northnkaal). diff --git a/models/bib.ini b/models/bib.ini index c9b0909..9f1afbd 100644 --- a/models/bib.ini +++ b/models/bib.ini @@ -6,6 +6,10 @@ label = {{ this.title }} label = Title type = string +[fields.body] +label = Body +type = markdown + [children] model = book -order_by = title \ No newline at end of file +order_by = title diff --git a/templates/bib.html b/templates/bib.html index e64dffc..315b3a0 100644 --- a/templates/bib.html +++ b/templates/bib.html @@ -1,7 +1,9 @@ {% extends "layout.html" %} {% block title %}{{ this.title }}{% endblock %} {% block body %} -

{{ this.title }}

+{% if this.body %}

{{ this.title }}

+{{ this.body }} +{% else %}

{{ this.title }}

{% endif %}