diff options
| author | John MacFarlane <[email protected]> | 2022-01-09 10:56:28 -0800 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2022-01-09 10:56:28 -0800 |
| commit | 2e50c8d1378e911095918a42c04643d64946d554 (patch) | |
| tree | 3c8a2ce9af33887e7bd61697c02da3156c5b5a29 /data | |
| parent | d908e31fe60abe54eb55434576a99cafe4d1e60b (diff) | |
Improve abstract in HTML template.
* Add localized title "abstract", unless `abstract-title` variable
is set.
* Add `abstract-title` div to abstract CSS.
* Move abstract CSS out of CSL conditional.
* Ensure that abstract is aligned left but indented on all sides.
* Use smaller font for abstract.
Improves #7588.
Diffstat (limited to 'data')
| -rw-r--r-- | data/templates/default.html4 | 1 | ||||
| -rw-r--r-- | data/templates/default.html5 | 1 | ||||
| -rw-r--r-- | data/templates/styles.html | 19 |
3 files changed, 15 insertions, 6 deletions
diff --git a/data/templates/default.html4 b/data/templates/default.html4 index 6534a590b..00f0bacbc 100644 --- a/data/templates/default.html4 +++ b/data/templates/default.html4 @@ -48,6 +48,7 @@ $if(date)$ $endif$ $if(abstract)$ <div class="abstract"> +<div class="abstract-title">$abstract-title$</div> $abstract$ </div> $endif$ diff --git a/data/templates/default.html5 b/data/templates/default.html5 index cb2aa7a09..5242f797f 100644 --- a/data/templates/default.html5 +++ b/data/templates/default.html5 @@ -51,6 +51,7 @@ $if(date)$ $endif$ $if(abstract)$ <div class="abstract"> +<div class="abstract-title">$abstract-title$</div> $abstract$ </div> $endif$ diff --git a/data/templates/styles.html b/data/templates/styles.html index 7df3c3dab..970adf2b8 100644 --- a/data/templates/styles.html +++ b/data/templates/styles.html @@ -73,6 +73,19 @@ blockquote { border-left: 2px solid #e6e6e6; color: #606060; } +$if(abstract)$ +div.abstract { + margin: 2em 2em 2em 2em; + text-align: left; + font-size: 85%; +} +div.abstract-title { + font-weight: bold; + text-align: center; + padding: 0; + margin-bottom: 0.5em; +} +$endif$ code { font-family: $if(monofont)$$monofont$$else$Menlo, Monaco, 'Lucida Console', Consolas, monospace$endif$; $if(monobackgroundcolor)$ @@ -161,12 +174,6 @@ div.csl-entry { $if(csl-entry-spacing)$ margin-bottom: $csl-entry-spacing$; $endif$ -$if(abstract)$ -div.abstract{ - margin: auto; - width: 90%; -} -$endif$ } .hanging div.csl-entry { margin-left:2em; |
