!publish! shard drafts
This commit is contained in:
parent
b65799c65c
commit
379bf1c250
15 changed files with 443 additions and 148 deletions
|
@ -17,12 +17,12 @@
|
||||||
{{ range $p := .Site.RegularPages }}
|
{{ range $p := .Site.RegularPages }}
|
||||||
{{ $scratch := $s.Get (printf "/%s" $p.File) }}
|
{{ $scratch := $s.Get (printf "/%s" $p.File) }}
|
||||||
{{ if eq $scratch.depth "core" }}
|
{{ if eq $scratch.depth "core" }}
|
||||||
<div class="sitemap" ><div class="{{ with $p.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><a href="{{- $p.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $p.Title}} title="{{- $p.Title -}}"{{- end -}}><span class="sup">{{- substr $p.File.Dir 0 -1 -}}⁄</span>{{- $p.Title -}}</a><a class="svedit" href="{{- printf "%sindex.html#%s" $editFilePath $p.File.UniqueID -}}">[EDIT]</a></div>
|
<div class="sitemap" ><div class="{{ with $p.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><a href="{{- $p.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $p.Title}} title="{{- $p.Title -}}"{{- end -}}><span class="sup">{{- substr $p.File.Dir 0 -1 -}}⁄</span>{{- $p.Title -}}</a></div>
|
||||||
{{ range $coreKid := $scratch.has_children }}
|
{{ range $coreKid := $scratch.has_children }}
|
||||||
<div class="sitemap"><a href="{{- $coreKid.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $coreKid.Title}} title="{{- $coreKid.Title -}}"{{- end -}}><div class="{{ with $coreKid.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><span class="sup">{{- substr $coreKid.File.Dir 0 -1 -}}⁄</span>{{- $coreKid.Title -}}</a><a class="svedit" href="{{- printf "%sindex.html#%s" $editFilePath $coreKid.File.UniqueID -}}">[EDIT]</a></div>
|
<div class="sitemap"><a href="{{- $coreKid.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $coreKid.Title}} title="{{- $coreKid.Title -}}"{{- end -}}><div class="{{ with $coreKid.File }}{{ if eq $currentDir .Dir }}highline{{ end }}{{ end }}"><span class="sup">{{- substr $coreKid.File.Dir 0 -1 -}}⁄</span>{{- $coreKid.Title -}}</a></div>
|
||||||
{{ $scratchCKid := $s.Get (printf "/%s" $coreKid.File) }}
|
{{ $scratchCKid := $s.Get (printf "/%s" $coreKid.File) }}
|
||||||
{{ range $mantleKid := $scratchCKid.has_children }}
|
{{ range $mantleKid := $scratchCKid.has_children }}
|
||||||
<div class="sitemap"><div class="{{ with $mantleKid.File }}{{ if eq $currentDir .Dir }} highline{{ end }}{{ end }}"><a href="{{- $mantleKid.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $mantleKid.Title}} title="{{- $mantleKid.Title -}}"{{- end -}}><span class="sup">{{ with $mantleKid.File }}{{substr .Dir 0 -1 -}}⁄{{ end }}</span>{{- $mantleKid.Title -}}</a><a class="svedit" href="{{- printf "%sindex.html#%s" $editFilePath $mantleKid.File.UniqueID -}}">[EDIT]</a></div></div>
|
<div class="sitemap"><div class="{{ with $mantleKid.File }}{{ if eq $currentDir .Dir }} highline{{ end }}{{ end }}"><a href="{{- $mantleKid.RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with $mantleKid.Title}} title="{{- $mantleKid.Title -}}"{{- end -}}><span class="sup">{{ with $mantleKid.File }}{{substr .Dir 0 -1 -}}⁄{{ end }}</span>{{- $mantleKid.Title -}}</a></div></div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -33,6 +33,6 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ range $noTriad }}
|
{{ range $noTriad }}
|
||||||
<div class="sitemap {{ with .File }}{{ if eq $currentDir .Dir }} highline{{ end }}{{ end }}"><a href="{{- .RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with .Title }} title="{{- . -}}"{{- end -}}><span class="sup">{{- substr .File.Dir 0 -1 -}}⁄</span>{{- .Title -}}</a>{{ if not (or (hasPrefix .File.Dir "edit") (hasPrefix .File.Dir "print")) }}<a class="svedit" href="{{- printf "%sindex.html#%s" $editFilePath .File.UniqueID -}}">[EDIT]</a>{{ end }}</div>
|
<div class="sitemap {{ with .File }}{{ if eq $currentDir .Dir }} highline{{ end }}{{ end }}"><a href="{{- .RelPermalink -}}{{- if eq hugo.Environment "offline" -}}index.html{{- end -}}"{{- with .Title }} title="{{- . -}}"{{- end -}}><span class="sup">{{- substr .File.Dir 0 -1 -}}⁄</span>{{- .Title -}}</a>{{ if not (or (hasPrefix .File.Dir "edit") (hasPrefix .File.Dir "print")) }}{{ end }}</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/**
|
/**
|
||||||
* @license Paged.js v0.3.1 | MIT | https://gitlab.pagedmedia.org/tools/pagedjs
|
* @license Paged.js v0.4.0 | MIT | https://gitlab.pagedmedia.org/tools/pagedjs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
|
@ -698,7 +698,7 @@
|
||||||
let after = elementAfter(node, limiter);
|
let after = elementAfter(node, limiter);
|
||||||
|
|
||||||
while (after && after.dataset.undisplayed) {
|
while (after && after.dataset.undisplayed) {
|
||||||
after = elementAfter(after);
|
after = elementAfter(after, limiter);
|
||||||
}
|
}
|
||||||
|
|
||||||
return after;
|
return after;
|
||||||
|
@ -708,7 +708,7 @@
|
||||||
let before = elementBefore(node, limiter);
|
let before = elementBefore(node, limiter);
|
||||||
|
|
||||||
while (before && before.dataset.undisplayed) {
|
while (before && before.dataset.undisplayed) {
|
||||||
before = elementBefore(before);
|
before = elementBefore(before, limiter);
|
||||||
}
|
}
|
||||||
|
|
||||||
return before;
|
return before;
|
||||||
|
@ -792,12 +792,23 @@
|
||||||
fragment.appendChild(parent);
|
fragment.appendChild(parent);
|
||||||
}
|
}
|
||||||
added.push(parent);
|
added.push(parent);
|
||||||
|
|
||||||
|
// rebuild table rows
|
||||||
|
if (parent.nodeName === "TD" && ancestor.parentElement.contains(ancestor)) {
|
||||||
|
let td = ancestor;
|
||||||
|
let prev = parent;
|
||||||
|
while ((td = td.previousElementSibling)) {
|
||||||
|
let sib = td.cloneNode(false);
|
||||||
|
parent.parentElement.insertBefore(sib, prev);
|
||||||
|
prev = sib;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
added = undefined;
|
added = undefined;
|
||||||
return fragment;
|
return fragment;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
export function split(bound, cutElement, breakAfter) {
|
export function split(bound, cutElement, breakAfter) {
|
||||||
let needsRemoval = [];
|
let needsRemoval = [];
|
||||||
|
@ -1014,7 +1025,7 @@
|
||||||
case "BLOCKQUOTE":
|
case "BLOCKQUOTE":
|
||||||
case "PRE":
|
case "PRE":
|
||||||
case "LI":
|
case "LI":
|
||||||
case "TR":
|
case "TD":
|
||||||
case "DT":
|
case "DT":
|
||||||
case "DD":
|
case "DD":
|
||||||
case "VIDEO":
|
case "VIDEO":
|
||||||
|
@ -1032,14 +1043,18 @@
|
||||||
return n.cloneNode(deep);
|
return n.cloneNode(deep);
|
||||||
}
|
}
|
||||||
|
|
||||||
function findElement(node, doc) {
|
function findElement(node, doc, forceQuery) {
|
||||||
const ref = node.getAttribute("data-ref");
|
const ref = node.getAttribute("data-ref");
|
||||||
return findRef(ref, doc);
|
return findRef(ref, doc, forceQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
function findRef(ref, doc) {
|
function findRef(ref, doc, forceQuery) {
|
||||||
|
if (!forceQuery && doc.indexOfRefs && doc.indexOfRefs[ref]) {
|
||||||
|
return doc.indexOfRefs[ref];
|
||||||
|
} else {
|
||||||
return doc.querySelector(`[data-ref='${ref}']`);
|
return doc.querySelector(`[data-ref='${ref}']`);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function validNode(node) {
|
function validNode(node) {
|
||||||
if (isText(node)) {
|
if (isText(node)) {
|
||||||
|
@ -1255,7 +1270,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Layout
|
* BreakToken
|
||||||
* @class
|
* @class
|
||||||
*/
|
*/
|
||||||
class BreakToken {
|
class BreakToken {
|
||||||
|
@ -1280,6 +1295,30 @@
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toJSON(hash) {
|
||||||
|
let node;
|
||||||
|
let index = 0;
|
||||||
|
if (!this.node) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
if (isElement(this.node) && this.node.dataset.ref) {
|
||||||
|
node = this.node.dataset.ref;
|
||||||
|
} else if (hash) {
|
||||||
|
node = this.node.parentElement.dataset.ref;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.node.parentElement) {
|
||||||
|
const children = Array.from(this.node.parentElement.childNodes);
|
||||||
|
index = children.indexOf(this.node);
|
||||||
|
}
|
||||||
|
|
||||||
|
return JSON.stringify({
|
||||||
|
"node": node,
|
||||||
|
"index" : index,
|
||||||
|
"offset": this.offset
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1313,6 +1352,15 @@
|
||||||
this.element = element;
|
this.element = element;
|
||||||
|
|
||||||
this.bounds = this.element.getBoundingClientRect();
|
this.bounds = this.element.getBoundingClientRect();
|
||||||
|
this.parentBounds = this.element.offsetParent.getBoundingClientRect();
|
||||||
|
let gap = parseFloat(window.getComputedStyle(this.element).columnGap);
|
||||||
|
|
||||||
|
if (gap) {
|
||||||
|
let leftMargin = this.bounds.left - this.parentBounds.left;
|
||||||
|
this.gap = gap - leftMargin;
|
||||||
|
} else {
|
||||||
|
this.gap = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (hooks) {
|
if (hooks) {
|
||||||
this.hooks = hooks;
|
this.hooks = hooks;
|
||||||
|
@ -1369,6 +1417,9 @@
|
||||||
console.warn("Unable to layout item: ", prevNode);
|
console.warn("Unable to layout item: ", prevNode);
|
||||||
return new RenderResult(undefined, new OverflowContentError("Unable to layout item", [prevNode]));
|
return new RenderResult(undefined, new OverflowContentError("Unable to layout item", [prevNode]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.rebuildTableFromBreakToken(newBreakToken, wrapper);
|
||||||
|
|
||||||
return new RenderResult(newBreakToken);
|
return new RenderResult(newBreakToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1387,18 +1438,36 @@
|
||||||
|
|
||||||
if (!newBreakToken) {
|
if (!newBreakToken) {
|
||||||
newBreakToken = this.breakAt(node);
|
newBreakToken = this.breakAt(node);
|
||||||
|
} else {
|
||||||
|
this.rebuildTableFromBreakToken(newBreakToken, wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newBreakToken && newBreakToken.equals(prevBreakToken)) {
|
if (newBreakToken && newBreakToken.equals(prevBreakToken)) {
|
||||||
console.warn("Unable to layout item: ", node);
|
console.warn("Unable to layout item: ", node);
|
||||||
|
let after = newBreakToken.node && nodeAfter(newBreakToken.node);
|
||||||
|
if (after) {
|
||||||
|
newBreakToken = new BreakToken(after);
|
||||||
|
} else {
|
||||||
return new RenderResult(undefined, new OverflowContentError("Unable to layout item", [node]));
|
return new RenderResult(undefined, new OverflowContentError("Unable to layout item", [node]));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
length = 0;
|
length = 0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (node.dataset && node.dataset.page) {
|
||||||
|
let named = node.dataset.page;
|
||||||
|
let page = this.element.closest(".pagedjs_page");
|
||||||
|
page.classList.add("pagedjs_named_page");
|
||||||
|
page.classList.add("pagedjs_" + named + "_page");
|
||||||
|
|
||||||
|
if (!node.dataset.splitFrom) {
|
||||||
|
page.classList.add("pagedjs_" + named + "_first_page");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Should the Node be a shallow or deep clone
|
// Should the Node be a shallow or deep clone
|
||||||
let shallow = isContainer(node);
|
let shallow = isContainer(node);
|
||||||
|
|
||||||
|
@ -1423,6 +1492,8 @@
|
||||||
|
|
||||||
if (!newBreakToken) {
|
if (!newBreakToken) {
|
||||||
newBreakToken = this.breakAt(node);
|
newBreakToken = this.breakAt(node);
|
||||||
|
} else {
|
||||||
|
this.rebuildTableFromBreakToken(newBreakToken, wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
length = 0;
|
length = 0;
|
||||||
|
@ -1443,13 +1514,19 @@
|
||||||
|
|
||||||
newBreakToken = this.findBreakToken(wrapper, source, bounds, prevBreakToken);
|
newBreakToken = this.findBreakToken(wrapper, source, bounds, prevBreakToken);
|
||||||
|
|
||||||
if (newBreakToken && newBreakToken.equals(prevBreakToken)) {
|
|
||||||
console.warn("Unable to layout item: ", node);
|
|
||||||
return new RenderResult(undefined, new OverflowContentError("Unable to layout item", [node]));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newBreakToken) {
|
if (newBreakToken) {
|
||||||
length = 0;
|
length = 0;
|
||||||
|
this.rebuildTableFromBreakToken(newBreakToken, wrapper);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newBreakToken && newBreakToken.equals(prevBreakToken)) {
|
||||||
|
console.warn("Unable to layout item: ", node);
|
||||||
|
let after = newBreakToken.node && nodeAfter(newBreakToken.node);
|
||||||
|
if (after) {
|
||||||
|
newBreakToken = new BreakToken(after);
|
||||||
|
} else {
|
||||||
|
return new RenderResult(undefined, new OverflowContentError("Unable to layout item", [node]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1534,6 +1611,13 @@
|
||||||
dest.appendChild(clone);
|
dest.appendChild(clone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (clone.dataset && clone.dataset.ref) {
|
||||||
|
if (!dest.indexOfRefs) {
|
||||||
|
dest.indexOfRefs = {};
|
||||||
|
}
|
||||||
|
dest.indexOfRefs[clone.dataset.ref] = clone;
|
||||||
|
}
|
||||||
|
|
||||||
let nodeHooks = this.hooks.renderNode.triggerSync(clone, node, this);
|
let nodeHooks = this.hooks.renderNode.triggerSync(clone, node, this);
|
||||||
nodeHooks.forEach((newNode) => {
|
nodeHooks.forEach((newNode) => {
|
||||||
if (typeof newNode != "undefined") {
|
if (typeof newNode != "undefined") {
|
||||||
|
@ -1544,6 +1628,23 @@
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rebuildTableFromBreakToken(breakToken, dest) {
|
||||||
|
if (!breakToken || !breakToken.node) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let node = breakToken.node;
|
||||||
|
let td = isElement(node) ? node.closest("td") : node.parentElement.closest("td");
|
||||||
|
if (td) {
|
||||||
|
let rendered = findElement(td, dest, true);
|
||||||
|
if (!rendered) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
while ((td = td.nextElementSibling)) {
|
||||||
|
this.append(td, dest, null, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async waitForImages(imgs) {
|
async waitForImages(imgs) {
|
||||||
let results = Array.from(imgs).map(async (img) => {
|
let results = Array.from(imgs).map(async (img) => {
|
||||||
return this.awaitImageLoaded(img);
|
return this.awaitImageLoaded(img);
|
||||||
|
@ -1723,16 +1824,20 @@
|
||||||
|
|
||||||
hasOverflow(element, bounds = this.bounds) {
|
hasOverflow(element, bounds = this.bounds) {
|
||||||
let constrainingElement = element && element.parentNode; // this gets the element, instead of the wrapper for the width workaround
|
let constrainingElement = element && element.parentNode; // this gets the element, instead of the wrapper for the width workaround
|
||||||
let {width} = element.getBoundingClientRect();
|
let {width, height} = element.getBoundingClientRect();
|
||||||
let scrollWidth = constrainingElement ? constrainingElement.scrollWidth : 0;
|
let scrollWidth = constrainingElement ? constrainingElement.scrollWidth : 0;
|
||||||
return Math.max(Math.floor(width), scrollWidth) > Math.round(bounds.width);
|
let scrollHeight = constrainingElement ? constrainingElement.scrollHeight : 0;
|
||||||
|
return Math.max(Math.floor(width), scrollWidth) > Math.round(bounds.width) ||
|
||||||
|
Math.max(Math.floor(height), scrollHeight) > Math.round(bounds.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
findOverflow(rendered, bounds = this.bounds) {
|
findOverflow(rendered, bounds = this.bounds, gap = this.gap) {
|
||||||
if (!this.hasOverflow(rendered, bounds)) return;
|
if (!this.hasOverflow(rendered, bounds)) return;
|
||||||
|
|
||||||
let start = Math.round(bounds.left);
|
let start = Math.floor(bounds.left);
|
||||||
let end = Math.round(bounds.right);
|
let end = Math.round(bounds.right + gap);
|
||||||
|
let vStart = Math.round(bounds.top);
|
||||||
|
let vEnd = Math.round(bounds.bottom);
|
||||||
let range;
|
let range;
|
||||||
|
|
||||||
let walker = walk$2(rendered.firstChild, rendered);
|
let walker = walk$2(rendered.firstChild, rendered);
|
||||||
|
@ -1752,8 +1857,10 @@
|
||||||
let pos = getBoundingClientRect(node);
|
let pos = getBoundingClientRect(node);
|
||||||
let left = Math.round(pos.left);
|
let left = Math.round(pos.left);
|
||||||
let right = Math.floor(pos.right);
|
let right = Math.floor(pos.right);
|
||||||
|
let top = Math.round(pos.top);
|
||||||
|
let bottom = Math.floor(pos.bottom);
|
||||||
|
|
||||||
if (!range && left >= end) {
|
if (!range && (left >= end || top >= vEnd)) {
|
||||||
// Check if it is a float
|
// Check if it is a float
|
||||||
let isFloat = false;
|
let isFloat = false;
|
||||||
|
|
||||||
|
@ -1761,7 +1868,8 @@
|
||||||
const insideTableCell = parentOf(node, "TD", rendered);
|
const insideTableCell = parentOf(node, "TD", rendered);
|
||||||
if (insideTableCell && window.getComputedStyle(insideTableCell)["break-inside"] === "avoid") {
|
if (insideTableCell && window.getComputedStyle(insideTableCell)["break-inside"] === "avoid") {
|
||||||
// breaking inside a table cell produces unexpected result, as a workaround, we forcibly avoid break inside in a cell.
|
// breaking inside a table cell produces unexpected result, as a workaround, we forcibly avoid break inside in a cell.
|
||||||
prev = insideTableCell;
|
// But we take the whole row, not just the cell that is causing the break.
|
||||||
|
prev = insideTableCell.parentElement;
|
||||||
} else if (isElement(node)) {
|
} else if (isElement(node)) {
|
||||||
let styles = window.getComputedStyle(node);
|
let styles = window.getComputedStyle(node);
|
||||||
isFloat = styles.getPropertyValue("float") !== "none";
|
isFloat = styles.getPropertyValue("float") !== "none";
|
||||||
|
@ -1787,23 +1895,24 @@
|
||||||
|
|
||||||
// Check if the node is inside a row with a rowspan
|
// Check if the node is inside a row with a rowspan
|
||||||
const table = parentOf(tableRow, "TABLE", rendered);
|
const table = parentOf(tableRow, "TABLE", rendered);
|
||||||
if (table) {
|
const rowspan = table.querySelector("[colspan]");
|
||||||
|
if (table && rowspan) {
|
||||||
let columnCount = 0;
|
let columnCount = 0;
|
||||||
for (const cell of Array.from(table.rows[0].cells)) {
|
for (const cell of Array.from(table.rows[0].cells)) {
|
||||||
columnCount += parseInt(cell.getAttribute("COLSPAN") || "1");
|
columnCount += parseInt(cell.getAttribute("colspan") || "1");
|
||||||
}
|
}
|
||||||
if (tableRow.cells.length !== columnCount) {
|
if (tableRow.cells.length !== columnCount) {
|
||||||
let previousRow = tableRow.previousSibling;
|
let previousRow = tableRow.previousElementSibling;
|
||||||
let previousRowColumnCount;
|
let previousRowColumnCount;
|
||||||
while (previousRow !== null) {
|
while (previousRow !== null) {
|
||||||
previousRowColumnCount = 0;
|
previousRowColumnCount = 0;
|
||||||
for (const cell of Array.from(previousRow.cells)) {
|
for (const cell of Array.from(previousRow.cells)) {
|
||||||
previousRowColumnCount += parseInt(cell.getAttribute("COLSPAN") || "1");
|
previousRowColumnCount += parseInt(cell.getAttribute("colspan") || "1");
|
||||||
}
|
}
|
||||||
if (previousRowColumnCount === columnCount) {
|
if (previousRowColumnCount === columnCount) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
previousRow = previousRow.previousSibling;
|
previousRow = previousRow.previousElementSibling;
|
||||||
}
|
}
|
||||||
if (previousRowColumnCount === columnCount) {
|
if (previousRowColumnCount === columnCount) {
|
||||||
prev = previousRow;
|
prev = previousRow;
|
||||||
|
@ -1839,16 +1948,20 @@
|
||||||
let rects = getClientRects(node);
|
let rects = getClientRects(node);
|
||||||
let rect;
|
let rect;
|
||||||
left = 0;
|
left = 0;
|
||||||
|
top = 0;
|
||||||
for (var i = 0; i != rects.length; i++) {
|
for (var i = 0; i != rects.length; i++) {
|
||||||
rect = rects[i];
|
rect = rects[i];
|
||||||
if (rect.width > 0 && (!left || rect.left > left)) {
|
if (rect.width > 0 && (!left || rect.left > left)) {
|
||||||
left = rect.left;
|
left = rect.left;
|
||||||
}
|
}
|
||||||
|
if (rect.height > 0 && (!top || rect.top > top)) {
|
||||||
|
top = rect.top;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (left >= end) {
|
if (left >= end || top >= vEnd) {
|
||||||
range = document.createRange();
|
range = document.createRange();
|
||||||
offset = this.textBreak(node, start, end);
|
offset = this.textBreak(node, start, end, vStart, vEnd);
|
||||||
if (!offset) {
|
if (!offset) {
|
||||||
range = undefined;
|
range = undefined;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1859,7 +1972,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip children
|
// Skip children
|
||||||
if (skip || right <= end) {
|
if (skip || (right <= end && bottom <= vEnd)) {
|
||||||
next = nodeAfter(node, rendered);
|
next = nodeAfter(node, rendered);
|
||||||
if (next) {
|
if (next) {
|
||||||
walker = walk$2(next, rendered);
|
walker = walk$2(next, rendered);
|
||||||
|
@ -1878,7 +1991,7 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
findEndToken(rendered, source, bounds = this.bounds) {
|
findEndToken(rendered, source) {
|
||||||
if (rendered.childNodes.length === 0) {
|
if (rendered.childNodes.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1920,10 +2033,12 @@
|
||||||
return this.breakAt(after);
|
return this.breakAt(after);
|
||||||
}
|
}
|
||||||
|
|
||||||
textBreak(node, start, end) {
|
textBreak(node, start, end, vStart, vEnd) {
|
||||||
let wordwalker = words(node);
|
let wordwalker = words(node);
|
||||||
let left = 0;
|
let left = 0;
|
||||||
let right = 0;
|
let right = 0;
|
||||||
|
let top = 0;
|
||||||
|
let bottom = 0;
|
||||||
let word, next, done, pos;
|
let word, next, done, pos;
|
||||||
let offset;
|
let offset;
|
||||||
while (!done) {
|
while (!done) {
|
||||||
|
@ -1939,13 +2054,15 @@
|
||||||
|
|
||||||
left = Math.floor(pos.left);
|
left = Math.floor(pos.left);
|
||||||
right = Math.floor(pos.right);
|
right = Math.floor(pos.right);
|
||||||
|
top = Math.floor(pos.top);
|
||||||
|
bottom = Math.floor(pos.bottom);
|
||||||
|
|
||||||
if (left >= end) {
|
if (left >= end || top >= vEnd) {
|
||||||
offset = word.startOffset;
|
offset = word.startOffset;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (right > end) {
|
if (right > end || bottom > vEnd) {
|
||||||
let letterwalker = letters(word);
|
let letterwalker = letters(word);
|
||||||
let letter, nextLetter, doneLetter;
|
let letter, nextLetter, doneLetter;
|
||||||
|
|
||||||
|
@ -1960,8 +2077,9 @@
|
||||||
|
|
||||||
pos = getBoundingClientRect(letter);
|
pos = getBoundingClientRect(letter);
|
||||||
left = Math.floor(pos.left);
|
left = Math.floor(pos.left);
|
||||||
|
top = Math.floor(pos.top);
|
||||||
|
|
||||||
if (left >= end) {
|
if (left >= end || top >= vEnd) {
|
||||||
offset = letter.startOffset;
|
offset = letter.startOffset;
|
||||||
done = true;
|
done = true;
|
||||||
|
|
||||||
|
@ -2060,7 +2178,7 @@
|
||||||
|
|
||||||
|
|
||||||
area.style.columnWidth = Math.round(size.width) + "px";
|
area.style.columnWidth = Math.round(size.width) + "px";
|
||||||
area.style.columnGap = "calc(var(--pagedjs-margin-right) + var(--pagedjs-margin-left))";
|
area.style.columnGap = "calc(var(--pagedjs-margin-right) + var(--pagedjs-margin-left) + var(--pagedjs-bleed-right) + var(--pagedjs-bleed-left) + var(--pagedjs-column-gap-offset))";
|
||||||
// area.style.overflow = "scroll";
|
// area.style.overflow = "scroll";
|
||||||
|
|
||||||
this.width = Math.round(size.width);
|
this.width = Math.round(size.width);
|
||||||
|
@ -2677,6 +2795,7 @@
|
||||||
this.hooks.afterOverflowRemoved = new Hook(this);
|
this.hooks.afterOverflowRemoved = new Hook(this);
|
||||||
this.hooks.onBreakToken = new Hook();
|
this.hooks.onBreakToken = new Hook();
|
||||||
this.hooks.afterPageLayout = new Hook(this);
|
this.hooks.afterPageLayout = new Hook(this);
|
||||||
|
this.hooks.finalizePage = new Hook(this);
|
||||||
this.hooks.afterRendered = new Hook(this);
|
this.hooks.afterRendered = new Hook(this);
|
||||||
|
|
||||||
this.pages = [];
|
this.pages = [];
|
||||||
|
@ -2883,12 +3002,14 @@
|
||||||
this.emit("page", page);
|
this.emit("page", page);
|
||||||
// await this.hooks.layout.trigger(page.element, page, undefined, this);
|
// await this.hooks.layout.trigger(page.element, page, undefined, this);
|
||||||
await this.hooks.afterPageLayout.trigger(page.element, page, undefined, this);
|
await this.hooks.afterPageLayout.trigger(page.element, page, undefined, this);
|
||||||
|
await this.hooks.finalizePage.trigger(page.element, page, undefined, this);
|
||||||
this.emit("renderedPage", page);
|
this.emit("renderedPage", page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async *layout(content, startAt) {
|
async *layout(content, startAt) {
|
||||||
let breakToken = startAt || false;
|
let breakToken = startAt || false;
|
||||||
|
let tokens = [];
|
||||||
|
|
||||||
while (breakToken !== undefined && (true)) {
|
while (breakToken !== undefined && (true)) {
|
||||||
|
|
||||||
|
@ -2906,7 +3027,20 @@
|
||||||
// Layout content in the page, starting from the breakToken
|
// Layout content in the page, starting from the breakToken
|
||||||
breakToken = await page.layout(content, breakToken, this.maxChars);
|
breakToken = await page.layout(content, breakToken, this.maxChars);
|
||||||
|
|
||||||
|
if (breakToken) {
|
||||||
|
let newToken = breakToken.toJSON(true);
|
||||||
|
if (tokens.lastIndexOf(newToken) > -1) {
|
||||||
|
// loop
|
||||||
|
let err = new OverflowContentError("Layout repeated", [breakToken.node]);
|
||||||
|
console.error("Layout repeated at: ", breakToken.node);
|
||||||
|
return err;
|
||||||
|
} else {
|
||||||
|
tokens.push(newToken);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
await this.hooks.afterPageLayout.trigger(page.element, page, breakToken, this);
|
await this.hooks.afterPageLayout.trigger(page.element, page, breakToken, this);
|
||||||
|
await this.hooks.finalizePage.trigger(page.element, page, undefined, this);
|
||||||
this.emit("renderedPage", page);
|
this.emit("renderedPage", page);
|
||||||
|
|
||||||
this.recoredCharLength(page.wrapper.textContent.length);
|
this.recoredCharLength(page.wrapper.textContent.length);
|
||||||
|
@ -3077,6 +3211,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.hooks.afterPageLayout.trigger(page.element, page, undefined, this);
|
await this.hooks.afterPageLayout.trigger(page.element, page, undefined, this);
|
||||||
|
await this.hooks.finalizePage.trigger(page.element, page, undefined, this);
|
||||||
this.emit("renderedPage", page);
|
this.emit("renderedPage", page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26299,9 +26434,10 @@
|
||||||
|
|
||||||
insertRule(rule) {
|
insertRule(rule) {
|
||||||
let inserted = this.ast.children.appendData(rule);
|
let inserted = this.ast.children.appendData(rule);
|
||||||
inserted.forEach((item) => {
|
|
||||||
this.declarations(item);
|
this.declarations(rule);
|
||||||
});
|
|
||||||
|
return inserted;
|
||||||
}
|
}
|
||||||
|
|
||||||
urls(ast) {
|
urls(ast) {
|
||||||
|
@ -26342,7 +26478,6 @@
|
||||||
lib.walk(ast, {
|
lib.walk(ast, {
|
||||||
visit: "Rule",
|
visit: "Rule",
|
||||||
enter: (ruleNode, ruleItem, rulelist) => {
|
enter: (ruleNode, ruleItem, rulelist) => {
|
||||||
// console.log("rule", ruleNode);
|
|
||||||
|
|
||||||
this.hooks.onRule.trigger(ruleNode, ruleItem, rulelist);
|
this.hooks.onRule.trigger(ruleNode, ruleItem, rulelist);
|
||||||
this.declarations(ruleNode, ruleItem, rulelist);
|
this.declarations(ruleNode, ruleItem, rulelist);
|
||||||
|
@ -26356,7 +26491,6 @@
|
||||||
lib.walk(ruleNode, {
|
lib.walk(ruleNode, {
|
||||||
visit: "Declaration",
|
visit: "Declaration",
|
||||||
enter: (declarationNode, dItem, dList) => {
|
enter: (declarationNode, dItem, dList) => {
|
||||||
// console.log(declarationNode);
|
|
||||||
|
|
||||||
this.hooks.onDeclaration.trigger(declarationNode, dItem, dList, {ruleNode, ruleItem, rulelist});
|
this.hooks.onDeclaration.trigger(declarationNode, dItem, dList, {ruleNode, ruleItem, rulelist});
|
||||||
|
|
||||||
|
@ -26583,6 +26717,7 @@
|
||||||
--pagedjs-page-count: 0;
|
--pagedjs-page-count: 0;
|
||||||
--pagedjs-page-counter-increment: 1;
|
--pagedjs-page-counter-increment: 1;
|
||||||
--pagedjs-footnotes-count: 0;
|
--pagedjs-footnotes-count: 0;
|
||||||
|
--pagedjs-column-gap-offset: 1000px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@page {
|
@page {
|
||||||
|
@ -27607,7 +27742,8 @@
|
||||||
backgroundOrigin: undefined,
|
backgroundOrigin: undefined,
|
||||||
block: {},
|
block: {},
|
||||||
marks: undefined,
|
marks: undefined,
|
||||||
notes: undefined
|
notes: undefined,
|
||||||
|
added: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27635,6 +27771,8 @@
|
||||||
page = this.pages[selector];
|
page = this.pages[selector];
|
||||||
marginalia = this.replaceMarginalia(node);
|
marginalia = this.replaceMarginalia(node);
|
||||||
needsMerge = true;
|
needsMerge = true;
|
||||||
|
// Mark page for getting classes added again
|
||||||
|
page.added = false;
|
||||||
} else {
|
} else {
|
||||||
page = this.pageModel(selector);
|
page = this.pageModel(selector);
|
||||||
marginalia = this.replaceMarginalia(node);
|
marginalia = this.replaceMarginalia(node);
|
||||||
|
@ -27754,9 +27892,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
afterTreeWalk(ast, sheet) {
|
afterTreeWalk(ast, sheet) {
|
||||||
|
let dirtyPage = "*" in this.pages && this.pages["*"].added === false;
|
||||||
|
|
||||||
this.addPageClasses(this.pages, ast, sheet);
|
this.addPageClasses(this.pages, ast, sheet);
|
||||||
|
|
||||||
if ("*" in this.pages) {
|
if (dirtyPage) {
|
||||||
let width = this.pages["*"].width;
|
let width = this.pages["*"].width;
|
||||||
let height = this.pages["*"].height;
|
let height = this.pages["*"].height;
|
||||||
let format = this.pages["*"].format;
|
let format = this.pages["*"].format;
|
||||||
|
@ -28202,41 +28342,48 @@
|
||||||
|
|
||||||
addPageClasses(pages, ast, sheet) {
|
addPageClasses(pages, ast, sheet) {
|
||||||
// First add * page
|
// First add * page
|
||||||
if ("*" in pages) {
|
if ("*" in pages && pages["*"].added === false) {
|
||||||
let p = this.createPage(pages["*"], ast.children, sheet);
|
let p = this.createPage(pages["*"], ast.children, sheet);
|
||||||
sheet.insertRule(p);
|
sheet.insertRule(p);
|
||||||
|
pages["*"].added = true;
|
||||||
}
|
}
|
||||||
// Add :left & :right
|
// Add :left & :right
|
||||||
if (":left" in pages) {
|
if (":left" in pages && pages[":left"].added === false) {
|
||||||
let left = this.createPage(pages[":left"], ast.children, sheet);
|
let left = this.createPage(pages[":left"], ast.children, sheet);
|
||||||
sheet.insertRule(left);
|
sheet.insertRule(left);
|
||||||
|
pages[":left"].added = true;
|
||||||
}
|
}
|
||||||
if (":right" in pages) {
|
if (":right" in pages && pages[":right"].added === false) {
|
||||||
let right = this.createPage(pages[":right"], ast.children, sheet);
|
let right = this.createPage(pages[":right"], ast.children, sheet);
|
||||||
sheet.insertRule(right);
|
sheet.insertRule(right);
|
||||||
|
pages[":right"].added = true;
|
||||||
}
|
}
|
||||||
// Add :first & :blank
|
// Add :first & :blank
|
||||||
if (":first" in pages) {
|
if (":first" in pages && pages[":first"].added === false) {
|
||||||
let first = this.createPage(pages[":first"], ast.children, sheet);
|
let first = this.createPage(pages[":first"], ast.children, sheet);
|
||||||
sheet.insertRule(first);
|
sheet.insertRule(first);
|
||||||
|
pages[":first"].added = true;
|
||||||
}
|
}
|
||||||
if (":blank" in pages) {
|
if (":blank" in pages && pages[":blank"].added === false) {
|
||||||
let blank = this.createPage(pages[":blank"], ast.children, sheet);
|
let blank = this.createPage(pages[":blank"], ast.children, sheet);
|
||||||
sheet.insertRule(blank);
|
sheet.insertRule(blank);
|
||||||
|
pages[":blank"].added = true;
|
||||||
}
|
}
|
||||||
// Add nth pages
|
// Add nth pages
|
||||||
for (let pg in pages) {
|
for (let pg in pages) {
|
||||||
if (pages[pg].nth) {
|
if (pages[pg].nth && pages[pg].added === false) {
|
||||||
let nth = this.createPage(pages[pg], ast.children, sheet);
|
let nth = this.createPage(pages[pg], ast.children, sheet);
|
||||||
sheet.insertRule(nth);
|
sheet.insertRule(nth);
|
||||||
|
pages[pg].added = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add named pages
|
// Add named pages
|
||||||
for (let pg in pages) {
|
for (let pg in pages) {
|
||||||
if (pages[pg].name) {
|
if (pages[pg].name && pages[pg].added === false) {
|
||||||
let named = this.createPage(pages[pg], ast.children, sheet);
|
let named = this.createPage(pages[pg], ast.children, sheet);
|
||||||
sheet.insertRule(named);
|
sheet.insertRule(named);
|
||||||
|
pages[pg].added = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29220,9 +29367,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
addPageAttributes(page, start, pages) {
|
addPageAttributes(page, start, pages) {
|
||||||
let named = start.dataset.page;
|
let namedPages = [start.dataset.page];
|
||||||
|
|
||||||
if (named) {
|
if (namedPages && namedPages.length) {
|
||||||
|
for (const named of namedPages) {
|
||||||
|
if (!named) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
page.name = named;
|
page.name = named;
|
||||||
page.element.classList.add("pagedjs_named_page");
|
page.element.classList.add("pagedjs_named_page");
|
||||||
page.element.classList.add("pagedjs_" + named + "_page");
|
page.element.classList.add("pagedjs_" + named + "_page");
|
||||||
|
@ -29232,6 +29383,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
getStartElement(content, breakToken) {
|
getStartElement(content, breakToken) {
|
||||||
let node = breakToken && breakToken.node;
|
let node = breakToken && breakToken.node;
|
||||||
|
@ -29274,7 +29426,7 @@
|
||||||
// page.element.querySelector('.paged_area').style.color = red;
|
// page.element.querySelector('.paged_area').style.color = red;
|
||||||
}
|
}
|
||||||
|
|
||||||
afterPageLayout(fragment, page, breakToken, chunker) {
|
finalizePage(fragment, page, breakToken, chunker) {
|
||||||
for (let m in this.marginalia) {
|
for (let m in this.marginalia) {
|
||||||
let margin = this.marginalia[m];
|
let margin = this.marginalia[m];
|
||||||
let sels = m.split(" ");
|
let sels = m.split(" ");
|
||||||
|
@ -29908,21 +30060,45 @@
|
||||||
onAtMedia(node, item, list) {
|
onAtMedia(node, item, list) {
|
||||||
let media = this.getMediaName(node);
|
let media = this.getMediaName(node);
|
||||||
let rules;
|
let rules;
|
||||||
|
if (media.includes("print")) {
|
||||||
if (media === "print") {
|
|
||||||
rules = node.block.children;
|
rules = node.block.children;
|
||||||
|
|
||||||
// Remove rules from the @media block
|
// Append rules to the end of main rules list
|
||||||
node.block.children = new lib.List();
|
// TODO: this isn't working right, needs to check what is in the prelude
|
||||||
|
/*
|
||||||
|
rules.forEach((selectList) => {
|
||||||
|
if (selectList.prelude) {
|
||||||
|
selectList.prelude.children.forEach((rule) => {
|
||||||
|
|
||||||
|
rule.children.prependData({
|
||||||
|
type: "Combinator",
|
||||||
|
name: " "
|
||||||
|
});
|
||||||
|
|
||||||
|
rule.children.prependData({
|
||||||
|
type: "ClassSelector",
|
||||||
|
name: "pagedjs_page"
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
list.insertList(rules, item);
|
||||||
|
*/
|
||||||
|
|
||||||
// Append rules to the end of main rules list
|
// Append rules to the end of main rules list
|
||||||
list.appendList(rules);
|
list.appendList(rules);
|
||||||
|
|
||||||
|
// Remove rules from the @media block
|
||||||
|
list.remove(item);
|
||||||
|
} else if (!media.includes("all") && !media.includes("pagedjs-ignore")) {
|
||||||
|
list.remove(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getMediaName(node) {
|
getMediaName(node) {
|
||||||
let media = "";
|
let media = [];
|
||||||
|
|
||||||
if (typeof node.prelude === "undefined" ||
|
if (typeof node.prelude === "undefined" ||
|
||||||
node.prelude.type !== "AtrulePrelude" ) {
|
node.prelude.type !== "AtrulePrelude" ) {
|
||||||
|
@ -29932,7 +30108,7 @@
|
||||||
lib.walk(node.prelude, {
|
lib.walk(node.prelude, {
|
||||||
visit: "Identifier",
|
visit: "Identifier",
|
||||||
enter: (identNode, iItem, iList) => {
|
enter: (identNode, iItem, iList) => {
|
||||||
media = identNode.name;
|
media.push(identNode.name);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return media;
|
return media;
|
||||||
|
@ -31143,9 +31319,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var pagedMediaHandlers = [
|
var pagedMediaHandlers = [
|
||||||
|
PrintMedia,
|
||||||
AtPage,
|
AtPage,
|
||||||
Breaks,
|
Breaks,
|
||||||
PrintMedia,
|
|
||||||
Splits,
|
Splits,
|
||||||
Counters,
|
Counters,
|
||||||
Lists,
|
Lists,
|
||||||
|
@ -31242,7 +31418,6 @@
|
||||||
afterPageLayout(fragment) {
|
afterPageLayout(fragment) {
|
||||||
for (let name of Object.keys(this.runningSelectors)) {
|
for (let name of Object.keys(this.runningSelectors)) {
|
||||||
let set = this.runningSelectors[name];
|
let set = this.runningSelectors[name];
|
||||||
if (!set.first) {
|
|
||||||
let selected = fragment.querySelector(set.selector);
|
let selected = fragment.querySelector(set.selector);
|
||||||
if (selected) {
|
if (selected) {
|
||||||
// let cssVar;
|
// let cssVar;
|
||||||
|
@ -31256,7 +31431,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// move elements
|
// move elements
|
||||||
if (!this.orderedSelectors) {
|
if (!this.orderedSelectors) {
|
||||||
|
@ -31413,21 +31587,35 @@
|
||||||
if (declaration.property === "string-set") {
|
if (declaration.property === "string-set") {
|
||||||
let selector = lib.generate(rule.ruleNode.prelude);
|
let selector = lib.generate(rule.ruleNode.prelude);
|
||||||
|
|
||||||
let identifier = declaration.value.children.first().name;
|
let identifiers = [];
|
||||||
|
let functions = [];
|
||||||
|
let values = [];
|
||||||
|
|
||||||
let value;
|
declaration.value.children.forEach((child) => {
|
||||||
lib.walk(declaration, {
|
if (child.type === "Identifier") {
|
||||||
visit: "Function",
|
identifiers.push(child.name);
|
||||||
enter: (node, item, list) => {
|
}
|
||||||
value = lib.generate(node);
|
if (child.type === "Function") {
|
||||||
|
functions.push(child.name);
|
||||||
|
child.children.forEach((subchild) => {
|
||||||
|
if (subchild.type === "Identifier") {
|
||||||
|
values.push(subchild.name);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
identifiers.forEach((identifier, index) => {
|
||||||
|
let func = functions[index];
|
||||||
|
let value = values[index];
|
||||||
this.stringSetSelectors[identifier] = {
|
this.stringSetSelectors[identifier] = {
|
||||||
identifier,
|
identifier,
|
||||||
|
func,
|
||||||
value,
|
value,
|
||||||
selector
|
selector
|
||||||
};
|
};
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31472,6 +31660,8 @@
|
||||||
for (let name of Object.keys(this.stringSetSelectors)) {
|
for (let name of Object.keys(this.stringSetSelectors)) {
|
||||||
|
|
||||||
let set = this.stringSetSelectors[name];
|
let set = this.stringSetSelectors[name];
|
||||||
|
let value = set.value;
|
||||||
|
let func = set.func;
|
||||||
let selected = fragment.querySelectorAll(set.selector);
|
let selected = fragment.querySelectorAll(set.selector);
|
||||||
|
|
||||||
// Get the last found string for the current identifier
|
// Get the last found string for the current identifier
|
||||||
|
@ -31489,18 +31679,36 @@
|
||||||
|
|
||||||
selected.forEach((sel) => {
|
selected.forEach((sel) => {
|
||||||
// push each content into the array to define in the variable the first and the last element of the page.
|
// push each content into the array to define in the variable the first and the last element of the page.
|
||||||
|
if (func === "content") {
|
||||||
this.pageLastString[name] = selected[selected.length - 1].textContent;
|
this.pageLastString[name] = selected[selected.length - 1].textContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (func === "attr") {
|
||||||
|
this.pageLastString[name] = selected[selected.length - 1].getAttribute(value) || "";
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/* FIRST */
|
/* FIRST */
|
||||||
|
|
||||||
|
if (func === "content") {
|
||||||
varFirst = selected[0].textContent;
|
varFirst = selected[0].textContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (func === "attr") {
|
||||||
|
varFirst = selected[0].getAttribute(value) || "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* LAST */
|
/* LAST */
|
||||||
|
|
||||||
|
if (func === "content") {
|
||||||
varLast = selected[selected.length - 1].textContent;
|
varLast = selected[selected.length - 1].textContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (func === "attr") {
|
||||||
|
varLast = selected[selected.length - 1].getAttribute(value) || "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* START */
|
/* START */
|
||||||
|
@ -32703,9 +32911,9 @@
|
||||||
|
|
||||||
removeStyles(doc=document) {
|
removeStyles(doc=document) {
|
||||||
// Get all stylesheets
|
// Get all stylesheets
|
||||||
const stylesheets = Array.from(doc.querySelectorAll("link[rel='stylesheet']"));
|
const stylesheets = Array.from(doc.querySelectorAll("link[rel='stylesheet']:not([data-pagedjs-ignore], [media~='screen'])"));
|
||||||
// Get inline styles
|
// Get inline styles
|
||||||
const inlineStyles = Array.from(doc.querySelectorAll("style:not([data-pagedjs-inserted-styles])"));
|
const inlineStyles = Array.from(doc.querySelectorAll("style:not([data-pagedjs-inserted-styles], [data-pagedjs-ignore], [media~='screen'])"));
|
||||||
const elements = [...stylesheets, ...inlineStyles];
|
const elements = [...stylesheets, ...inlineStyles];
|
||||||
return elements
|
return elements
|
||||||
// preserve order
|
// preserve order
|
||||||
|
@ -32779,6 +32987,7 @@
|
||||||
Polisher: Polisher,
|
Polisher: Polisher,
|
||||||
Previewer: Previewer,
|
Previewer: Previewer,
|
||||||
Handler: Handler,
|
Handler: Handler,
|
||||||
|
registeredHandlers: registeredHandlers,
|
||||||
registerHandlers: registerHandlers,
|
registerHandlers: registerHandlers,
|
||||||
initializeHandlers: initializeHandlers
|
initializeHandlers: initializeHandlers
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20221203175319-0ad4a4e76088
|
# git.sandpoints.org/Drawwell/SandpointsTheme v0.0.0-20221213002730-193934cadf4d
|
||||||
# git.sandpoints.org/Drawwell/SandpointsEditPage v0.0.0-20210825011616-e019d8a4d186
|
# git.sandpoints.org/Drawwell/SandpointsEditPage v0.0.0-20210825011616-e019d8a4d186
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
+++
|
+++
|
||||||
title = "Ubu"
|
title = "Ubu"
|
||||||
has_reflections = ["shardslist.md", "cristobal.md", "endtimes.md", "relational.md"]
|
glassblowers = ["alessandroludovico.md", "cristobalsciutto.md", "custodiansonline.md", "marcellmars.md", "olgagoriunova.md", "sasasavanovic.md", "sreckohorvat.md", "tomislavmedak.md"]
|
||||||
|
has_reflections = ["endtimes.md", "relational.md", "cristobal.md"]
|
||||||
+++
|
+++
|
||||||
|
|
||||||
# Ambient
|
# Ambient
|
||||||
|
@ -19,7 +20,7 @@ Our collective publication emerges from that initial sharing of texts and though
|
||||||
|
|
||||||
A lot of us approach the task of writing a text first by jotting down some notes. Those notes often have references to items in the catalog/bibliography. Notes relate to each other. More often than not, notes get dropped, with the hope they might better serve us in the future in another process of writing.
|
A lot of us approach the task of writing a text first by jotting down some notes. Those notes often have references to items in the catalog/bibliography. Notes relate to each other. More often than not, notes get dropped, with the hope they might better serve us in the future in another process of writing.
|
||||||
|
|
||||||
We like to understand our notes as shards. Shared shards. Shards collected/curated together build a reflection. We encourage editing someone else's shard or picking it up for your own reflection(s). Collective writing is hard but such guestures could help. That's our hope at least.
|
We like to understand our notes as [shards](/shard/index.html). Shared shards. Shards collected/curated together build a reflection. We encourage editing someone else's shard or picking it up for your own reflection(s). Collective writing is hard but such guestures could help. That's our hope at least.
|
||||||
|
|
||||||
# Reflections
|
# Reflections
|
||||||
|
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
+++
|
|
||||||
title = "List of shards"
|
|
||||||
has_shards = [
|
|
||||||
"backpull.md",
|
|
||||||
"crisis.md",
|
|
||||||
"custodianshipinrelationalpractices.md",
|
|
||||||
"effectivealtruism.md",
|
|
||||||
"existentialism.md",
|
|
||||||
"interpretivelabor.md",
|
|
||||||
"latentimage.md",
|
|
||||||
"library.md",
|
|
||||||
"longextinction.md",
|
|
||||||
"maintenance.md",
|
|
||||||
"migrationregime.md",
|
|
||||||
"neoliberallibrary.md",
|
|
||||||
"ordermaintenance.md",
|
|
||||||
"processnotplace.md",
|
|
||||||
"protocols.md",
|
|
||||||
"privatization.md",
|
|
||||||
"pure.md",
|
|
||||||
"senseofimagination.md",
|
|
||||||
"theimaginary.md",
|
|
||||||
"technologicaldeterminism.md",
|
|
||||||
"toolsinrelationalpractices.md",
|
|
||||||
"libgenscihubletter.md"
|
|
||||||
]
|
|
||||||
+++
|
|
||||||
|
|
||||||
List of shards. Will be deleted...
|
|
15
content/shard/abundance.md
Normal file
15
content/shard/abundance.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
+++
|
||||||
|
title = "Abundance"
|
||||||
|
glassblowers = ["olgagoriunova.md"]
|
||||||
|
+++
|
||||||
|
|
||||||
|
- against catastrophy, extreme scarcity (ecology) - degrowth
|
||||||
|
- economic systems are controlling surplus (link to Bataille)
|
||||||
|
- also Murray Book
|
||||||
|
- connected to the library
|
||||||
|
- links from Tomislav
|
||||||
|
- Bataille, the notion of general economy, overproduction > production energy
|
||||||
|
- generalised economy
|
||||||
|
- restricted economy (capitalism)
|
||||||
|
- notion of expand the abundance of energy
|
||||||
|
- degrowth based on modalities, different modalities who redistributes abundance
|
|
@ -2,11 +2,11 @@
|
||||||
title = "care"
|
title = "care"
|
||||||
glassblowers = ["tomislavmedak.md"]
|
glassblowers = ["tomislavmedak.md"]
|
||||||
+++
|
+++
|
||||||
- Care
|
|
||||||
“This Life”, book
|
- 
|
||||||
critique of care
|
- critique of care
|
||||||
dependency is a social condition
|
- dependency is a social condition
|
||||||
realm of needs vs realm of freedom (separation by Marx, mentioned above) is also about the division of labour and also class, gender, race
|
- realm of needs vs realm of freedom (separation by Marx, mentioned above) is also about the division of labour and also class, gender, race
|
||||||
instead: community as the centre of subjectvation (Marxist approach desubjectivises community)
|
- instead: community as the centre of subjectvation (Marxist approach desubjectivises community)
|
||||||
Vulnerable state
|
- Vulnerable state
|
||||||
needs - freedom - knowledge
|
- needs - freedom - knowledge
|
||||||
|
|
|
@ -3,9 +3,8 @@ title = "critical apparatus"
|
||||||
glassblowers = ["marcellmars.md"]
|
glassblowers = ["marcellmars.md"]
|
||||||
+++
|
+++
|
||||||
|
|
||||||
- critical apparatus (Marcell)
|
- 
|
||||||
philology as cybernetics
|
- transforms all the other languages, full of tools, pragmatic, reconstruct fragments of texts
|
||||||
transforms all the other languages, full of tools, pragmatic, reconstruct fragments of texts
|
- meta translator
|
||||||
meta translator
|
- reconstruction
|
||||||
reconstruction
|
- symbolic devices to do this
|
||||||
symbolic devices to do this
|
|
||||||
|
|
10
content/shard/idiorhythm.md
Normal file
10
content/shard/idiorhythm.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
+++
|
||||||
|
title = "Idiorhythm"
|
||||||
|
glassblowers = ["sreckohorvat.md"]
|
||||||
|
+++
|
||||||
|
|
||||||
|
- common rhythm
|
||||||
|
- routine - comfort
|
||||||
|
- productive rhythm
|
||||||
|
- 
|
||||||
|
- 
|
18
content/shard/interdependencenetworks.md
Normal file
18
content/shard/interdependencenetworks.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
+++
|
||||||
|
title = "Interdependence networks"
|
||||||
|
glassblowers = ["alessandroludovico.md"]
|
||||||
|
+++
|
||||||
|
|
||||||
|
- A network of interdependent networks
|
||||||
|
- co-constitution
|
||||||
|
- against whole (whole internet as a unavoidable and guiding paradigm)
|
||||||
|
- interdependency and relations
|
||||||
|
- small number / small groups are essential to maintain interdependance
|
||||||
|
- more limits
|
||||||
|
- anti-network science
|
||||||
|
- identity as built by small groups
|
||||||
|
- Latour, quasi object, transitional object
|
||||||
|
- technological systems are meant to separate
|
||||||
|
- Relative autonomy: in a group we learn a tool that facilitates collaboration but gives room to autonomy
|
||||||
|
- rhizome
|
||||||
|
- political subjectivation
|
14
content/shard/knowledgecommons.md
Normal file
14
content/shard/knowledgecommons.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
+++
|
||||||
|
title = "knowledge/ a commons"
|
||||||
|
glassblowers = ["tomislavmedak.md"]
|
||||||
|
+++
|
||||||
|
|
||||||
|
- knowledge/ a common (Isabelle Stengers)
|
||||||
|
- knowledge vs needs
|
||||||
|
- pragmatics of librarianship
|
||||||
|
- think / imagine / cooperate
|
||||||
|
- librarian practice - helping specific groups
|
||||||
|
- the knowledge in libraries is universal (the question of the universal) -> relationality -> knowledge and social stratification
|
||||||
|
- critical librarianship (notion that emerged from the movements, new left, in the 70s) -> technological deskilling -> relative autonomy -> linked to gaming the system / sabotage and their impossibility
|
||||||
|
a common: pragmatic of being together versus deskilling
|
||||||
|
- Library the realm of knowledge
|
6
content/shard/mundanity.md
Normal file
6
content/shard/mundanity.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
+++
|
||||||
|
title = "Mundanity/regularity"
|
||||||
|
glassblowers = ["olgagoriunova.md"]
|
||||||
|
+++
|
||||||
|
|
||||||
|
- regularity of biological functions, becomes the foundation of the ordering of the world
|
21
content/shard/productionreproduction.md
Normal file
21
content/shard/productionreproduction.md
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
+++
|
||||||
|
title = "Production/reproduction"
|
||||||
|
glassblowers = ["sasasavanovic.md", "marcellmars.md", "olgagoriunova.md"]
|
||||||
|
+++
|
||||||
|
|
||||||
|
- in contrast to production
|
||||||
|
- collective survival
|
||||||
|
- freedom is embedded in care
|
||||||
|
- patriarchy and non-human nature > modernity > after modernity
|
||||||
|
- “freedom starts in 2” Baumann dependency
|
||||||
|
- non-human nature
|
||||||
|
- (secondary, follows production)
|
||||||
|
- centre <> after modernity <> violence
|
||||||
|
- reproduction > notion of new, Groys?
|
||||||
|
- reproduction in mirror, archive, library, production
|
||||||
|
- production / reproduction as development of new
|
||||||
|
- redefining reproduction is needed
|
||||||
|
- symbiotic production
|
||||||
|
- byside products; rapports / relational structures (byproduct, byproduction; Valeria)
|
||||||
|
- reproduction = recreation and creation of something new-anew
|
||||||
|
- ANEW - possible term for a shard - or to come out of this?
|
11
content/shard/seriality.md
Normal file
11
content/shard/seriality.md
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
+++
|
||||||
|
title = "What is service? Seriality."
|
||||||
|
glassblowers = ["olgagoriunova.md"]
|
||||||
|
+++
|
||||||
|
|
||||||
|
- 
|
||||||
|
- the undignified service - socialisation of service in the Soviet Union (Kollontai)
|
||||||
|
- servility conviviality
|
||||||
|
- value-service -care
|
||||||
|
- the need to work, ethnographer book; old scientist were not paid
|
||||||
|
- disdain to the specialist, a system of moral values (the scientist, the writer)
|
20
content/shard/slowlazy.md
Normal file
20
content/shard/slowlazy.md
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
+++
|
||||||
|
title = "Slow & lazy"
|
||||||
|
glassblowers = ["sreckohorvat.md", "alessandroludovico.md"]
|
||||||
|
+++
|
||||||
|
|
||||||
|
- slowness / temporality
|
||||||
|
- value-driven logic - library is where this logic is disturbed
|
||||||
|
- the art of public institution that doesn’t have to submit to this logic -
|
||||||
|
- public institution is not just imaginary
|
||||||
|
- Benjamin Franklyn (time is money)
|
||||||
|
- capitalism is stealing time from God (the clocktower at the church)
|
||||||
|
- 
|
||||||
|
-  (Movie!)
|
||||||
|
- Silent Spring book
|
||||||
|
- Zapatistas -we walk slow but we walk far
|
||||||
|
- woodworking - slow is smooth and smooth is fast
|
||||||
|
- slow food and the preservation of species diversity - influenced science
|
||||||
|
- Seedbank (species preservation) and library
|
||||||
|
- against intensive farming
|
||||||
|
- forest gardens — cultivation and colonialism
|
Loading…
Add table
Reference in a new issue