debut d'integration de la version terminal
This commit is contained in:
parent
00edad1729
commit
54ce5faf08
146 changed files with 2532 additions and 40285 deletions
32
assets/js/plugins/decor-blockquote.js
Normal file
32
assets/js/plugins/decor-blockquote.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
class blockquoteDecor extends Paged.Handler {
|
||||
constructor(chunker, polisher, caller) {
|
||||
super(chunker, polisher, caller);
|
||||
this.symbol = ".";
|
||||
}
|
||||
afterPageLayout(pageElement, page, breakToken) {
|
||||
let blockquotes = pageElement.querySelectorAll("blockquote");
|
||||
blockquotes.forEach((blockquote) => {
|
||||
const container = document.createElement("div");
|
||||
container.className = "before-blockquote_container";
|
||||
const inner = document.createElement("div");
|
||||
inner.className = "before-blockquote";
|
||||
inner.textContent = this.symbol.repeat(300);
|
||||
container.appendChild(inner);
|
||||
blockquote.insertBefore(container, blockquote.firstChild);
|
||||
container.style.height = `${blockquote.offsetHeight}px`;
|
||||
|
||||
const containerAfter = document.createElement("div");
|
||||
containerAfter.className = "after-blockquote_container";
|
||||
const innerAfter = document.createElement("div");
|
||||
innerAfter.className = "after-blockquote";
|
||||
innerAfter.textContent = this.symbol.repeat(300);
|
||||
containerAfter.appendChild(innerAfter);
|
||||
blockquote.insertBefore(containerAfter, container.nextSibling);
|
||||
containerAfter.style.height = `${blockquote.offsetHeight}px`;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Paged.registerHandlers(blockquoteDecor);
|
||||
Loading…
Add table
Add a link
Reference in a new issue