Grimm is an eXist-db application used to compare multiple versions of tales present in the data package.
This application is easily deployed with this pre-configured Docker.
- exist-db version:
6.2.0or greater - ant version:
1.10.14(for building from source) - node version:
20.x(for building from source)
Releases is triggered by git tags. The .xar package will available as a release asset. The version number in expath-pkg.xml needs to be set manually before release:
- Increase version number in
expath-pkg.xml - commit and push as usual
- add tag
v1.0.0of new version e.g.git tag -a v1.0.0 - push tag
git push origin v1.0.0
For adding new tales or static pages, see the corresponding data repository.
-
The project has two main ODDs:
- grimm-odd, for display the tales, and
- static-odd, for the static pages.
-
The CSS files that add styling to elements generated by the ODDs are in the same folder, grimm.css and static.css. For example, the indentation of the formulettes is defined here: https://github.com/unil-lettres/grimm/blob/development/resources/odd/grimm.css#L43
HTML files are in the folder templates. Most relevant files:
- index.html: landing page
- menu.html: menu
- grimm.html: template use for rendering the tales
- view.html: template used for rendering the static pages
-
The main CSS files are:
- theme.css, which contains the customization of the TEI Publisher theme.
- theme-grimm.css, which contains additional rules, specific to the Grimm project.
-
Definition of important variables for colors:
--pb-highlight-color: for the alignment highlight.--highlight-closest-color: for the square brackets when there is no match.
-
Images are stored in the images folder.
-
For the images of the landing page, see the subfolder stories. To automatically associate a image to its tale, the name of the image file is crucial and it must match the number of the tale with the 'KHM' prefix, and the
.pngextension e.g.KHM14.png. This convention is defined by the functionpmf:get-thumbnail($tale as xs:string)that adds the images defined in ext-html.xql.
-
The app is functional in English and French (with English as a default language). To add the translations of other languages go to
resources/i18n/appand create a json file for each language. Use the existing ones for English and French as a model. -
For the static pages, use a
@xml:langattribute as explained in the documentation of the data package.