chapter
Base page structure print
Etherport uses paged.js to generate a paged version of the publication. More information on paged.js in their documentation.
The print version is rendered as one page. Roughly the publication is organised like this:
- Front-matter
- cover
- introduction
- toc
- Chapters marked to be placed before the content
- Reports
- Chapters marked to be placed after the content
- Label index
-
Chapters marked to be placed after the indexes The base structure of the print version.
div.front-matter
div.front-matter–title
h1 // Title of the publication
div.front-matter–introduction
h1 // Title of the index pad ... // Content of the index pad as HTML
div.toc
h1 ul li a
div.chapters
// Chapters with position ‘before_content’
div.chapter[data-chapter=”{{ chapter.name }}”]
// data-chapter holds the name of the chapter as entered in the pad. h1#{{ chapter.slug }} // Title of the chapter with chapter slug as id ... // Content of the chapter has HTML
div.reports
div.report[data-report=”{{ chapter.name }}”]
// data-report holds the name of the report as entered in the pad. h1#{{ chapter.report }} // Title of the report with slug as id ... // Content of the report as HTML
div.chapters
// Chapters with position ‘after_content’ or ‘before_indexes’
div.chapter[data-chapter=”{{ chapter.name }}”]
// data-chapter holds the name of the chapter as entered in the pad. h1#{{ chapter.slug }} // Title of the chapter with chapter slug as id ... // Content of the chapter as HTML
div.indexes
// Indexes. Currently only a label index is generated.
.index#generated-index–labels [data-index=”label”]
h1
ul
li span.index-term // The label span.index-entry[data-link-id="#{{ link.id }}"] // Repeated for each occurence of the label in the text, data-link-id holds the id of the link
div.chapters
// Chapters with position ‘after_indexes’
div.chapter[data-chapter=”{{ chapter.name }}”]
// data-chapter holds the name of the chapter as entered in the pad. h1#{{ chapter.slug }} // Title of the chapter with chapter slug as id ... // Content of the chapter has HTML
Reference
References are links to an object (often labels) within a text. There are two types of references: direct links where the label of the linked object is shown directly in the text, or inline references where a part of the text is marked as linked to an object.
Direct reference
<a href=""
id="{{ link.id }}"
data-reference=""
data-link-id="{{ link.id }}"
data-link-target-type="{{ type of referenced object }}"
data-label="{{ label of linked object}}"
data-direct-link="true">
<span class="reference--target">{{ label of linked object}}</span>
</a>
Inline reference
<a href=""
id="{{ link.id }}"
data-reference=""
data-link-id="{{ link.id }}"
data-link-target-type="{{ type of referenced object }}"
data-label="{{ label of referenced object }}">
<span class="reference--target">{{ label of linked object }}</span>
<span class="reference--label--inline">{{ marked text }}</span>
</a>