Reference list trucated in narrative web

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Reference list trucated in narrative web

Patrick Gerlier

Hi all,

I generate a narrative web from my Gramps DB with "Places" pages enabled.

At the bottom of a place page, events related to this place are listed as an ordered list (HTML <ol> element). Events are sequentially numbered. But when event # 999. is reached, next event is 000., i.e. counter value is truncated to the last 3 digits.

I had a look at the narrative-screen.css stylesheet but did not find any rule relative to this list. There is not even a rule for formatting the list (strictly speaking there are some rules which apply when <li> is in a table, which is not the case for event list in a place page).

The active style sheet is Web_Basic-Ash.css. I changed it for Web_Mainz.css with the same result.

I don't think there is a limitation in the CSS standard (I read through the draft about lists on W3C site).

<head> for a place page contains several <link href=… rel=stylesheet type="text/***"/>, some of them being "foreign" files like https://openlayers.org/en/latest/css/ol.css or https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css

There may be undesirable interferences vetween them though the debugging console in Firefox does not show conflicts.

It even does not show any specific rule for the <ol> and <li> elements in the list!

I also tried without including maps and numbers are still truncated.

Have you any idea how to fix the problem?

Regards,
Patrick


PS: there is also a small issue. "Vague" dates are not translated: in all other pages, "About 1800" is correctly translated into "Vers 1800" (French) but in the place list, this is displayed as "abt. 1800" (English abbreviation).



--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Reference list trucated in narrative web

Patrick Gerlier

Forgot to mention: using Gramps 5.1.0 under Linux Fedora 30

Le 13/09/2019 à 13:41, Patrick Gerlier a écrit :

Hi all,

I generate a narrative web from my Gramps DB with "Places" pages enabled.

At the bottom of a place page, events related to this place are listed as an ordered list (HTML <ol> element). Events are sequentially numbered. But when event # 999. is reached, next event is 000., i.e. counter value is truncated to the last 3 digits.

I had a look at the narrative-screen.css stylesheet but did not find any rule relative to this list. There is not even a rule for formatting the list (strictly speaking there are some rules which apply when <li> is in a table, which is not the case for event list in a place page).

The active style sheet is Web_Basic-Ash.css. I changed it for Web_Mainz.css with the same result.

I don't think there is a limitation in the CSS standard (I read through the draft about lists on W3C site).

<head> for a place page contains several <link href=… rel=stylesheet type="text/***"/>, some of them being "foreign" files like https://openlayers.org/en/latest/css/ol.css or https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css

There may be undesirable interferences vetween them though the debugging console in Firefox does not show conflicts.

It even does not show any specific rule for the <ol> and <li> elements in the list!

I also tried without including maps and numbers are still truncated.

Have you any idea how to fix the problem?

Regards,
Patrick


PS: there is also a small issue. "Vague" dates are not translated: in all other pages, "About 1800" is correctly translated into "Vers 1800" (French) but in the place list, this is displayed as "abt. 1800" (English abbreviation).





--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org
Reply | Threaded
Open this post in threaded view
|

Re: Reference list trucated in narrative web

Patrick Gerlier

Thanks to Serge Noiraud's suggestion, I began to play with the debugging console in Firefox and found out the culprit.

Apparently, no one anticipated the possibility of monster ordered lists (HTML tag <ol>) with thousands of items. Consequently, no special CSS rule is implemented in narrative-screen.css (and probably in …-print.css too). Not even web browser developers thought of this case (after all an ordered list is made for "reasonably"-long lists).

This means the left margin defined in the browser default CSS stylesheet affords for 3 digits plus the period space separator.

Once I added rule ol { margin-left: 3em }, there was enough room for the thousands digit and even for a fifth digit if necessary.

I did not test if this addition messed up other lists in other pages. This is only a quick'n'dirty  fix to identify the cause of the problem.

I'll file a bug report after I've registered for an account.

Patrick

Le 14/09/2019 à 13:43, Serge Noiraud a écrit :
Hi Patrick,

Le 13/09/2019 à 13:45, Patrick Gerlier a écrit :

Forgot to mention: using Gramps 5.1.0 under Linux Fedora 30

Le 13/09/2019 à 13:41, Patrick Gerlier a écrit :

Hi all,

I generate a narrative web from my Gramps DB with "Places" pages enabled.

At the bottom of a place page, events related to this place are listed as an ordered list (HTML <ol> element). Events are sequentially numbered. But when event # 999. is reached, next event is 000., i.e. counter value is truncated to the last 3 digits.


Can you test the following:

Create a directory $HOME/.gramps/css

Copy The Web_Basic-Ash.css in this directory changing the name: (cp Web_Basic-Ash.css $HOME/.gramps/css/My_CSS.css)

Add the following lines at the end of this file:

#references ol {
  list-style: none;
  counter-reset: refNumbering;
}
#references li {
counter-increment: refNumbering;
}
#references li:before {
  content: counter(refNumbering, decimal)'.';
}

Recreate the narrative web. Select My_CSS instead of Web_Basic-Ash


Does this solve your problem ?

I had a look at the narrative-screen.css stylesheet but did not find any rule relative to this list. There is not even a rule for formatting the list (strictly speaking there are some rules which apply when <li> is in a table, which is not the case for event list in a place page).

The active style sheet is Web_Basic-Ash.css. I changed it for Web_Mainz.css with the same result.

I don't think there is a limitation in the CSS standard (I read through the draft about lists on W3C site).

<head> for a place page contains several <link href=… rel=stylesheet type="text/***"/>, some of them being "foreign" files like https://openlayers.org/en/latest/css/ol.css or https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css

There may be undesirable interferences vetween them though the debugging console in Firefox does not show conflicts.

It even does not show any specific rule for the <ol> and <li> elements in the list!

I also tried without including maps and numbers are still truncated.

Have you any idea how to fix the problem?

Regards,
Patrick


PS: there is also a small issue. "Vague" dates are not translated: in all other pages, "About 1800" is correctly translated into "Vers 1800" (French) but in the place list, this is displayed as "abt. 1800" (English abbreviation).


Can you create two bug request :

The fist one for the line numbering in css

The second one for the translation problem


Serge




--
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
https://gramps-project.org