Permalink
Browse files

Make 'years of experience' dynamic

  • Loading branch information...
scriptype committed Jan 22, 2019
1 parent a99616d commit f0eca1bede7276f1d144e07bec0985782703a9a6
Showing with 8 additions and 5 deletions.
  1. +1 −1 index.hbs
  2. +1 −1 index.html
  3. +6 −3 scripts/tasks/handlebars.js
@@ -54,7 +54,7 @@
<a name="whoami"></a>
<div class="content-container">
<h2 class="section__title">Who Am I?</h2>
<p>A JavaScript Developer with 6+ years of working experience, living in Helsinki.</p>
<p>A JavaScript Developer with {{ yearsOfExperience }}+ years of working experience, living in Helsinki.</p>
<p>Popular science geek, amateur astro-photographer, creative coder, Vim addict.</p>
<p>Technical matters I care most are accessibility, code quality and automation.</p>
<p>Working at <a href="http://digitalgoodie.com" target="_blank">Digital Goodie</a>. Previously worked at: <a href="http://protein.tech" target="_blank">Protein</a>, <a href="http://vngrs.com" target="_blank">VNGRS</a>, <a href="http://adphorus.com" target="_blank">Adphorus</a>, <a href="http://evolvedmedia.co.uk" target="_blank">Evolved Media</a>.</p>
@@ -353,7 +353,7 @@ <h2 class="section__title">Contact</h2>

<footer class="section footer-section">
<p class="build-info">
Last build: <a href="https://github.com/scriptype/scriptype.github.io/commit/787f914">#787f914</a> (Mon, 26 Nov 2018 00:18:13 GMT)
Last build: <a href="https://github.com/scriptype/scriptype.github.io/commit/a99616d">#a99616d</a> (Tue, 22 Jan 2019 22:05:06 GMT)
</p>
</footer>

@@ -10,9 +10,12 @@ const {
const html = fs.readFileSync(htmlInput, 'utf-8')
const template = Handlebars.compile(html)

const output = template({
const templateData = {
lastCommitHash,
lastBuildTime: new Date().toUTCString()
})
lastBuildTime: new Date().toUTCString(),
yearsOfExperience: new Date().getUTCFullYear() - 2013
}

const output = template(templateData)

fs.writeFileSync(htmlOutput, output)

0 comments on commit f0eca1b

Please sign in to comment.