feat(image): render image as profile picture
This commit is contained in:
parent
09cec3e04f
commit
16e8bc28b1
|
@ -1,4 +1,7 @@
|
|||
<header class="masthead">
|
||||
{{#image}}
|
||||
<img src="{{.}}" alt="">
|
||||
{{/image}}
|
||||
<div>
|
||||
{{#name}}
|
||||
<h1>{{.}}</h1>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 > * + * {
|
|||
</head>
|
||||
<body>
|
||||
<header class="masthead">
|
||||
<img src="image.jpg" alt="">
|
||||
<div>
|
||||
<h1>Richard Hendriks</h1>
|
||||
<h2>Programmer</h2>
|
||||
|
|
|
@ -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()
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue