diff --git a/assets/import/main.scss b/assets/import/main.scss index 44fd59d..92e3334 100644 --- a/assets/import/main.scss +++ b/assets/import/main.scss @@ -43,7 +43,7 @@ h4 { } hr { color: $bg60; - margin: 50px 20px; + margin: 60px 0; } .container { diff --git a/assets/index.scss b/assets/index.scss index e28a845..782b882 100644 --- a/assets/index.scss +++ b/assets/index.scss @@ -50,127 +50,126 @@ main { margin: 60px 0 0 0; -} - - -.section.latest { - color: $white-dark; - font-size: 1.5em; - a { - color: $white; - font-weight: bold; - transition: border .2s, color .2s; - &:hover { - color: $red; + .latest { + color: $white-dark; + display: block; + font-size: 1.5em; + text-align: center; + margin: -7px; + a { + color: $white; + font-weight: bold; + transition: border .2s, color .2s; + &:hover { + color: $red; + text-decoration: none; + } + } + } + .section.projects .inner { + display: grid; + grid-gap: 1rem; + grid-template-columns: repeat(4, 1fr); + margin: 40px 0; + a { + color: $white-light; text-decoration: none; } - } -} - -.section.articles { - display: grid; - grid-template-columns: repeat(2, 1fr); - grid-gap: 1rem; - margin: 20px 0; - a { - color: $white-light; - text-decoration: none; - } - article { - background: $bg60; - border: 1px solid $bg60; - border-radius: 5px; - color: $white; - display: flex; - flex-flow: column; - height: max-content; - padding: 20px; - transition: background .2s; - &:hover { - background: $bg70; - } - img { - background: $bg80; - border-radius: 5px 5px 0px 0px; - margin: -20px -20px 15px -20px; - max-height: 250px; - max-width: calc(100% + 40px); - object-fit: cover; - order: -1; - } - h1 { - font-size: 18px; - font-weight: 400; - margin: 0 0 10px 0; - } - .meta { - color: $white-dark; - font-size: 14px; - margin: 0; - } - .author { - color: $white-dark; - font-style: italic; + article { + background: $bg60; + border-radius: 5px; + color: $white; + display: flex; + flex-flow: column; + height: max-content; + padding: 20px; + transition: background .2s; + &:hover { + background: $bg70; + } + h1 { + color: $white; + font-size: 18px; + font-weight: 400; + margin: 0; + text-align: center; + } + p.meta { + color: $white-dark; + font-size: 15px; + margin: 0; + text-align: center; + span.status { + /*&::before { + content: '·'; + margin-right: 9px; + }*/ + } + } } } -} - -.section.projects { - display: grid; - grid-gap: 1rem; - grid-template-columns: repeat(3, 1fr); - margin: 20px 0; - a { - color: $white-light; - text-decoration: none; - } - article { - background: $bg60; - border: 1px solid $bg60; - border-radius: 5px; - color: $white-light; - display: flex; - flex-flow: column; - height: max-content; - padding: 20px; - transition: background .2s; - &:hover { - background: $bg70; - } - img { - background: $bg80; - border-radius: 5px 5px 0px 0px; - margin: -20px -20px 10px -20px; - max-height: 170px; - max-width: calc(100% + 40px); - object-fit: cover; - order: -1; - } - h1 { - font-size: 20px; - font-weight: 400; - margin: 0; - } - .meta { - color: $white-dark; - font-size: 15px; - margin: 0; - } - .status { - color: $white-dark; - &::before { - content: '·'; - margin-right: 9px; + .section.articles { + margin: 0 auto; + .inner { + display: grid; + grid-template-columns: repeat(2, 1fr); + grid-gap: 1rem; + margin: 40px 0; + a { + color: $white-light; + text-decoration: none; + } + article { + background: $bg60; + border-radius: 5px; + color: $white; + display: flex; + flex-flow: column; + height: 100%; + padding: 20px; + transition: background .2s; + &:hover { + background: $bg70; + p.description { + max-height: none; + } + } + h1 { + font-size: 18px; + font-weight: 400; + margin: 0 0 10px 0; + min-height: 65px; + text-align: center; + color: $white; + } + p.description { + color: $white-dark; + margin: 20px 0; + flex: 1; + } + p.meta { + color: $white-dark; + font-size: 14px; + margin: 0; + text-align: center; + span.author { + font-style: italic; + } + } } } } } + + @media (max-width: 900px) { - .section.articles { - grid-template-columns: repeat(1, 1fr); - } - .section.projects { - grid-template-columns: repeat(2, 1fr); + main { + .section.projects.inner { + grid-template-columns: repeat(2, 1fr); + } + .section.articles.inner { + grid-template-columns: repeat(1, 1fr); + } } } @media (max-width: 600px) { @@ -195,7 +194,9 @@ main { } } } - .section.projects { - grid-template-columns: repeat(1, 1fr); + main { + .section.projects.inner { + grid-template-columns: repeat(1, 1fr); + } } } diff --git a/layouts/index.html b/layouts/index.html index b285286..570c928 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -28,44 +28,40 @@
- - latest - posts - -
- {{ range first 2 (where .Site.RegularPages "Type" "post") }} - -
-

{{ .Title }}

-

- {{ .Date.Format "2 January 2006" }} - {{ with .Params.author }}by {{ end }}{{ .Params.author }} -

- {{ with .Description }} -

{{ . }}

- {{ end }} - {{ with .Params.featured_image }} - - {{ end }} -
-
- {{ end }} -
- - latest - projects -
- {{ range first 3 (where .Site.RegularPages "Type" "project") }} - -
-

{{ .Title }}

-

{{ with .Params.activetime }}{{ . }}{{ end }} {{ with .Params.status }}{{ . }}{{ end }}

- {{ with .Description }}

{{ . }}

{{ end }} - -
-
- {{ end }} + + latest projects + +
+ {{ range first 4 (where .Site.RegularPages "Type" "project") }} + +
+

{{ .Title }}

+

{{ with .Params.activetime }}{{ . }}{{ end }}
{{ with .Params.status }}{{ . }}{{ end }}

+
+
+ {{ end }} +
+
+
+
+ + latest posts + +