Static build progress
Posted by mholmes on 12 Jan 2016 in Activity log
During and following the MoEML meeting, JT and I thrashed out an approach to the static HTML output which aims to be as future-proof as possible, bearing in mind best practices and the rise of the CSP. Basic ideas:
- Fragmentary resources will be compiled into .xml AJAX HTML fragments, for AJAX retrieval; and also into complete standalone pages for direct linking. The second will be generated from the first. They will include all the cited/mentioned lists for the item.
- HTML pages will initially link out to the standalone pages rather than incorporating their own copies of items. The only exceptions will be notes, which are inherent to the page, and bibliography items, because we must always provide a works cited list in any page; in this case, initial links will bounce down to the item in the works cited list.
- All links in the HTML must retain information (through @data attributes) on the type of item they're pointing at, for styling and similar purposes.
- At load time, a discrete JS module will process all of these links into popup calls (i.e. AJAX or copy-from-works-cited). This process will also add the relevant classes to all links (external or "internal") so people know when they're leaving the current page.
- All style will be achieved through external stylesheets (no internal CSS or @style). This means that each individual page will have its own accompanying CSS file (assuming it has rendition elements in its header). We will have to take care to ensure that the interaction of existing CSS, hand-created renditions, and auto-created renditions (from the XML standalone processing) results in the same effects in the output as was originally achieved/intended (so we'll have to take care with precedence).