mirror of
https://github.com/wassname/template.git
synced 2026-06-27 23:40:33 +08:00
v2 start
This commit is contained in:
-12
@@ -9,18 +9,6 @@ pids
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
|
||||
+14
-2
@@ -1,3 +1,15 @@
|
||||
import dtheader from "./components/dt-header";
|
||||
import * as frontMatter from "./components/d-front-matter";
|
||||
import * as title from "./components/d-title";
|
||||
import * as byline from "./components/d-byline";
|
||||
import * as article from "./components/d-article";
|
||||
import * as abstract from "./components/d-abstract";
|
||||
import * as toc from "./components/d-toc";
|
||||
import * as styles from "./components/styles";
|
||||
|
||||
export {dtheader as dtheader};
|
||||
export {frontMatter as frontMatter};
|
||||
export {title as title};
|
||||
export {byline as byline};
|
||||
export {article as article};
|
||||
export {abstract as abstract};
|
||||
export {toc as toc};
|
||||
export {styles as styles};
|
||||
@@ -0,0 +1,17 @@
|
||||
import {Template} from "../mixins/template";
|
||||
|
||||
const T = Template("d-abstract", `
|
||||
<style>
|
||||
d-abstract {
|
||||
display: block;
|
||||
font-size: 20px;
|
||||
line-height: 1.5rem;
|
||||
}
|
||||
</style>
|
||||
`, false);
|
||||
|
||||
export default class Abstract extends T(HTMLElement) {
|
||||
static get is() { return "d-abstract"; }
|
||||
}
|
||||
|
||||
customElements.define(Abstract.is, Abstract);
|
||||
@@ -0,0 +1,235 @@
|
||||
import {Template} from "../mixins/template";
|
||||
|
||||
const T = Template("d-article", `
|
||||
<style>
|
||||
d-article {
|
||||
display: block;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
padding-top: 36px;
|
||||
padding-bottom: 72px;
|
||||
overflow: hidden;
|
||||
background: white;
|
||||
min-height: calc(100vh - 70px - 182px);
|
||||
font-size: 20px;
|
||||
line-height: 1.5rem;
|
||||
}
|
||||
|
||||
@media(min-width: 1024px) {
|
||||
d-article {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
/* H2 */
|
||||
|
||||
d-article h2 {
|
||||
font-weight: 400;
|
||||
font-size: 26px;
|
||||
line-height: 1.25em;
|
||||
margin-top: 36px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
@media(min-width: 1024px) {
|
||||
d-article h2 {
|
||||
margin-top: 48px;
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
d-article h1 + h2 {
|
||||
font-weight: 300;
|
||||
font-size: 20px;
|
||||
line-height: 1.4em;
|
||||
margin-top: 8px;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@media(min-width: 1080px) {
|
||||
.centered h1 + h2 {
|
||||
text-align: center;
|
||||
}
|
||||
d-article h1 + h2 {
|
||||
margin-top: 12px;
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
/* H3 */
|
||||
|
||||
d-article h3 {
|
||||
font-weight: 400;
|
||||
font-size: 20px;
|
||||
line-height: 1.4em;
|
||||
margin-top: 36px;
|
||||
margin-bottom: 18px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
d-article h1 + h3 {
|
||||
margin-top: 48px;
|
||||
}
|
||||
|
||||
@media(min-width: 1024px) {
|
||||
d-article h3 {
|
||||
font-size: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
/* H4 */
|
||||
|
||||
d-article h4 {
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
d-article a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
d-article p,
|
||||
d-article ul,
|
||||
d-article ol {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
d-article p b,
|
||||
d-article ul b,
|
||||
d-article ol b {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
d-article a {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.4);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
d-article a:hover {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
d-article .link {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
d-article ul,
|
||||
d-article ol {
|
||||
padding-left: 24px;
|
||||
}
|
||||
|
||||
d-article li {
|
||||
margin-bottom: 24px;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
d-article pre {
|
||||
font-size: 14px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
|
||||
d-article hr {
|
||||
border: none;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
||||
margin-top: 60px;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
d-article section {
|
||||
margin-top: 60px;
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
|
||||
/* Figure */
|
||||
|
||||
d-article figure {
|
||||
position: relative;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
@media(min-width: 1024px) {
|
||||
d-article figure {
|
||||
margin-top: 48px;
|
||||
margin-bottom: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
d-article figure img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
d-article figure svg text,
|
||||
d-article figure svg tspan {
|
||||
}
|
||||
|
||||
d-article figure figcaption {
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
font-size: 12px;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
@media(min-width: 1024px) {
|
||||
d-article figure figcaption {
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
d-article figure.external img {
|
||||
background: white;
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
|
||||
padding: 18px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
d-article figure figcaption a {
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
/*d-article figure figcaption::before {
|
||||
position: relative;
|
||||
display: block;
|
||||
top: -20px;
|
||||
content: "";
|
||||
width: 25px;
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.3);
|
||||
}*/
|
||||
|
||||
d-article span.equation-mimic {
|
||||
font-family: georgia;
|
||||
font-size: 115%;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
d-article figure figcaption b {
|
||||
font-weight: 600;
|
||||
color: rgba(0, 0, 0, 1.0);
|
||||
}
|
||||
|
||||
d-article > d-code,
|
||||
d-article section > d-code {
|
||||
display: block;
|
||||
}
|
||||
|
||||
d-article .citation {
|
||||
color: #668;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
d-include {
|
||||
width: auto;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
`, false);
|
||||
|
||||
export default class Article extends T(HTMLElement) {
|
||||
static get is() { return "d-article"; }
|
||||
}
|
||||
|
||||
customElements.define(Article.is, Article);
|
||||
@@ -0,0 +1,161 @@
|
||||
import mustache from "mustache";
|
||||
import {Template} from "../mixins/template";
|
||||
import {page} from "./layout";
|
||||
|
||||
const T = Template("d-byline", `
|
||||
<style>
|
||||
d-byline {
|
||||
box-sizing: border-box;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
display: block;
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
background-color: grey;
|
||||
}
|
||||
${page("d-byline .byline")}
|
||||
d-article.centered d-byline {
|
||||
text-align: center;
|
||||
}
|
||||
d-byline a,
|
||||
d-article d-byline a {
|
||||
color: rgba(255, 255, 255, 1);
|
||||
text-decoration: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
d-article d-byline a:hover {
|
||||
text-decoration: underline;
|
||||
border-bottom: none;
|
||||
}
|
||||
d-byline .authors {
|
||||
text-align: left;
|
||||
}
|
||||
d-byline .name {
|
||||
display: inline;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
d-byline .affiliation {
|
||||
display: inline;
|
||||
}
|
||||
d-byline .date {
|
||||
display: block;
|
||||
text-align: left;
|
||||
}
|
||||
d-byline .year, d-byline .month {
|
||||
display: inline;
|
||||
}
|
||||
d-byline .citation {
|
||||
display: block;
|
||||
text-align: left;
|
||||
}
|
||||
d-byline .citation div {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
@media(min-width: 768px) {
|
||||
d-byline {
|
||||
}
|
||||
}
|
||||
|
||||
@media(min-width: 1080px) {
|
||||
d-byline {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
d-byline a:hover {
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
}
|
||||
|
||||
d-byline .authors {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
d-byline .author {
|
||||
display: inline-block;
|
||||
margin-right: 12px;
|
||||
/*padding-left: 20px;*/
|
||||
/*border-left: 1px solid #ddd;*/
|
||||
}
|
||||
|
||||
d-byline .affiliation {
|
||||
display: block;
|
||||
}
|
||||
|
||||
d-byline .author:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
d-byline .name {
|
||||
display: block;
|
||||
}
|
||||
|
||||
d-byline .date {
|
||||
border-left: 1px solid rgba(0, 0, 0, 0.1);
|
||||
padding-left: 15px;
|
||||
margin-left: 15px;
|
||||
display: inline-block;
|
||||
}
|
||||
d-byline .year, d-byline .month {
|
||||
display: block;
|
||||
}
|
||||
|
||||
d-byline .citation {
|
||||
border-left: 1px solid rgba(0, 0, 0, 0.15);
|
||||
padding-left: 15px;
|
||||
margin-left: 15px;
|
||||
display: inline-block;
|
||||
}
|
||||
d-byline .citation div {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
`, false);
|
||||
|
||||
const mustacheTemplate = `
|
||||
<div class="byline">
|
||||
<div class="authors">
|
||||
{{#authors}}
|
||||
<div class="author">
|
||||
{{#personalURL}}
|
||||
<a class="name" href="{{personalURL}}">{{name}}</a>
|
||||
{{/personalURL}}
|
||||
{{^personalURL}}
|
||||
<div class="name">{{name}}</div>
|
||||
{{/personalURL}}
|
||||
{{#affiliation}}
|
||||
{{#affiliationURL}}
|
||||
<a class="affiliation" href="{{affiliationURL}}">{{affiliation}}</a>
|
||||
{{/affiliationURL}}
|
||||
{{^affiliationURL}}
|
||||
<div class="affiliation">{{affiliation}}</div>
|
||||
{{/affiliationURL}}
|
||||
{{/affiliation}}
|
||||
</div>
|
||||
{{/authors}}
|
||||
</div>
|
||||
<div class="date">
|
||||
<div class="month">{{publishedMonth}}. {{publishedDay}}</div>
|
||||
<div class="year">{{publishedYear}}</div>
|
||||
</div>
|
||||
<a class="citation" href="#citation">
|
||||
<div>Citation:</div>
|
||||
<div>{{concatenatedAuthors}}, {{publishedYear}}</div>
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
|
||||
export default class Byline extends T(HTMLElement) {
|
||||
static get is() {
|
||||
return "d-byline";
|
||||
}
|
||||
render(data) {
|
||||
this.innerHTML = mustache.render(mustacheTemplate, data);
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define(Byline.is, Byline);
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
import ymlParse from "js-yaml";
|
||||
|
||||
export default class FrontMatter extends HTMLElement {
|
||||
static get is() { return "d-front-matter"; }
|
||||
constructor() {
|
||||
super();
|
||||
this.data = {};
|
||||
}
|
||||
connectedCallback() {
|
||||
let el = this.querySelector("script");
|
||||
if (el) {
|
||||
let text = el.textContent;
|
||||
this.parse(ymlParse.safeLoad(text));
|
||||
}
|
||||
}
|
||||
parse(localData) {
|
||||
this.data.title = localData.title ? localData.title : "Untitled";
|
||||
this.data.description = localData.description ? localData.description : "No description.";
|
||||
|
||||
this.data.authors = localData.authors ? localData.authors : [];
|
||||
|
||||
this.data.authors = this.data.authors.map((author, i) =>{
|
||||
let a = {};
|
||||
let name = Object.keys(author)[0];
|
||||
if ((typeof author) === "string") {
|
||||
name = author;
|
||||
} else {
|
||||
a.personalURL = author[name];
|
||||
}
|
||||
let names = name.split(" ");
|
||||
a.name = name;
|
||||
a.firstName = names.slice(0, names.length - 1).join(" ");
|
||||
a.lastName = names[names.length -1];
|
||||
if(localData.affiliations[i]) {
|
||||
let affiliation = Object.keys(localData.affiliations[i])[0];
|
||||
if ((typeof localData.affiliations[i]) === "string") {
|
||||
affiliation = localData.affiliations[i]
|
||||
} else {
|
||||
a.affiliationURL = localData.affiliations[i][affiliation];
|
||||
}
|
||||
a.affiliation = affiliation;
|
||||
}
|
||||
return a;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define(FrontMatter.is, FrontMatter);
|
||||
@@ -0,0 +1,36 @@
|
||||
import {Template} from "../mixins/template";
|
||||
import {body} from "./layout";
|
||||
|
||||
const T = Template("d-title", `
|
||||
<style>
|
||||
d-title {
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
width: 100%;
|
||||
background-color: hsl(200, 0%, 95%);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
d-title h1 {
|
||||
padding-top: 100px;
|
||||
padding-bottom: 36px;
|
||||
margin: 0;
|
||||
line-height: 1em;
|
||||
font-size: 60px;
|
||||
font-weight: 400;
|
||||
}
|
||||
${body("d-title h1")}
|
||||
</style>
|
||||
`, false);
|
||||
|
||||
export default class Title extends T(HTMLElement) {
|
||||
static get is() { return "d-title"; }
|
||||
connectedCallback() {
|
||||
super.connectedCallback();
|
||||
this.byline = document.createElement("d-byline");
|
||||
let frontMatter = document.querySelector("d-front-matter");
|
||||
this.byline.render(frontMatter.data);
|
||||
this.appendChild(this.byline);
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define(Title.is, Title);
|
||||
@@ -0,0 +1,17 @@
|
||||
import {Template} from "../mixins/template";
|
||||
|
||||
const T = Template("d-toc", `
|
||||
<style>
|
||||
d-toc {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
`, false);
|
||||
|
||||
export default class Toc extends T(HTMLElement) {
|
||||
static get is() {
|
||||
return "d-toc";
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define(Toc.is, Toc);
|
||||
@@ -0,0 +1,68 @@
|
||||
|
||||
export function body(selector) {
|
||||
return `${selector} {
|
||||
width: auto;
|
||||
margin-left: 24px;
|
||||
margin-right: 24px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@media(min-width: 768px) {
|
||||
${selector} {
|
||||
margin-left: 72px;
|
||||
margin-right: 72px;
|
||||
}
|
||||
}
|
||||
@media(min-width: 1080px) {
|
||||
${selector} {
|
||||
margin-left: calc(50% - 984px / 2);
|
||||
width: 648px;
|
||||
}
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
||||
export function page(selector) {
|
||||
return `${selector} {
|
||||
width: auto;
|
||||
margin-left: 24px;
|
||||
margin-right: 24px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@media(min-width: 768px) {
|
||||
${selector} {
|
||||
margin-left: 72px;
|
||||
margin-right: 72px;
|
||||
}
|
||||
}
|
||||
@media(min-width: 1080px) {
|
||||
${selector} {
|
||||
width: 984px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
||||
export function screen(selector) {
|
||||
return `${selector} {
|
||||
width: auto;
|
||||
margin-left: 24px;
|
||||
margin-right: 24px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@media(min-width: 768px) {
|
||||
${selector} {
|
||||
margin-left: 72px;
|
||||
margin-right: 72px;
|
||||
}
|
||||
}
|
||||
@media(min-width: 1080px) {
|
||||
${selector} {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
`;
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
html {
|
||||
font-size: 20px;
|
||||
line-height: 1rem;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
/*background-color: hsl(223, 9%, 25%);*/
|
||||
}
|
||||
|
||||
a {
|
||||
color: #004276;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
html, body, div, span, applet, object, iframe,
|
||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
||||
a, abbr, acronym, address, big, cite, code,
|
||||
del, dfn, em, img, ins, kbd, q, s, samp,
|
||||
small, strike, strong, sub, sup, tt, var,
|
||||
b, u, i, center,
|
||||
dl, dt, dd, ol, ul, li,
|
||||
fieldset, form, label, legend,
|
||||
table, caption, tbody, tfoot, thead, tr, th, td,
|
||||
article, aside, canvas, details, embed,
|
||||
figure, figcaption, footer, header, hgroup,
|
||||
menu, nav, output, ruby, section, summary,
|
||||
time, mark, audio, video {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 100%;
|
||||
font: inherit;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
article, aside, details, figcaption, figure,
|
||||
footer, header, hgroup, menu, nav, section {
|
||||
display: block;
|
||||
}
|
||||
body {
|
||||
line-height: 1;
|
||||
}
|
||||
ol, ul {
|
||||
list-style: none;
|
||||
}
|
||||
blockquote, q {
|
||||
quotes: none;
|
||||
}
|
||||
blockquote:before, blockquote:after,
|
||||
q:before, q:after {
|
||||
content: '';
|
||||
content: none;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}*/
|
||||
@@ -0,0 +1,147 @@
|
||||
/**
|
||||
* prism.js default theme for JavaScript, CSS and HTML
|
||||
* Based on dabblet (http://dabblet.com)
|
||||
* @author Lea Verou
|
||||
*/
|
||||
|
||||
code {
|
||||
white-space: nowrap;
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
border-radius: 2px;
|
||||
padding: 4px 7px;
|
||||
font-size: 15px;
|
||||
color: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
pre code {
|
||||
display: block;
|
||||
background: white;
|
||||
border-left: 3px solid rgba(0, 0, 0, 0.05);
|
||||
padding: 0 0 0 24px;
|
||||
}
|
||||
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: 0 1px white;
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
|
||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
|
||||
code[class*="language-"]::selection, code[class*="language-"] ::selection {
|
||||
text-shadow: none;
|
||||
background: #b3d4fc;
|
||||
}
|
||||
|
||||
@media print {
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.token.comment,
|
||||
.token.prolog,
|
||||
.token.doctype,
|
||||
.token.cdata {
|
||||
color: slategray;
|
||||
}
|
||||
|
||||
.token.punctuation {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.token.property,
|
||||
.token.tag,
|
||||
.token.boolean,
|
||||
.token.number,
|
||||
.token.constant,
|
||||
.token.symbol,
|
||||
.token.deleted {
|
||||
color: #905;
|
||||
}
|
||||
|
||||
.token.selector,
|
||||
.token.attr-name,
|
||||
.token.string,
|
||||
.token.char,
|
||||
.token.builtin,
|
||||
.token.inserted {
|
||||
color: #690;
|
||||
}
|
||||
|
||||
.token.operator,
|
||||
.token.entity,
|
||||
.token.url,
|
||||
.language-css .token.string,
|
||||
.style .token.string {
|
||||
color: #a67f59;
|
||||
background: hsla(0, 0%, 100%, .5);
|
||||
}
|
||||
|
||||
.token.atrule,
|
||||
.token.attr-value,
|
||||
.token.keyword {
|
||||
color: #07a;
|
||||
}
|
||||
|
||||
.token.function {
|
||||
color: #DD4A68;
|
||||
}
|
||||
|
||||
.token.regex,
|
||||
.token.important,
|
||||
.token.variable {
|
||||
color: #e90;
|
||||
}
|
||||
|
||||
.token.important,
|
||||
.token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
@@ -0,0 +1,227 @@
|
||||
/*
|
||||
Column: 60px
|
||||
Gutter: 24px
|
||||
|
||||
Body: 648px
|
||||
- 8 columns
|
||||
- 7 gutters
|
||||
Middle: 816px
|
||||
Page: 984px
|
||||
- 12 columns
|
||||
- 11 gutters
|
||||
*/
|
||||
|
||||
.l-body,
|
||||
.l-body-outset,
|
||||
.l-page,
|
||||
.l-page-outset,
|
||||
.l-middle,
|
||||
.l-middle-outset,
|
||||
d-article > div,
|
||||
d-article > p,
|
||||
d-article > h1,
|
||||
d-article > h2,
|
||||
d-article > h3,
|
||||
d-article > h4,
|
||||
d-article > figure,
|
||||
d-article > ul,
|
||||
d-article > d-abstract,
|
||||
d-article > d-code,
|
||||
d-article section > div,
|
||||
d-article section > p,
|
||||
d-article section > h1,
|
||||
d-article section > h2,
|
||||
d-article section > h3,
|
||||
d-article section > h4,
|
||||
d-article section > figure,
|
||||
d-article section > ul,
|
||||
d-article section > d-abstract,
|
||||
d-article section > d-code {
|
||||
width: auto;
|
||||
margin-left: 24px;
|
||||
margin-right: 24px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media(min-width: 768px) {
|
||||
.l-body,
|
||||
.l-body-outset,
|
||||
.l-page,
|
||||
.l-page-outset,
|
||||
.l-middle,
|
||||
.l-middle-outset,
|
||||
d-article > div,
|
||||
d-article > p,
|
||||
d-article > h1,
|
||||
d-article > h2,
|
||||
d-article > h3,
|
||||
d-article > h4,
|
||||
d-article > figure,
|
||||
d-article > ul,
|
||||
d-article > d-abstract,
|
||||
d-article > d-code,
|
||||
d-article section > div,
|
||||
d-article section > p,
|
||||
d-article section > h1,
|
||||
d-article section > h2,
|
||||
d-article section > h3,
|
||||
d-article section > h4,
|
||||
d-article section > figure,
|
||||
d-article section > ul,
|
||||
d-article section > d-abstract,
|
||||
d-article section > d-code {
|
||||
margin-left: 72px;
|
||||
margin-right: 72px;
|
||||
}
|
||||
}
|
||||
|
||||
@media(min-width: 1080px) {
|
||||
.l-body,
|
||||
d-article > div,
|
||||
d-article > p,
|
||||
d-article > h2,
|
||||
d-article > h3,
|
||||
d-article > h4,
|
||||
d-article > figure,
|
||||
d-article > ul,
|
||||
d-article > d-abstract,
|
||||
d-article > d-code,
|
||||
d-article section > div,
|
||||
d-article section > p,
|
||||
d-article section > h2,
|
||||
d-article section > h3,
|
||||
d-article section > h4,
|
||||
d-article section > figure,
|
||||
d-article section > ul,
|
||||
d-article section > d-abstract,
|
||||
d-article section > d-code {
|
||||
margin-left: calc(50% - 984px / 2);
|
||||
width: 648px;
|
||||
}
|
||||
.l-body-outset,
|
||||
d-article .l-body-outset {
|
||||
margin-left: calc(50% - 984px / 2 - 96px/2);
|
||||
width: calc(648px + 96px);
|
||||
}
|
||||
.l-middle,
|
||||
d-article .l-middle {
|
||||
width: 816px;
|
||||
margin-left: calc(50% - 984px / 2);
|
||||
margin-right: auto;
|
||||
}
|
||||
.l-middle-outset,
|
||||
d-article .l-middle-outset {
|
||||
width: calc(816px + 96px);
|
||||
margin-left: calc(50% - 984px / 2 - 48px);
|
||||
margin-right: auto;
|
||||
}
|
||||
d-article > h1,
|
||||
d-article section > h1,
|
||||
.l-page,
|
||||
d-article .l-page,
|
||||
d-article.centered .l-page {
|
||||
width: 984px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
.l-page-outset,
|
||||
d-article .l-page-outset,
|
||||
d-article.centered .l-page-outset {
|
||||
width: 1080px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
.l-screen,
|
||||
d-article .l-screen,
|
||||
d-article.centered .l-screen {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: auto;
|
||||
}
|
||||
.l-screen-inset,
|
||||
d-article .l-screen-inset,
|
||||
d-article.centered .l-screen-inset {
|
||||
margin-left: 24px;
|
||||
margin-right: 24px;
|
||||
width: auto;
|
||||
}
|
||||
.l-gutter,
|
||||
d-article .l-gutter {
|
||||
clear: both;
|
||||
float: right;
|
||||
margin-top: 0;
|
||||
margin-left: 24px;
|
||||
margin-right: calc((100vw - 984px) / 2 + 168px);
|
||||
width: calc((984px - 648px) / 2 - 24px);
|
||||
}
|
||||
|
||||
/* Side */
|
||||
.side.l-body,
|
||||
d-article .side.l-body {
|
||||
clear: both;
|
||||
float: right;
|
||||
margin-top: 0;
|
||||
margin-left: 48px;
|
||||
margin-right: calc((100vw - 984px + 648px) / 2);
|
||||
width: calc(648px / 2 - 24px - 84px);
|
||||
}
|
||||
.side.l-body-outset,
|
||||
d-article .side.l-body-outset {
|
||||
clear: both;
|
||||
float: right;
|
||||
margin-top: 0;
|
||||
margin-left: 48px;
|
||||
margin-right: calc((100vw - 984px + 648px - 48px) / 2);
|
||||
width: calc(648px / 2 - 48px + 24px);
|
||||
}
|
||||
.side.l-middle,
|
||||
d-article .side.l-middle {
|
||||
clear: both;
|
||||
float: right;
|
||||
width: calc(456px - 84px);
|
||||
margin-left: 48px;
|
||||
margin-right: calc((100vw - 984px) / 2 + 168px);
|
||||
}
|
||||
.side.l-middle-outset,
|
||||
d-article .side.l-middle-outset {
|
||||
clear: both;
|
||||
float: right;
|
||||
width: 456px;
|
||||
margin-left: 48px;
|
||||
margin-right: calc((100vw - 984px) / 2 + 168px);
|
||||
}
|
||||
.side.l-page,
|
||||
d-article .side.l-page {
|
||||
clear: both;
|
||||
float: right;
|
||||
margin-left: 48px;
|
||||
width: calc(624px - 84px);
|
||||
margin-right: calc((100vw - 984px) / 2);
|
||||
}
|
||||
.side.l-page-outset,
|
||||
d-article .side.l-page-outset {
|
||||
clear: both;
|
||||
float: right;
|
||||
width: 624px;
|
||||
margin-right: calc((100vw - 984px) / 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Rows and Columns */
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
}
|
||||
.column {
|
||||
flex: 1;
|
||||
box-sizing: border-box;
|
||||
margin-right: 24px;
|
||||
margin-left: 24px;
|
||||
}
|
||||
.row > .column:first-of-type {
|
||||
margin-left: 0;
|
||||
}
|
||||
.row > .column:last-of-type {
|
||||
margin-right: 0;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
@media print {
|
||||
@page {
|
||||
size: 8in 11in;
|
||||
}
|
||||
html {
|
||||
}
|
||||
p, code {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
h2, h3 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
d-header {
|
||||
visibility: hidden;
|
||||
}
|
||||
d-footer {
|
||||
display: none!important;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import base from "./styles-base.css";
|
||||
import layout from "./styles-layout.css";
|
||||
import article from "./styles-article.css";
|
||||
import code from "./styles-code.css";
|
||||
import print from "./styles-print.css";
|
||||
|
||||
let s = document.createElement("style");
|
||||
s.textContent = base + layout + code + print;
|
||||
document.querySelector("head").appendChild(s);
|
||||
export default s;
|
||||
Vendored
+5062
File diff suppressed because it is too large
Load Diff
Vendored
+1
File diff suppressed because one or more lines are too long
@@ -1,18 +1,20 @@
|
||||
import {Template} from './mixins/template';
|
||||
import {Template} from "./mixins/template";
|
||||
|
||||
// import logo from "./distill-logo.svg";
|
||||
var logo = "";
|
||||
|
||||
const T = Template('dt-header', `
|
||||
const T = Template("distill-header", `
|
||||
<style>
|
||||
:host {
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
position: relative;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
background-color: hsl(200, 60%, 15%);
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
z-index: 2;
|
||||
z-index: ${1e6};
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
|
||||
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
|
||||
@@ -82,10 +84,10 @@ svg path {
|
||||
</div>
|
||||
`);
|
||||
|
||||
export default class DTHeader extends T(HTMLElement) {
|
||||
export default class DistillHeader extends T(HTMLElement) {
|
||||
static get is() {
|
||||
return 'dt-header';
|
||||
return "distill-header";
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define(DTHeader.is, DTHeader);
|
||||
customElements.define(DistillHeader.is, DistillHeader);
|
||||
+153
-150
@@ -1,158 +1,161 @@
|
||||
<!doctype html>
|
||||
<meta charset="utf8">
|
||||
<script src="../dist/template.js"></script>
|
||||
<script type="text/front-matter">
|
||||
title: Article Title
|
||||
published: Jan 10, 2017
|
||||
authors:
|
||||
- Chris Olah:
|
||||
- Shan Carter: http://shancarter.com
|
||||
affiliations:
|
||||
- Google Brain:
|
||||
- Google Brain: http://g.co/brain
|
||||
</script>
|
||||
<dt-header></dt-header>
|
||||
<dt-article>
|
||||
<script type="text/article"></script>
|
||||
<h1>Hello World</h1>
|
||||
<h2>A description of the article</h2>
|
||||
<dt-byline></dt-byline>
|
||||
<p>This is the first paragraph of the article.</p>
|
||||
<p>Test a long — dash -- here it is.</p>
|
||||
<p>Test for owner's possessive.</p>
|
||||
<p>Test for "quoting a passage." And another sentence. Or two.</p>
|
||||
<p>We can also cite <dt-cite key="gregor2015draw,mercier2011humans"></dt-cite> external publications. <dt-cite key="dong2014image,dumoulin2016guide,mordvintsev2015inceptionism"></dt-cite></p>
|
||||
</dt-article>
|
||||
<script src="../dist/components.js"></script>
|
||||
|
||||
<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={arXiv preprint arXiv:1502.04623},
|
||||
year={2015},
|
||||
url ={https://arxiv.org/pdf/1502.04623.pdf}
|
||||
}
|
||||
@article{mercier2011humans,
|
||||
title={Why do humans reason? Arguments for an argumentative theory},
|
||||
author={Mercier, Hugo and Sperber, Dan},
|
||||
journal={Behavioral and brain sciences},
|
||||
volume={34},
|
||||
number={02},
|
||||
pages={57--74},
|
||||
year={2011},
|
||||
publisher={Cambridge Univ Press},
|
||||
doi={10.1017/S0140525X10000968}
|
||||
}
|
||||
<d-front-matter>
|
||||
<script type="text/yml">
|
||||
authors:
|
||||
- Chris Olah:
|
||||
- Shan Carter: http://shancarter.com
|
||||
affiliations:
|
||||
- Google Brain:
|
||||
- Google Brain: http://g.co/brain
|
||||
</script>
|
||||
</d-front-matter>
|
||||
|
||||
@article{dong2014image,
|
||||
title={Image super-resolution using deep convolutional networks},
|
||||
author={Dong, Chao and Loy, Chen Change and He, Kaiming and Tang, Xiaoou},
|
||||
journal={arXiv preprint arXiv:1501.00092},
|
||||
year={2014},
|
||||
url={https://arxiv.org/pdf/1501.00092.pdf}
|
||||
}
|
||||
<d-title>
|
||||
<h1>Attention and Augmented Recurrent Neural Networks</h1>
|
||||
</d-title>
|
||||
|
||||
@article{dumoulin2016adversarially,
|
||||
title={Adversarially Learned Inference},
|
||||
author={Dumoulin, Vincent and Belghazi, Ishmael and Poole, Ben and Lamb, Alex and Arjovsky, Martin and Mastropietro, Olivier and Courville, Aaron},
|
||||
journal={arXiv preprint arXiv:1606.00704},
|
||||
year={2016},
|
||||
url={https://arxiv.org/pdf/1606.00704.pdf}
|
||||
}
|
||||
<d-article>
|
||||
<d-abstract>A description of the article. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laudantium at, cumque, quod praesentium, pariatur quos, assumenda omnis rem repellendus culpa ipsam laborum blanditiis modi aliquam quaerat similique. Quod recusandae, distinctio.</d-abstract>
|
||||
<h2>This is the First Chapter</h2>
|
||||
<p>This is the first paragraph of the article. Test a long — dash -- here it is. Test for owner's possessive. Test for "quoting a passage." And another sentence. Or two. We can also cite <d-cite key="gregor2015draw,mercier2011humans"></d-cite> external publications. <d-cite key="dong2014image,dumoulin2016guide,mordvintsev2015inceptionism"></d-cite></p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit consectetur deleniti totam perspiciatis neque, eum sapiente, reiciendis velit magnam! Ipsam quas, voluptatum, eligendi velit animi distinctio. Rerum eos iusto sed.</p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsa minima voluptatibus eos, harum, quae hic veritatis perferendis mollitia ullam alias tempora, ipsum quaerat est, quisquam iste ab saepe deleniti possimus.</p>
|
||||
</d-article>
|
||||
|
||||
@article{dumoulin2016guide,
|
||||
title={A guide to convolution arithmetic for deep learning},
|
||||
author={Dumoulin, Vincent and Visin, Francesco},
|
||||
journal={arXiv preprint arXiv:1603.07285},
|
||||
year={2016},
|
||||
url={https://arxiv.org/pdf/1603.07285.pdf}
|
||||
}
|
||||
|
||||
@article{donahue2016adversarial,
|
||||
title={Adversarial Feature Learning},
|
||||
author={Donahue, Jeff and Kr{\"a}henb{\"u}hl, Philipp and Darrell, Trevor},
|
||||
journal={arXiv preprint arXiv:1605.09782},
|
||||
year={2016},
|
||||
url={https://arxiv.org/pdf/1605.09782.pdf}
|
||||
}
|
||||
|
||||
@article{gauthier2014conditional,
|
||||
title={Conditional generative adversarial nets for convolutional face generation},
|
||||
author={Gauthier, Jon},
|
||||
journal={Class Project for Stanford CS231N: Convolutional Neural Networks for Visual Recognition, Winter semester},
|
||||
volume={2014},
|
||||
year={2014},
|
||||
url={http://www.foldl.me/uploads/papers/tr-cgans.pdf}
|
||||
}
|
||||
|
||||
@article{henaff2015geodesics,
|
||||
title={Geodesics of learned representations},
|
||||
author={H{\'e}naff, Olivier J and Simoncelli, Eero P},
|
||||
journal={arXiv preprint arXiv:1511.06394},
|
||||
year={2015},
|
||||
url={https://arxiv.org/pdf/1511.06394.pdf}
|
||||
}
|
||||
|
||||
@article{johnson2016perceptual,
|
||||
title={Perceptual losses for real-time style transfer and super-resolution},
|
||||
author={Johnson, Justin and Alahi, Alexandre and Fei-Fei, Li},
|
||||
journal={arXiv preprint arXiv:1603.08155},
|
||||
year={2016},
|
||||
url={https://arxiv.org/pdf/1603.08155.pdf}
|
||||
}
|
||||
|
||||
@article{mordvintsev2015inceptionism,
|
||||
title={Inceptionism: Going deeper into neural networks},
|
||||
author={Mordvintsev, Alexander and Olah, Christopher and Tyka, Mike},
|
||||
journal={Google Research Blog},
|
||||
year={2015},
|
||||
url={https://research.googleblog.com/2015/06/inceptionism-going-deeper-into-neural.html}
|
||||
}
|
||||
|
||||
@misc{mordvintsev2016deepdreaming,
|
||||
title={DeepDreaming with TensorFlow},
|
||||
author={Mordvintsev, Alexander},
|
||||
year={2016},
|
||||
url={https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/deepdream/deepdream.ipynb},
|
||||
}
|
||||
|
||||
@article{radford2015unsupervised,
|
||||
title={Unsupervised representation learning with deep convolutional generative adversarial networks},
|
||||
author={Radford, Alec and Metz, Luke and Chintala, Soumith},
|
||||
journal={arXiv preprint arXiv:1511.06434},
|
||||
year={2015},
|
||||
url={https://arxiv.org/pdf/1511.06434.pdf}
|
||||
}
|
||||
|
||||
@inproceedings{salimans2016improved,
|
||||
title={Improved techniques for training gans},
|
||||
author={Salimans, Tim and Goodfellow, Ian and Zaremba, Wojciech and Cheung, Vicki and Radford, Alec and Chen, Xi},
|
||||
booktitle={Advances in Neural Information Processing Systems},
|
||||
pages={2226--2234},
|
||||
year={2016},
|
||||
url={https://arxiv.org/pdf/1606.03498.pdf}
|
||||
}
|
||||
|
||||
@article{shi2016deconvolution,
|
||||
title={Is the deconvolution layer the same as a convolutional layer?},
|
||||
author={Shi, Wenzhe and Caballero, Jose and Theis, Lucas and Huszar, Ferenc and Aitken, Andrew and Ledig, Christian and Wang, Zehan},
|
||||
journal={arXiv preprint arXiv:1609.07009},
|
||||
year={2016},
|
||||
url={https://arxiv.org/pdf/1609.07009.pdf}
|
||||
}
|
||||
|
||||
@inproceedings{shi2016real,
|
||||
title={Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network},
|
||||
author={Shi, Wenzhe and Caballero, Jose and Husz{\'a}r, Ferenc and Totz, Johannes and Aitken, Andrew P and Bishop, Rob and Rueckert, Daniel and Wang, Zehan},
|
||||
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
|
||||
pages={1874--1883},
|
||||
year={2016},
|
||||
url={https://arxiv.org/pdf/1609.05158.pdf},
|
||||
doi={10.1109/cvpr.2016.207}
|
||||
}
|
||||
|
||||
</script>
|
||||
<dt-appendix>
|
||||
<d-appendix>
|
||||
<h3>Contributions</h3>
|
||||
<p>List of who did what</p>
|
||||
</dt-appendix>
|
||||
</d-appendix>
|
||||
|
||||
<d-bibliography>
|
||||
<script type="text/bibtex">
|
||||
@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={arXiv preprint arXiv:1502.04623},
|
||||
year={2015},
|
||||
url ={https://arxiv.org/pdf/1502.04623.pdf}
|
||||
}
|
||||
@article{mercier2011humans,
|
||||
title={Why do humans reason? Arguments for an argumentative theory},
|
||||
author={Mercier, Hugo and Sperber, Dan},
|
||||
journal={Behavioral and brain sciences},
|
||||
volume={34},
|
||||
number={02},
|
||||
pages={57--74},
|
||||
year={2011},
|
||||
publisher={Cambridge Univ Press},
|
||||
doi={10.1017/S0140525X10000968}
|
||||
}
|
||||
|
||||
@article{dong2014image,
|
||||
title={Image super-resolution using deep convolutional networks},
|
||||
author={Dong, Chao and Loy, Chen Change and He, Kaiming and Tang, Xiaoou},
|
||||
journal={arXiv preprint arXiv:1501.00092},
|
||||
year={2014},
|
||||
url={https://arxiv.org/pdf/1501.00092.pdf}
|
||||
}
|
||||
|
||||
@article{dumoulin2016adversarially,
|
||||
title={Adversarially Learned Inference},
|
||||
author={Dumoulin, Vincent and Belghazi, Ishmael and Poole, Ben and Lamb, Alex and Arjovsky, Martin and Mastropietro, Olivier and Courville, Aaron},
|
||||
journal={arXiv preprint arXiv:1606.00704},
|
||||
year={2016},
|
||||
url={https://arxiv.org/pdf/1606.00704.pdf}
|
||||
}
|
||||
|
||||
@article{dumoulin2016guide,
|
||||
title={A guide to convolution arithmetic for deep learning},
|
||||
author={Dumoulin, Vincent and Visin, Francesco},
|
||||
journal={arXiv preprint arXiv:1603.07285},
|
||||
year={2016},
|
||||
url={https://arxiv.org/pdf/1603.07285.pdf}
|
||||
}
|
||||
|
||||
@article{donahue2016adversarial,
|
||||
title={Adversarial Feature Learning},
|
||||
author={Donahue, Jeff and Kr{\"a}henb{\"u}hl, Philipp and Darrell, Trevor},
|
||||
journal={arXiv preprint arXiv:1605.09782},
|
||||
year={2016},
|
||||
url={https://arxiv.org/pdf/1605.09782.pdf}
|
||||
}
|
||||
|
||||
@article{gauthier2014conditional,
|
||||
title={Conditional generative adversarial nets for convolutional face generation},
|
||||
author={Gauthier, Jon},
|
||||
journal={Class Project for Stanford CS231N: Convolutional Neural Networks for Visual Recognition, Winter semester},
|
||||
volume={2014},
|
||||
year={2014},
|
||||
url={http://www.foldl.me/uploads/papers/tr-cgans.pdf}
|
||||
}
|
||||
|
||||
@article{henaff2015geodesics,
|
||||
title={Geodesics of learned representations},
|
||||
author={H{\'e}naff, Olivier J and Simoncelli, Eero P},
|
||||
journal={arXiv preprint arXiv:1511.06394},
|
||||
year={2015},
|
||||
url={https://arxiv.org/pdf/1511.06394.pdf}
|
||||
}
|
||||
|
||||
@article{johnson2016perceptual,
|
||||
title={Perceptual losses for real-time style transfer and super-resolution},
|
||||
author={Johnson, Justin and Alahi, Alexandre and Fei-Fei, Li},
|
||||
journal={arXiv preprint arXiv:1603.08155},
|
||||
year={2016},
|
||||
url={https://arxiv.org/pdf/1603.08155.pdf}
|
||||
}
|
||||
|
||||
@article{mordvintsev2015inceptionism,
|
||||
title={Inceptionism: Going deeper into neural networks},
|
||||
author={Mordvintsev, Alexander and Olah, Christopher and Tyka, Mike},
|
||||
journal={Google Research Blog},
|
||||
year={2015},
|
||||
url={https://research.googleblog.com/2015/06/inceptionism-going-deeper-into-neural.html}
|
||||
}
|
||||
|
||||
@misc{mordvintsev2016deepdreaming,
|
||||
title={DeepDreaming with TensorFlow},
|
||||
author={Mordvintsev, Alexander},
|
||||
year={2016},
|
||||
url={https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/deepdream/deepdream.ipynb},
|
||||
}
|
||||
|
||||
@article{radford2015unsupervised,
|
||||
title={Unsupervised representation learning with deep convolutional generative adversarial networks},
|
||||
author={Radford, Alec and Metz, Luke and Chintala, Soumith},
|
||||
journal={arXiv preprint arXiv:1511.06434},
|
||||
year={2015},
|
||||
url={https://arxiv.org/pdf/1511.06434.pdf}
|
||||
}
|
||||
|
||||
@inproceedings{salimans2016improved,
|
||||
title={Improved techniques for training gans},
|
||||
author={Salimans, Tim and Goodfellow, Ian and Zaremba, Wojciech and Cheung, Vicki and Radford, Alec and Chen, Xi},
|
||||
booktitle={Advances in Neural Information Processing Systems},
|
||||
pages={2226--2234},
|
||||
year={2016},
|
||||
url={https://arxiv.org/pdf/1606.03498.pdf}
|
||||
}
|
||||
|
||||
@article{shi2016deconvolution,
|
||||
title={Is the deconvolution layer the same as a convolutional layer?},
|
||||
author={Shi, Wenzhe and Caballero, Jose and Theis, Lucas and Huszar, Ferenc and Aitken, Andrew and Ledig, Christian and Wang, Zehan},
|
||||
journal={arXiv preprint arXiv:1609.07009},
|
||||
year={2016},
|
||||
url={https://arxiv.org/pdf/1609.07009.pdf}
|
||||
}
|
||||
|
||||
@inproceedings{shi2016real,
|
||||
title={Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network},
|
||||
author={Shi, Wenzhe and Caballero, Jose and Husz{\'a}r, Ferenc and Totz, Johannes and Aitken, Andrew P and Bishop, Rob and Rueckert, Daniel and Wang, Zehan},
|
||||
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition},
|
||||
pages={1874--1883},
|
||||
year={2016},
|
||||
url={https://arxiv.org/pdf/1609.05158.pdf},
|
||||
doi={10.1109/cvpr.2016.207}
|
||||
}
|
||||
</script>
|
||||
</d-bibliography>
|
||||
|
||||
@@ -9,13 +9,16 @@ export const Template = (name, templateString, useShadow = true) => {
|
||||
return class extends superclass {
|
||||
constructor() {
|
||||
super();
|
||||
const clone = document.importNode(template.content, true);
|
||||
this.clone = document.importNode(template.content, true);
|
||||
if (useShadow) {
|
||||
// ShadyCSS.applyStyle(this);
|
||||
this.shadow_ = this.attachShadow({mode: 'open'});
|
||||
this.shadow_.appendChild(clone);
|
||||
} else {
|
||||
this.appendChild(clone);
|
||||
}
|
||||
}
|
||||
connectedCallback() {
|
||||
if (!useShadow) {
|
||||
this.insertBefore(this.clone, this.firstChild);
|
||||
}
|
||||
}
|
||||
get root() {
|
||||
+1
-2
@@ -28,10 +28,9 @@
|
||||
"marked": "^0.3.6",
|
||||
"mocha": "^3.2.0",
|
||||
"prismjs": "^1.6.0",
|
||||
"rollup": "^0.36.4",
|
||||
"rollup": "latest",
|
||||
"rollup-plugin-buble": "^0.14.0",
|
||||
"rollup-plugin-commonjs": "^7.0.0",
|
||||
"rollup-plugin-livereload": "^0.3.1",
|
||||
"rollup-plugin-node-resolve": "^2.0.0",
|
||||
"rollup-plugin-serve": "^0.1.0",
|
||||
"rollup-plugin-string": "^2.0.2",
|
||||
|
||||
+35
-37
@@ -1,39 +1,37 @@
|
||||
// import buble from 'rollup-plugin-buble';
|
||||
// import resolve from 'rollup-plugin-node-resolve';
|
||||
// import commonjs from 'rollup-plugin-commonjs';
|
||||
// import liveReload from 'rollup-plugin-livereload';
|
||||
// import serve from 'rollup-plugin-serve';
|
||||
// import uglify from 'rollup-plugin-uglify';
|
||||
// import string from 'rollup-plugin-string';
|
||||
import buble from 'rollup-plugin-buble';
|
||||
import resolve from 'rollup-plugin-node-resolve';
|
||||
import commonjs from 'rollup-plugin-commonjs';
|
||||
import serve from 'rollup-plugin-serve';
|
||||
import uglify from 'rollup-plugin-uglify';
|
||||
import string from 'rollup-plugin-string';
|
||||
|
||||
// const PORT = 8080;
|
||||
// // console.log(`open http://localhost:${PORT}/`);
|
||||
const PORT = 8080;
|
||||
console.log(`open http://localhost:${PORT}/`);
|
||||
|
||||
// export default {
|
||||
// entry: 'index.js',
|
||||
// sourceMap: true,
|
||||
// targets: [
|
||||
// {
|
||||
// format: 'umd',
|
||||
// moduleName: 'dl',
|
||||
// dest: `dist/template.js`,
|
||||
// }
|
||||
// ],
|
||||
// plugins: [
|
||||
// resolve({
|
||||
// jsnext: true,
|
||||
// browser: true,
|
||||
// }),
|
||||
// string({
|
||||
// include: ["**/*.txt", "**/*.svg", "**/*.html", "**/*.css", "**/*.base64"]
|
||||
// }),
|
||||
// buble({
|
||||
// exclude: 'node_modules',
|
||||
// target: { chrome: 52, safari: 9, edge: 13, firefox: 48, }
|
||||
// }),
|
||||
// commonjs(),
|
||||
// // uglify(),
|
||||
// // liveReload(),
|
||||
// // serve({port: PORT}),
|
||||
// ]
|
||||
// };
|
||||
export default {
|
||||
entry: 'components.js',
|
||||
sourceMap: true,
|
||||
targets: [
|
||||
{
|
||||
format: 'umd',
|
||||
moduleName: 'dl',
|
||||
dest: `dist/components.js`,
|
||||
}
|
||||
],
|
||||
plugins: [
|
||||
resolve({
|
||||
jsnext: true,
|
||||
browser: true,
|
||||
}),
|
||||
string({
|
||||
include: ["**/*.txt", "**/*.svg", "**/*.html", "**/*.css", "**/*.base64"]
|
||||
}),
|
||||
buble({
|
||||
exclude: 'node_modules',
|
||||
target: { chrome: 52, safari: 9, edge: 13, firefox: 48, }
|
||||
}),
|
||||
commonjs(),
|
||||
// uglify(),
|
||||
serve({port: PORT})
|
||||
]
|
||||
};
|
||||
|
||||
@@ -11,6 +11,8 @@ const html = `
|
||||
color: rgba(0, 0, 0, 0.5);
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
min-height: 90px;
|
||||
|
||||
}
|
||||
dt-article.centered dt-byline {
|
||||
text-align: center;
|
||||
|
||||
@@ -384,7 +384,7 @@ chalk@^1.1.1, chalk@^1.1.3:
|
||||
strip-ansi "^3.0.0"
|
||||
supports-color "^2.0.0"
|
||||
|
||||
chokidar@^1.4.3, chokidar@^1.6.0:
|
||||
chokidar@^1.4.3:
|
||||
version "1.6.1"
|
||||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2"
|
||||
dependencies:
|
||||
@@ -1189,14 +1189,6 @@ levn@~0.3.0:
|
||||
prelude-ls "~1.1.2"
|
||||
type-check "~0.3.2"
|
||||
|
||||
livereload@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.yarnpkg.com/livereload/-/livereload-0.6.0.tgz#ac02fe5b5e8b3ab768e14c7eb9bc6a9b0b37cef2"
|
||||
dependencies:
|
||||
chokidar "^1.6.0"
|
||||
opts ">= 1.2.0"
|
||||
ws "^1.1.1"
|
||||
|
||||
load-json-file@^1.0.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
|
||||
@@ -1507,14 +1499,6 @@ optionator@^0.8.1:
|
||||
type-check "~0.3.2"
|
||||
wordwrap "~1.0.0"
|
||||
|
||||
options@>=0.0.5:
|
||||
version "0.0.6"
|
||||
resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f"
|
||||
|
||||
"opts@>= 1.2.0":
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/opts/-/opts-1.2.2.tgz#81782b93014a1cd88d56c226643fd4282473853d"
|
||||
|
||||
os-browserify@^0.2.0:
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f"
|
||||
@@ -1817,12 +1801,6 @@ rollup-plugin-commonjs@^7.0.0:
|
||||
resolve "^1.1.7"
|
||||
rollup-pluginutils "^1.5.1"
|
||||
|
||||
rollup-plugin-livereload@^0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-livereload/-/rollup-plugin-livereload-0.3.1.tgz#3294ba9e88f968284623bae528be4ce682ef8bb3"
|
||||
dependencies:
|
||||
livereload "^0.6.0"
|
||||
|
||||
rollup-plugin-node-resolve@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-2.0.0.tgz#07e0ae94ac002a3ea36e8f33ca121d9f836b1309"
|
||||
@@ -1863,9 +1841,9 @@ rollup-watch@^2.5.0:
|
||||
dependencies:
|
||||
semver "^5.1.0"
|
||||
|
||||
rollup@^0.36.4:
|
||||
version "0.36.4"
|
||||
resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.36.4.tgz#a224494c5386c1d73d38f7bb86f69f5eb011a3d2"
|
||||
rollup@^0.41.4:
|
||||
version "0.41.4"
|
||||
resolved "https://registry.yarnpkg.com/rollup/-/rollup-0.41.4.tgz#a970580176329f9ead86854d7fd4c46de752aef8"
|
||||
dependencies:
|
||||
source-map-support "^0.4.0"
|
||||
|
||||
@@ -2121,10 +2099,6 @@ uid-number@~0.0.6:
|
||||
version "0.0.6"
|
||||
resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"
|
||||
|
||||
ultron@1.0.x:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa"
|
||||
|
||||
url@^0.11.0:
|
||||
version "0.11.0"
|
||||
resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
|
||||
@@ -2259,13 +2233,6 @@ wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
|
||||
ws@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.1.tgz#082ddb6c641e85d4bb451f03d52f06eabdb1f018"
|
||||
dependencies:
|
||||
options ">=0.0.5"
|
||||
ultron "1.0.x"
|
||||
|
||||
xml-name-validator@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635"
|
||||
|
||||
Reference in New Issue
Block a user