chore: remove debug file in _site

This commit is contained in:
Sivan 2020-03-01 21:51:18 +08:00
parent d0e9abac01
commit 7fff23629a
6 changed files with 11 additions and 773 deletions

View file

@ -1,753 +0,0 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.Heti = factory());
}(this, (function () { 'use strict';
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}
var findAndReplaceDOMText = createCommonjsModule(function (module) {
/**
* findAndReplaceDOMText v 0.4.6
* @author James Padolsey http://james.padolsey.com
* @license http://unlicense.org/UNLICENSE
*
* Matches the text of a DOM node against a regular expression
* and replaces each match (or node-separated portions of the match)
* in the specified element.
*/
(function (root, factory) {
if ( module.exports) {
// Node/CommonJS
module.exports = factory();
} else {
// Browser globals
root.findAndReplaceDOMText = factory();
}
}(commonjsGlobal, function factory() {
var PORTION_MODE_RETAIN = 'retain';
var PORTION_MODE_FIRST = 'first';
var doc = document;
var hasOwn = {}.hasOwnProperty;
function escapeRegExp(s) {
return String(s).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
}
function exposed() {
// Try deprecated arg signature first:
return deprecated.apply(null, arguments) || findAndReplaceDOMText.apply(null, arguments);
}
function deprecated(regex, node, replacement, captureGroup, elFilter) {
if ((node && !node.nodeType) && arguments.length <= 2) {
return false;
}
var isReplacementFunction = typeof replacement == 'function';
if (isReplacementFunction) {
replacement = (function(original) {
return function(portion, match) {
return original(portion.text, match.startIndex);
};
}(replacement));
}
// Awkward support for deprecated argument signature (<0.4.0)
var instance = findAndReplaceDOMText(node, {
find: regex,
wrap: isReplacementFunction ? null : replacement,
replace: isReplacementFunction ? replacement : '$' + (captureGroup || '&'),
prepMatch: function(m, mi) {
// Support captureGroup (a deprecated feature)
if (!m[0]) throw 'findAndReplaceDOMText cannot handle zero-length matches';
if (captureGroup > 0) {
var cg = m[captureGroup];
m.index += m[0].indexOf(cg);
m[0] = cg;
}
m.endIndex = m.index + m[0].length;
m.startIndex = m.index;
m.index = mi;
return m;
},
filterElements: elFilter
});
exposed.revert = function() {
return instance.revert();
};
return true;
}
/**
* findAndReplaceDOMText
*
* Locates matches and replaces with replacementNode
*
* @param {Node} node Element or Text node to search within
* @param {RegExp} options.find The regular expression to match
* @param {String|Element} [options.wrap] A NodeName, or a Node to clone
* @param {String} [options.wrapClass] A classname to append to the wrapping element
* @param {String|Function} [options.replace='$&'] What to replace each match with
* @param {Function} [options.filterElements] A Function to be called to check whether to
* process an element. (returning true = process element,
* returning false = avoid element)
*/
function findAndReplaceDOMText(node, options) {
return new Finder(node, options);
}
exposed.NON_PROSE_ELEMENTS = {
br:1, hr:1,
// Media / Source elements:
script:1, style:1, img:1, video:1, audio:1, canvas:1, svg:1, map:1, object:1,
// Input elements
input:1, textarea:1, select:1, option:1, optgroup: 1, button:1
};
exposed.NON_CONTIGUOUS_PROSE_ELEMENTS = {
// Elements that will not contain prose or block elements where we don't
// want prose to be matches across element borders:
// Block Elements
address:1, article:1, aside:1, blockquote:1, dd:1, div:1,
dl:1, fieldset:1, figcaption:1, figure:1, footer:1, form:1, h1:1, h2:1, h3:1,
h4:1, h5:1, h6:1, header:1, hgroup:1, hr:1, main:1, nav:1, noscript:1, ol:1,
output:1, p:1, pre:1, section:1, ul:1,
// Other misc. elements that are not part of continuous inline prose:
br:1, li: 1, summary: 1, dt:1, details:1, rp:1, rt:1, rtc:1,
// Media / Source elements:
script:1, style:1, img:1, video:1, audio:1, canvas:1, svg:1, map:1, object:1,
// Input elements
input:1, textarea:1, select:1, option:1, optgroup:1, button:1,
// Table related elements:
table:1, tbody:1, thead:1, th:1, tr:1, td:1, caption:1, col:1, tfoot:1, colgroup:1
};
exposed.NON_INLINE_PROSE = function(el) {
return hasOwn.call(exposed.NON_CONTIGUOUS_PROSE_ELEMENTS, el.nodeName.toLowerCase());
};
// Presets accessed via `options.preset` when calling findAndReplaceDOMText():
exposed.PRESETS = {
prose: {
forceContext: exposed.NON_INLINE_PROSE,
filterElements: function(el) {
return !hasOwn.call(exposed.NON_PROSE_ELEMENTS, el.nodeName.toLowerCase());
}
}
};
exposed.Finder = Finder;
/**
* Finder -- encapsulates logic to find and replace.
*/
function Finder(node, options) {
var preset = options.preset && exposed.PRESETS[options.preset];
options.portionMode = options.portionMode || PORTION_MODE_RETAIN;
if (preset) {
for (var i in preset) {
if (hasOwn.call(preset, i) && !hasOwn.call(options, i)) {
options[i] = preset[i];
}
}
}
this.node = node;
this.options = options;
// Enable match-preparation method to be passed as option:
this.prepMatch = options.prepMatch || this.prepMatch;
this.reverts = [];
this.matches = this.search();
if (this.matches.length) {
this.processMatches();
}
}
Finder.prototype = {
/**
* Searches for all matches that comply with the instance's 'match' option
*/
search: function() {
var match;
var matchIndex = 0;
var offset = 0;
var regex = this.options.find;
var textAggregation = this.getAggregateText();
var matches = [];
var self = this;
regex = typeof regex === 'string' ? RegExp(escapeRegExp(regex), 'g') : regex;
matchAggregation(textAggregation);
function matchAggregation(textAggregation) {
for (var i = 0, l = textAggregation.length; i < l; ++i) {
var text = textAggregation[i];
if (typeof text !== 'string') {
// Deal with nested contexts: (recursive)
matchAggregation(text);
continue;
}
if (regex.global) {
while (match = regex.exec(text)) {
matches.push(self.prepMatch(match, matchIndex++, offset));
}
} else {
if (match = text.match(regex)) {
matches.push(self.prepMatch(match, 0, offset));
}
}
offset += text.length;
}
}
return matches;
},
/**
* Prepares a single match with useful meta info:
*/
prepMatch: function(match, matchIndex, characterOffset) {
if (!match[0]) {
throw new Error('findAndReplaceDOMText cannot handle zero-length matches');
}
match.endIndex = characterOffset + match.index + match[0].length;
match.startIndex = characterOffset + match.index;
match.index = matchIndex;
return match;
},
/**
* Gets aggregate text within subject node
*/
getAggregateText: function() {
var elementFilter = this.options.filterElements;
var forceContext = this.options.forceContext;
return getText(this.node);
/**
* Gets aggregate text of a node without resorting
* to broken innerText/textContent
*/
function getText(node) {
if (node.nodeType === Node.TEXT_NODE) {
return [node.data];
}
if (elementFilter && !elementFilter(node)) {
return [];
}
var txt = [''];
var i = 0;
if (node = node.firstChild) do {
if (node.nodeType === Node.TEXT_NODE) {
txt[i] += node.data;
continue;
}
var innerText = getText(node);
if (
forceContext &&
node.nodeType === Node.ELEMENT_NODE &&
(forceContext === true || forceContext(node))
) {
txt[++i] = innerText;
txt[++i] = '';
} else {
if (typeof innerText[0] === 'string') {
// Bridge nested text-node data so that they're
// not considered their own contexts:
// I.e. ['some', ['thing']] -> ['something']
txt[i] += innerText.shift();
}
if (innerText.length) {
txt[++i] = innerText;
txt[++i] = '';
}
}
} while (node = node.nextSibling);
return txt;
}
},
/**
* Steps through the target node, looking for matches, and
* calling replaceFn when a match is found.
*/
processMatches: function() {
var matches = this.matches;
var node = this.node;
var elementFilter = this.options.filterElements;
var startPortion,
endPortion,
innerPortions = [],
curNode = node,
match = matches.shift(),
atIndex = 0, // i.e. nodeAtIndex
portionIndex = 0,
doAvoidNode,
nodeStack = [node];
out: while (true) {
if (curNode.nodeType === Node.TEXT_NODE) {
if (!endPortion && curNode.length + atIndex >= match.endIndex) {
// We've found the ending
// (Note that, in the case of a single portion, it'll be an
// endPortion, not a startPortion.)
endPortion = {
node: curNode,
index: portionIndex++,
text: curNode.data.substring(match.startIndex - atIndex, match.endIndex - atIndex),
// If it's the first match (atIndex==0) we should just return 0
indexInMatch: atIndex === 0 ? 0 : atIndex - match.startIndex,
indexInNode: match.startIndex - atIndex,
endIndexInNode: match.endIndex - atIndex,
isEnd: true
};
} else if (startPortion) {
// Intersecting node
innerPortions.push({
node: curNode,
index: portionIndex++,
text: curNode.data,
indexInMatch: atIndex - match.startIndex,
indexInNode: 0 // always zero for inner-portions
});
}
if (!startPortion && curNode.length + atIndex > match.startIndex) {
// We've found the match start
startPortion = {
node: curNode,
index: portionIndex++,
indexInMatch: 0,
indexInNode: match.startIndex - atIndex,
endIndexInNode: match.endIndex - atIndex,
text: curNode.data.substring(match.startIndex - atIndex, match.endIndex - atIndex)
};
}
atIndex += curNode.data.length;
}
doAvoidNode = curNode.nodeType === Node.ELEMENT_NODE && elementFilter && !elementFilter(curNode);
if (startPortion && endPortion) {
curNode = this.replaceMatch(match, startPortion, innerPortions, endPortion);
// processMatches has to return the node that replaced the endNode
// and then we step back so we can continue from the end of the
// match:
atIndex -= (endPortion.node.data.length - endPortion.endIndexInNode);
startPortion = null;
endPortion = null;
innerPortions = [];
match = matches.shift();
portionIndex = 0;
if (!match) {
break; // no more matches
}
} else if (
!doAvoidNode &&
(curNode.firstChild || curNode.nextSibling)
) {
// Move down or forward:
if (curNode.firstChild) {
nodeStack.push(curNode);
curNode = curNode.firstChild;
} else {
curNode = curNode.nextSibling;
}
continue;
}
// Move forward or up:
while (true) {
if (curNode.nextSibling) {
curNode = curNode.nextSibling;
break;
}
curNode = nodeStack.pop();
if (curNode === node) {
break out;
}
}
}
},
/**
* Reverts ... TODO
*/
revert: function() {
// Reversion occurs backwards so as to avoid nodes subsequently
// replaced during the matching phase (a forward process):
for (var l = this.reverts.length; l--;) {
this.reverts[l]();
}
this.reverts = [];
},
prepareReplacementString: function(string, portion, match) {
var portionMode = this.options.portionMode;
if (
portionMode === PORTION_MODE_FIRST &&
portion.indexInMatch > 0
) {
return '';
}
string = string.replace(/\$(\d+|&|`|')/g, function($0, t) {
var replacement;
switch(t) {
case '&':
replacement = match[0];
break;
case '`':
replacement = match.input.substring(0, match.startIndex);
break;
case '\'':
replacement = match.input.substring(match.endIndex);
break;
default:
replacement = match[+t] || '';
}
return replacement;
});
if (portionMode === PORTION_MODE_FIRST) {
return string;
}
if (portion.isEnd) {
return string.substring(portion.indexInMatch);
}
return string.substring(portion.indexInMatch, portion.indexInMatch + portion.text.length);
},
getPortionReplacementNode: function(portion, match) {
var replacement = this.options.replace || '$&';
var wrapper = this.options.wrap;
var wrapperClass = this.options.wrapClass;
if (wrapper && wrapper.nodeType) {
// Wrapper has been provided as a stencil-node for us to clone:
var clone = doc.createElement('div');
clone.innerHTML = wrapper.outerHTML || new XMLSerializer().serializeToString(wrapper);
wrapper = clone.firstChild;
}
if (typeof replacement == 'function') {
replacement = replacement(portion, match);
if (replacement && replacement.nodeType) {
return replacement;
}
return doc.createTextNode(String(replacement));
}
var el = typeof wrapper == 'string' ? doc.createElement(wrapper) : wrapper;
if (el && wrapperClass) {
el.className = wrapperClass;
}
replacement = doc.createTextNode(
this.prepareReplacementString(
replacement, portion, match
)
);
if (!replacement.data) {
return replacement;
}
if (!el) {
return replacement;
}
el.appendChild(replacement);
return el;
},
replaceMatch: function(match, startPortion, innerPortions, endPortion) {
var matchStartNode = startPortion.node;
var matchEndNode = endPortion.node;
var precedingTextNode;
var followingTextNode;
if (matchStartNode === matchEndNode) {
var node = matchStartNode;
if (startPortion.indexInNode > 0) {
// Add `before` text node (before the match)
precedingTextNode = doc.createTextNode(node.data.substring(0, startPortion.indexInNode));
node.parentNode.insertBefore(precedingTextNode, node);
}
// Create the replacement node:
var newNode = this.getPortionReplacementNode(
endPortion,
match
);
node.parentNode.insertBefore(newNode, node);
if (endPortion.endIndexInNode < node.length) { // ?????
// Add `after` text node (after the match)
followingTextNode = doc.createTextNode(node.data.substring(endPortion.endIndexInNode));
node.parentNode.insertBefore(followingTextNode, node);
}
node.parentNode.removeChild(node);
this.reverts.push(function() {
if (precedingTextNode === newNode.previousSibling) {
precedingTextNode.parentNode.removeChild(precedingTextNode);
}
if (followingTextNode === newNode.nextSibling) {
followingTextNode.parentNode.removeChild(followingTextNode);
}
newNode.parentNode.replaceChild(node, newNode);
});
return newNode;
} else {
// Replace matchStartNode -> [innerMatchNodes...] -> matchEndNode (in that order)
precedingTextNode = doc.createTextNode(
matchStartNode.data.substring(0, startPortion.indexInNode)
);
followingTextNode = doc.createTextNode(
matchEndNode.data.substring(endPortion.endIndexInNode)
);
var firstNode = this.getPortionReplacementNode(
startPortion,
match
);
var innerNodes = [];
for (var i = 0, l = innerPortions.length; i < l; ++i) {
var portion = innerPortions[i];
var innerNode = this.getPortionReplacementNode(
portion,
match
);
portion.node.parentNode.replaceChild(innerNode, portion.node);
this.reverts.push((function(portion, innerNode) {
return function() {
innerNode.parentNode.replaceChild(portion.node, innerNode);
};
}(portion, innerNode)));
innerNodes.push(innerNode);
}
var lastNode = this.getPortionReplacementNode(
endPortion,
match
);
matchStartNode.parentNode.insertBefore(precedingTextNode, matchStartNode);
matchStartNode.parentNode.insertBefore(firstNode, matchStartNode);
matchStartNode.parentNode.removeChild(matchStartNode);
matchEndNode.parentNode.insertBefore(lastNode, matchEndNode);
matchEndNode.parentNode.insertBefore(followingTextNode, matchEndNode);
matchEndNode.parentNode.removeChild(matchEndNode);
this.reverts.push(function() {
precedingTextNode.parentNode.removeChild(precedingTextNode);
firstNode.parentNode.replaceChild(matchStartNode, firstNode);
followingTextNode.parentNode.removeChild(followingTextNode);
lastNode.parentNode.replaceChild(matchEndNode, lastNode);
});
return lastNode;
}
}
};
return exposed;
}));
});
/**
* Heti add-on v 0.1.0
* Add right spacing between CJK & ANS characters
*/
// 正则表达式来自 pangu.js https://github.com/vinta/pangu.js
const CJK = '\u2e80-\u2eff\u2f00-\u2fdf\u3040-\u309f\u30a0-\u30fa\u30fc-\u30ff\u3100-\u312f\u3200-\u32ff\u3400-\u4dbf\u4e00-\u9fff\uf900-\ufaff';
const A = 'A-Za-z\u0370-\u03ff';
const N = '0-9';
const S = '`~!@#\\$%\\^&\\*\\(\\)-_=\\+\\[\\]{}\\\\\\|;:\'",<.>\\/\\?';
const ANS = `${A}${N}${S}`;
const HETI_NON_CONTIGUOUS_ELEMENTS = {
// Block Elements
address: 1, article: 1, aside: 1, blockquote: 1, dd: 1, div: 1,
dl: 1, fieldset: 1, figcaption: 1, figure: 1, footer: 1, form: 1, h1: 1, h2: 1, h3: 1,
h4: 1, h5: 1, h6: 1, header: 1, hgroup: 1, hr: 1, main: 1, nav: 1, noscript: 1, ol: 1,
output: 1, p: 1, pre: 1, section: 1, ul: 1,
// Other misc. elements that are not part of continuous inline prose:
br: 1, li: 1, summary: 1, dt: 1, details: 1, rp: 1, rt: 1, rtc: 1,
// Media / Source elements:
script: 1, style: 1, img: 1, video: 1, audio: 1, canvas: 1, svg: 1, map: 1, object: 1,
// Input elements
input: 1, textarea: 1, select: 1, option: 1, optgroup: 1, button: 1,
// Table related elements:
table: 1, tbody: 1, thead: 1, th: 1, tr: 1, td: 1, caption: 1, col: 1, tfoot: 1, colgroup: 1,
// Inline elements
ins: 1, del: 1, s: 1,
};
const HETI_SKIPPED_ELEMENTS = {
br: 1, hr: 1,
// Media / Source elements:
script: 1, style: 1, img: 1, video: 1, audio: 1, canvas: 1, svg: 1, map: 1, object: 1,
// Input elements:
input: 1, textarea: 1, select: 1, option: 1, optgroup: 1, button: 1,
// Pre elements:
pre: 1, code: 1, sup: 1, sub: 1,
// Heti elements
'heti-spacing': 1,
};
const HETI_SKIPPED_CLASS = 'heti-skip';
const hasOwn = {}.hasOwnProperty;
class Heti {
constructor (rootSelector) {
this.rootSelector = rootSelector || '.heti';
this.REG_FULL = new RegExp(`(?<=[${CJK}])( *[${ANS}]+(?: +[${ANS}]+)* *)(?=[${CJK}])`, 'g');
this.REG_START = new RegExp(`([${ANS}]+(?: +[${ANS}]+)* *)(?=[${CJK}])`, 'g');
this.REG_END = new RegExp(`(?<=[${CJK}])( *[${ANS}]+(?: +[${ANS}]+)*)`, 'g');
this.funcForceContext = function forceContext (el) {
return hasOwn.call(HETI_NON_CONTIGUOUS_ELEMENTS, el.nodeName.toLowerCase())
};
this.funcFilterElements = function filterElements (el) {
return (
!(el.classList && el.classList.contains(HETI_SKIPPED_CLASS)) &&
!hasOwn.call(HETI_SKIPPED_ELEMENTS, el.nodeName.toLowerCase())
)
};
}
spacingElements (elmList) {
for (let $$root of elmList) {
this.spacingElement($$root);
}
}
spacingElement ($$elm) {
const commonConfig = {
forceContext: this.funcForceContext,
filterElements: this.funcFilterElements,
};
const getWrapper = function (classList, text) {
const $$r = document.createElement('heti-spacing');
$$r.className = classList;
$$r.textContent = text.trim();
return $$r
};
findAndReplaceDOMText($$elm, Object.assign(commonConfig, {
find: this.REG_FULL,
replace: portion => getWrapper('heti-spacing-start heti-spacing-end', portion.text),
}));
findAndReplaceDOMText($$elm, Object.assign(commonConfig, {
find: this.REG_START,
replace: portion => getWrapper('heti-spacing-start', portion.text),
}));
findAndReplaceDOMText($$elm, Object.assign(commonConfig, {
find: this.REG_END,
replace: portion => getWrapper('heti-spacing-end', portion.text),
}));
}
autoSpacing () {
document.addEventListener('DOMContentLoaded', () => {
const $$rootList = document.querySelectorAll(this.rootSelector);
for (let $$root of $$rootList) {
this.spacingElement($$root);
}
});
}
}
return Heti;
})));

