update
This commit is contained in:
parent
7b777115c8
commit
cc98aeaa05
3 changed files with 149 additions and 152 deletions
|
@ -43,7 +43,7 @@ h4 {
|
|||
}
|
||||
hr {
|
||||
color: $bg60;
|
||||
margin: 50px 20px;
|
||||
margin: 60px 0;
|
||||
}
|
||||
|
||||
.container {
|
||||
|
|
|
@ -50,12 +50,12 @@
|
|||
|
||||
main {
|
||||
margin: 60px 0 0 0;
|
||||
}
|
||||
|
||||
|
||||
.section.latest {
|
||||
.latest {
|
||||
color: $white-dark;
|
||||
display: block;
|
||||
font-size: 1.5em;
|
||||
text-align: center;
|
||||
margin: -7px;
|
||||
a {
|
||||
color: $white;
|
||||
font-weight: bold;
|
||||
|
@ -66,19 +66,17 @@ main {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.section.articles {
|
||||
.section.projects .inner {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-gap: 1rem;
|
||||
margin: 20px 0;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
margin: 40px 0;
|
||||
a {
|
||||
color: $white-light;
|
||||
text-decoration: none;
|
||||
}
|
||||
article {
|
||||
background: $bg60;
|
||||
border: 1px solid $bg60;
|
||||
border-radius: 5px;
|
||||
color: $white;
|
||||
display: flex;
|
||||
|
@ -89,88 +87,89 @@ main {
|
|||
&: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 {
|
||||
color: $white;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
.meta {
|
||||
color: $white-dark;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
}
|
||||
.author {
|
||||
p.meta {
|
||||
color: $white-dark;
|
||||
font-style: italic;
|
||||
font-size: 15px;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
span.status {
|
||||
/*&::before {
|
||||
content: '·';
|
||||
margin-right: 9px;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.section.projects {
|
||||
}
|
||||
.section.articles {
|
||||
margin: 0 auto;
|
||||
.inner {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-gap: 1rem;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
margin: 20px 0;
|
||||
margin: 40px 0;
|
||||
a {
|
||||
color: $white-light;
|
||||
text-decoration: none;
|
||||
}
|
||||
article {
|
||||
background: $bg60;
|
||||
border: 1px solid $bg60;
|
||||
border-radius: 5px;
|
||||
color: $white-light;
|
||||
color: $white;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
height: max-content;
|
||||
height: 100%;
|
||||
padding: 20px;
|
||||
transition: background .2s;
|
||||
&:hover {
|
||||
background: $bg70;
|
||||
p.description {
|
||||
max-height: none;
|
||||
}
|
||||
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-size: 18px;
|
||||
font-weight: 400;
|
||||
margin: 0;
|
||||
margin: 0 0 10px 0;
|
||||
min-height: 65px;
|
||||
text-align: center;
|
||||
color: $white;
|
||||
}
|
||||
.meta {
|
||||
p.description {
|
||||
color: $white-dark;
|
||||
font-size: 15px;
|
||||
margin: 0;
|
||||
margin: 20px 0;
|
||||
flex: 1;
|
||||
}
|
||||
.status {
|
||||
p.meta {
|
||||
color: $white-dark;
|
||||
&::before {
|
||||
content: '·';
|
||||
margin-right: 9px;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
span.author {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.section.articles {
|
||||
main {
|
||||
.section.projects.inner {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
.section.articles.inner {
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
.section.projects {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
|
@ -195,7 +194,9 @@ main {
|
|||
}
|
||||
}
|
||||
}
|
||||
.section.projects {
|
||||
main {
|
||||
.section.projects.inner {
|
||||
grid-template-columns: repeat(1, 1fr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,44 +28,40 @@
|
|||
</section>
|
||||
<main>
|
||||
<div class="container">
|
||||
<span class="section latest">
|
||||
latest
|
||||
<a href="{{ "/blog" | relURL }}">posts</a>
|
||||
<section class="section projects">
|
||||
<span class="latest">
|
||||
latest <a href="{{ "/projects" | relURL }}">projects</a>
|
||||
</span>
|
||||
<section class="section articles">
|
||||
{{ range first 2 (where .Site.RegularPages "Type" "post") }}
|
||||
<div class="section projects inner">
|
||||
{{ range first 4 (where .Site.RegularPages "Type" "project") }}
|
||||
<a href="{{ .Permalink }}">
|
||||
<article>
|
||||
<h1>{{ .Title }}</h1>
|
||||
<p class="meta">{{ with .Params.activetime }}<span class="date">{{ . }}</span>{{ end }}<br />{{ with .Params.status }}<span class="status">{{ . }}</span>{{ end }}</p>
|
||||
</article>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<section class="section articles">
|
||||
<span class="latest">
|
||||
latest <a href="{{ "/blog" | relURL }}">posts</a>
|
||||
</span>
|
||||
<div class="section articles inner">
|
||||
{{ range first 4 (where .Site.RegularPages "Type" "post") }}
|
||||
<a href="{{ .Permalink }}">
|
||||
<article>
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ with .Description }}<p class="description">{{ . }}</p>{{ end }}
|
||||
<p class="meta" title="{{ .Date.Format "2 Jan 2006, 15:04 MST" }}">
|
||||
<span class="date">{{ .Date.Format "2 January 2006" }}</span>
|
||||
<span class="author">{{ with .Params.author }}by {{ end }}{{ .Params.author }}</span>
|
||||
</p>
|
||||
{{ with .Description }}
|
||||
<p>{{ . }}</p>
|
||||
{{ end }}
|
||||
{{ with .Params.featured_image }}
|
||||
<img src="{{ . | relURL }}" alt="">
|
||||
{{ end }}
|
||||
</article>
|
||||
</a>
|
||||
{{ end }}
|
||||
</section>
|
||||
<span class="section latest">
|
||||
latest
|
||||
<a href="{{ "/projects" | relURL }}">projects</a>
|
||||
</span>
|
||||
<section class="section projects">
|
||||
{{ range first 3 (where .Site.RegularPages "Type" "project") }}
|
||||
<a href="{{ .Permalink }}">
|
||||
<article>
|
||||
<h1>{{ .Title }}</h1>
|
||||
<p class="meta">{{ with .Params.activetime }}<span class="date">{{ . }}</span>{{ end }} {{ with .Params.status }}<span class="status">{{ . }}</span>{{ end }}</p>
|
||||
{{ with .Description }}<p>{{ . }}</p>{{ end }}
|
||||
<img {{ with .Params.featured_image }}src="{{ . | relURL }}"{{ end }} alt="">
|
||||
</article>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
|
Loading…
Reference in a new issue