mirror of
https://github.com/wassname/template.git
synced 2026-06-28 02:47:44 +08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 715dbec2a1 | |||
| 953991f3f7 | |||
| 998d88a927 | |||
| fa20821af9 | |||
| 07432d89e1 | |||
| 5e44237783 | |||
| 4ca4c92c13 | |||
| 92461b41a0 | |||
| 11026d1c2e |
@@ -0,0 +1 @@
|
||||
iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA99JREFUeNrsG4t1ozDMzQSM4A2ODUonKBucN2hugtIJ6E1AboLcBiQTkJsANiAb9OCd/OpzMWBJBl5TvaeXPiiyJetry0J8wW3D3QpjRh3GjneXDq+fSQA9s2mH9x3KDhN4foJfCb8N/Jrv+2fnDn8vLRQOplWHVYdvHZYdZsBcZP1vBmh/n8DzEmhUQDPaOuP9pFuY+JwJHwHnCLQE2tnWBGEyXozY9xCUgHMhhjE2I4heVWtgIkZ83wL6Qgxj1obfWBxymPwe+b00BCCRNPbwfb60yleAkkBHGT5AEehIYz7eJrFDMF9CvH4wwhcGHiHMneFvLDQwlwvMLQq58trRcYBWfYn0A0OgHWQUSu25mE+BnoYKnnEJoeIWAifzOv7vLWd2ZKRfWAIme3tOiUaQ3UnLkb0xj1FxRIeEGKaGIHOs9nEgLaaA9i0JRYo1Ic67wJW86KSKE/ZAM8KuVMk8ITVhmxUxJ3Cl2xlm9Vtkeju1+mpCQNxaEGNCY8bs9X2YqwNoQeGjBWut/ma0QAWy/TqAsHx9wSya3I5IRxOfTC+leG+kA/4vSeEcGBtNUN6byhu3+keEZCQJUNh8MAO7HL6H8pQLnsW/Hd4T4lv93TPjfM7A46iEEqbB5EDOvwYNW6tGNZzT/o+CZ6sqZ6wUtR/wf7mi/VL8iNciT6rHih48Y55b4nKCHJCCzb4y0nwFmin3ZEMIoLfZF8F7nncFmvnWBaBj7CGAYA/WGJsUwHdYqVDwAmNsUgAx4CGgAA7GOOxADYOFWOaIKifuVYzmOpREqA21Mo7aPsgiY1PhOMAmxtR+AUbYH3Id2wc0SAFIQTsn9IUGWR8k9jx3vtXSiAacFxTAGakBk9UudkNECd6jLe+6HrshshvIuC6IlLMRy7er+JpcKma24SlE4cFZSZJDGVVrsNvitQhQrDhW0jfiOLfFd47C42eHT56D/BK0To+58Ahj+cAT8HT1UWlfLZCCd/uKawzU0Rh2EyIX/Icqth3niG8ybNroezwe6khdCNxRN+l4XGdOLVLlOOt2hTRJlr1ETIuMAltVTMz70mJrkdGAaZLSmnBEqmAE32JCMmuTlCnRgsBENtOUpHhvvsYIL0ibnBkaC6QvKcR7738GKp0AKnim7xgUSNv1bpS8QwhBt8r+EP47v/oyRK/S34yJ9nT+AN0Tkm4OdB9E4BsmXM3SnMlRFUrtp6IDpV2eKzdYvF3etm3KhQksbOLChGkSmcBdmcEwvqkrMy5BzL00NZeu3qPYJOOuCc+5NjcWKXQxFvTa3NoXJ4d8in7fiAUuTt781dkvuHX4K8AA2Usy7yNKLy0AAAAASUVORK5CYII=
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="64px" height="64px" viewBox="-1214 838 64 64" style="enable-background:new -1214 838 64 64;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:none;stroke:#000000;}
|
||||
</style>
|
||||
<g>
|
||||
<g>
|
||||
<path class="st0" d="M-1182,841.2c-15.9,0-28.8,12.9-28.8,28.8s12.9,28.8,28.8,28.8s28.8-12.9,28.8-28.8S-1166.1,841.2-1182,841.2
|
||||
z M-1182,891.2c-7.7,0-13.9-6.1-13.9-13.8s13.9-22.2,13.9-36.3c0,14.2,13.9,28.7,13.9,36.3S-1174.3,891.2-1182,891.2z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 740 B |
@@ -0,0 +1,3 @@
|
||||
export default function(data) {
|
||||
return "crossref";
|
||||
}
|
||||
@@ -6,7 +6,7 @@ dt-header {
|
||||
display: block;
|
||||
position: relative;
|
||||
height: 60px;
|
||||
background-color: #fcfcfc;
|
||||
background-color: none;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
z-index: 2;
|
||||
|
||||
@@ -5,6 +5,7 @@ export default function(dom) {
|
||||
|
||||
let head = dom.querySelector("head");
|
||||
|
||||
|
||||
if (!dom.querySelector("meta[charset]")) {
|
||||
let meta = dom.createElement("meta");
|
||||
meta.setAttribute("charset", "utf-8");
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
import favicon from './distill-favicon.base64';
|
||||
|
||||
export default function(dom, data) {
|
||||
let head = dom.querySelector("head");
|
||||
let appendHead = html => appendHtml(head, html);
|
||||
@@ -9,7 +11,7 @@ export default function(dom, data) {
|
||||
|
||||
appendHead(`
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
|
||||
<link rel="icon" type="image/png" href="/favicon.png">
|
||||
<link rel="icon" type="image/png" href="data:image/png;base64,${favicon}">
|
||||
<link href="/rss.xml" rel="alternate" type="application/rss+xml" title="Articles from Distill">
|
||||
<link rel="canonical" href="${data.url}">
|
||||
<title>${data.title}</title>
|
||||
|
||||
Vendored
+20
-8
@@ -11,6 +11,7 @@ var html = function(dom) {
|
||||
|
||||
var head = dom.querySelector("head");
|
||||
|
||||
|
||||
if (!dom.querySelector("meta[charset]")) {
|
||||
var meta = dom.createElement("meta");
|
||||
meta.setAttribute("charset", "utf-8");
|
||||
@@ -4260,6 +4261,8 @@ var expandData = function(dom, data) {
|
||||
|
||||
};
|
||||
|
||||
var favicon = "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA99JREFUeNrsG4t1ozDMzQSM4A2ODUonKBucN2hugtIJ6E1AboLcBiQTkJsANiAb9OCd/OpzMWBJBl5TvaeXPiiyJetry0J8wW3D3QpjRh3GjneXDq+fSQA9s2mH9x3KDhN4foJfCb8N/Jrv+2fnDn8vLRQOplWHVYdvHZYdZsBcZP1vBmh/n8DzEmhUQDPaOuP9pFuY+JwJHwHnCLQE2tnWBGEyXozY9xCUgHMhhjE2I4heVWtgIkZ83wL6Qgxj1obfWBxymPwe+b00BCCRNPbwfb60yleAkkBHGT5AEehIYz7eJrFDMF9CvH4wwhcGHiHMneFvLDQwlwvMLQq58trRcYBWfYn0A0OgHWQUSu25mE+BnoYKnnEJoeIWAifzOv7vLWd2ZKRfWAIme3tOiUaQ3UnLkb0xj1FxRIeEGKaGIHOs9nEgLaaA9i0JRYo1Ic67wJW86KSKE/ZAM8KuVMk8ITVhmxUxJ3Cl2xlm9Vtkeju1+mpCQNxaEGNCY8bs9X2YqwNoQeGjBWut/ma0QAWy/TqAsHx9wSya3I5IRxOfTC+leG+kA/4vSeEcGBtNUN6byhu3+keEZCQJUNh8MAO7HL6H8pQLnsW/Hd4T4lv93TPjfM7A46iEEqbB5EDOvwYNW6tGNZzT/o+CZ6sqZ6wUtR/wf7mi/VL8iNciT6rHih48Y55b4nKCHJCCzb4y0nwFmin3ZEMIoLfZF8F7nncFmvnWBaBj7CGAYA/WGJsUwHdYqVDwAmNsUgAx4CGgAA7GOOxADYOFWOaIKifuVYzmOpREqA21Mo7aPsgiY1PhOMAmxtR+AUbYH3Id2wc0SAFIQTsn9IUGWR8k9jx3vtXSiAacFxTAGakBk9UudkNECd6jLe+6HrshshvIuC6IlLMRy7er+JpcKma24SlE4cFZSZJDGVVrsNvitQhQrDhW0jfiOLfFd47C42eHT56D/BK0To+58Ahj+cAT8HT1UWlfLZCCd/uKawzU0Rh2EyIX/Icqth3niG8ybNroezwe6khdCNxRN+l4XGdOLVLlOOt2hTRJlr1ETIuMAltVTMz70mJrkdGAaZLSmnBEqmAE32JCMmuTlCnRgsBENtOUpHhvvsYIL0ibnBkaC6QvKcR7738GKp0AKnim7xgUSNv1bpS8QwhBt8r+EP47v/oyRK/S34yJ9nT+AN0Tkm4OdB9E4BsmXM3SnMlRFUrtp6IDpV2eKzdYvF3etm3KhQksbOLChGkSmcBdmcEwvqkrMy5BzL00NZeu3qPYJOOuCc+5NjcWKXQxFvTa3NoXJ4d8in7fiAUuTt781dkvuHX4K8AA2Usy7yNKLy0AAAAASUVORK5CYII=\n";
|
||||
|
||||
var meta = function(dom, data) {
|
||||
var head = dom.querySelector("head");
|
||||
var appendHead = function (html) { return appendHtml(head, html); };
|
||||
@@ -4269,7 +4272,7 @@ var meta = function(dom, data) {
|
||||
{ appendHead(("<meta name=\"" + name + "\" content=\"" + content + "\" >")); }
|
||||
}
|
||||
|
||||
appendHead(("\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge,chrome=1\">\n <link rel=\"icon\" type=\"image/png\" href=\"/favicon.png\">\n <link href=\"/rss.xml\" rel=\"alternate\" type=\"application/rss+xml\" title=\"Articles from Distill\">\n <link rel=\"canonical\" href=\"" + (data.url) + "\">\n <title>" + (data.title) + "</title>\n "));
|
||||
appendHead(("\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge,chrome=1\">\n <link rel=\"icon\" type=\"image/png\" href=\"data:image/png;base64," + favicon + "\">\n <link href=\"/rss.xml\" rel=\"alternate\" type=\"application/rss+xml\" title=\"Articles from Distill\">\n <link rel=\"canonical\" href=\"" + (data.url) + "\">\n <title>" + (data.title) + "</title>\n "));
|
||||
|
||||
appendHead(("\n <!-- https://schema.org/Article -->\n <meta property=\"article:published\" itemprop=\"datePublished\" content=\"" + (data.published) + "\" />\n <meta property=\"article:modified\" itemprop=\"dateModified\" content=\"" + (data.updated) + "\" />\n "));
|
||||
data.authors.forEach(function (a) {
|
||||
@@ -4282,23 +4285,27 @@ var meta = function(dom, data) {
|
||||
|
||||
appendHead("\n <!-- https://scholar.google.com/intl/en/scholar/inclusion.html#indexing -->\n ");
|
||||
|
||||
var journal = data.journal || {};
|
||||
var zeroPad = function (n) { return n < 10 ? "0" + n : n; };
|
||||
var publishedYear = data.published.getFullYear();
|
||||
var publishedMonthPadded = zeroPad(data.published.getMonth() + 1);
|
||||
var publishedDayPadded = zeroPad(data.published.getDate());
|
||||
meta("citation_title", data.title);
|
||||
meta("citation_publication_date", data.published? (publishedYear + "/" + publishedMonthPadded + "/" + publishedDayPadded) : undefined);
|
||||
meta("citation_fulltext_html_url", data.url);
|
||||
meta("citation_volume", data.volume);
|
||||
meta("citation_issue", data.issue);
|
||||
meta("citation_firstpage", data.doiSuffix? ("e" + (data.doiSuffix)) : undefined);
|
||||
meta("citation_doi", data.doi);
|
||||
|
||||
var journal = data.journal || {};
|
||||
meta("citation_journal_title", journal.name);
|
||||
meta("citation_journal_abbrev", journal.nameAbbrev);
|
||||
meta("citation_issn", journal.issn);
|
||||
meta("citation_publisher", journal.publisher);
|
||||
|
||||
if (data.published){
|
||||
var zeroPad = function (n) { return n < 10 ? "0" + n : n; };
|
||||
var publishedYear = data.published.getFullYear();
|
||||
var publishedMonthPadded = zeroPad(data.published.getMonth() + 1);
|
||||
var publishedDayPadded = zeroPad(data.published.getDate());
|
||||
meta("citation_publication_date", (publishedYear + "/" + publishedMonthPadded + "/" + publishedDayPadded));
|
||||
}
|
||||
|
||||
(data.authors || []).forEach(function (a) {
|
||||
meta("citation_author", ((a.lastName) + ", " + (a.firstName)));
|
||||
meta("citation_author_institution", a.affiliation);
|
||||
@@ -4336,7 +4343,7 @@ function citation_meta_content(ref){
|
||||
|
||||
var logo = "<svg viewBox=\"-607 419 64 64\">\n <path style=\"fill: none; stroke: black;stroke-width: 2px;\" d=\"M-573.4,478.9c-8,0-14.6-6.4-14.6-14.5s14.6-25.9,14.6-40.8c0,14.9,14.6,32.8,14.6,40.8S-565.4,478.9-573.4,478.9z\"/>\n</svg>\n";
|
||||
|
||||
var html$1 = "\n<style>\ndt-header {\n display: block;\n position: relative;\n height: 60px;\n background-color: #fcfcfc;\n width: 100%;\n box-sizing: border-box;\n z-index: 2;\n color: rgba(0, 0, 0, 0.8);\n}\ndt-header .content {\n border-bottom: 1px solid rgba(0, 0, 0, 0.3);\n height: 60px;\n}\ndt-header a {\n font-size: 16px;\n height: 60px;\n line-height: 60px;\n text-decoration: none;\n color: rgba(0, 0, 0, 0.8);\n}\ndt-header svg {\n width: 24px;\n position: relative;\n top: 4px;\n margin-right: -2px;\n}\ndt-header svg path {\n fill: none;\n stroke: black;\n stroke-width: 1;\n stroke-linejoin: round;\n}\ndt-header .logo {\n font-size: 16px;\n font-weight: 300;\n}\ndt-header .nav {\n float: right;\n}\ndt-header .nav a {\n font-size: 14px;\n}\n</style>\n\n<div class=\"content l-page\">\n <a href=\"/\" class=\"logo\">\n " + logo + "\n Distill\n </a>\n <div class=\"nav\">\n </div>\n</div>\n";
|
||||
var html$1 = "\n<style>\ndt-header {\n display: block;\n position: relative;\n height: 60px;\n background-color: none;\n width: 100%;\n box-sizing: border-box;\n z-index: 2;\n color: rgba(0, 0, 0, 0.8);\n}\ndt-header .content {\n border-bottom: 1px solid rgba(0, 0, 0, 0.3);\n height: 60px;\n}\ndt-header a {\n font-size: 16px;\n height: 60px;\n line-height: 60px;\n text-decoration: none;\n color: rgba(0, 0, 0, 0.8);\n}\ndt-header svg {\n width: 24px;\n position: relative;\n top: 4px;\n margin-right: -2px;\n}\ndt-header svg path {\n fill: none;\n stroke: black;\n stroke-width: 1;\n stroke-linejoin: round;\n}\ndt-header .logo {\n font-size: 16px;\n font-weight: 300;\n}\ndt-header .nav {\n float: right;\n}\ndt-header .nav a {\n font-size: 14px;\n}\n</style>\n\n<div class=\"content l-page\">\n <a href=\"/\" class=\"logo\">\n " + logo + "\n Distill\n </a>\n <div class=\"nav\">\n </div>\n</div>\n";
|
||||
|
||||
var header = function(dom, data) {
|
||||
dom.querySelector('dt-header').innerHTML = html$1;
|
||||
@@ -6626,6 +6633,10 @@ var code$1 = function(dom, data) {
|
||||
});
|
||||
};
|
||||
|
||||
var generateCrossref = function(data) {
|
||||
return "crossref";
|
||||
};
|
||||
|
||||
function render(dom, data) {
|
||||
data = data || {};
|
||||
html(dom);
|
||||
@@ -6663,6 +6674,7 @@ exports.footer = footer;
|
||||
exports.citation = citation;
|
||||
exports.markdown = markdown;
|
||||
exports.code = code$1;
|
||||
exports.generateCrossref = generateCrossref;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+26
-29
@@ -24,18 +24,12 @@
|
||||
<p>Distill ships with a CSS framework and a collection of custom web components that make building interactive academic articles easier than with raw HTML, CSS and JavaScript. This reference article details several examples and best practices for how to use both frameworks.</p>
|
||||
<hr>
|
||||
<h2>Getting Started</h2>
|
||||
<p>If you’re using Chrome as your development browser, here is the smallest distill post.</p>
|
||||
<dt-code block language="html">
|
||||
<script src="../dist/template.min.js"></script>
|
||||
<dt-article>
|
||||
<h1>Hello World</h1>
|
||||
</dt-article>
|
||||
</dt-code>
|
||||
<p>However, this omits some required html tags that might cause rendering problems during development if you’re using a browser other than Chrome. These missing tags will be added during publishing, so if the above works for you, feel free to use it. If you are having issues, try adding <dt-code>doctype</dt-code> and <dt-code>meta</dt-code> tags explicitly.</p>
|
||||
<p>Here is the smallest distill post.</p>
|
||||
<dt-code block language="html">
|
||||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../dist/template.min.js"></script>
|
||||
|
||||
<dt-article>
|
||||
<h1>Hello World</h1>
|
||||
</dt-article>
|
||||
@@ -45,7 +39,8 @@
|
||||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../dist/template.min.js"></script>
|
||||
<dt-front-matter>
|
||||
|
||||
<script type="text/front-matter">
|
||||
title: Article Title
|
||||
description: Description of the post
|
||||
published: Jan 10, 2017
|
||||
@@ -55,7 +50,8 @@
|
||||
affiliations:
|
||||
- Google Brain: http://g.co/brain
|
||||
- Google Brain: http://g.co/brain
|
||||
</dt-front-matter>
|
||||
</script>
|
||||
|
||||
<dt-article>
|
||||
<h1>Hello World</h1>
|
||||
<h2>A description of the article</h2>
|
||||
@@ -63,14 +59,15 @@
|
||||
<p>This is the first paragraph of the article.</p>
|
||||
<p>We can also cite <dt-cite key="gregor2015draw"></dt-cite> external publications.</p>
|
||||
</dt-article>
|
||||
<dt-bibliography>
|
||||
|
||||
<script type="text/bibliography">
|
||||
@article{gregor2015draw,
|
||||
title={DRAW: A recurrent neural network for image generation},
|
||||
author={Gregor, Karol and Danihelka, Ivo and Graves, Alex and Rezende, Danilo Jimenez and Wierstra, Daan},
|
||||
journal={arXivreprint arXiv:1502.04623},
|
||||
year={2015}
|
||||
}
|
||||
</dt-bibliography>
|
||||
</script>
|
||||
</dt-code>
|
||||
<hr>
|
||||
<h2>Markdown</h2>
|
||||
@@ -86,14 +83,14 @@
|
||||
|
||||
First paragraph of the article.
|
||||
</dt-article>
|
||||
<dt-bibliography></dt-bibliography>
|
||||
<script type="text/bibliography"></script>
|
||||
</dt-code>
|
||||
<p>We use <a href="https://github.com/chjj/marked">marked</a> as the rendering engine, with <a href="https://help.github.com/articles/basic-writing-and-formatting-syntax/">github flavored markdown</a> and <a href="https://daringfireball.net/projects/smartypants/">smartypants</a> enabled. In development mode the markdown is translated in the client after the dom content has loaded, but when published, the translation is precompiled.</p>
|
||||
<hr>
|
||||
<h2>Front Matter</h2>
|
||||
<p>You’ll need to describe some data about you post — title, description, authors, etc. For this use the <dt-code language="html"><dt-front-matter></dt-code> tag.</p>
|
||||
<p>You’ll need to describe some data about you post — title, description, authors, etc. For this use the <dt-code language="html"><script type="text/front-matter"></dt-code> tag.</p>
|
||||
<dt-code block language="html">
|
||||
<dt-front-matter>
|
||||
<script type="text/front-matter">
|
||||
title: Article Title
|
||||
description: Description of the post
|
||||
authors:
|
||||
@@ -102,17 +99,17 @@
|
||||
affiliations:
|
||||
- Google Brain: http://g.co/brain
|
||||
- Google Brain: http://g.co/brain
|
||||
</dt-front-matter>
|
||||
</script>
|
||||
</dt-code>
|
||||
<p>You can also use an external JSON file if you like. We will automatically make a request for a <dt-code>distill.json</dt-code> file if there is no <dt-code language="html"><dt-front-matter></dt-code> element on the page, or you can point to another file with the <dt-code>src</dt-code> attribute. In production, these files will be inlined into the document.</p>
|
||||
<!-- <p>You can also use an external JSON file if you like. We will automatically make a request for a <dt-code>distill.json</dt-code> file if there is no <dt-code language="html"><script type="text/front-matter"></dt-code> element on the page, or you can point to another file with the <dt-code>src</dt-code> attribute. In production, these files will be inlined into the document.</p>
|
||||
<dt-code block language="html">
|
||||
<dt-front-matter src="./distill.json"></dt-front-matter>
|
||||
</dt-code>
|
||||
<script type="text/front-matter" src="./distill.json"></script>
|
||||
</dt-code> -->
|
||||
<hr>
|
||||
<h2>Citations</h2>
|
||||
<p>Bibtex is the supported way of making academic citations. You first need have a global definition of all your possible citations. For this we’ll use the <dt-code language="html"><dt-bibliography></dt-code> element.</p>
|
||||
<p>Bibtex is the supported way of making academic citations. You first need have a global definition of all your possible citations. For this we’ll use the <dt-code language="html"><script type="text/bibliography"></dt-code> element.</p>
|
||||
<dt-code block language="html">
|
||||
<dt-bibliography>
|
||||
<script type="text/bibliography"">
|
||||
@article{gregor2015draw,
|
||||
title={DRAW: A recurrent neural network for image generation},
|
||||
author={Gregor, Karol and Danihelka, Ivo and Graves, Alex and Rezende, Danilo Jimenez and Wierstra, Daan},
|
||||
@@ -129,12 +126,12 @@
|
||||
year={2011},
|
||||
publisher={Cambridge Univ Press}
|
||||
}
|
||||
</dt-bibliography>
|
||||
</script>
|
||||
</dt-code>
|
||||
<p>Like with the <dt-code language="html"><dt-front-matter></dt-code> element, you can alternatively reference an external file with the <dt-code>src</dt-code> attribute. If no <dt-code language="html"><dt-bibliography></dt-code> element is found on the page, a request will automatically be made for <dt-code>bibliography.bib</dt-code>. In production, these files will be inlined into the document.</p>
|
||||
<!-- <p>Like with the <dt-code language="html"><script type="text/front-matter"></dt-code> element, you can alternatively reference an external file with the <dt-code>src</dt-code> attribute. If no <dt-code language="html"><script type="text/bibliography"></dt-code> element is found on the page, a request will automatically be made for <dt-code>bibliography.bib</dt-code>. In production, these files will be inlined into the document.</p>
|
||||
<dt-code block language="html">
|
||||
<dt-bibliography src="bibliography.bib"></dt-bibliography>
|
||||
</dt-code>
|
||||
<script type="text/bibliography" src="bibliography.bib"></script>
|
||||
</dt-code> -->
|
||||
<p>Citations are then used in the article body with the <dt-code language="html"><dt-cite></dt-code> tag. The <dt-code>article</dt-code> attribute is a reference to the id provided in the bibiography.</p>
|
||||
<dt-code block language="html">
|
||||
<dt-cite ket="gregor2015draw"></dt-cite>
|
||||
@@ -152,12 +149,12 @@
|
||||
</dt-code>
|
||||
</dt-code>
|
||||
|
||||
<hr>
|
||||
<!-- <hr>
|
||||
<h2>Footnotes</h2>
|
||||
<p>This is a <dt-footnote ref="blah" /></p>
|
||||
<dt-footnote-body ref="blah"></dt-footnote-body>
|
||||
<hr>
|
||||
<h2>Math</h2>
|
||||
<h2>Math</h2> -->
|
||||
<hr>
|
||||
<h2>Layouts</h2>
|
||||
<p>The main text column is referred to as the body. It is the assumed layout of any direct descendents of the <code>dt-article</code> element.</p>
|
||||
@@ -173,9 +170,9 @@
|
||||
<p>They are all floated to the right and anchored to the right-hand edge of the position you specify. By default, each will take up approximately half of the width of the standard layout position, but you can override the width with a more specific selector. </p>
|
||||
<div class="fake-img l-gutter"><p>.l-gutter</p></div>
|
||||
<p>The final layout is for marginalia, asides, and footnotes. It does not interrupt the normal flow of <code>.l-body</code> sized text except on mobile screen sizes.</p>
|
||||
|
||||
<!--
|
||||
<hr>
|
||||
<h2>Including External Files</h2>
|
||||
<h2>Including External Files</h2> -->
|
||||
|
||||
</dt-article>
|
||||
<dt-footer></dt-footer>
|
||||
|
||||
@@ -10,6 +10,7 @@ import footer from "./components/footer";
|
||||
import citation from "./components/citation";
|
||||
import markdown from "./components/markdown";
|
||||
import code from "./components/code";
|
||||
import generateCrossref from "./components/generate-crossref";
|
||||
|
||||
function render(dom, data) {
|
||||
data = data || {};
|
||||
@@ -48,3 +49,4 @@ export {footer as footer};
|
||||
export {citation as citation};
|
||||
export {markdown as markdown};
|
||||
export {code as code};
|
||||
export {generateCrossref as generateCrossref};
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "distill-template",
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.6",
|
||||
"description": "Template for creating Distill articles.",
|
||||
"main": "dist/distill.js",
|
||||
"main": "dist/template.js",
|
||||
"scripts": {
|
||||
"start": "rollup -c -w",
|
||||
"build": "rollup -c",
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ export default {
|
||||
browser: true,
|
||||
}),
|
||||
string({
|
||||
include: ["**/*.svg", "**/*.html", "**/*.css"]
|
||||
include: ["**/*.svg", "**/*.html", "**/*.css", "**/*.base64"]
|
||||
}),
|
||||
buble({
|
||||
exclude: 'node_modules',
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
export default {
|
||||
"title": "Experiments in Handwriting with a Neural Network",
|
||||
"description": "Several interactive visualizations of a generative model of handwriting. Some are fun, some are serious.",
|
||||
"url": "http://distill.pub/2016/handwriting/",
|
||||
"github": "https://github.com/distillpub/post--handwriting",
|
||||
"firstPublished": "Tue Dec 6 2016 21:39:33 GMT-0700 (PDT)",
|
||||
"lastPublished": "Tue Dec 6 2016 21:39:33 GMT-0700 (PDT)",
|
||||
"authors": [
|
||||
{
|
||||
"firstName": "Shan",
|
||||
"lastName": "Carter",
|
||||
"personalURL": "http://shancarter.com",
|
||||
"affiliation": "Google Brain",
|
||||
"affiliationURL": "http://g.co/brain"
|
||||
},
|
||||
{
|
||||
"firstName": "David",
|
||||
"lastName": "Ha",
|
||||
"personalURL": "https://github.com/hardmaru",
|
||||
"affiliation": "Google Brain",
|
||||
"affiliationURL": "http://g.co/brain"
|
||||
},
|
||||
{
|
||||
"firstName": "Ian",
|
||||
"lastName": "Johnson",
|
||||
"personalURL": "https://github.com/enjalot",
|
||||
"affiliation": "Google Cloud",
|
||||
"affiliationURL": ""
|
||||
},
|
||||
{
|
||||
"firstName": "Chris",
|
||||
"lastName": "Olah",
|
||||
"personalURL": "http://colah.github.io/",
|
||||
"affiliation": "Google Brain",
|
||||
"affiliationURL": "http://g.co/brain"
|
||||
}
|
||||
],
|
||||
journal: {
|
||||
"title": "Distill",
|
||||
"full_title": "Distill",
|
||||
"abbrev_title": "Distill",
|
||||
"url": "http://distill.pub",
|
||||
"doi": "00.0000/dstl",
|
||||
"issn": "0000-0000"
|
||||
}
|
||||
};
|
||||
@@ -377,6 +377,10 @@ diff@1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf"
|
||||
|
||||
distill-template@^0.0.4:
|
||||
version "0.0.4"
|
||||
resolved "https://registry.yarnpkg.com/distill-template/-/distill-template-0.0.4.tgz#d9d8350001f9f6fc64884e0ad903d733b6856d59"
|
||||
|
||||
ecc-jsbn@~0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505"
|
||||
|
||||
Reference in New Issue
Block a user