This proved to be more involved than I had first imagined, but I think the end result is rather nice.
The attribute data-highlight-dans can now be added to any element in the narrative HTML sections; it takes a comma-separated list of the indices of the sections that should be highlighted with the element is hovered over -- e.g. <h3 data-highlight-dans="3,4,5">Waki enters</h3> (from Hashitomi Act I). I've gone in and added the values as appropriate for all the <h2> and <h3> tags in the narratives as they exist at this point, but the idea is to put the power in the hands of Jarek and François -- they can add/edit/remove these values as they see fit.
To test this, both yarn install and yarn parse will be required; the former because I had to update the interweave package to get the functionality I needed to prevent it stripping out the data- attributes from the narrative HTML; the latter because I added new "Section Index" values to all the sheets the section-data folder on Google Drive.
This proved to be more involved than I had first imagined, but I think the end result is rather nice.
The attribute
data-highlight-dans
can now be added to any element in the narrative HTML sections; it takes a comma-separated list of the indices of the sections that should be highlighted with the element is hovered over -- e.g.<h3 data-highlight-dans="3,4,5">Waki enters</h3>
(from Hashitomi Act I). I've gone in and added the values as appropriate for all the<h2>
and<h3>
tags in the narratives as they exist at this point, but the idea is to put the power in the hands of Jarek and François -- they can add/edit/remove these values as they see fit.To test this, both
yarn install
andyarn parse
will be required; the former because I had to update theinterweave
package to get the functionality I needed to prevent it stripping out thedata-
attributes from the narrative HTML; the latter because I added new "Section Index" values to all the sheets thesection-data
folder on Google Drive.