diff --git a/examples/article.html b/examples/article.html index 0bfc835..47e8b37 100644 --- a/examples/article.html +++ b/examples/article.html @@ -52,19 +52,13 @@ c = \pm \sqrt{ \sum_{i=0}^{n}{a^{222} + b^2}} -

- Math can also be quite involved: - - f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi - - - \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } } - -

+

Math can also be quite involved:

+ + \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } } + 1.1

Citations

-

We can also cite external publications.

-

We should also be testing footnotesThis will become a hoverable footnote. This will become a hoverable footnote. This will become a hoverable footnote. This will become a hoverable footnote. This will become a hoverable footnote. This will become a hoverable footnote. This will become a hoverable footnote. This will become a hoverable footnote.. There are multiple footnotes, and they appear in the appendixGiven I have coded them right. Also, here's math in a footnote: c = \sum_0^i{x}. Also, a citation. Box-ception! as well.

+

We can also cite external publications. . We should also be testing footnotesThis will become a hoverable footnote. This will become a hoverable footnote. This will become a hoverable footnote. This will become a hoverable footnote. This will become a hoverable footnote. This will become a hoverable footnote. This will become a hoverable footnote. This will become a hoverable footnote.. There are multiple footnotes, and they appear in the appendixGiven I have coded them right. Also, here's math in a footnote: c = \sum_0^i{x}. Also, a citation. Box-ception! as well.

diff --git a/src/components.js b/src/components.js index 8eee8de..d9be12e 100644 --- a/src/components.js +++ b/src/components.js @@ -14,7 +14,7 @@ import { Code } from './components/d-code'; import { Footnote } from './components/d-footnote'; import { FootnoteList } from './components/d-footnote-list'; import { FrontMatter } from './components/d-front-matter'; -import { Headline } from './components/d-headline'; +import { Title } from './components/d-title'; import { DMath } from './components/d-math'; import { References } from './components/d-references'; import { TOC } from './components/d-toc'; @@ -22,7 +22,7 @@ import { Figure } from './components/d-figure'; const components = [ Abstract, Appendix, Article, Bibliography, Byline, Cite, CitationList, Code, - Footnote, FootnoteList, FrontMatter, Headline, DMath, References, TOC, Figure, + Footnote, FootnoteList, FrontMatter, Title, DMath, References, TOC, Figure, ]; /* Distill website specific components */ diff --git a/src/components/d-abstract.js b/src/components/d-abstract.js index c728e14..63c364f 100644 --- a/src/components/d-abstract.js +++ b/src/components/d-abstract.js @@ -5,17 +5,18 @@ const T = Template('d-abstract', ` diff --git a/src/components/d-article.js b/src/components/d-article.js index 93e7085..8c132ea 100644 --- a/src/components/d-article.js +++ b/src/components/d-article.js @@ -55,8 +55,8 @@ d-article .marker:hover span { } d-article h2 { - grid-column-end: span 5; - font-weight: 600; + grid-column-end: span 10; + font-weight: 700; font-size: 24px; line-height: 1.25em; } @@ -99,8 +99,10 @@ d-article a { d-article p, d-article ul, d-article ol { + font-family: "Merriweather", georgia, serif; + font-weight: 300; margin-top: 0; - margin-bottom: 36px; + margin-bottom: 1.7em; } d-article a { diff --git a/src/components/d-byline.js b/src/components/d-byline.js index 8d98764..50ca8c0 100644 --- a/src/components/d-byline.js +++ b/src/components/d-byline.js @@ -20,6 +20,12 @@ d-byline h3 { text-transform: uppercase; } +d-byline p { + font-family: "Merriweather", georgia, serif; + font-weight: 300; + margin: 0; +} + d-byline a, d-article d-byline a { color: rgba(0, 0, 0, 0.8); @@ -32,7 +38,7 @@ d-article d-byline a:hover { border-bottom: none; } -d-byline .authors { +d-byline .authors p { font-weight: 600; } d-byline .affiliations { @@ -47,36 +53,32 @@ export function bylineTemplate(frontMatter) {

Authors

${frontMatter.authors.map(author => ` -
+

${author.personalURL ? `${author.name}` : `

${author.name}
` } -
+ `).join("")}

Affiliations

${frontMatter.authors.map(author => ` -
+

${author.affiliationURL ? `${author.affiliation}` : `

${author.affiliation}
` } -
+

`).join("")}

Published

-
${frontMatter.publishedMonth}. ${frontMatter.publishedDay} ${frontMatter.publishedYear}
-
-
-

Cite as

-
${frontMatter.concatenatedAuthors}, ${frontMatter.publishedYear}
+

${frontMatter.publishedMonth}. ${frontMatter.publishedDay} ${frontMatter.publishedYear}

DOI

-
${frontMatter.doi}
+

${frontMatter.doi}

`; diff --git a/src/components/d-headline.js b/src/components/d-title.js similarity index 57% rename from src/components/d-headline.js rename to src/components/d-title.js index 65ff62d..5486a96 100644 --- a/src/components/d-headline.js +++ b/src/components/d-title.js @@ -1,39 +1,42 @@ import { Template } from '../mixins/template'; -import { body } from '../helpers/layout'; -const T = Template('d-headline', ` +const T = Template('d-title', ` -
Peer Reviewed
+ +
Peer Reviewed
`); -export class Headline extends T(HTMLElement) { +export class Title extends T(HTMLElement) { } diff --git a/src/styles/d-math.css b/src/styles/d-math.css index 6d58f89..e02be30 100644 --- a/src/styles/d-math.css +++ b/src/styles/d-math.css @@ -1,7 +1,7 @@ span.katex-display { text-align: left; padding: 8px 0 8px 0; - margin: 20px 0 20px 24px; + margin: 0 0 1.7em 1em; } span.katex { diff --git a/src/styles/styles-layout.css b/src/styles/styles-layout.css index 7b8f997..004dc00 100644 --- a/src/styles/styles-layout.css +++ b/src/styles/styles-layout.css @@ -1,5 +1,5 @@ @supports not (display: grid) { - d-headline, + d-title, d-abstract, d-article, d-appendix, @@ -11,7 +11,7 @@ } } -d-headline, +d-title, d-abstract, d-article, d-appendix, @@ -32,7 +32,7 @@ distill-footer { } }*/ /* @media(min-width: 768px) { - d-headline, + d-title, d-abstract, d-article, d-appendix, @@ -45,7 +45,7 @@ distill-footer { } */ @media(min-width: 1060px) { - d-headline, + d-title, d-abstract, d-article, d-appendix, @@ -83,7 +83,7 @@ d-article > * { } .l-page, -d-headline > *, +d-title > *, d-figure { grid-column: page; } */ diff --git a/src/transforms/optional-components.js b/src/transforms/optional-components.js index d7a6f4f..be99ffb 100644 --- a/src/transforms/optional-components.js +++ b/src/transforms/optional-components.js @@ -18,7 +18,7 @@ export default function(dom, data) { // } // } else { if (data.title) { - let headline = dom.createElement('d-headline'); + let headline = dom.createElement('d-title'); let h1 = dom.createElement('h1'); headline.appendChild(h1); h1.textContent = data.title;
FirstSecondThird