From 1bac9924e5732f325bf9c11e115704f786a5f88d Mon Sep 17 00:00:00 2001 From: hacksalot Date: Tue, 12 Jan 2016 09:49:28 -0500 Subject: [PATCH] Positive: Refactor w/ partials. --- themes/positive/src/positive-html.html | 5 + themes/positive/src/positive-pdf.css | 33 +++-- themes/positive/src/positive-pdf.html | 188 ++++--------------------- 3 files changed, 59 insertions(+), 167 deletions(-) diff --git a/themes/positive/src/positive-html.html b/themes/positive/src/positive-html.html index acc4908..4ae67ef 100644 --- a/themes/positive/src/positive-html.html +++ b/themes/positive/src/positive-html.html @@ -61,6 +61,11 @@ {{#*inline "icon-speaking"}}{{/inline}} {{> section/speaking }} + {{#*inline "icon-testimonials"}}{{/inline}} + {{> section/testimonials }} + + {{#*inline "icon-references"}}{{/inline}} + {{> section/references }} diff --git a/themes/positive/src/positive-pdf.css b/themes/positive/src/positive-pdf.css index 3a94a5c..cc766e2 100644 --- a/themes/positive/src/positive-pdf.css +++ b/themes/positive/src/positive-pdf.css @@ -33,6 +33,9 @@ h2 { h3 { font-size: 1em; + margin-top: 0; + width: 66%; + float: left; } table { @@ -52,6 +55,10 @@ td:last-child { text-align: justify; /* HTML justification sucks, but in this case... */ } +hr { + display: none; +} + main { padding: 15px; max-width: 800px; @@ -62,12 +69,21 @@ section { margin-top: 1em; } -li { - margin-left: 2em; +section > div { + margin-top: 1em; + overflow: hidden; /* Clear floated children */ } -h3 { - margin-top: 1em; +section > div p { + clear: both; +} + +section > header { + position: relative; +} + +li { + margin-left: 2em; } p, li { @@ -88,12 +104,11 @@ main > header { margin-bottom: 1em; } - -main > header > h1 { +h1 { float: left; } -main > header > h1, .label { +h1, h2, .label { font-size: 2.5em; text-transform: uppercase; font-weight: 300; @@ -105,11 +120,13 @@ main > header > h1, .label { float: right; } -h2 > span.fa { +header > span.fa { text-align: center; margin-right: 3px; position: absolute; width: 40px; + top: 10px; + font-size: 30px; transform: translateX(-110%); color: #DADADA; } diff --git a/themes/positive/src/positive-pdf.html b/themes/positive/src/positive-pdf.html index 25d3fb4..8d22b45 100644 --- a/themes/positive/src/positive-pdf.html +++ b/themes/positive/src/positive-pdf.html @@ -21,182 +21,52 @@ -{{#has "info.brief"}} + {{#has "info.brief"}}
{{{ r.info.brief }}}
-{{/has}} + {{/has}} -{{#section "skills"}} -
-
-

Skills

-
- - - - - - - - - {{#each r.skills.sets}} - - - - - {{/each}} - -
{{{sectionTitle "Skills"}}}Keywords
{{{ name }}}{{#each skills}}{{{ this }}} {{/each}}
-
-{{/section}} + {{!}} + {{#*inline "icon-skills"}}{{/inline}} + {{> section/skills }} -{{#section "employment"}} -
-
-

{{{sectionTitle "Employment"}}}

-
+ {{#*inline "icon-employment"}}{{/inline}} + {{> section/employment }} - {{#each r.employment.history }} -

{{ position }}, - {{#if url }} - {{{ employer }}} - {{else}} - {{{ employer }}} - {{/if}} - {{formatDate safe.start 'YYYY-MM' }} — {{formatDate safe.end 'YYYY-MM' }}

-

{{{ summary }}}

- {{#if highlights}} - - {{/if}} - {{/each}} + {{#*inline "icon-projects"}}{{/inline}} + {{> section/projects }} -
-{{/section}} + {{#*inline "icon-education"}}{{/inline}} + {{> section/education }} -{{#section 'projects'}} -
-
-
-

{{{sectionTitle "Projects"}}}

-
- - {{#each r.projects}} - {{#if url}} -

{{ role }}, {{ title }}

- {{else}} -

{{ role }}, {{ title }}

- {{/if}} - {{formatDate safe.start 'YYYY-MM' }}—{{formatDate safe.end 'YYYY-MM' }} - {{{ summary }}} - {{#if proj.highlights}} - - {{/if}} - {{/each}} + {{#*inline "icon-service"}}{{/inline}} + {{> section/service }} -
-{{/section}} + {{#*inline "icon-samples"}}{{/inline}} + {{> section/samples }} -{{#section 'samples'}} -
-
-
-

{{{sectionTitle "Samples"}}}

-
- - {{#each r.samples}} - {{#if url}} -

{{ role }}, {{ title }}

- {{else}} -

{{ role }}, {{ title }}

- {{/if}} - {{formatDate safe.start 'YYYY-MM' }}—{{formatDate safe.end 'YYYY-MM' }} - {{{ summary }}} - {{#if proj.highlights}} - - {{/if}} - {{/each}} + {{#*inline "icon-writing"}}{{/inline}} + {{> section/writing }} -
-{{/section}} + {{#*inline "icon-recognition"}}{{/inline}} + {{> section/recognition }} -{{#section "education"}} -
-
-

{{{sectionTitle "Education"}}}

-
- {{#each r.education.history}} -

{{{ institution }}} {{formatDate safe.start 'YYYY' }} — {{formatDate safe.end 'YYYY' }}

- {{/each}} + {{#*inline "icon-speaking"}}{{/inline}} + {{> section/speaking }} -
-{{/section}} + {{#*inline "icon-testimonials"}}{{/inline}} + {{> section/testimonials }} -{{#section "service"}} -
-
-

{{{sectionTitle "Service"}}}

-
- {{#each r.service.history}} -

{{{ position }}}, - {{#if url}} - {{{ organization }}} - {{else}} - {{{ organization }}} - {{/if}} - {{formatDate safe.start 'YYYY' }} — {{formatDate safe.end 'YYYY' }}

-

{{{ summary }}}

- {{#if highlights}} - - {{/if}} - {{/each}} - -
-{{/section}} - -{{#section "writing"}} -
-
-

{{{sectionTitle "Writing"}}}

-
- {{#each r.writing }} -

{{#if url}}{{{ title }}}{{else}}{{{ title }}}{{/if}}, - {{{ publisher.name }}} {{formatDate safe.date 'YYYY'}}

- {{# if summary}}{{{ summary }}}{{/if}} - {{/each}} -
-{{/section}} - -{{#section "recognition"}} -
-
-

{{{"sectionTitle" "recognition" "Awards"}}}

-
- {{#each r.recognition}} -

{{{ title }}}, {{{ from }}} {{formatDate safe.date 'YYYY' }}

- {{{ summary }}} - {{/each}} -
-{{/section}} + {{#*inline "icon-references"}}{{/inline}} + {{> section/references }}