UNPKG

jsonresume-theme-even-crewshin

Version:
312 lines (311 loc) 14.2 kB
(function(m,u){typeof exports=="object"&&typeof module<"u"?u(exports,require("micromark"),require("striptags"),require("feather-icons")):typeof define=="function"&&define.amd?define(["exports","micromark","striptags","feather-icons"],u):(m=typeof globalThis<"u"?globalThis:m||self,u(m.jsonresumeThemeEvenCrewshin={},m.micromark,m.striptags,m.feather))})(this,function(m,u,x,k){"use strict";function t(e,...i){return e.reduce((r,o,a)=>{const n=i[a];return Array.isArray(n)?r+o+n.join(""):n!=null&&!!n!==n?r+o+n:r+o},"")}function s(e,i=!1){const r=u(e);return i?x(r):r}const w=e=>new Date(e).toLocaleDateString("en",{month:"short",year:"numeric",timeZone:"UTC"});function p(e){return t`<time datetime="${e}">${w(e)}</time>`}function j(e=[]){return e.length>0&&t` <section id="awards"> <h3>Awards</h3> <div class="stack"> ${e.map(({awarder:i,date:r,summary:o,title:a})=>t` <article> <header> <h4>${a}</h4> <div class="meta"> ${i&&t` <div> Awarded by <strong>${i}</strong> </div> `} ${r&&p(r)} </div> </header> ${o&&s(o)} </article> `)} </div> </section> `}const L=e=>e.replace(/^(https?:|)\/\//,"").replace(/\/$/,"");function h(e,i){return i?e?t`<a href="${e}">${i}</a>`:i:e&&t`<a href="${e}">${L(e)}</a>`}function C(e=[]){return e.length>0&&t` <section id="certificates"> <h3>Certificates</h3> <div class="stack"> ${e.map(({date:i,issuer:r,name:o,url:a})=>t` <article> <header> <h4>${h(a,o)}</h4> <div class="meta"> ${r&&t` <div> Issued by <strong>${r}</strong> </div> `} ${i&&p(i)} </div> </header> </article> `)} </div> </section> `}function y(e,i){return t`${p(e)}${i?p(i):"Present"}`}function z(e=[]){return e.length>0&&t` <section id="education"> <h3>Education</h3> <div class="stack"> ${e.map(({area:i,courses:r=[],institution:o,startDate:a,endDate:n,studyType:l,url:c})=>t` <article> <header> <h4>${h(c,o)}</h4> <div class="meta"> ${i&&t`<strong>${i}</strong>`} <div>${y(a,n)}</div> </div> </header> ${l&&s(l)} ${r.length>0&&t` <h5>Courses</h5> <ul> ${r.map(d=>t`<li>${s(d)}</li>`)} </ul> `} </article> `)} </div> </section> `}function f(e,i){return(k.icons[e.toLowerCase()]||k.icons[i.toLowerCase()]).toSvg({width:16,height:16})}const I=e=>Intl.DisplayNames?new Intl.DisplayNames(["en"],{type:"region"}).of(e):e;function q(e={}){const{email:i,image:r,label:o,location:a,name:n,phone:l,profiles:c=[],summary:d,url:v}=e;return t` <header class="masthead"> ${r&&t`<img src="${r}" alt="">`} <div> ${n&&t`<h1>${n}</h1>`} ${o&&t`<h2>${o}</h2>`} </div> ${d&&t`<article>${s(d)}</article>`} <ul class="icon-list"> ${a?.city&&t` <li> ${f("map-pin")} ${a.city}${a.countryCode&&t`, ${I(a.countryCode)}`} </li> `} ${i&&t` <li> ${f("mail")} <a href="mailto:${i}">${i}</a> </li> `} ${l&&t` <li> ${f("phone")} <a href="tel:${l.replace(/\s/g,"")}">${l}</a> </li> `} ${v&&t` <li> ${f("link")} ${h(v)} </li> `} ${c.map(({network:g,url:$,username:b})=>t` <li> ${f(g,"user")} ${h($,b)} ${g&&t`<span class="network">(${g})</span>`} </li> `)} </ul> </header> `}function P(e=[]){return e.length>0&&t` <section id="interests"> <h3>Interests</h3> <div class="grid-list"> ${e.map(({keywords:i=[],name:r})=>t` <div> ${r&&t`<h4>${r}</h4>`} ${i.length>0&&t` <ul class="tag-list"> ${i.map(o=>t`<li>${o}</li>`)} </ul> `} </div> `)} </div> </section> `}function R(e=[]){return e.length>0&&t` <section id="languages"> <h3>Languages</h3> <div class="grid-list"> ${e.map(({fluency:i,language:r})=>t` <div> ${r&&t`<h4>${r}</h4>`} ${i} </div> `)} </div> </section> `}function S(e={}){const{name:i,summary:r}=e;return t` ${i&&t`<title>${i}</title>`} ${r&&t`<meta name="description" content="${s(r,!0)}">`} `}const A=e=>Intl.ListFormat?new Intl.ListFormat("en").format(e):e.join(", ");function D(e=[]){return e.length>0&&t` <section id="projects"> <h3>Projects</h3> <div class="stack"> ${e.map(({description:i,entity:r,highlights:o=[],keywords:a=[],name:n,startDate:l,endDate:c,roles:d=[],type:v,url:g})=>t` <article> <header> <h4>${h(g,n)}</h4> <div class="meta"> <div> ${d.length>0&&t`<strong>${A(d)}</strong>`} ${r&&t`at <strong>${r}</strong>`} </div> <div>${y(l,c)}</div> ${v&&t`<div>${v}</div>`} </div> </header> ${i&&s(i)} ${o.length>0&&t` <ul> ${o.map($=>t`<li>${s($)}</li>`)} </ul> `} ${a.length>0&&t` <ul class="tag-list"> ${a.map($=>t`<li>${$}</li>`)} </ul> `} </article> `)} </div> </section> `}function T(e=[]){return e.length>0&&t` <section id="publications"> <h3>Publications</h3> <div class="stack"> ${e.map(({name:i,publisher:r,releaseDate:o,summary:a,url:n})=>t` <article> <header> <h4>${h(n,i)}</h4> <div class="meta"> ${r&&t` <div> Published by <strong>${r}</strong> </div> `} ${o&&p(o)} </div> </header> ${a&&s(a)} </article> `)} </div> </section> `}function O(e=[]){return e.length>0&&t` <section id="references"> <h3>References</h3> <div class="stack"> ${e.map(({name:i,reference:r})=>t` <blockquote> ${r&&s(r)} ${i&&t` <p> <cite>${i}</cite> </p> `} </blockquote> `)} </div> </section> `}function E(e=[]){return e.length>0&&t` <section id="skills"> <h3>Skills</h3> <div class="grid-list"> ${e.map(({keywords:i=[],name:r})=>t` <div> ${r&&t`<h4>${r}</h4>`} ${i.length>0&&t` <ul class="tag-list"> ${i.map(o=>t`<li>${o}</li>`)} </ul> `} </div> `)} </div> </section> `}function W(e=[]){return e.length>0&&t` <section id="volunteer"> <h3>Volunteer</h3> <div class="stack"> ${e.map(({highlights:i=[],organization:r,position:o,startDate:a,endDate:n,summary:l,url:c})=>t` <article> <header> <h4>${h(c,r)}</h4> <div class="meta"> <strong>${o}</strong> <div>${y(a,n)}</div> </div> </header> ${l&&s(l)} ${i.length>0&&t` <ul> ${i.map(d=>t`<li>${s(d)}</li>`)} </ul> `} </article> `)} </div> </section> `}function F(e=[]){const i=e.reduce((r,{description:o,name:a,url:n,...l})=>{const c=r[r.length-1];return c&&c.name===a&&c.description===o&&c.url===n?c.items.push(l):r.push({description:o,name:a,url:n,items:[l]}),r},[]);return e.length>0&&t` <section id="work"> <h3>Work</h3> <div class="stack"> ${i.map(({description:r,name:o,url:a,items:n=[]})=>t` <article> <header> <h4>${h(a,o)}</h4> <div class="meta"> ${r&&t`<div>${r}</div>`} </div> </header> <div class="timeline"> ${n.map(({highlights:l=[],location:c,position:d,startDate:v,endDate:g,summary:$})=>t` <div> <div> <h5>${d}</h5> <div class="meta"> <div>${y(v,g)}</div> ${c&&t`<div>${c}</div>`} </div> </div> ${$&&s($)} ${l.length>0&&t` <ul> ${l.map(b=>t`<li>${s(b)}</li>`)} </ul> `} </div> `)} </div> </article> `)} </div> </section> `}function M(e={}){const{colors:i}=e;return i&&Object.entries(i).map(([r,[o,a=o]])=>`--color-${r}-light:${o}; --color-${r}-dark:${a};`).join(" ")}function N(e,i){return t`<!doctype html> <html lang="en" style="${M(e.meta)}"> <head> <meta charset="utf-8" /> ${S(e.basics)} <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" href=print.css" /> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,700&display=swap" /> <style> ${i} </style> </head> <body> ${q(e.basics)} ${F(e.work)} ${W(e.volunteer)} ${D(e.projects)} ${j(e.awards)} ${C(e.certificates)} ${T(e.publications)} ${E(e.skills)} ${z(e.education)} ${R(e.languages)} ${P(e.interests)} ${O(e.references)} </body> </html>`}const U=':root{color-scheme:light dark;--color-background-light: #ffffff;--color-dimmed-light: #f3f4f5;--color-primary-light: #191e23;--color-secondary-light: #6c7781;--color-accent-light: #0073aa;--color-background-dark: #191e23;--color-dimmed-dark: #23282d;--color-primary-dark: #fbfbfc;--color-secondary-dark: #9f9f9f;--color-accent-dark: #00a0d2;--color-background: var(--color-background-light);--color-dimmed: var(--color-dimmed-light);--color-primary: var(--color-primary-light);--color-secondary: var(--color-secondary-light);--color-accent: var(--color-accent-light);--scale-ratio: 1.25;--scale0: 1rem;--scale1: calc(var(--scale0) * var(--scale-ratio));--scale2: calc(var(--scale1) * var(--scale-ratio));--scale3: calc(var(--scale2) * var(--scale-ratio));--scale4: calc(var(--scale3) * var(--scale-ratio));--scale5: calc(var(--scale4) * var(--scale-ratio))}@media (prefers-color-scheme: dark){:root{--color-background: var(--color-background-dark);--color-dimmed: var(--color-dimmed-dark);--color-primary: var(--color-primary-dark);--color-secondary: var(--color-secondary-dark);--color-accent: var(--color-accent-dark)}}*{box-sizing:border-box;margin:0;padding:0}html{font-size:14px}body{background:var(--color-background);color:var(--color-primary);display:grid;font:1em/1.5 Lato,sans-serif;gap:2em;grid-template-columns:[full-start] 1fr [main-start side-start] minmax(min-content,12em) [side-end content-start] minmax(min-content,36em) [main-end content-end] 1fr [full-end];grid-template-rows:auto [content] 0;margin-bottom:4em}body:before{content:"";grid-column:full;grid-row:content}ol,ul{padding-left:1em}:not(.icon-list,.tag-list)>li+li{margin-top:.4em}li::marker,.network{color:var(--color-secondary)}a{color:var(--color-accent);text-decoration:none}a:focus,a:hover{text-decoration:underline}h1,h2,h3,h5{font-weight:400}h1,h2,h3{line-height:1.2}h1{font-size:var(--scale5)}h2{color:var(--color-secondary);font-size:var(--scale4)}h3{color:var(--color-secondary);font-size:var(--scale3);grid-column:side;margin-bottom:1rem}h4{font-size:var(--scale2)}h5{font-size:var(--scale1)}h6{font-size:var(--scale0)}blockquote{border-left:.2em solid var(--color-dimmed);padding-left:1em}cite{color:var(--color-secondary);font-style:inherit}cite:before{content:"— "}svg{margin-right:.2em;vertical-align:text-bottom}.masthead{background:var(--color-dimmed);display:inherit;gap:inherit;grid-column:full;grid-template-columns:inherit;padding:4em 0 1em;text-align:center}.masthead>*,section{grid-column:main}.masthead>img{border:4px solid;border-radius:50%;margin:0 auto;max-width:12em}article>*+*,blockquote>*+*,.timeline>div>*+*{margin-top:.6em}.meta{color:var(--color-secondary)}.stack{display:grid;gap:1.5em}.icon-list{display:flex;flex-wrap:wrap;gap:.4em 1em;justify-content:center;list-style:none;padding:0}.grid-list{display:grid;gap:1em}.tag-list{display:flex;flex-wrap:wrap;gap:.4em;list-style:none;padding:0}.tag-list>li{background:var(--color-dimmed);border-radius:.2em;padding:.2em .6em}.timeline>div{position:relative}.timeline>div:not(:last-child){padding-bottom:1rem}.timeline>div:not(:last-child):before{content:"";position:absolute;top:1rem;left:-15px;width:2px;height:100%;background:var(--color-secondary)}.timeline>div:not(:only-child):after{content:"";position:absolute;top:.6rem;left:-20px;width:8px;height:8px;background:var(--color-secondary);border:2px solid var(--color-background);border-radius:50%}@media print,(min-width: 48em){h3{text-align:right;margin-bottom:inherit}.masthead{text-align:inherit}.masthead>*,section{grid-column:content}.masthead img{grid-column:side;grid-row:span 2;max-width:100%}section{display:contents}.icon-list{flex-direction:column}.grid-list{grid-template-columns:repeat(auto-fit,minmax(calc((100% - 1em)/2),1fr))}}',V={mediaType:"print"},H=e=>N(e,U);m.pdfRenderOptions=V,m.render=H,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});