Skip to content

Commit

Permalink
Reorganize files
Browse files Browse the repository at this point in the history
  • Loading branch information
OmeGak committed Oct 19, 2018
1 parent a8c1b98 commit ed31bdf
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cv.njk → html/cv.njk
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
<body class="phantomjs-fix">
<div class="page">
<div class="header">
{% include 'partials/header.njk' %}
{% include './partials/header.njk' %}
</div>
<div class="content">
<div class="sidebar">
{% include 'partials/sidebar.njk' %}
{% include './partials/sidebar.njk' %}
</div>
<div class="main">
{% include 'partials/main.njk' %}
{% include './partials/main.njk' %}
</div>
</div>
<div class="footer">
{% include 'partials/footer.njk' %}
{% include './partials/footer.njk' %}
</div>
</div>
</body>
Expand Down
15 changes: 15 additions & 0 deletions html/partials/_util.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% macro shrink() %}
{% set text = caller().val %}
{% for char in text %}
{#--#}<span>{{ char }}</span>{#--#}
{% endfor %}
{% endmacro %}

<script>
var $shrinkingText = document.getElementsByClassName('shrinking-text')[0];
for (var i = 0, len = $shrinkingText.children.length; i < len; i++) {
var reduction = 500 / (500 + i)
reduction = Math.max(0.4, reduction)
$shrinkingText.children[i].style.cssText = 'font-size:' + reduction + 'em; opacity: ' + reduction / 2
}
</script>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ sass.render({

// -- Generate HTML ------------------------------------------------------------

nunjucks.render('cv.njk', function handleNunjucksRender(err, res) {
nunjucks.render('html/cv.njk', function handleNunjucksRender(err, res) {
if (err) { return console.log(err) }
var path = 'cv.html'
fs.writeFileSync(path, res)
Expand Down

0 comments on commit ed31bdf

Please sign in to comment.