CentreForDigitalHumanities / idioms

Database of Dutch Dialect Idioms
https://dutchdialectidioms.uu.nl/
Other
0 stars 0 forks source link

Improve interlinear display #9

Closed ar-jan closed 2 years ago

ar-jan commented 2 years ago

The current data structure requires iterating over orthographic words in the original and gloss columns separately for the interlinear display. We can use use str.split() in the Jinja template, but we cannot really create a better data structure. Now implemented by using a table element, but I would prefer nested tags.

Solve this either in the SQL query, or create a custom template function that combines original and gloss?

jgonggrijp commented 2 years ago

This probably answers only half of the question, but <ruby> and its subelements are specifically meant for the markup of interlinear glosses.

ar-jan commented 2 years ago

Interesting! It looks like the ruby element is very much oriented towards use with East Asian characters rather than generic interlinear glosses for typical linguistics usage, where the only layout requirement is that they are "left-aligned vertically, word by word".

For now I've implemented it with generic divs, since the ruby element requires overriding default browser styles. Maybe a description list would be more appropriate than generic divs. It doesn't really feel more semantically correct to me to use ruby, given its typical usage, but I'm open to being convinced otherwise.

jgonggrijp commented 2 years ago

Having to override browser styles is common ground. Bootstrap and Bulma already do it behind your back because frankly, every browser just has its own arbitrary style.

While <ruby> is most commonly used for character-based East-Asian writing, that is by no means its only intended use. <div> and <dl> are definitely less semantically appropriate, in my opinion.

ar-jan commented 2 years ago

Alright, I'm not opposed to it :). Now changed the elements to use ruby and rt.