diff --git a/partials/header.hbs b/partials/header.hbs index 0b367a6..9c1556e 100644 --- a/partials/header.hbs +++ b/partials/header.hbs @@ -1,4 +1,7 @@
+ {{#image}} + + {{/image}}
{{#name}}

{{.}}

diff --git a/style.css b/style.css index 9c48181..8982ecd 100644 --- a/style.css +++ b/style.css @@ -161,6 +161,13 @@ section { grid-column: main; } +.masthead > img { + border-radius: 50%; + grid-column: side; + grid-row: span 2; + max-width: 100%; +} + article > * + *, blockquote > * + * { margin-top: 0.6em; diff --git a/tap-snapshots/test/render.js.test.cjs b/tap-snapshots/test/render.js.test.cjs index f997741..8683b2f 100644 --- a/tap-snapshots/test/render.js.test.cjs +++ b/tap-snapshots/test/render.js.test.cjs @@ -177,6 +177,13 @@ section { grid-column: main; } +.masthead > img { + border-radius: 50%; + grid-column: side; + grid-row: span 2; + max-width: 100%; +} + article > * + *, blockquote > * + * { margin-top: 0.6em; @@ -251,6 +258,7 @@ blockquote > * + * {
+

Richard Hendriks

Programmer

diff --git a/test/render.js b/test/render.js index deff04d..eff4de2 100644 --- a/test/render.js +++ b/test/render.js @@ -4,6 +4,9 @@ const { HtmlValidate } = require('html-validate') const { render } = require('..') const resume = require('resume-schema/sample.resume.json') +// Overwrite empty sample resume values +resume.basics.image = 'image.jpg' + test('renders a resume', t => { t.matchSnapshot(render(resume)) t.end() @@ -19,6 +22,6 @@ test('renders valid HTML', t => { results: [{ messages } = {}], } = htmlvalidate.validateString(render(resume)) - t.is(messages, undefined) + t.equal(messages, undefined) t.end() })