This commit is contained in:
Julie Blanc 2026-02-24 09:11:23 +01:00
parent 31bb24548f
commit a8ab44f5a6
13 changed files with 257 additions and 52 deletions

View file

@ -13,7 +13,7 @@
@page {
size: 165mm 240mm;
margin-top: 10mm;
margin-bottom: 60mm;
margin-bottom: 20mm;
bleed: 6mm;
marks: crop;

View file

@ -3,6 +3,7 @@
--font: 'Routed Gothic', sans-serif;
// --font: 'HAL Timezone', serif;
--mono: 'Selectric Mono', monospace;
--mono: 'Ivory Mono', monospace;
// --mono: 'HAL Timezone Mono', monospace;
--note: 'Routed Gothic', serif;
--title: 'HNoailles Times Triplex', sans-serif;

View file

@ -31,6 +31,7 @@
.chapter-header .type{
margin-bottom: calc(var(--baseline)*1);
display: none;
// text-align: center;
}
@ -38,28 +39,37 @@
}
.chapter-header .bio{
font-family: var(--mono);
// text-align: right;
margin-top: calc(var(--baseline)*1);
font-family: var(--title);
hyphens: none;
font-size: 11px;
font-size: 12px;
line-height: 1.2;
left: 0px!important;
// left: 0px!important;
.name{
text-indent: 0;
text-align: left;
font-weight: bold;
}
.description{
text-indent: -14mm;
padding-left: 14mm;
text-align: left;
font-weight: bold;
}
}
.chapter-header .bio{
margin-top: calc(var(--baseline)*1);
text-align: center;
text-indent: 0;
}
.chapter-header .author{
left: 0px!important;
font-size: 26px;
line-height: 1;
font-family: var(--title);
font-weight: bold;
font-family: var(--font);
// font-weight: bold;
text-align: center;
// color: var(--green);
text-align: right;

View file

@ -4,6 +4,7 @@
:root {
--font: "Routed Gothic", sans-serif;
--mono: "Selectric Mono", monospace;
--mono: "Ivory Mono", monospace;
--note: "Routed Gothic", serif;
--title: "HNoailles Times Triplex", sans-serif;
--red: #9B0000;
@ -41,7 +42,7 @@ body {
@page {
size: 165mm 240mm;
margin-top: 10mm;
margin-bottom: 60mm;
margin-bottom: 20mm;
bleed: 6mm;
marks: crop;
}
@ -403,29 +404,34 @@ body {
.chapter-header .type {
margin-bottom: calc(var(--baseline) * 1);
}
.chapter-header .bio {
font-family: var(--mono);
-webkit-hyphens: none;
hyphens: none;
font-size: 11px;
line-height: 1.2;
left: 0px !important;
display: none;
}
.chapter-header .bio {
margin-top: calc(var(--baseline) * 1);
text-align: center;
font-family: var(--title);
-webkit-hyphens: none;
hyphens: none;
font-size: 12px;
line-height: 1.2;
}
.chapter-header .bio .name {
text-indent: 0;
text-align: left;
font-weight: bold;
}
.chapter-header .bio .description {
text-indent: -14mm;
padding-left: 14mm;
text-align: left;
font-weight: bold;
}
.chapter-header .author {
left: 0px !important;
font-size: 26px;
line-height: 1;
font-family: var(--title);
font-weight: bold;
font-family: var(--font);
text-align: center;
text-align: right;
}

View file

@ -1 +1 @@
{"version":3,"sources":["base/_type.scss","base/_var.scss","style.css","base/_body.scss","base/_layout.scss","base/_type-specimen.scss","modules/_text.scss","modules/_notes.scss","modules/_chapter-header.scss","modules/_item-decor.scss"],"names":[],"mappings":"AAAQ,wEAAA;AACA,8HAAA;AACA,6GAAA;ACFR;EAEI,mCAAA;EAEA,mCAAA;EAEA,8BAAA;EACA,8CAAA;EAEA,cAAA;EACA,eAAA;EACA,uBAAA;EACA,eAAA;EAEA,YAAA;EACA,aAAA;EACA,aAAA;EAEA,aAAA;EAEA,iBAAA;EACA,gBAAA;ACHJ;;AClBA;EACI,SAAA;EACA,UAAA;EACA,sBAAA;EACA,mCAAA;EACA,gCAAA;EACA,8BAAA;ADqBJ;;ACnBA;EACI,mBAAA;ADsBJ;;ACdA;EAEI,wBAAA;EACA,2BAAA;EACA,4BAAA;ADgBJ;;AE3BA;EAEE;IACE,iBAAA;IACA,gBAAA;IACA,mBAAA;IACA,UAAA;IACA,WAAA;EF6BF;EEzBA;IACE,iBAAA;IACA,kBAAA;IACC;MACC,sBAAA;MAxBJ,wBAAA;MACA,eAAA;MACA,sBAAA;MACA,mBAAA;MAwBK,gBAAA;MACC,kBAAA;IF6BJ;IE3BC;MACC,uBAAA;MA/BJ,wBAAA;MACA,eAAA;MACA,sBAAA;MACA,mBAAA;IF6DE;IE9BC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AKlVA;EACI,mBAAA;EACA,gBAAA;EACA,WAAA;EACA,yBAAA;EAEA,eAAA;OAAA,UAAA;EACA,sBAAA;OAAA,iBAAA;EAEA,iBAAA;ALkVJ;;AMjXA;EAEI,wCAAA;ANmXJ;;AMhXA;EACE,+BAAA;ANmXF;;AMhXA;EACE,gCAAA;ANmXF;;AMhXA;EACE,8BAAA;ANmXF;;AM/WA;EACI,eAAA;EACA,gBAAA;EACA,yBAAA;EACA,kBAAA;EACA,wCAAA;EACA,gBAAA;EACA,iBAAA;EACA,kBAAA;ANkXJ;;AM7WA;EACK,wCAAA;ANgXL;;AMzWA;EACK,wBAAA;EAEA,qBAAA;UAAA,aAAA;EACA,eAAA;EACA,gBAAA;EACI,oBAAA;AN2WT;;AMtWA;EACA,qCAAA;EACK,kBAAA;EACA,cAAA;ANyWL;;AMtWA;EACI,oBAAA;EACA,eAAA;EACA,cAAA;EACA,yBAAA;EACA,iBAAA;EACA,kBAAA;EAEA,iBAAA;ANwWJ;;AOvaA;EACI,wBAAA;EACA,gBAAA;EACA,eAAA;EACA,kBAAA;EACA,mBAAA;AP0aJ;;AOvaA;EACK,WAAA;AP0aL;;AOvaA;EACK,YAAA;AP0aL","file":"style.css"}
{"version":3,"sources":["base/_type.scss","base/_var.scss","style.css","base/_body.scss","base/_layout.scss","base/_type-specimen.scss","modules/_text.scss","modules/_notes.scss","modules/_chapter-header.scss","modules/_item-decor.scss"],"names":[],"mappings":"AAAQ,wEAAA;AACA,8HAAA;AACA,6GAAA;ACFR;EAEI,mCAAA;EAEA,mCAAA;EACA,+BAAA;EAEA,8BAAA;EACA,8CAAA;EAEA,cAAA;EACA,eAAA;EACA,uBAAA;EACA,eAAA;EAEA,YAAA;EACA,aAAA;EACA,aAAA;EAEA,aAAA;EAEA,iBAAA;EACA,gBAAA;ACHJ;;ACnBA;EACI,SAAA;EACA,UAAA;EACA,sBAAA;EACA,mCAAA;EACA,gCAAA;EACA,8BAAA;ADsBJ;;ACpBA;EACI,mBAA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otes",
"sidenotes"],
"inlineNotes"
],
"pluginsParameters":{
"inlineNotes": {
"input": ".footnote-ref",
"containerNotes": "#footnotes",
"section": ".chapter"
"containerNotes": "#footnotes"
},
"sidenotes": {
"selector": ".inline-note",
"footnotesFix": {
"selector": ".footnote",
"reset": ".chapter"
}

View file

@ -0,0 +1 @@
.DS_Store

View file

@ -0,0 +1,95 @@
# Plugin to fix footnotes reset issue
This plugin fix the issue of footnote reset.
You can use the current method to declare footnotes:
```CSS
@page {
@footnote {
float: bottom;
}
}
.pagedjs_footnote {
float: footnote;
}
```
This style is also added to the default stylesheet `footnotes.css` of this plugin. You can delete it if you have already declared footnotes in your own stylesheet (don't forget to remove it from the `config.json` as well).
## How to use the plugin
Add this folder to `csspageweaver/plugins/`.
Call the plugin in `csspageweaver/manifest.json`:
```json
"plugins": [
"footnotesFix",
// other plugins ...
],
```
## Configuration
In `manifest.json`, you can modify/add some parameters:
```json
"plugins":{
"footnotesFix"
},
"pluginsParameters":{
"footnotesFix": {
"selector": ".footnote",
"reset": ".chapter"
}
},
```
All the parameters are optional.
- `selector` → CSS selector for the note element (must be inline in the HTML), by default is `.footnote`
- `reset` → CSS selector where you want reset note counter. If you want to reset on the page: `page`
## Notes in HTML
In your HTML, the note must be a `<span>` inserted in the text, like this:
```HTML
Donec tincidunt, odio vel vestibulum sollicitudin, nibh dolor tempor sapien, ac laoreet
sem felis ut purus.&#8239;<span class=".footnote">Vestibulum neque ex, ullamcorper sit
amet diam sed, pharetra laoreet sem.</span> Morbi cursus bibendum consectetur. Nullam vel
lacus congue nibh pulvinar maximus sit amet eu risus. Curabitur semper odio mauris, nec
imperdiet velit pharetra non. Aenean accumsan nulla ac ex iaculis interdum.
```
You can use the [inline_notes` plugin](https://gitlab.com/csspageweaver/plugins/inline_notes) to create these span elements from listed notes, which are more common in conversion tools like Pandoc.
The inline_notes plugin should be called before the footnotes plugin in the `manifest.json`:
```json
"plugins": [
"inline_notes",
"footnotes_fix",
// other plugins ...
],
```
## Styling call & footer
It's possible to change the styles of call notes and marker notes directly in your stylesheet like in the following code:
```CSS
::footnote-call{
font-weight: bold;
}
::footnote-marker{
font-weight: bold;
}
```

View file

@ -0,0 +1,9 @@
{
"name": "Footnotes",
"description": "Fix footnote reset",
"author": ["Julie Blanc"],
"licence": "MIT",
"version": "1.0",
"hook": "footnotes.js",
"stylesheet": "footnotes.css"
}

View file

@ -0,0 +1,9 @@
@page {
@footnote {
float: bottom;
}
}
.pagedjs_footnote {
float: footnote;
}

View file

@ -0,0 +1,84 @@
/**
* @name Footnotes
* @file Reset the way footnote are counted
* @author Julie Blanc <contact@julie-blanc.fr>
* @see { @link https://gitlab.com/csspageweaver/plugins/footnotesFix/ }
*/
import { Handler } from '/csspageweaver/lib/paged.esm.js';
export default class footnotes extends Handler {
constructor(chunker, polisher, caller) {
super(chunker, polisher, caller);
this.parameters = cssPageWeaver.features.footnotesFix.parameters;
this.reset = this.parameters?.reset ;
this.counter = 0;
this.selector = this.parameters?.selector || ".footnote";
}
beforeParsed(content) {
let notes = content.querySelectorAll(this.selector);
notes.forEach(function (note, index) {
note.classList.add("pagedjs_footnote");
});
if(this.reset){
let elems = content.querySelectorAll(this.reset);
elems.forEach(function (elem, index) {
var span = document.createElement('span');
span.classList.add("reset-fix-footnote");
span.style.position = "absolute";
elem.insertBefore(span, elem.firstChild);
});
}else{
console.log("[footnotesFix] no reset")
}
}
afterPageLayout(pageElement, page, breakToken){
if(this.reset){
// reset on pages
if(this.reset === "page"){
this.counter = 0;
}
// reset on specific element
let newchapter = pageElement.querySelector('.reset-fix-footnote');
if(newchapter){
this.counter = 0;
}
let footnotes = pageElement.querySelectorAll(".pagedjs_footnote_content [data-note]");
let callnotes = pageElement.querySelectorAll('a.pagedjs_footnote');
callnotes.forEach((call, index) => {
this.counter = this.counter + 1; // increment
let num = this.counter - 1;
// update data-counter for call
call.setAttribute('data-counter-footnote-increment', num);
call.style.counterReset = "footnote " + num;
// update data-counter for marker
let footnote = footnotes[index];
let dataCounter = num + 1;
footnote.setAttribute('data-counter-note', dataCounter);
footnote.style.counterReset = "footnote-marker " + num;
});
}
}
}

View file

@ -11,7 +11,6 @@ export default class inlineNotes extends Handler {
constructor(chunker, polisher, caller) {
super(chunker, polisher, caller);
this.section = cssPageWeaver.features.inlineNotes.parameters?.section || false,
this.input = cssPageWeaver.features.inlineNotes.parameters?.input || ".footnote-ref"; // ← CSS selector of the call element
this.containerNotes = cssPageWeaver.features.inlineNotes.parameters?.containerNotes || "#footnotes"; // ← CSS selector of the container of the footnote
this.newClass = cssPageWeaver.features.inlineNotes.parameters?.newClass || "inline-note"; // ← Class of the span create for the note
@ -22,7 +21,6 @@ export default class inlineNotes extends Handler {
inlineNotesHandler({
content: content,
input: this.input,
section: this.section,
containerNotes: this.containerNotes,
type: this.newClass
});
@ -37,25 +35,13 @@ function inlineNotesHandler(params){
let content = params.content;
let input = params.input;
let type = params.type;
let section = params.section;
let containerNotes = params.containerNotes;
createNotes(content, input, type);
if (section) {
let sections = content.querySelectorAll(section);
sections.forEach(sectionEl => {
createNotes(sectionEl, input, type);
let noteContainer = sectionEl.querySelector(containerNotes);
if (noteContainer) {
noteContainer.remove();
}
});
} else {
createNotes(content, input, type);
let noteContainer = content.querySelector(containerNotes);
if (noteContainer) {
let noteContainer = content.querySelector(params.containerNotes);
if(noteContainer){
noteContainer.remove();
}
}
}
}

View file

@ -13,6 +13,8 @@
<link rel="stylesheet" type="text/css" href="/assets/fonts/HNoaillesTimes/stylesheet.css">
<link rel="stylesheet" type="text/css" href="/assets/fonts/RoutedGothic/stylesheet.css">
<link rel="stylesheet" type="text/css" href="/assets/fonts/ITCCheltenham/style.css">
<link rel="stylesheet" type="text/css" href="/assets/fonts/IvoryMono/stylesheet.css">
</head>
@ -31,10 +33,13 @@
<h2>Un robot-poète ne nous fait toujours pas peur</h2>
<p class="type">Essai</p>
<p class="author">Olivain Porry</p>
<p class="bio">Olivain Porry est artiste, docteur en recherche-création (SACRe) du laboratoire EnsadLab
<div class="bio">
<p class="name">Olivain Porry</p>
<p class="description">est artiste, docteur en recherche-création (SACRe) du laboratoire EnsadLab
(université PSL) et diplômé d'un DNSEP de l'École des Beaux-Arts de Nantes. Son travail plastique se
concentre sur l'émergence, dans une expérience esthétique, de modalités relationnelles entre public,
dispositif artistique et environnement. </p>
</div>
</div>
<p>Entouré dun cadre noir et brillant, posé sur une surface blanche et