feat: support CJK & ANS spacing (#12)
This commit is contained in:
parent
25cfc2229a
commit
91686092ac
16 changed files with 534 additions and 1029 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -3,7 +3,6 @@
|
||||||
.settings/
|
.settings/
|
||||||
|
|
||||||
# Dev dependencies and cache files
|
# Dev dependencies and cache files
|
||||||
dist/
|
|
||||||
node_modules/
|
node_modules/
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
|
|
||||||
|
@ -19,3 +18,7 @@ Thumbs.db
|
||||||
# Files that might appear on external disks
|
# Files that might appear on external disks
|
||||||
.Spotlight-V100
|
.Spotlight-V100
|
||||||
.Trashes
|
.Trashes
|
||||||
|
|
||||||
|
# Project debug files
|
||||||
|
_site/heti.css
|
||||||
|
_site/heti-addon.js
|
||||||
|
|
750
_site/heti.min.css
vendored
750
_site/heti.min.css
vendored
|
@ -1,750 +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;
|
|
||||||
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;
|
|
||||||
letter-spacing: 1.6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.heti h2 {
|
|
||||||
font-size: 24px;
|
|
||||||
line-height: 36px;
|
|
||||||
letter-spacing: 1.2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.heti h3 {
|
|
||||||
font-size: 20px;
|
|
||||||
line-height: 36px;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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 + 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;
|
|
||||||
color: rgba(0, 0, 0, 0.88);
|
|
||||||
}
|
|
||||||
|
|
||||||
.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";
|
|
||||||
line-height: 1;
|
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.heti sub {
|
|
||||||
bottom: -0.25em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.heti sup {
|
|
||||||
top: -0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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-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;
|
|
||||||
}
|
|
|
@ -50,7 +50,8 @@ a {
|
||||||
|
|
||||||
.article[data-bg-grid="grid-24"] {
|
.article[data-bg-grid="grid-24"] {
|
||||||
background-size: 100% 24px;
|
background-size: 100% 24px;
|
||||||
background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 31px, #eee 1px, rgba(255, 255, 255, 0) 33px),
|
background-image:
|
||||||
|
linear-gradient(to right, rgba(255, 255, 255, 0) 31px, #eee 1px, rgba(255, 255, 255, 0) 33px),
|
||||||
linear-gradient(rgba(255, 255, 255, 0) 23px, #eee 1px);
|
linear-gradient(rgba(255, 255, 255, 0) 23px, #eee 1px);
|
||||||
outline-color: #eee;
|
outline-color: #eee;
|
||||||
}
|
}
|
||||||
|
@ -63,7 +64,8 @@ a {
|
||||||
|
|
||||||
.article[data-bg-grid="grid-12"] {
|
.article[data-bg-grid="grid-12"] {
|
||||||
background-size: 100% 12px;
|
background-size: 100% 12px;
|
||||||
background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 31px, #eee 1px, rgba(255, 255, 255, 0) 33px),
|
background-image:
|
||||||
|
linear-gradient(to right, rgba(255, 255, 255, 0) 31px, #eee 1px, rgba(255, 255, 255, 0) 33px),
|
||||||
linear-gradient(rgba(255, 255, 255, 0) 11px, #eee 12px);
|
linear-gradient(rgba(255, 255, 255, 0) 11px, #eee 12px);
|
||||||
outline-color: #eee;
|
outline-color: #eee;
|
||||||
}
|
}
|
||||||
|
@ -313,4 +315,7 @@ a {
|
||||||
margin-block-start: 12px;
|
margin-block-start: 12px;
|
||||||
margin-block-end: 0;
|
margin-block-end: 0;
|
||||||
}
|
}
|
||||||
|
.article .article__toc ol ol {
|
||||||
|
margin-block-start: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
137
_site/index.html
137
_site/index.html
|
@ -6,7 +6,7 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="stylesheet" href="./normalize.css">
|
<link rel="stylesheet" href="./normalize.css">
|
||||||
<link rel="stylesheet" href="./index.css">
|
<link rel="stylesheet" href="./index.css">
|
||||||
<link rel="stylesheet" href="./heti.min.css">
|
<link rel="stylesheet" href="./heti.css">
|
||||||
<link rel="icon" href="./favicon.svg">
|
<link rel="icon" href="./favicon.svg">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
<h1>赫蹏</h1>
|
<h1>赫蹏</h1>
|
||||||
<blockquote>古代称用以书写的小幅绢帛。后亦以借指纸。《汉书·外戚传下·孝成赵皇后》:<q>武(籍武 )发篋中,有裹药二枚,赫蹏书。</q><u>颜师古</u>注:<q><u>邓展</u>曰:<q>赫音兄弟鬩墙之鬩。</q><u>应劭</u>曰:<q>赫蹏,薄小纸也。</q></q><u>宋</u><u>赵彦卫</u> 《云麓漫钞》卷七:<q>《赵后传》所谓『赫蹏』者,注云<q>薄小纸</q>,然其寔亦縑帛。</q></blockquote>
|
<blockquote>古代称用以书写的小幅绢帛。后亦以借指纸。《汉书·外戚传下·孝成赵皇后》:<q>武(籍武 )发篋中,有裹药二枚,赫蹏书。</q><u>颜师古</u>注:<q><u>邓展</u>曰:<q>赫音兄弟鬩墙之鬩。</q><u>应劭</u>曰:<q>赫蹏,薄小纸也。</q></q><u>宋</u><u>赵彦卫</u> 《云麓漫钞》卷七:<q>《赵后传》所谓『赫蹏』者,注云<q>薄小纸</q>,然其寔亦縑帛。</q></blockquote>
|
||||||
|
|
||||||
<nav class="article__toc">
|
<nav class="article__toc heti-skip">
|
||||||
<details open>
|
<details open>
|
||||||
<summary>目录</summary>
|
<summary>目录</summary>
|
||||||
<ol>
|
<ol>
|
||||||
|
@ -31,34 +31,33 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#columns">多栏排版</a></li>
|
<li><a href="#columns">多栏排版</a></li>
|
||||||
<li><a href="#vertical">垂直排版</a></li>
|
<li><a href="#vertical">竖排排版</a></li>
|
||||||
<li><a href="#guidelines">排版原则</a></li>
|
<li><a href="#guidelines">设计原则</a></li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#appendix">附录</a>
|
<a href="#appendix">附录</a>
|
||||||
<ol class="heti-list-latin">
|
<ol class="heti-list-latin">
|
||||||
<li><a href="#compatibility">兼容性</a></li>
|
<li><a href="#compatibility">兼容性</a></li>
|
||||||
<li><a href="#tags">标签示例表</a></li>
|
<li><a href="#tags">标签示例表</a></li>
|
||||||
|
<li><a href="#javascript">增强脚本</a></li>
|
||||||
<li><a href="#license">开源协议</a></li>
|
<li><a href="#license">开源协议</a></li>
|
||||||
</ol>
|
</ol>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#wip">待开发功能</a></li>
|
|
||||||
</ol>
|
</ol>
|
||||||
</details>
|
</details>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<h2 id="intro">介绍<a class="anchor" href="#intro">#</a></h2>
|
<h2 id="intro">介绍<a class="anchor" href="#intro">#</a></h2>
|
||||||
<p><dfn>赫蹏</dfn>(<code>hètí</code>)是专为中文内容展示设计的排版样式增强。它基于通行的中文排版规范而来,可以为网站的读者带来更好的文章阅读体验。由于它不同于传统的网页样式重置,而是专注于<em>正文区域</em>的样式增强,因此可以很好的与常见的CSS样式重置方案共存。</p>
|
<p><ruby class="heti-ruby--inline"><rb>赫</rb><rp>(</rp><rt>hè</rt><rp>)</rp></ruby><ruby class="heti-ruby--inline"><rb>蹏</rb><rp>(</rp><rt>tí</rt><rp>)</rp></ruby>是专为中文网页内容设计的排版样式增强。它基于通行的中文排版规范,可为网站的读者带来更好的内容阅读体验。它的主要特性有:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>全标签样式统一;</li>
|
|
||||||
<li>贴合网格的排版;</li>
|
<li>贴合网格的排版;</li>
|
||||||
<li>预置多种预设字体族(仅限桌面端);</li>
|
<li>全标签样式美化;</li>
|
||||||
<li>预置横排、直排(竖排)样式;</li>
|
|
||||||
<li>预置古文、诗词样式;</li>
|
<li>预置古文、诗词样式;</li>
|
||||||
<li>预置行间注排版样式;</li>
|
<li>预置多种排版样式(行间注、多栏、竖排等);</li>
|
||||||
<li>预置多栏排版样式;</li>
|
<li>多种预设字体族(仅限桌面端);</li>
|
||||||
<li>兼容<i>normalize.css</i>、<i>CSS Reset</i><sup><a href="#fn-01">[1]</a></sup>;</li>
|
<li>简/繁体中文支持;</li>
|
||||||
|
<li>中西文混排美化(基于JavaScript脚本实现);</li>
|
||||||
|
<li>兼容<i>normalize.css</i>、<i>CSS Reset<sup><a id="ref-01" href="#fn-01">[1]</a></sup></i>;</li>
|
||||||
<li>移动端支持;</li>
|
<li>移动端支持;</li>
|
||||||
<li>基于BEM<sup><a href="#fn-02">[2]</a></sup>命名;</li>
|
|
||||||
<li>……</li>
|
<li>……</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>总之,用上就会变好看。</p>
|
<p>总之,用上就会变好看。</p>
|
||||||
|
@ -66,27 +65,27 @@
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<h2 id="usage">使用方法<a class="anchor" href="#usage">#</a></h2>
|
<h2 id="usage">使用方法<a class="anchor" href="#usage">#</a></h2>
|
||||||
<p>赫蹏的使用方法很简单,只需要引入样式文件并设定作用范围即可:</p>
|
<p>赫蹏的源文件可在项目仓库(<a href="https://github.com/sivan/heti">https://github.com/sivan/heti</a>)下载,生产文件位于<code>dist</code>文件夹。使用方法如下:</p>
|
||||||
<ol>
|
<ol>
|
||||||
<li>
|
<li>
|
||||||
在页面的<code><head></code>标签中引入<code>heti.css</code>文件:
|
在页面的<code></head></code>标签前中引入<code>heti.css</code>样式文件:
|
||||||
<pre><code><link rel="stylesheet" href="./heti.css"></code></pre>
|
<pre><code><link rel="stylesheet" href="./heti.css"></code></pre>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
在要作用的容器元素上增加<code>class="heti"</code>的类名即可:
|
在要作用的容器元素上增加<code>class="heti"</code>的类名即可:
|
||||||
<pre><code><article class="entry heti">
|
<pre><code><article class="entry <ins>heti</ins>">
|
||||||
<h1>我的世界观</h1>
|
<h1>我的世界观</h1>
|
||||||
<p>有钱人的生活就是这么朴实无华,且枯燥</p>
|
<p>有钱人的生活就是这么朴实无华,且枯燥</p>
|
||||||
……
|
……
|
||||||
</article></code></pre>
|
</article></code></pre>
|
||||||
</li>
|
</li>
|
||||||
<li>不建议将样式作用在根标签(比如<code><body></code>或<code><div class="container"></code>)上,除非你的页面<u title="就像本页面一样">通篇都是文章的一部分</u>。</li>
|
<li>注意:赫蹏是正文区域的样式增强,不是<i>normalize.css</i>或<i>CSS Reset</i>的替代。因此<b>不建议</b>将它作用在根标签(如<code><body></code>或<code><div class="container"></code>)上,除非像本页面一样通篇都是文章的一部分。</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<h2 id="examples">效果示例<a class="anchor" href="#examples">#</a></h2>
|
<h2 id="examples">效果示例<a class="anchor" href="#examples">#</a></h2>
|
||||||
<p>本站已<em>全页</em>应用了赫蹏样式,下面是赫蹏在特殊排版下的效果演示。</p>
|
<p>本页面<em>全页</em>应用了赫蹏样式,所见即所得。下面是内置的多种排版效果演示。</p>
|
||||||
<details open>
|
<details open>
|
||||||
<summary id="example-1">示例1:古文</summary>
|
<summary id="example-1">示例1:古文</summary>
|
||||||
<section class="demo">
|
<section class="demo">
|
||||||
|
@ -120,12 +119,12 @@
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="heti--poetry">
|
<div class="heti--poetry">
|
||||||
<h2>丑奴儿·书博山道中壁<span class="heti-meta heti-small">[宋]<abbr title="号稼轩">辛弃疾</abbr></span></h2>
|
<h2>赠汪伦<span class="heti-meta heti-small">[唐]<abbr title="号青莲居士">李白</abbr></span></h2>
|
||||||
<p class="heti-x-large">
|
<p class="heti-x-large">
|
||||||
少年不识愁滋味,爱上层楼<span class="heti-hang">。</span><br>
|
李白乘舟将欲行<span class="heti-hang">,</span><br>
|
||||||
爱上层楼,为赋新词强说愁<span class="heti-hang">。</span><br>
|
忽闻岸上踏歌声<span class="heti-hang">。</span><br>
|
||||||
而今识尽愁滋味,欲说还休<span class="heti-hang">。</span><br>
|
桃花潭水深千尺<span class="heti-hang">,</span><br>
|
||||||
欲说还休,却道天凉好个秋<span class="heti-hang">。</span>
|
不及汪伦送我情<span class="heti-hang">。</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
@ -162,27 +161,27 @@
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<h2 id="columns">多栏排版<a class="anchor" href="#columns">#</a></h2>
|
<h2 id="columns">多栏排版<a class="anchor" href="#columns">#</a></h2>
|
||||||
<p>赫蹏预置了多种多栏布局类,可以按栏数或栏宽进行设置。</p>
|
<p>赫蹏预置了多种多栏布局类,可以按栏数或每栏行宽进行设置。</p>
|
||||||
<details>
|
<details>
|
||||||
<summary>查看使用说明</summary>
|
<summary>查看使用说明</summary>
|
||||||
<p>为容器元素添加名为<code>heti--columns-2</code>class即可实现三栏排版。</p>
|
<p>为容器元素添加名为<code>heti--columns-2</code>的class即可实现双栏排版。</p>
|
||||||
<pre><code><div class="heti heti--columns-2"></div></code></pre>
|
<pre><code><div class="heti heti--columns-2">...</div></code></pre>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 60px;">方式</th>
|
<th style="width: 80px;">方式</th>
|
||||||
<th style="width: 160px;">对应类名</th>
|
<th style="width: 160px;">对应类名</th>
|
||||||
<th style="width: 280px;">可选数值</th>
|
<th style="width: 300px;">可选数值</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>按数量</td>
|
<td>按栏目数量</td>
|
||||||
<td><code>heti--columns-3</code></td>
|
<td><code>heti--columns-3</code></td>
|
||||||
<td>2, 3, 4</td>
|
<td>2, 3, 4</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>按宽度</td>
|
<td>按每栏行宽</td>
|
||||||
<td><code>heti--columns-16em</code></td>
|
<td><code>heti--columns-16em</code></td>
|
||||||
<td>16em, 20em, 24em, … +4em, … , 48em</td>
|
<td>16em, 20em, 24em, … +4em, … , 48em</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -206,12 +205,12 @@
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<h2 id="vertical">垂直排版<a class="anchor" href="#vertical">#</a></h2>
|
<h2 id="vertical">竖排排版<a class="anchor" href="#vertical">#</a></h2>
|
||||||
<p>赫蹏预置了传统的垂直方向排版,同样贴合栅格。</p>
|
<p>赫蹏预置了传统的竖排(直排)方向排版,同样贴合栅格。</p>
|
||||||
<details>
|
<details>
|
||||||
<summary>查看使用说明</summary>
|
<summary>查看使用说明</summary>
|
||||||
<p>为容器元素添加名为<code>heti--vertical</code>class即可实现垂直布局:</p>
|
<p>为容器元素添加名为<code>heti--vertical</code>的class即可实现竖排布局。</p>
|
||||||
<pre><code><div class="heti heti--vertical"></div></code></pre>
|
<pre><code><div class="heti heti--vertical">...</div></code></pre>
|
||||||
</details>
|
</details>
|
||||||
<figure class="card card--vertical">
|
<figure class="card card--vertical">
|
||||||
<div class="card__vertical-container">
|
<div class="card__vertical-container">
|
||||||
|
@ -227,21 +226,20 @@
|
||||||
<p>願陛下託臣以討賊興復之效;不效,則治臣之罪,以告先帝之靈。若無興德之言,則責攸之、禕、允等之慢,以彰其咎。陛下亦宜自謀,以諮諏善道,察納雅言,深追先帝遺詔。臣不勝受恩感激。今當遠離,臨表涕零,不知所言!</p>
|
<p>願陛下託臣以討賊興復之效;不效,則治臣之罪,以告先帝之靈。若無興德之言,則責攸之、禕、允等之慢,以彰其咎。陛下亦宜自謀,以諮諏善道,察納雅言,深追先帝遺詔。臣不勝受恩感激。今當遠離,臨表涕零,不知所言!</p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<figcaption>垂直排版演示</figcaption>
|
<figcaption>竖排排版演示</figcaption>
|
||||||
</figure>
|
</figure>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<h2 id="guidelines">排版原则<a class="anchor" href="#guidelines">#</a></h2>
|
<h2 id="guidelines">设计原则<a class="anchor" href="#guidelines">#</a></h2>
|
||||||
|
<p>赫蹏项目的初衷很简单:它不作为一个CSS Reset出现,而是根据通行的中文排版规范,对网页正文区域进行排版样式增强。在部分CSS特性尚未有浏览器支持前,可通过JavaScript实现部分补充(非必要)。</p>
|
||||||
<h3>核心</h3>
|
<h3>核心</h3>
|
||||||
<p>以美化中文方块字排版为目标,假定作用范围是网页中的文章区域(含标题、正文、元信息等),不包含网页导航、表单、侧边栏等区域(它们也不需要这套格式排版)。</p>
|
<p>美化中文方块字排版,作用范围是网页中的文章区域(含标题、正文、元信息等),不包含网页导航、表单、侧边栏等区域(它们也不需要这套格式排版)。</p>
|
||||||
<p>使用<code>heti.css</code>时建议搭配良好的中文书写习惯,即:使用正确的HTML标签、正确的引号、中文全角标点等。使用Markdown书写文章将助你一臂之力。</p>
|
<p>使用<code>heti.css</code>时建议搭配良好的中文书写习惯,即:使用正确的HTML标签(可参考后面的<a href="#tags">标签示例表</a>)、正确的引号、中文全角标点等。使用Markdown书写文章将助你一臂之力。</p>
|
||||||
<h3>字号</h3>
|
<h3>文字</h3>
|
||||||
<p><code>heti.css</code> 采用16px作为默认字号。在文字较大时(作用于标题等情况),会适当地增加字间距以便获得更好地可读性。</p>
|
<p>参考《中文排版需求<sup><a id="ref-02" href="#fn-02">[2]</a></sup>》中描述的常用书籍排版字体,赫蹏提供了黑体、宋体和<u title="以正文宋体、标题楷体构成的搭配">传统</u>三种字体风格,前两者分别对应无衬线、衬线字体族。文字默认采用16px作为标准字号。在标题等文字较大的情况下,会适当地增加字间距以便获得更好地可读性。</p>
|
||||||
<h3>字体</h3>
|
|
||||||
<p>参考《中文排版需求<sup><a href="#fn-03">[3]</a></sup>》中描述的四种常见书籍排版字体:宋体、楷体、黑体、仿宋。赫蹏提供黑体、宋体和<u title="以正文宋体、标题楷体构成的搭配">传统</u>三种字体风格,前两者分别对应无衬线、衬线字体族。</p>
|
|
||||||
<details>
|
<details>
|
||||||
<summary>查看对照表</summary>
|
<summary>查看字体风格对照表</summary>
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<table>
|
<table>
|
||||||
<caption>各字体族下不同标签对应的字体</caption>
|
<caption>各字体族下不同标签对应的字体</caption>
|
||||||
|
@ -258,7 +256,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th>标题</th>
|
<th>标题</th>
|
||||||
<td>黑体</td>
|
<td>黑体</td>
|
||||||
<td>宋体(粗)</td>
|
<td>宋体</td>
|
||||||
<td>楷体</td>
|
<td>楷体</td>
|
||||||
<td>
|
<td>
|
||||||
<section>
|
<section>
|
||||||
|
@ -363,7 +361,7 @@
|
||||||
<h3>标点</h3>
|
<h3>标点</h3>
|
||||||
<p>参考《中文排版需求》制定符号样式。唯一差异在于简体中文一律采用直角引号(「」)替代圆角引号(“”),这样可以保持字符等宽。</p>
|
<p>参考《中文排版需求》制定符号样式。唯一差异在于简体中文一律采用直角引号(「」)替代圆角引号(“”),这样可以保持字符等宽。</p>
|
||||||
<h3>间距</h3>
|
<h3>间距</h3>
|
||||||
<p>为保持页面元素总是贴合垂直栅格,大部分块级元素(段落、列表、表格等)采用一行行高作为底边距,半行行高作为顶边距。</p>
|
<p>为保持页面元素总是贴合垂直栅格,块级元素(段落、列表、表格等)采用一行行高作为底边距,半行行高作为顶边距。标题根据亲密性原则采用相反的边距设计。</p>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
@ -402,14 +400,14 @@
|
||||||
<table>
|
<table>
|
||||||
<caption>常用标签样式示例表</caption>
|
<caption>常用标签样式示例表</caption>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="width: 80px;">类型</th>
|
<th style="width: 72px;">类型</th>
|
||||||
<th style="width: 320px;">标签</th>
|
<th style="width: 320px;">标签</th>
|
||||||
<th style="width: 240px;">效果</th>
|
<th style="width: 240px;">效果</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>链接</td>
|
<td>链接</td>
|
||||||
<td><code><a href="https://github.com/sivan/heti" title="赫蹏" target="_blank">heti.css</a></code></td>
|
<td><code><a href="https://github.com/sivan/heti" title="赫蹏">heti.css</a></code></td>
|
||||||
<td><a href="https://github.com/sivan/heti" title="赫蹏" target="_blank">heti.css</a></td>
|
<td><a href="https://github.com/sivan/heti" title="赫蹏">heti.css</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>缩写</td>
|
<td>缩写</td>
|
||||||
|
@ -428,8 +426,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>文本变动</td>
|
<td>文本变动</td>
|
||||||
<td><code>这次考试,我考了<del datetime="17:00:00">97</del><ins datetime="18:15:00">100</ins>分呢!</code></td>
|
<td><code>这次考试,我考了<del datetime="17:00:00">58</del><ins datetime="18:15:00">98</ins>分呢!</code></td>
|
||||||
<td>这次考试,我考了<del datetime="17:00:00">97</del><ins datetime="18:15:00">100</ins>分呢!</td>
|
<td>这次考试,我考了<del datetime="17:00:00">58</del><ins datetime="18:15:00">98</ins>分呢!</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>文本更新</td>
|
<td>文本更新</td>
|
||||||
|
@ -446,6 +444,11 @@
|
||||||
<td><code><dfn>窃·格瓦拉</dfn>,中国大陆网络红人、罪犯。被奉为百度「戒赌吧」400万会员的「精神领袖」。</code></td>
|
<td><code><dfn>窃·格瓦拉</dfn>,中国大陆网络红人、罪犯。被奉为百度「戒赌吧」400万会员的「精神领袖」。</code></td>
|
||||||
<td><dfn>窃·格瓦拉</dfn>,中国大陆网络红人、罪犯。被奉为百度「戒赌吧」400万会员的「精神领袖」。</td>
|
<td><dfn>窃·格瓦拉</dfn>,中国大陆网络红人、罪犯。被奉为百度「戒赌吧」400万会员的「精神领袖」。</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>标记</td>
|
||||||
|
<td><code>这道题<mark>必考</mark>,你们爱记不记。</code></td>
|
||||||
|
<td>这道题<mark>必考</mark>,你们爱记不记。</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>强调</td>
|
<td>强调</td>
|
||||||
<td><code>稳住,<em>我们能赢</em>!</code></td>
|
<td><code>稳住,<em>我们能赢</em>!</code></td>
|
||||||
|
@ -456,15 +459,22 @@
|
||||||
<td><code>我们<span class="heti-em">必将</span>战胜这场疫情。</code></td>
|
<td><code>我们<span class="heti-em">必将</span>战胜这场疫情。</code></td>
|
||||||
<td>我们<span class="heti-em">必将</span>战胜这场疫情。</td>
|
<td>我们<span class="heti-em">必将</span>战胜这场疫情。</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td>标记</td>
|
|
||||||
<td><code>这道题<mark>必考</mark>,你们爱记不记。</code></td>
|
|
||||||
<td>这道题<mark>必考</mark>,你们爱记不记。</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
<h3 id="javascript">增强脚本<sup>beta</sup><a class="anchor" href="#javascript">#</a></h3>
|
||||||
|
<p>由于部分CSS特性尚未有浏览器,所以可选择使用增强脚本进行中西文混排优化。无论你的输入习惯是否在中西文之间加入「空格」,都会统一成一样的间距(1/4字宽的空白)。</p>
|
||||||
|
<details>
|
||||||
|
<summary>查看使用说明</summary>
|
||||||
|
<p>在页面的<code></body></code>标签前引入JavaScript脚本:</p>
|
||||||
|
<pre><code><script src="./heti-addon.min.js"></script>
|
||||||
|
<script>
|
||||||
|
const heti = new Heti();
|
||||||
|
heti.autoSpacing();
|
||||||
|
</script></code></pre>
|
||||||
|
</details>
|
||||||
|
|
||||||
<h3 id="license">开源协议<a class="anchor" href="#tags">#</a></h3>
|
<h3 id="license">开源协议<a class="anchor" href="#tags">#</a></h3>
|
||||||
<p>「赫蹏」遵循MIT协议开源。</p>
|
<p>「赫蹏」遵循MIT协议开源。</p>
|
||||||
|
|
||||||
|
@ -472,18 +482,23 @@
|
||||||
|
|
||||||
<h2 id="wip">待开发功能<a class="anchor" href="#wip">#</a></h2>
|
<h2 id="wip">待开发功能<a class="anchor" href="#wip">#</a></h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>️☑ 中、西文混排</li>
|
|
||||||
<li>☑ 标点挤压</li>
|
<li>☑ 标点挤压</li>
|
||||||
<li>☑ 标点悬挂</li>
|
<li>☑ 标点悬挂</li>
|
||||||
|
<li>✅ 中、西文混排</li>
|
||||||
<li>✅ 诗词版式</li>
|
<li>✅ 诗词版式</li>
|
||||||
<li>✅ 行间注版式</li>
|
<li>✅ 行间注版式</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<footer class="heti-fn">
|
<footer class="heti-fn">
|
||||||
<ol>
|
<ol>
|
||||||
<li id="fn-01">CSS Reset:指代类似Eric Meyer's Reset CSS的样式重置方案</li>
|
<li id="fn-01">
|
||||||
<li id="fn-02">BEM:由Yandex公司创造的命名方式 https://en.bem.info/</li>
|
<a href="#ref-01" title="移至">^</a>
|
||||||
<li id="fn-03">《中文排版需求》:https://w3c.github.io/clreq/</li>
|
CSS Reset:指代类似Eric Meyer's Reset CSS的样式重置方案
|
||||||
|
</li>
|
||||||
|
<li id="fn-02">
|
||||||
|
<a href="#ref-02" title="移至">^</a>
|
||||||
|
《中文排版需求》:https://w3c.github.io/clreq/
|
||||||
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</footer>
|
</footer>
|
||||||
</article>
|
</article>
|
||||||
|
@ -502,6 +517,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
|
<script src="./heti-addon.js"></script>
|
||||||
<script>
|
<script>
|
||||||
const $$root = document.getElementsByTagName('article')[0]
|
const $$root = document.getElementsByTagName('article')[0]
|
||||||
|
|
||||||
|
@ -518,6 +534,9 @@
|
||||||
addEventListeners(document.getElementsByClassName('J_radioGrid'), 'change', function (e) {
|
addEventListeners(document.getElementsByClassName('J_radioGrid'), 'change', function (e) {
|
||||||
$$root.setAttribute('data-bg-grid', e.target.value)
|
$$root.setAttribute('data-bg-grid', e.target.value)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const heti = new Heti()
|
||||||
|
heti.autoSpacing()
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
107
add-ons/add-on.js
Normal file
107
add-ons/add-on.js
Normal file
|
@ -0,0 +1,107 @@
|
||||||
|
/**
|
||||||
|
* Heti add-on v 0.1.0
|
||||||
|
* Add right spacing between CJK & ANS characters
|
||||||
|
*/
|
||||||
|
|
||||||
|
import Finder from 'findandreplacedomtext'
|
||||||
|
|
||||||
|
// 正则表达式来自 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
|
||||||
|
}
|
||||||
|
|
||||||
|
Finder($$elm, Object.assign(commonConfig, {
|
||||||
|
find: this.REG_FULL,
|
||||||
|
replace: portion => getWrapper('heti-spacing-start heti-spacing-end', portion.text),
|
||||||
|
}))
|
||||||
|
|
||||||
|
Finder($$elm, Object.assign(commonConfig, {
|
||||||
|
find: this.REG_START,
|
||||||
|
replace: portion => getWrapper('heti-spacing-start', portion.text),
|
||||||
|
}))
|
||||||
|
|
||||||
|
Finder($$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)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Heti
|
1
dist/heti-addon.min.js
vendored
Normal file
1
dist/heti-addon.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
dist/heti.min.css
vendored
Normal file
5
dist/heti.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -23,21 +23,16 @@
|
||||||
margin-block-end: $std-block-unit;
|
margin-block-end: $std-block-unit;
|
||||||
font-size: $font-size-h1;
|
font-size: $font-size-h1;
|
||||||
line-height: $line-height-size-h1;
|
line-height: $line-height-size-h1;
|
||||||
|
|
||||||
// 中文大标题增加微小文字间距
|
|
||||||
letter-spacing: $font-size-h1 * 0.05;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
font-size: $font-size-h2;
|
font-size: $font-size-h2;
|
||||||
line-height: $line-height-size-h2;
|
line-height: $line-height-size-h2;
|
||||||
letter-spacing: $font-size-h2 * 0.05;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
font-size: $font-size-h3;
|
font-size: $font-size-h3;
|
||||||
line-height: $line-height-size-h3;
|
line-height: $line-height-size-h3;
|
||||||
letter-spacing: $font-size-h3 * 0.05;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h4 {
|
h4 {
|
||||||
|
@ -58,6 +53,9 @@
|
||||||
h1,
|
h1,
|
||||||
h2,
|
h2,
|
||||||
h3 {
|
h3 {
|
||||||
|
// 中文大标题增加微小文字间距
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
|
||||||
// 非中文时不加间距
|
// 非中文时不加间距
|
||||||
@include non-cjk-block {
|
@include non-cjk-block {
|
||||||
letter-spacing: 0;
|
letter-spacing: 0;
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
|
|
||||||
rt {
|
rt {
|
||||||
font-size: 0.875em;
|
font-size: 0.875em;
|
||||||
color: rgba(0, 0, 0, 0.88);
|
font-weight: $font-weight-normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 完美 <small> 字号 by Sivan
|
// 完美 <small> 字号 by Sivan
|
||||||
|
@ -111,6 +111,7 @@
|
||||||
margin-inline-end: 0.25em;
|
margin-inline-end: 0.25em;
|
||||||
font-size: 0.75em;
|
font-size: 0.75em;
|
||||||
font-family: $font-family-hei;
|
font-family: $font-family-hei;
|
||||||
|
font-style: normal;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
@ -121,6 +122,11 @@
|
||||||
|
|
||||||
sup {
|
sup {
|
||||||
top: -0.5em;
|
top: -0.5em;
|
||||||
|
|
||||||
|
&:target,
|
||||||
|
a:target {
|
||||||
|
background-color: #def;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
summary {
|
summary {
|
||||||
|
@ -155,7 +161,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 为所有加划线的元素增加缝隙
|
// 为带划线的元素添加间距,以防止视觉上混为一个元素
|
||||||
|
// 注: 如果设成为两个相连元素添加间距,会有一个问题:
|
||||||
|
// 如果结构是 `<u>倚天</u>和<u>屠龙</u>`,「屠龙」前面仍然会有边距。
|
||||||
|
// 此处跟预期不一致,应该只在两个同名元素紧邻时增加边距,即:`<u>倚天剑</u><u>屠龙刀</u>`
|
||||||
|
//@each $tag in (abbr[title], del, ins, s, u) {
|
||||||
|
// #{$tag} + #{$tag} {
|
||||||
|
// margin-inline-start: 0.125em;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
// 因此采用下面的形式,为所有加划线的元素增加缝隙
|
||||||
abbr[title],
|
abbr[title],
|
||||||
del,
|
del,
|
||||||
ins,
|
ins,
|
||||||
|
@ -164,12 +179,4 @@
|
||||||
margin-inline-start: 1px;
|
margin-inline-start: 1px;
|
||||||
margin-inline-end: 1px;
|
margin-inline-end: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 带边框的元素,两个相连时添加间距,以防止视觉上混为一个元素
|
|
||||||
// @todo: 此处有一个问题:如果结构是 <u>倚天</u>和<u>屠龙</u>,「屠龙」前面仍然会有边距。此处跟预期不一致,应该只在两个同名元素紧邻时增加边距,即:<u>倚天剑</u><u>屠龙刀</u>
|
|
||||||
//@each $tag in (abbr[title], del, ins, s, u) {
|
|
||||||
// #{$tag} + #{$tag} {
|
|
||||||
// margin-inline-start: 0.125em;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
23
lib/helpers/_add-on.scss
Normal file
23
lib/helpers/_add-on.scss
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
// Author: Sivan [sun.sivan@gmail.com]
|
||||||
|
// Description: define add-ons.
|
||||||
|
@import "../variables";
|
||||||
|
|
||||||
|
@mixin hetiAddOns {
|
||||||
|
// 用于中西文混排增加边距
|
||||||
|
heti-spacing {
|
||||||
|
display: inline;
|
||||||
|
|
||||||
|
& + sup,
|
||||||
|
& + sub {
|
||||||
|
margin-inline-start: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.heti-spacing-start {
|
||||||
|
margin-inline-end: 0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.heti-spacing-end {
|
||||||
|
margin-inline-start: 0.25em;
|
||||||
|
}
|
||||||
|
}
|
|
@ -26,6 +26,7 @@
|
||||||
&-x-large {
|
&-x-large {
|
||||||
font-size: $font-size-x-large;
|
font-size: $font-size-x-large;
|
||||||
line-height: $line-height-size-x-large;
|
line-height: $line-height-size-x-large;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-small {
|
&-small {
|
||||||
|
@ -78,5 +79,11 @@
|
||||||
margin-block-start: $std-block-unit / 2;
|
margin-block-start: $std-block-unit / 2;
|
||||||
margin-block-end: 0;
|
margin-block-end: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
li {
|
||||||
|
&:target {
|
||||||
|
background-color: #def;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,12 +3,13 @@
|
||||||
@import "../variables";
|
@import "../variables";
|
||||||
|
|
||||||
@mixin hetiInlineHelperClasses {
|
@mixin hetiInlineHelperClasses {
|
||||||
|
// 标点悬挂 Punctuation mark hanging
|
||||||
// @todo: 用于标点悬挂用的样式
|
// @todo: 用于标点悬挂用的样式
|
||||||
#{$root-selector}-hang {
|
#{$root-selector}-hang {
|
||||||
@include hang();
|
@include hang();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 显示强烈的着重号
|
// 强烈着重号 Emphasis Mark
|
||||||
#{$root-selector}-em {
|
#{$root-selector}-em {
|
||||||
-webkit-text-emphasis: filled circle;
|
-webkit-text-emphasis: filled circle;
|
||||||
-webkit-text-emphasis-position: under;
|
-webkit-text-emphasis-position: under;
|
||||||
|
@ -17,4 +18,21 @@
|
||||||
-webkit-text-emphasis: none;
|
-webkit-text-emphasis: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 内联 Ruby
|
||||||
|
// 在非行间注排版中使用 ruby 标签,且不额外占据空间
|
||||||
|
// 注:使用此样式需按字拆分 <ruby class="heti-ruby heti-ruby--inline"><rb>赫</rb><rp>(</rp><rt>hè</rt><rp>)</rp></ruby>
|
||||||
|
// https://stackoverflow.com/questions/38680695/adjust-the-vertical-positioning-of-ruby-text/38877801#38877801
|
||||||
|
#{$root-selector}-ruby {
|
||||||
|
&--inline {
|
||||||
|
display: inline-flex;
|
||||||
|
flex-direction: column-reverse;
|
||||||
|
height: 1.5em;
|
||||||
|
|
||||||
|
rt {
|
||||||
|
display: inline;
|
||||||
|
line-height: 0.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
@import "modifiers/annotation";
|
@import "modifiers/annotation";
|
||||||
@import "helpers/block";
|
@import "helpers/block";
|
||||||
@import "helpers/inline";
|
@import "helpers/inline";
|
||||||
|
@import "helpers/add-on";
|
||||||
|
|
||||||
#{$root-selector} {
|
#{$root-selector} {
|
||||||
// 中文每行展示文字(CPL)建议在 30~50 之间,默认 42
|
// 中文每行展示文字(CPL)建议在 30~50 之间,默认 42
|
||||||
|
@ -25,6 +26,7 @@
|
||||||
// 默认字体大小为 16px,行高 1.5
|
// 默认字体大小为 16px,行高 1.5
|
||||||
font-size: $font-size-normal;
|
font-size: $font-size-normal;
|
||||||
font-weight: $font-weight-normal;
|
font-weight: $font-weight-normal;
|
||||||
|
-webkit-font-smoothing: subpixel-antialiased;
|
||||||
line-height: $line-height-normal;
|
line-height: $line-height-normal;
|
||||||
|
|
||||||
// 自动在中西文间加 1/4 空格(暂无浏览器支持)
|
// 自动在中西文间加 1/4 空格(暂无浏览器支持)
|
||||||
|
@ -52,4 +54,5 @@
|
||||||
// .heti .heti-verse, .heti .heti-hang
|
// .heti .heti-verse, .heti .heti-hang
|
||||||
@include hetiBlockHelperClasses();
|
@include hetiBlockHelperClasses();
|
||||||
@include hetiInlineHelperClasses();
|
@include hetiInlineHelperClasses();
|
||||||
|
@include hetiAddOns();
|
||||||
}
|
}
|
||||||
|
|
395
package-lock.json
generated
395
package-lock.json
generated
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "heti",
|
"name": "heti",
|
||||||
"version": "0.3.4",
|
"version": "0.4.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -214,12 +214,53 @@
|
||||||
"fastq": "^1.6.0"
|
"fastq": "^1.6.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@rollup/plugin-commonjs": {
|
||||||
|
"version": "11.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-11.0.2.tgz",
|
||||||
|
"integrity": "sha512-MPYGZr0qdbV5zZj8/2AuomVpnRVXRU5XKXb3HVniwRoRCreGlf5kOE081isNWeiLIi6IYkwTX9zE0/c7V8g81g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@rollup/pluginutils": "^3.0.0",
|
||||||
|
"estree-walker": "^1.0.1",
|
||||||
|
"is-reference": "^1.1.2",
|
||||||
|
"magic-string": "^0.25.2",
|
||||||
|
"resolve": "^1.11.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@rollup/plugin-node-resolve": {
|
||||||
|
"version": "7.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.1.tgz",
|
||||||
|
"integrity": "sha512-14ddhD7TnemeHE97a4rLOhobfYvUVcaYuqTnL8Ti7Jxi9V9Jr5LY7Gko4HZ5k4h4vqQM0gBQt6tsp9xXW94WPA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@rollup/pluginutils": "^3.0.6",
|
||||||
|
"@types/resolve": "0.0.8",
|
||||||
|
"builtin-modules": "^3.1.0",
|
||||||
|
"is-module": "^1.0.0",
|
||||||
|
"resolve": "^1.14.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@rollup/pluginutils": {
|
||||||
|
"version": "3.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.8.tgz",
|
||||||
|
"integrity": "sha512-rYGeAc4sxcZ+kPG/Tw4/fwJODC3IXHYDH4qusdN/b6aLw5LPUbzpecYbEJh4sVQGPFJxd2dBU4kc1H3oy9/bnw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"estree-walker": "^1.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@types/color-name": {
|
"@types/color-name": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
|
||||||
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
|
"integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"@types/estree": {
|
||||||
|
"version": "0.0.39",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
|
||||||
|
"integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"@types/minimist": {
|
"@types/minimist": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz",
|
||||||
|
@ -244,6 +285,15 @@
|
||||||
"integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==",
|
"integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"@types/resolve": {
|
||||||
|
"version": "0.0.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-0.0.8.tgz",
|
||||||
|
"integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@types/unist": {
|
"@types/unist": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz",
|
||||||
|
@ -276,6 +326,12 @@
|
||||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"acorn": {
|
||||||
|
"version": "7.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
|
||||||
|
"integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"ajv": {
|
"ajv": {
|
||||||
"version": "6.11.0",
|
"version": "6.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz",
|
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.11.0.tgz",
|
||||||
|
@ -369,12 +425,6 @@
|
||||||
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
|
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"array-uniq": {
|
|
||||||
"version": "1.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
|
|
||||||
"integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"arrify": {
|
"arrify": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
|
||||||
|
@ -402,15 +452,6 @@
|
||||||
"integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
|
"integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"async": {
|
|
||||||
"version": "2.6.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz",
|
|
||||||
"integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"lodash": "^4.17.14"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"async-foreach": {
|
"async-foreach": {
|
||||||
"version": "0.1.3",
|
"version": "0.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz",
|
||||||
|
@ -523,6 +564,18 @@
|
||||||
"node-releases": "^1.1.46"
|
"node-releases": "^1.1.46"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"buffer-from": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"builtin-modules": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"callsites": {
|
"callsites": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
|
||||||
|
@ -949,12 +1002,6 @@
|
||||||
"integrity": "sha512-C1i/vH6/kQx9YV8RddMkmW216GwW4pTrnYIlKmDFIqXA4fPwqDxIdGyHsuG+fgurHoljRz7/oaD+tztcryW/9g==",
|
"integrity": "sha512-C1i/vH6/kQx9YV8RddMkmW216GwW4pTrnYIlKmDFIqXA4fPwqDxIdGyHsuG+fgurHoljRz7/oaD+tztcryW/9g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"email-addresses": {
|
|
||||||
"version": "3.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/email-addresses/-/email-addresses-3.1.0.tgz",
|
|
||||||
"integrity": "sha512-k0/r7GrWVL32kZlGwfPNgB2Y/mMXVTq/decgLczm/j34whdaspNrZO8CnXPf1laaHxI6ptUlsnAxN+UAPw+fzg==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"emoji-regex": {
|
"emoji-regex": {
|
||||||
"version": "8.0.0",
|
"version": "8.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
|
||||||
|
@ -982,6 +1029,12 @@
|
||||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"estree-walker": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz",
|
||||||
|
"integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"esutils": {
|
"esutils": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
||||||
|
@ -1052,33 +1105,6 @@
|
||||||
"flat-cache": "^2.0.1"
|
"flat-cache": "^2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filename-reserved-regex": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz",
|
|
||||||
"integrity": "sha1-5hz4BfDeHJhFZ9A4bcXfUO5a9+Q=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"filenamify": {
|
|
||||||
"version": "1.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/filenamify/-/filenamify-1.2.1.tgz",
|
|
||||||
"integrity": "sha1-qfL/0RxQO+0wABUCknI3jx8TZaU=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"filename-reserved-regex": "^1.0.0",
|
|
||||||
"strip-outer": "^1.0.0",
|
|
||||||
"trim-repeated": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"filenamify-url": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/filenamify-url/-/filenamify-url-1.0.0.tgz",
|
|
||||||
"integrity": "sha1-syvYExnvWGO3MHi+1Q9GpPeXX1A=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"filenamify": "^1.0.0",
|
|
||||||
"humanize-url": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fill-range": {
|
"fill-range": {
|
||||||
"version": "7.0.1",
|
"version": "7.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||||
|
@ -1098,6 +1124,11 @@
|
||||||
"path-exists": "^4.0.0"
|
"path-exists": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"findandreplacedomtext": {
|
||||||
|
"version": "0.4.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/findandreplacedomtext/-/findandreplacedomtext-0.4.6.tgz",
|
||||||
|
"integrity": "sha512-CVRIKbEwfWoKTSnLrmyX26WjMY7o0aUUTm0RXN47fF/eHINJa8C+YHZxGagC7gMWVaAEBFwH7uVXuhwZcylWOQ=="
|
||||||
|
},
|
||||||
"flat-cache": {
|
"flat-cache": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
|
||||||
|
@ -1132,17 +1163,6 @@
|
||||||
"mime-types": "^2.1.12"
|
"mime-types": "^2.1.12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fs-extra": {
|
|
||||||
"version": "8.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
|
|
||||||
"integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"graceful-fs": "^4.2.0",
|
|
||||||
"jsonfile": "^4.0.0",
|
|
||||||
"universalify": "^0.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"fs.realpath": {
|
"fs.realpath": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||||
|
@ -1250,44 +1270,6 @@
|
||||||
"assert-plus": "^1.0.0"
|
"assert-plus": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"gh-pages": {
|
|
||||||
"version": "2.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-2.2.0.tgz",
|
|
||||||
"integrity": "sha512-c+yPkNOPMFGNisYg9r4qvsMIjVYikJv7ImFOhPIVPt0+AcRUamZ7zkGRLHz7FKB0xrlZ+ddSOJsZv9XAFVXLmA==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"async": "^2.6.1",
|
|
||||||
"commander": "^2.18.0",
|
|
||||||
"email-addresses": "^3.0.1",
|
|
||||||
"filenamify-url": "^1.0.0",
|
|
||||||
"fs-extra": "^8.1.0",
|
|
||||||
"globby": "^6.1.0"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"array-union": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
|
|
||||||
"integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"array-uniq": "^1.0.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"globby": {
|
|
||||||
"version": "6.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
|
|
||||||
"integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"array-union": "^1.0.1",
|
|
||||||
"glob": "^7.0.3",
|
|
||||||
"object-assign": "^4.0.1",
|
|
||||||
"pify": "^2.0.0",
|
|
||||||
"pinkie-promise": "^2.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"glob": {
|
"glob": {
|
||||||
"version": "7.1.6",
|
"version": "7.1.6",
|
||||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
|
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
|
||||||
|
@ -1479,16 +1461,6 @@
|
||||||
"sshpk": "^1.7.0"
|
"sshpk": "^1.7.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"humanize-url": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/humanize-url/-/humanize-url-1.0.1.tgz",
|
|
||||||
"integrity": "sha1-9KuZ4NKIF0yk4eUEB8VfuuRk7/8=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"normalize-url": "^1.0.0",
|
|
||||||
"strip-url-auth": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"ignore": {
|
"ignore": {
|
||||||
"version": "5.1.4",
|
"version": "5.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz",
|
||||||
|
@ -1647,6 +1619,12 @@
|
||||||
"integrity": "sha512-zxQ9//Q3D/34poZf8fiy3m3XVpbQc7ren15iKqrTtLPwkPD/t3Scy9Imp63FujULGxuK0ZlCwoo5xNpktFgbOA==",
|
"integrity": "sha512-zxQ9//Q3D/34poZf8fiy3m3XVpbQc7ren15iKqrTtLPwkPD/t3Scy9Imp63FujULGxuK0ZlCwoo5xNpktFgbOA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"is-module": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"is-number": {
|
"is-number": {
|
||||||
"version": "7.0.0",
|
"version": "7.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||||
|
@ -1665,6 +1643,15 @@
|
||||||
"integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=",
|
"integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"is-reference": {
|
||||||
|
"version": "1.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.4.tgz",
|
||||||
|
"integrity": "sha512-uJA/CDPO3Tao3GTrxYn6AwkM4nUPJiGGYu5+cB8qbC7WGFlrKZbiRo7SFKxUAEpFUfiHofWCXBUNhvYJMh+6zw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/estree": "0.0.39"
|
||||||
|
}
|
||||||
|
},
|
||||||
"is-regexp": {
|
"is-regexp": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz",
|
||||||
|
@ -1713,6 +1700,27 @@
|
||||||
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
|
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"jest-worker": {
|
||||||
|
"version": "24.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz",
|
||||||
|
"integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"merge-stream": "^2.0.0",
|
||||||
|
"supports-color": "^6.1.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"supports-color": {
|
||||||
|
"version": "6.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
|
||||||
|
"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"has-flag": "^3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"js-base64": {
|
"js-base64": {
|
||||||
"version": "2.5.1",
|
"version": "2.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.1.tgz",
|
||||||
|
@ -1778,15 +1786,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jsonfile": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
|
||||||
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"graceful-fs": "^4.1.6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"jsprim": {
|
"jsprim": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
|
||||||
|
@ -1937,6 +1936,15 @@
|
||||||
"yallist": "^2.1.2"
|
"yallist": "^2.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"magic-string": {
|
||||||
|
"version": "0.25.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.6.tgz",
|
||||||
|
"integrity": "sha512-3a5LOMSGoCTH5rbqobC2HuDNRtE2glHZ8J7pK+QZYppyWA36yuNpsX994rIY2nCuyP7CZYy7lQq/X2jygiZ89g==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"sourcemap-codec": "^1.4.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"map-obj": {
|
"map-obj": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.1.0.tgz",
|
||||||
|
@ -1989,6 +1997,12 @@
|
||||||
"yargs-parser": "^16.1.0"
|
"yargs-parser": "^16.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"merge-stream": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"merge2": {
|
"merge2": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz",
|
||||||
|
@ -2354,18 +2368,6 @@
|
||||||
"integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=",
|
"integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"normalize-url": {
|
|
||||||
"version": "1.9.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-1.9.1.tgz",
|
|
||||||
"integrity": "sha1-LMDWazHqIwNkWENuNiDYWVTGbDw=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"object-assign": "^4.0.1",
|
|
||||||
"prepend-http": "^1.0.0",
|
|
||||||
"query-string": "^4.1.0",
|
|
||||||
"sort-keys": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"npmlog": {
|
"npmlog": {
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
|
||||||
|
@ -2736,12 +2738,6 @@
|
||||||
"integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==",
|
"integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"prepend-http": {
|
|
||||||
"version": "1.0.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz",
|
|
||||||
"integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"process-nextick-args": {
|
"process-nextick-args": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||||
|
@ -2772,16 +2768,6 @@
|
||||||
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
|
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"query-string": {
|
|
||||||
"version": "4.3.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/query-string/-/query-string-4.3.4.tgz",
|
|
||||||
"integrity": "sha1-u7aTucqRXCMlFbIosaArYJBD2+s=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"object-assign": "^4.1.0",
|
|
||||||
"strict-uri-encode": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"quick-lru": {
|
"quick-lru": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz",
|
||||||
|
@ -2993,6 +2979,47 @@
|
||||||
"glob": "^7.1.3"
|
"glob": "^7.1.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rollup": {
|
||||||
|
"version": "1.32.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-1.32.0.tgz",
|
||||||
|
"integrity": "sha512-ab2tF5pdDqm2zuI8j02ceyrJSScl9V2C24FgWQ1v1kTFTu1UrG5H0hpP++mDZlEFyZX4k0chtGEHU2i+pAzBgA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@types/estree": "*",
|
||||||
|
"@types/node": "*",
|
||||||
|
"acorn": "^7.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rollup-plugin-terser": {
|
||||||
|
"version": "5.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-jQI+nYhtDBc9HFRBz8iGttQg7li9klmzR62RG2W2nN6hJ/FI2K2ItYQ7kJ7/zn+vs+BP1AEccmVRjRN989I+Nw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"@babel/code-frame": "^7.5.5",
|
||||||
|
"jest-worker": "^24.9.0",
|
||||||
|
"rollup-pluginutils": "^2.8.2",
|
||||||
|
"serialize-javascript": "^2.1.2",
|
||||||
|
"terser": "^4.6.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rollup-pluginutils": {
|
||||||
|
"version": "2.8.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz",
|
||||||
|
"integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"estree-walker": "^0.6.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"estree-walker": {
|
||||||
|
"version": "0.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz",
|
||||||
|
"integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"run-parallel": {
|
"run-parallel": {
|
||||||
"version": "1.1.9",
|
"version": "1.1.9",
|
||||||
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz",
|
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz",
|
||||||
|
@ -3050,6 +3077,12 @@
|
||||||
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"serialize-javascript": {
|
||||||
|
"version": "2.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz",
|
||||||
|
"integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"set-blocking": {
|
"set-blocking": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
||||||
|
@ -3087,21 +3120,28 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sort-keys": {
|
|
||||||
"version": "1.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz",
|
|
||||||
"integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"is-plain-obj": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"source-map": {
|
"source-map": {
|
||||||
"version": "0.6.1",
|
"version": "0.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"source-map-support": {
|
||||||
|
"version": "0.5.16",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz",
|
||||||
|
"integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"buffer-from": "^1.0.0",
|
||||||
|
"source-map": "^0.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sourcemap-codec": {
|
||||||
|
"version": "1.4.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
|
||||||
|
"integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"spdx-correct": {
|
"spdx-correct": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz",
|
||||||
|
@ -3204,12 +3244,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"strict-uri-encode": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
|
|
||||||
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"string-width": {
|
"string-width": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
|
||||||
|
@ -3269,21 +3303,6 @@
|
||||||
"min-indent": "^1.0.0"
|
"min-indent": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"strip-outer": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz",
|
|
||||||
"integrity": "sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"escape-string-regexp": "^1.0.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"strip-url-auth": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-url-auth/-/strip-url-auth-1.0.1.tgz",
|
|
||||||
"integrity": "sha1-IrD6OkE4WzO+PzMVUbu4N/oM164=",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"style-search": {
|
"style-search": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz",
|
||||||
|
@ -3485,6 +3504,17 @@
|
||||||
"inherits": "2"
|
"inherits": "2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"terser": {
|
||||||
|
"version": "4.6.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/terser/-/terser-4.6.4.tgz",
|
||||||
|
"integrity": "sha512-5fqgBPLgVHZ/fVvqRhhUp9YUiGXhFJ9ZkrZWD9vQtFBR4QIGTnbsb+/kKqSqfgp3WnBwGWAFnedGTtmX1YTn0w==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"commander": "^2.20.0",
|
||||||
|
"source-map": "~0.6.1",
|
||||||
|
"source-map-support": "~0.5.12"
|
||||||
|
}
|
||||||
|
},
|
||||||
"to-fast-properties": {
|
"to-fast-properties": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
|
||||||
|
@ -3530,15 +3560,6 @@
|
||||||
"integrity": "sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA==",
|
"integrity": "sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"trim-repeated": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/trim-repeated/-/trim-repeated-1.0.0.tgz",
|
|
||||||
"integrity": "sha1-42RqLqTokTEr9+rObPsFOAvAHCE=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"escape-string-regexp": "^1.0.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"trim-trailing-lines": {
|
"trim-trailing-lines": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.2.tgz",
|
||||||
|
@ -3673,12 +3694,6 @@
|
||||||
"unist-util-is": "^3.0.0"
|
"unist-util-is": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"universalify": {
|
|
||||||
"version": "0.1.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
|
||||||
"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"uri-js": {
|
"uri-js": {
|
||||||
"version": "4.2.2",
|
"version": "4.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
|
||||||
|
|
30
package.json
30
package.json
|
@ -1,19 +1,18 @@
|
||||||
{
|
{
|
||||||
"name": "heti",
|
"name": "heti",
|
||||||
"version": "0.3.5",
|
"version": "0.4.0",
|
||||||
"description": "赫蹏是专为中文内容展示设计的排版样式增强。它基于通行的中文排版规范而来,可以为网站的读者带来更好的文章阅读体验。",
|
"description": "赫蹏是专为中文内容展示设计的排版样式增强。它基于通行的中文排版规范而来,可以为网站的读者带来更好的文章阅读体验。",
|
||||||
"main": "lib/heti.scss",
|
"main": "lib/heti.scss",
|
||||||
"files": [
|
"files": [
|
||||||
|
"add-ons",
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"directories": {
|
|
||||||
"lib": "lib"
|
|
||||||
},
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node-sass -w --output-style=expanded lib/heti.scss _site/heti.min.css",
|
"start": "node-sass -w --output-style=expanded lib/heti.scss _site/heti.css",
|
||||||
"build:expanded": "node-sass lib/heti.scss dist/heti.css --output-style=expanded",
|
"compile": "rollup -c -w",
|
||||||
"build:compressed": "node-sass lib/heti.scss dist/heti.min.css --output-style=compressed",
|
"build:style": "node-sass lib/heti.scss dist/heti.min.css --output-style=compressed",
|
||||||
"build": "npm run build:expanded && npm run build:compressed",
|
"build:script": "rollup -c",
|
||||||
|
"build": "npm run build:style && npm run build:script",
|
||||||
"test": "npx stylelint --config package.json 'lib/**/*.scss'"
|
"test": "npx stylelint --config package.json 'lib/**/*.scss'"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -33,8 +32,15 @@
|
||||||
"url": "https://github.com/sivan/heti/issues"
|
"url": "https://github.com/sivan/heti/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/sivan/heti#readme",
|
"homepage": "https://github.com/sivan/heti#readme",
|
||||||
|
"dependencies": {
|
||||||
|
"findandreplacedomtext": "^0.4.6"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@rollup/plugin-commonjs": "^11.0.2",
|
||||||
|
"@rollup/plugin-node-resolve": "^7.1.1",
|
||||||
"node-sass": "^4.13.1",
|
"node-sass": "^4.13.1",
|
||||||
|
"rollup": "^1.32.0",
|
||||||
|
"rollup-plugin-terser": "^5.2.0",
|
||||||
"stylelint": "^13.0.0",
|
"stylelint": "^13.0.0",
|
||||||
"stylelint-config-recommended-scss": "^4.1.0",
|
"stylelint-config-recommended-scss": "^4.1.0",
|
||||||
"stylelint-config-standard": "^19.0.0",
|
"stylelint-config-standard": "^19.0.0",
|
||||||
|
@ -53,6 +59,14 @@
|
||||||
"selectors-within-list"
|
"selectors-within-list"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"selector-type-no-unknown": [
|
||||||
|
true,
|
||||||
|
{
|
||||||
|
"ignore": [
|
||||||
|
"custom-elements"
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
30
rollup.config.js
Normal file
30
rollup.config.js
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
import commonjs from '@rollup/plugin-commonjs';
|
||||||
|
import resolve from '@rollup/plugin-node-resolve';
|
||||||
|
import {terser} from 'rollup-plugin-terser';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
input: 'add-ons/add-on.js',
|
||||||
|
output: [
|
||||||
|
{
|
||||||
|
file: '_site/heti-addon.js',
|
||||||
|
name: 'Heti',
|
||||||
|
format: 'umd'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
file: 'dist/heti-addon.min.js',
|
||||||
|
format: 'umd',
|
||||||
|
name: 'Heti',
|
||||||
|
plugins: [
|
||||||
|
terser({
|
||||||
|
output: {
|
||||||
|
comments: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
]
|
||||||
|
},
|
||||||
|
],
|
||||||
|
plugins: [
|
||||||
|
resolve(),
|
||||||
|
commonjs(),
|
||||||
|
]
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue