mirror of
https://github.com/wassname/template.git
synced 2026-06-28 08:08:48 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ab8ab149e6 |
@@ -11,7 +11,7 @@ To contribute a change, [check out the contributing guide](CONTRIBUTING.md).
|
|||||||
|
|
||||||
### Local Development
|
### Local Development
|
||||||
|
|
||||||
First, run `npm install` to install all node modules required. Then, run `npm run dev` to start a watching build rollup server. To view the sample pages in the repo, you can run `npm run serve` as a separate process which starts a static server. `npm run build` will run a one-time build.
|
Run `npm run start` to start a watching build rollup server. To view the sample pages in the repo, you can run `npm run serve` as a separate process which starts a static server. `npm run build` will run a one-time build.
|
||||||
|
|
||||||
|
|
||||||
## Disclaimer & License
|
## Disclaimer & License
|
||||||
|
|||||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "distill-template",
|
"name": "distill-template",
|
||||||
"version": "2.3.0",
|
"version": "2.2.26",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "distill-template",
|
"name": "distill-template",
|
||||||
"version": "2.3.0",
|
"version": "2.2.26",
|
||||||
"description": "Template for creating Distill articles.",
|
"description": "Template for creating Distill articles.",
|
||||||
"main": "dist/template.v2.js",
|
"main": "dist/template.v2.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ d-appendix {
|
|||||||
}
|
}
|
||||||
|
|
||||||
d-appendix h3 {
|
d-appendix h3 {
|
||||||
grid-column: page-start / text-start;
|
grid-column: text;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ export class Cite extends T(HTMLElement) {
|
|||||||
|
|
||||||
attributeChangedCallback(name, oldValue, newValue) {
|
attributeChangedCallback(name, oldValue, newValue) {
|
||||||
const eventName = oldValue ? 'onCiteKeyChanged' : 'onCiteKeyCreated';
|
const eventName = oldValue ? 'onCiteKeyChanged' : 'onCiteKeyCreated';
|
||||||
const keys = newValue.split(',').map(k => k.trim());
|
const keys = newValue.split(',');
|
||||||
const options = { detail: [this, keys], bubbles: true };
|
const options = { detail: [this, keys], bubbles: true };
|
||||||
const event = new CustomEvent(eventName, options);
|
const event = new CustomEvent(eventName, options);
|
||||||
document.dispatchEvent(event);
|
document.dispatchEvent(event);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export function _moveLegacyAffiliationFormatIntoArray(frontMatter) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function parseFrontmatter(element) {
|
export function parseFrontmatter(element) {
|
||||||
const scriptTag = element.firstElementChild;
|
const scriptTag = element.querySelector('script');
|
||||||
if (scriptTag) {
|
if (scriptTag) {
|
||||||
const type = scriptTag.getAttribute('type');
|
const type = scriptTag.getAttribute('type');
|
||||||
if (type.split('/')[1] == 'json') {
|
if (type.split('/')[1] == 'json') {
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ export function mergeFromYMLFrontmatter(target, source) {
|
|||||||
target.authors = source.authors.map( (authorObject) => new Author(authorObject));
|
target.authors = source.authors.map( (authorObject) => new Author(authorObject));
|
||||||
target.katex = source.katex;
|
target.katex = source.katex;
|
||||||
target.password = source.password;
|
target.password = source.password;
|
||||||
target.doi = source.doi;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class FrontMatter {
|
export class FrontMatter {
|
||||||
|
|||||||
Reference in New Issue
Block a user