From d5104af1a510b0b1adc9b0e715fc7c9b6bd962a8 Mon Sep 17 00:00:00 2001 From: Rafael Bardini Date: Sat, 31 Oct 2020 13:19:52 +0100 Subject: [PATCH] Improve article children spacing --- partials/awards.hbs | 28 ++-- partials/education.hbs | 32 ++--- partials/header.hbs | 2 +- partials/projects.hbs | 42 +++--- partials/publications.hbs | 34 ++--- partials/volunteer.hbs | 32 ++--- partials/work.hbs | 32 ++--- style.css | 19 ++- tap-snapshots/test-render.js-TAP.test.js | 165 ++++++++++++----------- 9 files changed, 202 insertions(+), 184 deletions(-) diff --git a/partials/awards.hbs b/partials/awards.hbs index d795e71..bb9e33a 100644 --- a/partials/awards.hbs +++ b/partials/awards.hbs @@ -4,19 +4,21 @@
{{#each resume.awards}}
-
-

{{title}}

- {{#date}} - - {{/date}} -
-
- {{#awarder}} -
- Awarded by {{.}} -
- {{/awarder}} -
+
+
+

{{title}}

+ {{#date}} + + {{/date}} +
+
+ {{#awarder}} +
+ Awarded by {{.}} +
+ {{/awarder}} +
+
{{#summary}}

{{.}}

{{/summary}} diff --git a/partials/education.hbs b/partials/education.hbs index ccfa073..fc85a3c 100644 --- a/partials/education.hbs +++ b/partials/education.hbs @@ -4,21 +4,23 @@
{{#each resume.education}}
-
-

{{institution}}

- - – - {{#if endDate}}{{else}}Present{{/if}} - -
-
- {{#area}} - {{.}} - {{/area}} - {{#url}} - {{.}} - {{/url}} -
+
+
+

{{institution}}

+ + – + {{#if endDate}}{{else}}Present{{/if}} + +
+
+ {{#area}} + {{.}} + {{/area}} + {{#url}} + {{.}} + {{/url}} +
+
{{#studyType}}

{{.}}

{{/studyType}} diff --git a/partials/header.hbs b/partials/header.hbs index 72f6d1c..fe510db 100644 --- a/partials/header.hbs +++ b/partials/header.hbs @@ -1,4 +1,4 @@ -
+
{{#name}}

{{.}}

{{/name}} diff --git a/partials/projects.hbs b/partials/projects.hbs index b36502e..49d3529 100644 --- a/partials/projects.hbs +++ b/partials/projects.hbs @@ -4,26 +4,28 @@
{{#each resume.projects}}
-
-

{{name}}

- - – - {{#if endDate}}{{else}}Present{{/if}} - -
-
- - {{#if roles}} - {{join roles}} - {{/if}} - {{#entity}} - at {{.}} - {{/entity}} - - {{#url}} - {{.}} - {{/url}} -
+
+
+

{{name}}

+ + – + {{#if endDate}}{{else}}Present{{/if}} + +
+
+ + {{#if roles}} + {{join roles}} + {{/if}} + {{#entity}} + at {{.}} + {{/entity}} + + {{#url}} + {{.}} + {{/url}} +
+
{{#description}}

{{.}}

{{/description}} diff --git a/partials/publications.hbs b/partials/publications.hbs index fcb20d8..9a33538 100644 --- a/partials/publications.hbs +++ b/partials/publications.hbs @@ -4,22 +4,24 @@
{{#each resume.publications}}
-
-

{{name}}

- {{#releaseDate}} - - {{/releaseDate}} -
-
- {{#publisher}} - - Published by {{.}} - - {{/publisher}} - {{#url}} - {{.}} - {{/url}} -
+
+
+

{{name}}

+ {{#releaseDate}} + + {{/releaseDate}} +
+
+ {{#publisher}} + + Published by {{.}} + + {{/publisher}} + {{#url}} + {{.}} + {{/url}} +
+
{{#summary}}

{{.}}

{{/summary}} diff --git a/partials/volunteer.hbs b/partials/volunteer.hbs index 01dc3eb..c08fe8c 100644 --- a/partials/volunteer.hbs +++ b/partials/volunteer.hbs @@ -4,21 +4,23 @@
{{#each resume.volunteer}}
-
-

{{organization}}

- - – - {{#if endDate}}{{else}}Present{{/if}} - -
-
- {{#position}} - {{.}} - {{/position}} - {{#url}} - {{.}} - {{/url}} -
+
+
+

{{organization}}

+ + – + {{#if endDate}}{{else}}Present{{/if}} + +
+
+ {{#position}} + {{.}} + {{/position}} + {{#url}} + {{.}} + {{/url}} +
+
{{#summary}}

{{.}}

{{/summary}} diff --git a/partials/work.hbs b/partials/work.hbs index c2d9add..cd54d21 100644 --- a/partials/work.hbs +++ b/partials/work.hbs @@ -4,21 +4,23 @@
{{#each resume.work}}
-
-

{{name}}

- - – - {{#if endDate}}{{else}}Present{{/if}} - -
-
- {{#position}} - {{.}} - {{/position}} - {{#url}} - {{.}} - {{/url}} -
+
+
+

{{name}}

+ + – + {{#if endDate}}{{else}}Present{{/if}} + +
+
+ {{#position}} + {{.}} + {{/position}} + {{#url}} + {{.}} + {{/url}} +
+
{{#summary}}

{{.}}

{{/summary}} diff --git a/style.css b/style.css index f2dbbe6..dfc1057 100644 --- a/style.css +++ b/style.css @@ -116,14 +116,6 @@ h6 { font-size: var(--scale0); } -p:not(:first-child) { - margin-top: 1em; -} - -p:not(:last-child) { - margin-bottom: 1em; -} - blockquote { border-left: 0.2em solid var(--mutedColor); padding-left: 1em; @@ -138,7 +130,7 @@ cite::before { content: '— '; } -header { +.masthead { background: var(--mutedColor); display: inherit; gap: inherit; @@ -148,11 +140,16 @@ header { row-gap: 0; } -header > *, +.masthead > *, section { grid-column: main; } +article > * + *, +blockquote > * + * { + margin-top: 0.6em; +} + .stack { display: grid; gap: 1.5em; @@ -200,7 +197,7 @@ section { margin-bottom: inherit; } - header > *, + .masthead > *, section { grid-column: content; } diff --git a/tap-snapshots/test-render.js-TAP.test.js b/tap-snapshots/test-render.js-TAP.test.js index ef16698..06b1546 100644 --- a/tap-snapshots/test-render.js-TAP.test.js +++ b/tap-snapshots/test-render.js-TAP.test.js @@ -132,14 +132,6 @@ h6 { font-size: var(--scale0); } -p:not(:first-child) { - margin-top: 1em; -} - -p:not(:last-child) { - margin-bottom: 1em; -} - blockquote { border-left: 0.2em solid var(--mutedColor); padding-left: 1em; @@ -154,7 +146,7 @@ cite::before { content: '— '; } -header { +.masthead { background: var(--mutedColor); display: inherit; gap: inherit; @@ -164,11 +156,16 @@ header { row-gap: 0; } -header > *, +.masthead > *, section { grid-column: main; } +article > * + *, +blockquote > * + * { + margin-top: 0.6em; +} + .stack { display: grid; gap: 1.5em; @@ -216,7 +213,7 @@ section { margin-bottom: inherit; } - header > *, + .masthead > *, section { grid-column: content; } @@ -232,7 +229,7 @@ section { -
+

Richard Hendriks

Programmer

@@ -277,17 +274,19 @@ section {

Work

-
-

Pied Piper

- - – - - -
-
- CEO/President - http://piedpiper.example.com -
+
+
+

Pied Piper

+ + – + + +
+
+ CEO/President + http://piedpiper.example.com +
+

Pied Piper is a multi-platform technology based on a proprietary universal compression algorithm that has consistently fielded high Weisman Scores™ that are not merely competitive, but approach the theoretical limit of lossless compression.

Highlights
    @@ -302,17 +301,19 @@ section {

    Volunteer

    -
    -

    CoderDojo

    - - – - - -
    - +
    +
    +

    CoderDojo

    + + – + + +
    + +

    Global movement of free coding clubs for young people.

    Highlights
      @@ -325,17 +326,19 @@ section {

      Education

      -
      -

      University of Oklahoma

      - - – - - -
      -
      - Information Technology - https://www.ou.edu/ -
      +
      +
      +

      University of Oklahoma

      + + – + + +
      +
      + Information Technology + https://www.ou.edu/ +
      +

      Bachelor

      Courses
        @@ -349,20 +352,22 @@ section {

        Projects

        -
        -

        Miss Direction

        - - – - - -
        -
        - - Team lead, Designer - at Smoogle - - missdirection.example.com -
        +
        +
        +

        Miss Direction

        + + – + + +
        +
        + + Team lead, Designer + at Smoogle + + missdirection.example.com +
        +

        A mapping engine that misguides you

        Highlights
          @@ -377,15 +382,17 @@ section {

          Awards

          -
          -

          Digital Compression Pioneer Award

          - -
          -
          -
          - Awarded by Techcrunch -
          -
          +
          +
          +

          Digital Compression Pioneer Award

          + +
          +
          +
          + Awarded by Techcrunch +
          +
          +

          There is no spoon.

          @@ -394,16 +401,18 @@ section {

          Publications