From f203660e46d2679161744fc78ac561de3b1533cc Mon Sep 17 00:00:00 2001
From: Rafael Bardini
Date: Sun, 23 Sep 2018 20:28:05 +0200
Subject: [PATCH] 0.1.0
---
.gitignore | 2 +
LICENSE | 21 ++
README.md | 17 ++
index.js | 32 +++
package-lock.json | 72 +++++++
package.json | 18 ++
resume.template | 494 ++++++++++++++++++++++++++++++++++++++++++++++
style.css | 176 +++++++++++++++++
8 files changed, 832 insertions(+)
create mode 100644 .gitignore
create mode 100644 LICENSE
create mode 100644 README.md
create mode 100644 index.js
create mode 100644 package-lock.json
create mode 100644 package.json
create mode 100644 resume.template
create mode 100644 style.css
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1ca9571
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+node_modules/
+npm-debug.log
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..2937f87
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Rafael Bardini
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a64230e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,17 @@
+jsonresume-theme-even
+=====================
+
+[![npm package version](https://img.shields.io/npm/v/jsonresume-theme-even.svg)](https://www.npmjs.com/package/jsonresume-theme-even)
+[![Dependency status](https://img.shields.io/david/rbardini/jsonresume-theme-even.svg)](https://david-dm.org/rbardini/jsonresume-theme-even)
+
+A flat theme for [JSON Resume](https://jsonresume.org/), compatible with the bleeding edge [resume schema](https://github.com/jsonresume/resume-schema/tree/v1.0.0).
+
+Based on [jsonresume-theme-flat](https://github.com/erming/jsonresume-theme-flat).
+
+## Installation
+
+ $ npm install jsonresume-theme-even
+
+## License
+
+Licensed under the [MIT License](https://opensource.org/licenses/MIT).
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..a946279
--- /dev/null
+++ b/index.js
@@ -0,0 +1,32 @@
+var fs = require("fs");
+var Handlebars = require("handlebars");
+
+module.exports = {
+ render: render
+};
+
+function render(resume) {
+ var css = fs.readFileSync(__dirname + "/style.css", "utf-8");
+ var template = fs.readFileSync(__dirname + "/resume.template", "utf-8");
+ return Handlebars.compile(template)({
+ css: css,
+ resume: resume
+ });
+}
+
+Handlebars.registerHelper("formatDate", function(dateString) {
+ const date = new Date(dateString);
+ return date.toLocaleDateString("en", {
+ month: "short",
+ year: "numeric"
+ });
+});
+
+Handlebars.registerHelper("join", function(arr, separator) {
+ separator = typeof separator === "string" ? separator : ", ";
+ return arr.join(separator);
+});
+
+Handlebars.registerHelper("nl2br", function(value) {
+ return (value || "").replace(/\n/g, "