-
Notifications
You must be signed in to change notification settings - Fork 1
HTML Templating
This page aims to explain how to set up your own HTML template for the use with the ontology documentation script.
A default template is available in this repository and should be a reference for developing further templates.
The HTML template consists of three main parts:
- The page header (header.html)
- The page content (several files)
- The page footer (footer.html)
The page header should contain the page title and a set of CSS and JavaScript statements relevant to all pages generated by the template. The page header also contains an area that shows the class tree of the RDF deployment.
The page content or body of the page consists of a table of statements that are currently generated by the plugin itself. However, the following HTML snippets allow special content to be represented on the HTML page more prominently:
- 3dtemplate.html: A snippet to show 3D models and annotations using the 3DHOP library
- audiotemplate.html: A snippet to include an HTML5 audio player for audio files linked in the knowledge graph
- geoexports.html: Defines the contents of the export menu of data for geodatasets
- imagetemplate.html: A snippet to include an image in the HTML page. Invokes a Bootstrap carousel for more than three images
- imagetemplatesvg.html: A snippet to include an SVG image in the HTML page. Invokes a Bootstrap carousel for more than three images
- imagewithannotemplate.html: A snippet to include an image in the HTML page. Draws SVG annotations of the W3C Web Annotation Data Model on top of the image if defined
- maptemplate.html: Defines a leaflet map including the MarkerCluster plugin in CRS conversion with proj.js
- nongeoexports.html: Defines the contents of the export menu of data for non-geodatasets
- threejstemplate.html: A snippet to show 3D models and annotations using the JavaScript library three.js
- videotemplate.html: A snippet to include an HTML5 video player for video files linked in the knowledge graph
The documentation script invokes these templates depending on the detection results of these data types in the knowledge graph. Each snipped is equipped with CSS styles and JavaScript libraries, which are needed for the document only.
A few special pages only occur once in the HTML export. These receive extra HTML templates.
- sparql.html: The template for the SPARQL query interface in JavaScript
Resources to be published with the given page template are in the js and CSS folders, respectively. Icons of the class tree optimized for web view are contained in the icons folder.
- css/style.css: A generic CSS file that can be applied to all pages
- js/startscripts.js: Javascript variables and properties needed to display the classtree and further page functionality
- js/epsgdefs.js: Coordinate reference system definitions for the conversion of CRS on-the-fly in JavaScript