From 4472a3885420d517c8109fec32859a29055f2c80 Mon Sep 17 00:00:00 2001 From: Serge Noiraud Date: Fri, 16 Jul 2021 09:12:29 +0200 Subject: [PATCH] Narweb: Inconsistency between the name of the link (#1272) to a reference and the name of this reference for an individual. Fixes #12336 --- data/css/Web_Basic-Ash.css | 30 ++++++++++++++++++++-- data/css/Web_Basic-Blue.css | 34 ++++++++++++++++++------- data/css/Web_Basic-Cypress.css | 30 ++++++++++++++++++++-- data/css/Web_Basic-Lilac.css | 30 ++++++++++++++++++++-- data/css/Web_Basic-Peach.css | 30 ++++++++++++++++++++-- data/css/Web_Basic-Spruce.css | 30 ++++++++++++++++++++-- data/css/Web_Mainz.css | 38 ++++++++++++++++++++++++++-- data/css/Web_Nebraska.css | 31 ++++++++++++++++++++--- gramps/plugins/webreport/basepage.py | 4 +-- 9 files changed, 230 insertions(+), 27 deletions(-) diff --git a/data/css/Web_Basic-Ash.css b/data/css/Web_Basic-Ash.css index 81cefd951..fbd420d1a 100644 --- a/data/css/Web_Basic-Ash.css +++ b/data/css/Web_Basic-Ash.css @@ -827,8 +827,34 @@ a.family_map { /* Subsection : Source References ----------------------------------------------------- */ -#sourcerefs ol li ol { - list-style-type: lower-alpha; +#sourcerefs ol#srcr { + counter-reset: itema; + list-style-type: none; + display: block; + margin-top: .1em; +} +#sourcerefs ol#citr { + counter-reset: itemb; + list-style-type: none; +} +#sourcerefs ol#srcr > li::before { + content: counter(itema); +} +#sourcerefs ol#citr > li::before { + content: counter(itema)counter(itemb, lower-alpha); +} +#sourcerefs ol#srcr > li { + counter-increment: itema; + margin-top: .1em; +} +#sourcerefs ol#citr > li { + counter-increment: itemb; + margin-top: .1em; +} +#sourcerefs ol#citr ul { + list-style: none; + display: inline-block; + vertical-align: top; } /* Subsection : Pedigree diff --git a/data/css/Web_Basic-Blue.css b/data/css/Web_Basic-Blue.css index a08a604ab..535ff4c54 100644 --- a/data/css/Web_Basic-Blue.css +++ b/data/css/Web_Basic-Blue.css @@ -1540,18 +1540,34 @@ div#References { /* Subsections : Source References ----------------------------------------------------- */ -div#sourcerefs { - padding: 0; - margin: 0 auto; +#sourcerefs ol#srcr { + counter-reset: itema; + list-style-type: none; + display: block; + margin-top: .1em; } -div#sourcerefs ol { - list-style-type: decimal; +#sourcerefs ol#citr { + counter-reset: itemb; + list-style-type: none; } -div#sourcerefs ol li ol { - list-style-type: lower-alpha; +#sourcerefs ol#srcr > li::before { + content: counter(itema); } -div#sourcerefs ol li a { - text-decoration: none; +#sourcerefs ol#citr > li::before { + content: counter(itema)counter(itemb, lower-alpha); +} +#sourcerefs ol#srcr > li { + counter-increment: itema; + margin-top: .1em; +} +#sourcerefs ol#citr > li { + counter-increment: itemb; + margin-top: .1em; +} +#sourcerefs ol#citr ul { + list-style: none; + display: inline-block; + vertical-align: top; } /* Subsections : Summary Area diff --git a/data/css/Web_Basic-Cypress.css b/data/css/Web_Basic-Cypress.css index 6a343709c..0d949604d 100644 --- a/data/css/Web_Basic-Cypress.css +++ b/data/css/Web_Basic-Cypress.css @@ -881,8 +881,34 @@ a.family_map { /* Subsection : Source References ----------------------------------------------------- */ -#sourcerefs ol li ol { - list-style-type: lower-alpha; +#sourcerefs ol#srcr { + counter-reset: itema; + list-style-type: none; + display: block; + margin-top: .1em; +} +#sourcerefs ol#citr { + counter-reset: itemb; + list-style-type: none; +} +#sourcerefs ol#srcr > li::before { + content: counter(itema); +} +#sourcerefs ol#citr > li::before { + content: counter(itema)counter(itemb, lower-alpha); +} +#sourcerefs ol#srcr > li { + counter-increment: itema; + margin-top: .1em; +} +#sourcerefs ol#citr > li { + counter-increment: itemb; + margin-top: .1em; +} +#sourcerefs ol#citr ul { + list-style: none; + display: inline-block; + vertical-align: top; } /* Subsection : Pedigree diff --git a/data/css/Web_Basic-Lilac.css b/data/css/Web_Basic-Lilac.css index e4b1d28de..acfb65022 100644 --- a/data/css/Web_Basic-Lilac.css +++ b/data/css/Web_Basic-Lilac.css @@ -877,8 +877,34 @@ a.family_map { /* Subsection : Source References ----------------------------------------------------- */ -#sourcerefs ol li ol { - list-style-type: lower-alpha; +#sourcerefs ol#srcr { + counter-reset: itema; + list-style-type: none; + display: block; + margin-top: .1em; +} +#sourcerefs ol#citr { + counter-reset: itemb; + list-style-type: none; +} +#sourcerefs ol#srcr > li::before { + content: counter(itema); +} +#sourcerefs ol#citr > li::before { + content: counter(itema)counter(itemb, lower-alpha); +} +#sourcerefs ol#srcr > li { + counter-increment: itema; + margin-top: .1em; +} +#sourcerefs ol#citr > li { + counter-increment: itemb; + margin-top: .1em; +} +#sourcerefs ol#citr ul { + list-style: none; + display: inline-block; + vertical-align: top; } /* Subsection : Pedigree diff --git a/data/css/Web_Basic-Peach.css b/data/css/Web_Basic-Peach.css index 6d11b8b54..2db348b22 100644 --- a/data/css/Web_Basic-Peach.css +++ b/data/css/Web_Basic-Peach.css @@ -878,8 +878,34 @@ a.family_map { /* Subsection : Source References ----------------------------------------------------- */ -#sourcerefs ol li ol { - list-style-type: lower-alpha; +#sourcerefs ol#srcr { + counter-reset: itema; + list-style-type: none; + display: block; + margin-top: .1em; +} +#sourcerefs ol#citr { + counter-reset: itemb; + list-style-type: none; +} +#sourcerefs ol#srcr > li::before { + content: counter(itema); +} +#sourcerefs ol#citr > li::before { + content: counter(itema)counter(itemb, lower-alpha); +} +#sourcerefs ol#srcr > li { + counter-increment: itema; + margin-top: .1em; +} +#sourcerefs ol#citr > li { + counter-increment: itemb; + margin-top: .1em; +} +#sourcerefs ol#citr ul { + list-style: none; + display: inline-block; + vertical-align: top; } /* Subsection : Pedigree diff --git a/data/css/Web_Basic-Spruce.css b/data/css/Web_Basic-Spruce.css index 0d4fd910f..5247336cc 100644 --- a/data/css/Web_Basic-Spruce.css +++ b/data/css/Web_Basic-Spruce.css @@ -880,8 +880,34 @@ a.family_map { /* Subsection : Source References ----------------------------------------------------- */ -#sourcerefs ol li ol { - list-style-type: lower-alpha; +#sourcerefs ol#srcr { + counter-reset: itema; + list-style-type: none; + display: block; + margin-top: .1em; +} +#sourcerefs ol#citr { + counter-reset: itemb; + list-style-type: none; +} +#sourcerefs ol#srcr > li::before { + content: counter(itema); +} +#sourcerefs ol#citr > li::before { + content: counter(itema)counter(itemb, lower-alpha); +} +#sourcerefs ol#srcr > li { + counter-increment: itema; + margin-top: .1em; +} +#sourcerefs ol#citr > li { + counter-increment: itemb; + margin-top: .1em; +} +#sourcerefs ol#citr ul { + list-style: none; + display: inline-block; + vertical-align: top; } /* Subsection : Pedigree diff --git a/data/css/Web_Mainz.css b/data/css/Web_Mainz.css index 67e06a64e..42be44f0e 100644 --- a/data/css/Web_Mainz.css +++ b/data/css/Web_Mainz.css @@ -817,9 +817,43 @@ div.grampsstylednote a:visited { /* SubSection : Source References -----------------------------------------------------------------*/ -#sourcerefs ol li ol { - list-style-type: lower-alpha; +#sourcerefs ol#srcr { + counter-reset: itema; + list-style-type: none; + display: block; + margin-top: .1em; } +#sourcerefs ol#citr { + counter-reset: itemb; + list-style-type: none; +} +#sourcerefs ol#srcr > li::before { + content: counter(itema); +} +#sourcerefs ol#citr > li::before { + content: counter(itema)counter(itemb, lower-alpha); +} +#sourcerefs ol#srcr > li { + counter-increment: itema; + margin-top: .1em; +} +#sourcerefs ol#citr > li { + counter-increment: itemb; + margin-top: .1em; +} +#sourcerefs ol#citr ul { + list-style: none; + display: inline-block; + vertical-align: top; +} +/* +#sourcerefs a { + color: #767D25; +} +#sourcerefs a:visited { + color: red; +} +*/ /* SubSection : Pedigree -----------------------------------------------------------------*/ diff --git a/data/css/Web_Nebraska.css b/data/css/Web_Nebraska.css index 5435402cb..d779e08e2 100644 --- a/data/css/Web_Nebraska.css +++ b/data/css/Web_Nebraska.css @@ -1347,11 +1347,34 @@ div.grampsstylednote a:visited { /* Subsections : Source References ----------------------------------------------------- */ -div#sourcerefs ol { - list-style-type:decimal; +#sourcerefs ol#srcr { + counter-reset: itema; + list-style-type: none; + display: block; + margin-top: .1em; } -div#sourcerefs ol li ol { - list-style-type:lower-alpha; +#sourcerefs ol#citr { + counter-reset: itemb; + list-style-type: none; +} +#sourcerefs ol#srcr > li::before { + content: counter(itema); +} +#sourcerefs ol#citr > li::before { + content: counter(itema)counter(itemb, lower-alpha); +} +#sourcerefs ol#srcr > li { + counter-increment: itema; + margin-top: .1em; +} +#sourcerefs ol#citr > li { + counter-increment: itemb; + margin-top: .1em; +} +#sourcerefs ol#citr ul { + list-style: none; + display: inline-block; + vertical-align: top; } /* Subsections : Summary Area diff --git a/gramps/plugins/webreport/basepage.py b/gramps/plugins/webreport/basepage.py index 857a1bf29..6ea274992 100644 --- a/gramps/plugins/webreport/basepage.py +++ b/gramps/plugins/webreport/basepage.py @@ -2549,7 +2549,7 @@ class BasePage: with Html("div", class_="subsection", id="sourcerefs") as section: section += Html("h4", self._("Source References"), inline=True) - ordered = Html("ol") + ordered = Html("ol", id="srcr") cindex = 0 citationlist = bibli.get_citation_list() @@ -2572,7 +2572,7 @@ class BasePage: else: list_html = Html("li", "None") - ordered1 = Html("ol") + ordered1 = Html("ol", id="citr") citation_ref_list = citation.get_ref_list() for key, sref in citation_ref_list: cit_ref_li = Html("li", id="sref%d%s" % (cindex, key))