diff --git a/src/index.html b/src/index.html index 0b5d08e..3521f6c 100644 --- a/src/index.html +++ b/src/index.html @@ -4,7 +4,10 @@ - Document + + CV
diff --git a/src/lib/icons.js b/src/lib/icons.js index 7cf78ae..41d61a2 100644 --- a/src/lib/icons.js +++ b/src/lib/icons.js @@ -18,7 +18,7 @@ const getIconsData = function(prefix) { throw new Error(`Icon set ${prefix} is not included.`); } -export const getIconSVG = function(name, { dom }) { +export const getIconSVG = function(name, { dom } = {}) { const iconName = stringToIcon(name) const icon = getIconData(getIconsData(iconName.prefix), iconName.name) if (!icon) { diff --git a/src/templates/reorx/index.ejs b/src/templates/reorx/index.ejs index 26ced3c..77da9c7 100644 --- a/src/templates/reorx/index.ejs +++ b/src/templates/reorx/index.ejs @@ -1,9 +1,37 @@ -

<%= cv.basics.name %>

-

<%= cv.basics.summary %>

-
- <%= cv.basics.email %> | <%= cv.basics.phone %> -
+
+

<%= cv.basics.name %>

+ <% if (cv.basics.label) { %> +
<%= cv.basics.label %>
+ <% } %> + <% if (cv.basics.url) { %> +
+ <%= fn.urlNoSchema(cv.basics.url) %>
+ <% } %> + <% if (cv.basics.summary) { %> +
<%= cv.basics.summary %>
+ <% } %> +
+ <% if (cv.basics.email) { %> +
+ <%- fn.getIconSVG('mdi:email') %> + <%= cv.basics.email %> +
+ <% } %> + <% if (cv.basics.phone) { %> +
+ <%- fn.getIconSVG('mdi:phone') %> + <%= cv.basics.phone %> +
+ <% } %> + <% if (cv.basics.location) { %> +
+ <%- fn.getIconSVG('mdi:location') %> + <%= cv.basics.location.city %>, <%= cv.basics.location.countryCode %> +
+ <% } %> +
+
<% function dateRange(item, preserveDay) { @@ -21,7 +49,10 @@ function dateRange(item, preserveDay) { <% if (cv.education) { %>
-

Educations

+
+

Educations

+
+
<% for (const item of cv.education) { %>

<%= item.institution %>

@@ -37,7 +68,10 @@ function dateRange(item, preserveDay) { <% if (cv.work) { %>
-

Work

+
+

Work

+
+
<% for (const item of cv.work) { %>

<%= item.name %>

@@ -58,7 +92,10 @@ function dateRange(item, preserveDay) { <% if (cv.projects) { %>
-

Projects

+
+

Projects

+
+
<% for (const item of cv.projects) { %>

<%= item.name %>

@@ -83,7 +120,10 @@ function dateRange(item, preserveDay) { <% if (cv.sideProjects) { %>
-

Side-projects

+
+

Side-projects

+
+
<% for (const item of cv.sideProjects) { %>

<%= item.name %>

@@ -103,7 +143,10 @@ function dateRange(item, preserveDay) { <% if (cv.skills) { %>
-

Skills

+
+

Skills

+
+
<% for (const item of cv.skills) { %>

<%= item.name %>

@@ -121,7 +164,10 @@ function dateRange(item, preserveDay) { <% if (cv.languages) { %>
-

Languages

+
+

Languages

+
+
<% for (const item of cv.languages) { %>

<%= item.language %>

diff --git a/src/templates/reorx/index.scss b/src/templates/reorx/index.scss index 1560230..6fce1e6 100644 --- a/src/templates/reorx/index.scss +++ b/src/templates/reorx/index.scss @@ -1,5 +1,61 @@ +$color-signature: #2A3FFB; +$color-text-dim: #777; + .cv-container { font-size: 14px; font-family: system-ui, sans-serif; + a, a:visited, a:hover, a:active { + color: $color-signature; + text-decoration: none; + } +} + +.basics-section { + h1 { + font-size: 36px; + font-weight: 600; + margin: .8em 0 .2em 0; + } + .label { + margin: .4em 0; + } + .url { + margin: .4em 0; + } + .summary { + margin: .4em 0; + } + .contact { + margin: .4em 0; + color: $color-text-dim; + + display: flex; + .item { + margin-right: 1em; + a { + color: $color-text-dim; + } + svg { + vertical-align: bottom; + } + } + } +} + +.section-title { + margin-top: 3em; + display: flex; + h2 { + font-size: 22px; + font-weight: 600; + color: $color-signature; + margin: 0; + } + .line { + flex-grow: 1; + margin: 14px 0 0 1em; + height: 2px; + background-color: $color-signature; + } } diff --git a/src/themer/index.js b/src/themer/index.js index 5fb78f6..3b17063 100644 --- a/src/themer/index.js +++ b/src/themer/index.js @@ -1,6 +1,7 @@ import ejs from 'ejs'; import { reformatDate } from '../lib/date'; +import { getIconSVG } from '../lib/icons'; const themes = {} @@ -35,6 +36,8 @@ export function renderTheme(template, data, options) { cv: data, fn: { reformatDate, + getIconSVG, + urlNoSchema, } }, options) } @@ -52,3 +55,9 @@ export function applyThemeTo(name, el, data) { } elStyle.innerHTML = theme.style } + +/* fn */ + +function urlNoSchema(url) { + return url.replace(/https?:\/\//, '') +}