From d82a4a1655b98a0a31505052ff4037593ce7f853 Mon Sep 17 00:00:00 2001 From: Jan Kollars Date: Thu, 2 Jul 2020 12:12:52 +0200 Subject: [PATCH 1/5] fix printing of list decoration in Firefox --- src/assets/styles/print/_index.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/assets/styles/print/_index.scss b/src/assets/styles/print/_index.scss index 396a8ed..94865aa 100644 --- a/src/assets/styles/print/_index.scss +++ b/src/assets/styles/print/_index.scss @@ -77,6 +77,7 @@ .entrylist::before, .entrylist__item::before, .bulletlist li::before { + color-adjust: exact !important; -webkit-print-color-adjust: exact !important; } From 6a73e3bf4d85e2eb9acb2fc5b271b2a3a2bce1e2 Mon Sep 17 00:00:00 2001 From: Jan Kollars Date: Thu, 2 Jul 2020 18:05:26 +0200 Subject: [PATCH 2/5] only wrap halfwidth sections in grid container this avoids page breaks inside of sections when printing (closes #6) --- src/assets/styles/components/_section.scss | 2 + src/includes/vcard.njk | 2 +- src/layouts/resume.njk | 44 +++++++++++----------- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/assets/styles/components/_section.scss b/src/assets/styles/components/_section.scss index e80270f..53b3c31 100644 --- a/src/assets/styles/components/_section.scss +++ b/src/assets/styles/components/_section.scss @@ -2,12 +2,14 @@ display: grid; grid-template-columns: 1fr 1fr; column-gap: $spacing-x * 2; + page-break-inside: avoid; } .section { grid-column: span 2; padding-top: $spacing-y; padding-bottom: $spacing-y; + page-break-inside: avoid; @include mq(md, true) { &--half { diff --git a/src/includes/vcard.njk b/src/includes/vcard.njk index 3f3681b..20d8e72 100644 --- a/src/includes/vcard.njk +++ b/src/includes/vcard.njk @@ -47,7 +47,7 @@ {%- set isSocialIcon = true -%} {%- icon social.name, isSocialIcon -%} {{- social.user -}} - on {{ social.name }} + on {{ social.name }} {% endfor %} diff --git a/src/layouts/resume.njk b/src/layouts/resume.njk index 6ec7838..a8e0354 100644 --- a/src/layouts/resume.njk +++ b/src/layouts/resume.njk @@ -2,30 +2,31 @@ layout: base --- -
-
+
-
-

About Me

-
- {{ content | safe }} -
-
+
+

About Me

+
+ {{ content | safe }} +
+
-
-

Work Experience

- {% set entries = collections.work %} - {% set microformat = "p-experience" %} - {% include "entrylist.njk" %} -
+
+

Work Experience

+ {% set entries = collections.work %} + {% set microformat = "p-experience" %} + {% include "entrylist.njk" %} +
-
-

Education

- {% set entries = collections.education %} - {% set microformat = "p-education" %} - {% include "entrylist.njk" %} -
+
+

Education

+ {% set entries = collections.education %} + {% set microformat = "p-education" %} + {% include "entrylist.njk" %} +
+ {% if author.skills or author.languages %} +
{% if author.skills %}

Skills

@@ -47,6 +48,7 @@ layout: base
{% endif %} -
+ {% endif %} +
\ No newline at end of file From b2339187ae3b6f694e43f70c9c17156e652562cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20B=C3=B6ck?= Date: Thu, 9 Jul 2020 20:04:59 +0200 Subject: [PATCH 3/5] extract hardcoded strings to data file, #4 --- src/assets/styles/base/_layout.scss | 10 ++++++ src/assets/styles/components/_section.scss | 24 ++++++------- src/data/strings.json | 15 ++++++++ src/includes/footer.njk | 2 +- src/includes/sidebar.njk | 6 ++-- src/layouts/resume.njk | 42 +++++++++++----------- 6 files changed, 60 insertions(+), 39 deletions(-) create mode 100644 src/data/strings.json diff --git a/src/assets/styles/base/_layout.scss b/src/assets/styles/base/_layout.scss index 22c4640..fdaf4d8 100755 --- a/src/assets/styles/base/_layout.scss +++ b/src/assets/styles/base/_layout.scss @@ -48,3 +48,13 @@ body { padding-right: 7%; } } + +.grid { + display: grid; + column-gap: $spacing-x * 2; + page-break-inside: avoid; + + &--2col { + grid-template-columns: 1fr 1fr; + } +} diff --git a/src/assets/styles/components/_section.scss b/src/assets/styles/components/_section.scss index 53b3c31..acc6a6d 100644 --- a/src/assets/styles/components/_section.scss +++ b/src/assets/styles/components/_section.scss @@ -1,25 +1,21 @@ -.sections { - display: grid; - grid-template-columns: 1fr 1fr; - column-gap: $spacing-x * 2; - page-break-inside: avoid; -} - .section { - grid-column: span 2; padding-top: $spacing-y; padding-bottom: $spacing-y; page-break-inside: avoid; - @include mq(md, true) { - &--half { - grid-column: span 1; - } - } - &__title { margin-bottom: $spacing-y; padding-bottom: 0.5rem; border-bottom: 1px solid $gray; } } + +.grid .section { + grid-column: span 2; + + @include mq(md, true) { + &--half { + grid-column: span 1; + } + } +} diff --git a/src/data/strings.json b/src/data/strings.json new file mode 100644 index 0000000..33abfc7 --- /dev/null +++ b/src/data/strings.json @@ -0,0 +1,15 @@ +{ + "titles": { + "introduction": "About Me", + "experience": "Work Experience", + "education": "Education", + "skills": "Skills", + "languages": "Languages" + }, + "labels": { + "email": "Email", + "telephone": "Telephone", + "print": "Print Résumé", + "lastUpdated": "Last updated" + } +} \ No newline at end of file diff --git a/src/includes/footer.njk b/src/includes/footer.njk index 8576568..cc9e4c5 100644 --- a/src/includes/footer.njk +++ b/src/includes/footer.njk @@ -1,7 +1,7 @@