View file

@ -1,817 +0,0 @@
@charset "UTF-8";
/*!
* Project: Heti
* URL: https://github.com/sivan/heti
* Author: Sivan [sun.sivan@gmail.com]
*/
@font-face {
font-family: "Heti Hei";
src: local("PingFang SC Regular"), local("PingFang TC Regular"), local("Hiragino Sans GB W3"), local("Heiti SC Regular"), local("Heiti TC Regular"), local("Microsoft YaHei"), local("Microsoft Jhenghei"), local("Source Han Sans CN Regular"), local("Source Han Sans HK Regular"), local("Source Han Sans TW Regular"), local("Source Han Sans JP Regular"), local("Source Han Sans KR Regular"), local("Noto Sans CJK SC Regular"), local("Noto Sans CJK TC Regular"), local("Noto Sans CJK JP Regular"), local("Noto Sans CJK KR Regular"), local("WenQuanYi Micro Hei"), local("Droid Sans Fallback");
}
@font-face {
font-family: "Heti Hei";
font-weight: 200;
src: local("PingFang SC Light"), local("PingFang TC Light"), local("Heiti SC Light"), local("Heiti TC Light"), local("Microsoft YaHei Light"), local("Microsoft Jhenghei Light"), local("Source Han Sans CN Light"), local("Source Han Sans HK Light"), local("Source Han Sans TW Light"), local("Source Han Sans JP Light"), local("Source Han Sans KR Light"), local("Noto Sans CJK SC Light"), local("Noto Sans CJK TC Light"), local("Noto Sans CJK JP Light"), local("Noto Sans CJK KR Light");
}
@font-face {
font-family: "Heti Hei";
font-weight: 600;
src: local("PingFang SC Medium"), local("Hiragino Sans GB W6"), local("PingFang TC Medium"), local("Heiti SC Medium"), local("Heiti TC Medium"), local("Microsoft YaHei Bold"), local("Microsoft Jhenghei Bold"), local("Source Han Sans CN Bold"), local("Source Han Sans HK Bold"), local("Source Han Sans TW Bold"), local("Source Han Sans JP Bold"), local("Source Han Sans KR Bold"), local("Noto Sans CJK SC Bold"), local("Noto Sans CJK TC Bold"), local("Noto Sans CJK JP Bold"), local("Noto Sans CJK KR Bold");
}
@font-face {
font-family: "Heti Hei Black";
font-weight: 800;
src: local("Lantinghei SC Heavy"), local("Lantinghei TC Heavy"), local("PingFang SC Semibold"), local("PingFang TC Semibold"), local("Hiragino Sans GB W6"), local("Heiti SC Medium"), local("Heiti TC Medium"), local("Microsoft YaHei Bold"), local("Microsoft Jhenghei Bold"), local("Source Han Sans CN Heavy"), local("Source Han Sans HK Heavy"), local("Source Han Sans TW Heavy"), local("Source Han Sans JP Heavy"), local("Source Han Sans KR Heavy"), local("Noto Sans CJK SC Heavy"), local("Noto Sans CJK TC Heavy"), local("Noto Sans CJK JP Heavy"), local("Noto Sans CJK KR Heavy"), local("Droid Sans Fallback");
}
@font-face {
font-family: "Heti Song";
src: local("Songti SC Regular"), local("Songti TC Regular"), local("SimSun");
}
@font-face {
font-family: "Heti Song";
font-weight: 200;
src: local("Songti SC Light"), local("Songti TC Light"), local(STSong), local("SimSun");
}
@font-face {
font-family: "Heti Song";
font-weight: 600;
src: local("Songti SC Bold"), local("Songti TC Bold"), local("SimSun");
}
@font-face {
font-family: "Heti Song Black";
font-weight: 800;
src: local("Songti SC Black"), local("SimSun");
}
@font-face {
font-family: "Heti Kai";
src: local("Kaiti SC Regular"), local("Kaiti TC Regular"), local("BiauKai");
}
@font-face {
font-family: "Heti Kai";
font-weight: 600;
src: local("Kaiti SC Bold"), local("Kaiti TC Bold");
}
@font-face {
font-family: "Heti Kai Black";
font-weight: 800;
src: local("Kaiti SC Black"), local("Kaiti TC Black");
}
.heti {
max-width: 42em;
font-size: 16px;
font-weight: 400;
-webkit-font-smoothing: subpixel-antialiased;
line-height: 1.5;
}
.heti::before, .heti::after {
content: "";
display: table;
}
.heti::after {
clear: both;
}
.heti > *:first-child,
.heti section > *:first-child,
.heti td > *:first-child {
margin-block-start: 0 !important;
}
.heti > *:last-child,
.heti section > *:last-child,
.heti td > *:last-child {
margin-block-end: 0 !important;
}
.heti blockquote {
margin-block-start: 12px;
margin-block-end: 24px;
margin-inline-start: 32px;
margin-inline-end: 32px;
padding-block-start: 12px;
padding-block-end: 12px;
padding-inline-start: 16px;
padding-inline-end: 16px;
background-color: rgba(0, 0, 0, 0.054);
}
.heti figure {
display: block;
text-align: center;
}
.heti figure > img {
display: block;
margin-inline-start: auto;
margin-inline-end: auto;
}
.heti hr {
width: 30%;
height: 1px;
margin-block-start: 48px;
margin-block-end: 47px;
margin-inline-start: auto;
margin-inline-end: auto;
border: 0;
background-color: #ddd;
}
.heti p {
margin-block-start: 12px;
margin-block-end: 24px;
text-align: justify;
}
.heti p:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .heti p:not(:lang(zh)) {
text-align: start;
}
.heti pre {
margin-block-start: 12px;
margin-block-end: 12px;
margin-inline-start: 0;
margin-inline-end: 0;
padding-block-start: 12px;
padding-block-end: 12px;
padding-inline-start: 16px;
padding-inline-end: 16px;
overflow: auto;
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
white-space: pre;
word-wrap: normal;
background-color: rgba(0, 0, 0, 0.054);
border-radius: 4px;
}
.heti pre code {
margin: 0;
padding: 0;
border: 0;
border-radius: 0;
background-color: transparent;
color: inherit;
}
.heti h1,
.heti h2,
.heti h3,
.heti h4,
.heti h5,
.heti h6 {
position: relative;
margin: 0;
margin-block-start: 24px;
margin-block-end: 12px;
font-weight: 600;
}
.heti h1 {
margin-block-end: 24px;
font-size: 32px;
line-height: 48px;
}
.heti h2 {
font-size: 24px;
line-height: 36px;
}
.heti h3 {
font-size: 20px;
line-height: 36px;
}
.heti h4 {
font-size: 18px;
line-height: 24px;
}
.heti h5 {
font-size: 16px;
line-height: 24px;
}
.heti h6 {
font-size: 14px;
line-height: 24px;
}
.heti h1,
.heti h2,
.heti h3 {
letter-spacing: 0.05em;
}
.heti h1:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .heti h1:not(:lang(zh)),
.heti h2:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)),
.heti h2:not(:lang(zh)),
.heti h3:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)),
.heti h3:not(:lang(zh)) {
letter-spacing: 0;
}
.heti h1 + h2,
.heti h2 + h3,
.heti h3 + h4,
.heti h4 + h5,
.heti h5 + h6 {
margin-block-start: 12px;
}
.heti ul,
.heti ol,
.heti dl {
margin-block-start: 12px;
margin-block-end: 24px;
}
.heti ul,
.heti ol {
padding-inline-start: 32px;
}
.heti ul ul,
.heti ul ol,
.heti ol ul,
.heti ol ol {
margin-block-start: 0;
margin-block-end: 0;
}
.heti ul {
list-style-type: disc;
}
.heti ol {
list-style-type: decimal;
}
.heti ul ul,
.heti ol ul {
list-style-type: circle;
}
.heti ul ul ul,
.heti ul ol ul,
.heti ol ul ul,
.heti ol ol ul {
list-style-type: square;
}
.heti li {
list-style-type: unset;
}
.heti table {
box-sizing: border-box;
table-layout: fixed;
border-collapse: collapse;
border: 1px solid #ccc;
margin-block-start: 12px;
margin-block-end: 24px;
margin-inline-start: auto;
margin-inline-end: auto;
word-break: break-word;
}
.heti th,
.heti td {
border: 1px solid #ccc;
padding-block-start: 6px;
padding-block-end: 6px;
padding-inline-start: 8px;
padding-inline-end: 8px;
}
.heti caption {
caption-side: bottom;
margin-block-start: 2px;
margin-block-end: -4px;
font-size: 14px;
line-height: 24px;
}
.heti a {
text-decoration: none;
}
.heti a:hover {
padding-block-end: 1px;
border-block-end: 1px solid currentColor;
text-decoration: none;
}
.heti abbr[title] {
padding-block-end: 1px;
border-block-end: 1px dotted;
text-decoration: none;
cursor: help;
}
.heti b,
.heti strong {
font-weight: 600;
}
.heti code {
margin-inline-start: 0.25em;
margin-inline-end: 0.25em;
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 0.875em;
}
.heti dfn {
font-weight: 600;
}
.heti dfn:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .heti dfn:not(:lang(zh)) {
font-weight: 400;
}
.heti em {
font-weight: 600;
}
.heti figcaption {
display: inline-block;
vertical-align: top;
font-size: 14px;
text-align: start;
}
.heti i {
font-style: italic;
}
.heti ins,
.heti u {
padding-block-end: 1px;
border-block-end: 1px solid;
text-decoration: none;
}
.heti mark {
padding-block-start: 2px;
padding-block-end: 2px;
padding-inline-start: 1px;
padding-inline-end: 1px;
margin-inline-start: 1px;
margin-inline-end: 1px;
background-color: rgba(255, 247, 0, 0.88);
}
.heti q {
quotes: "「" "」" "『" "』";
}
.heti q:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .heti q:not(:lang(zh)) {
quotes: initial;
quotes: auto;
}
.heti rt {
font-size: 0.875em;
font-weight: 400;
}
.heti small {
font-size: 0.875em;
}
.heti strong {
font-weight: 600;
}
.heti sub,
.heti sup {
position: relative;
margin-inline-start: 0.25em;
margin-inline-end: 0.25em;
font-size: 0.75em;
font-family: "Helvetica Neue", Helvetica, Arial, "Heti Hei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-style: normal;
line-height: 1;
vertical-align: baseline;
}
.heti sub {
bottom: -0.25em;
}
.heti sup {
top: -0.5em;
}
.heti sup:target,
.heti sup a:target {
background-color: #def;
}
.heti summary {
padding-inline-start: 1em;
outline: 0;
cursor: pointer;
}
.heti summary::-webkit-details-marker {
width: 0.6em;
margin-inline-end: 0.4em;
}
.heti u[title] {
cursor: help;
border-block-end-color: rgba(0, 0, 0, 0.54);
border-block-end-width: 3px;
border-block-end-style: double;
}
.heti address,
.heti cite,
.heti dfn,
.heti dt,
.heti em {
font-style: normal;
}
.heti address:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .heti address:not(:lang(zh)),
.heti cite:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)),
.heti cite:not(:lang(zh)),
.heti dfn:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)),
.heti dfn:not(:lang(zh)),
.heti dt:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)),
.heti dt:not(:lang(zh)),
.heti em:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)),
.heti em:not(:lang(zh)) {
font-style: italic;
}
.heti abbr[title],
.heti del,
.heti ins,
.heti s,
.heti u {
margin-inline-start: 1px;
margin-inline-end: 1px;
}
.heti, .heti--sans {
font-family: "Helvetica Neue", Helvetica, Arial, "Heti Hei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.heti--serif {
font-family: "Times New Roman", Times, "Heti Song", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.heti--classic {
font-family: "Times New Roman", Times, "Heti Song", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.heti--classic h1,
.heti--classic h2,
.heti--classic h3,
.heti--classic h4,
.heti--classic h5,
.heti--classic h6 {
font-family: "Times New Roman", Times, "Heti Kai Black", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-weight: 800;
}
.heti--classic blockquote,
.heti--classic cite,
.heti--classic q {
font-family: "Times New Roman", Times, "Heti Kai", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.heti--classic figcaption,
.heti--classic caption,
.heti--classic th {
font-family: "Helvetica Neue", Helvetica, Arial, "Heti Hei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.heti--hei {
font-family: "Helvetica Neue", Helvetica, Arial, "Heti Hei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.heti--song {
font-family: "Times New Roman", Times, "Heti Song", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.heti--kai {
font-family: "Times New Roman", Times, "Heti Kai", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.heti--columns-1, .heti--columns-2, .heti--columns-3, .heti--columns-4, .heti--columns-16em, .heti--columns-20em, .heti--columns-24em, .heti--columns-28em, .heti--columns-32em, .heti--columns-36em, .heti--columns-40em, .heti--columns-44em, .heti--columns-48em, .heti comma {
max-width: none;
column-gap: 2em;
}
.heti--columns-1 p, .heti--columns-2 p, .heti--columns-3 p, .heti--columns-4 p, .heti--columns-16em p, .heti--columns-20em p, .heti--columns-24em p, .heti--columns-28em p, .heti--columns-32em p, .heti--columns-36em p, .heti--columns-40em p, .heti--columns-44em p, .heti--columns-48em p, .heti comma p {
margin-block-start: 6px;
margin-block-end: 12px;
text-indent: 2em;
}
.heti--columns-1 {
column-count: 1;
}
.heti--columns-2 {
column-count: 2;
}
.heti--columns-3 {
column-count: 3;
}
.heti--columns-4 {
column-count: 4;
}
.heti--columns-16em {
column-width: 16em;
}
.heti--columns-20em {
column-width: 20em;
}
.heti--columns-24em {
column-width: 24em;
}
.heti--columns-28em {
column-width: 28em;
}
.heti--columns-32em {
column-width: 32em;
}
.heti--columns-36em {
column-width: 36em;
}
.heti--columns-40em {
column-width: 40em;
}
.heti--columns-44em {
column-width: 44em;
}
.heti--columns-48em {
column-width: 48em;
}
.heti--vertical {
max-width: none;
max-height: 42em;
writing-mode: vertical-rl;
letter-spacing: 0.125em;
}
.heti--vertical h1,
.heti--vertical h2,
.heti--vertical h3,
.heti--vertical h4,
.heti--vertical h5,
.heti--vertical h6 {
text-align: start;
}
.heti--ancient, .heti--poetry {
font-family: "Times New Roman", Times, "Heti Song", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.heti--ancient h1,
.heti--ancient h2,
.heti--ancient h3,
.heti--ancient h4,
.heti--ancient h5,
.heti--ancient h6, .heti--poetry h1,
.heti--poetry h2,
.heti--poetry h3,
.heti--poetry h4,
.heti--poetry h5,
.heti--poetry h6 {
font-family: "Times New Roman", Times, "Heti Kai Black", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-weight: 800;
text-align: center;
}
.heti--ancient h1 .heti-meta,
.heti--ancient h2 .heti-meta,
.heti--ancient h3 .heti-meta,
.heti--ancient h4 .heti-meta,
.heti--ancient h5 .heti-meta,
.heti--ancient h6 .heti-meta, .heti--poetry h1 .heti-meta,
.heti--poetry h2 .heti-meta,
.heti--poetry h3 .heti-meta,
.heti--poetry h4 .heti-meta,
.heti--poetry h5 .heti-meta,
.heti--poetry h6 .heti-meta {
font-weight: 400;
}
@media screen and (min-width: 640px) {
.heti--ancient h1 .heti-meta,
.heti--ancient h2 .heti-meta,
.heti--ancient h3 .heti-meta,
.heti--ancient h4 .heti-meta,
.heti--ancient h5 .heti-meta,
.heti--ancient h6 .heti-meta, .heti--poetry h1 .heti-meta,
.heti--poetry h2 .heti-meta,
.heti--poetry h3 .heti-meta,
.heti--poetry h4 .heti-meta,
.heti--poetry h5 .heti-meta,
.heti--poetry h6 .heti-meta {
position: absolute;
line-height: inherit;
text-indent: 0;
display: inline;
margin-block-start: 4px;
margin-inline-start: 8px;
}
}
.heti--ancient .heti-meta, .heti--poetry .heti-meta {
line-height: 24px;
text-align: center;
text-indent: 0;
}
.heti--ancient p {
text-indent: 2em;
}
.heti--poetry p {
text-align: center;
text-indent: 0;
}
.heti--annotation p {
margin-block-start: 0;
margin-block-end: 0;
line-height: 2.25;
text-indent: 2em;
}
.heti--annotation em {
-webkit-text-emphasis: filled circle;
-webkit-text-emphasis-position: under;
font-weight: 400;
}
.heti--annotation em:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .heti--annotation em:not(:lang(zh)) {
-webkit-text-emphasis: none;
}
.heti--annotation .heti-meta {
margin-block-start: 12px;
margin-block-end: 24px;
}
.heti .heti-meta {
display: block;
text-indent: 0;
}
.heti .heti-verse {
text-align: center;
text-indent: 0;
}
.heti .heti-large {
font-size: 18px;
line-height: 24px;
}
.heti .heti-x-large {
font-size: 20px;
line-height: 30px;
letter-spacing: 0.05em;
}
.heti .heti-small {
font-size: 14px;
line-height: 24px;
}
.heti .heti-x-small {
font-size: 12px;
line-height: 18px;
}
.heti .heti-list-latin {
list-style-type: upper-latin;
}
.heti .heti-list-latin ol {
list-style-type: lower-roman;
}
.heti .heti-list-latin ol ol {
list-style-type: lower-latin;
}
.heti .heti-list-han {
list-style-type: cjk-ideographic;
}
.heti .heti-list-han ol {
list-style-type: decimal;
}
.heti .heti-list-han ol ol {
list-style-type: decimal-leading-zero;
}
.heti .heti-fn {
margin-block-start: 59px;
border-block-start: 1px solid #ccc;
font-size: 14px;
font-family: "Helvetica Neue", Helvetica, Arial, "Heti Hei", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
line-height: 24px;
}
.heti .heti-fn ol {
margin-block-start: 12px;
margin-block-end: 0;
}
.heti .heti-fn li:target {
background-color: #def;
}
.heti .heti-hang {
position: absolute;
line-height: inherit;
text-indent: 0;
}
.heti .heti-em {
-webkit-text-emphasis: filled circle;
-webkit-text-emphasis-position: under;
}
.heti .heti-em:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .heti .heti-em:not(:lang(zh)) {
-webkit-text-emphasis: none;
}
<<<<<<< HEAD:_site/heti.debug.css
.heti .heti-ruby--inline {
display: inline-flex;
flex-direction: column-reverse;
height: 1.5em;
}
.heti .heti-ruby--inline rt {
display: inline;
line-height: 0.5;
}
.heti heti-spacing {
display: inline;
=======
.heti heti-spacing {
display: inline;
}
.heti heti-spacing.heti-spacing-start {
margin-inline-end: 0.25em;
}
.heti heti-spacing.heti-spacing-end {
margin-inline-start: 0.25em;
>>>>>>> 20c70557b52890ee555f81223c2dfeb4ca795af2:_site/heti.debug.css
}
.heti heti-spacing + sup,
.heti heti-spacing + sub {
margin-inline-start: 0;
}
<<<<<<< HEAD:_site/heti.debug.css
.heti .heti-spacing-start {
margin-inline-end: 0.25em;
}
.heti .heti-spacing-end {
margin-inline-start: 0.25em;
}
=======
>>>>>>> 20c70557b52890ee555f81223c2dfeb4ca795af2:_site/heti.debug.css