Compare commits

...

5 Commits

  1. 22
      assets/sass/main.scss
  2. 14
      layouts/_default/list.html
  3. 30
      layouts/_default/single.html
  4. 55
      layouts/authors/list.html
  5. 41
      layouts/games/list.html
  6. 3
      layouts/games/meta-extra.html
  7. 12
      layouts/partials/article-meta.html
  8. 2
      layouts/partials/header-image.html

22
assets/sass/main.scss

@ -63,7 +63,7 @@ a {
} }
} }
.content-wrapper, .article-meta { main {
max-width: 820px; max-width: 820px;
margin: auto; margin: auto;
@include screen-max(840px){padding: 0px 16px;} @include screen-max(840px){padding: 0px 16px;}
@ -87,19 +87,20 @@ a, p, li, h2 {
font-size: 1.25rem; font-size: 1.25rem;
} }
main > h2 {
font-size: 1.3rem;
}
img { img {
object-fit: cover; object-fit: cover;
} }
img.featured {
border-radius: 8px;
max-height: 500px;
}
.small-text { .small-text {
font-size: 1rem; font-size: 1rem;
} }
.article-meta { .article-header {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -107,13 +108,8 @@ img {
flex-wrap: wrap; flex-wrap: wrap;
h1 { h1 {
font-size: 2rem; font-size: 2rem;
} text-align: center;
img { flex-basis: 100%;
border-radius: 8px;
}
img.large-image {
width: 100%;
max-height: 500px;
} }
} }

14
layouts/_default/list.html

@ -1,14 +1,14 @@
{{ define "main" }} {{ define "main" }}
{{if not .IsHome }} {{if not .IsHome }}
<h1 class="center-text">{{ .Title | markdownify | lower }}</h1> <h1 class="center-text">{{ .Title | markdownify | lower }}</h1>
{{ end }} {{ end }}
{{ .Content }} {{ .Content }}
<section class="article-list"> <section class="article-list">
{{ $pages := .Pages }} {{ $pages := .Pages }}
{{ if .IsHome }}{{ $pages = where .Site.RegularPages "Type" "not in" (default "[]" .Site.Params.excludedSections) }}{{ end }} {{ if .IsHome }}{{ $pages = where .Site.RegularPages "Type" "not in" (default "[]" .Site.Params.excludedSections) }}{{ end }}
{{ range (where $pages "Section" "ne" "") }} {{ range (where $pages "Section" "ne" "") }}
{{ partial "article-card.html" . }} {{ partial "article-card.html" . }}
{{ end }} {{ end }}
</section> </section>
{{ end }} {{ end }}

30
layouts/_default/single.html

@ -1,25 +1,27 @@
{{ define "main" }} {{ define "main" }}
<main>
{{ partial "article-meta.html" . }}
{{ partial "article-meta.html" . }} {{ if .Params.toc }}
{{ .TableOfContents }}
{{ end }}
{{ if .Params.toc }}
{{ .TableOfContents }}
{{ end }}
<div class="content-wrapper">
<main>
{{ .Content }} {{ .Content }}
<p> <p>
{{ with .NextInSection }}
{{ with .NextInSection }}
<b>Next: </b><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> <b>Next: </b><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
<br> <br>
{{ end }} {{ end }}
{{ with .PrevInSection }}
{{ with .PrevInSection }}
<b>Previous: </b><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a> <b>Previous: </b><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
<br> <br>
{{ end }} {{ end }}
<b><a href="/"> >> Home</a></b> <b><a href="/"> >> Home</a></b>
</p> </p>
</main>
</div> </main>
{{ end }} {{ end }}

55
layouts/authors/list.html

@ -1,25 +1,36 @@
{{ define "main" }} {{ define "main" }}
<section> <main>
{{if not .IsHome }} <section class="article-header">
<div class="article-meta"> {{if not .IsHome }}
<h1 class="center-text">{{ .Params.name }}</h1>
<p class="center-text">{{ .Params.bio }}</p> <h1>{{ .Params.name }}</h1>
<a class="small-text" href={{ .Params.projects}}>Projects</a> <p class="center-text">{{ .Params.bio }}</p>
<span> | </span>
<a class="small-text" href="mailto:{{ .Params.email }}">{{ .Params.email}}</a> <a class="small-text" href={{ .Params.projects}}>Projects</a>
<div class="break"></div> <span> | </span>
{{ with .Resources.GetMatch "avatar" }} <a class="small-text" href="mailto:{{ .Params.email }}">{{ .Params.email}}</a>
<img class="shadow small-image" src="{{ .RelPermalink }}" alt="{{ .Params.alt }}"/>
{{ end }} <div class="break"></div>
</div> {{ with .Resources.GetMatch "avatar" }}
{{ end }} <img class="shadow small-image featured" src="{{ .RelPermalink }}" alt="{{ .Params.alt }}"/>
{{ .Content }} {{ end }}
<h2>Posts:</h2>
</section> {{ end }}
<section class="article-list">
{{ range .Data.Pages }} {{ .Content }}
{{ partial "article-card.html" . }}
{{ end }} </section>
</section> </main>
<section>
<h2>Posts:</h2>
</section>
<section class="article-list">
{{ range .Data.Pages }}
{{ partial "article-card.html" . }}
{{ end }}
</section>
{{ end }} {{ end }}

41
layouts/games/list.html

@ -1,22 +1,27 @@
{{ define "main" }} {{ define "main" }}
{{ partial "article-meta.html" . }} <main>
{{ partial "article-meta.html" . }}
{{ if .Params.toc }}
{{ .TableOfContents }}
{{ end }}
{{ .Content }}
</main>
{{ if gt (len .Data.Pages) 0 }}
<section>
<h2>Devlogs:</h2>
</section>
<section class="article-list">
{{ range .Data.Pages }}
{{ partial "article-card.html" . }}
{{ end }}
</section>
{{ end }}
{{ if .Params.toc }}
{{ .TableOfContents }}
{{ end }}
<div class="content-wrapper">
<main>
{{ .Content }}
{{ if gt (len .Data.Pages) 0 }}
<h2>Devlogs:</h2>
<section class="article-list">
{{ range .Data.Pages }}
{{ partial "article-card.html" . }}
{{ end }}
</section>
{{ end }}
<a href="/"> >> Home</a>
</main>
</div>
{{ end }} {{ end }}

3
layouts/games/meta-extra.html

@ -1,6 +1,5 @@
{{ if .Params.releaseDate }} {{ if .Params.releaseDate }}
<h2 class="small-text">Released {{ dateFormat "Mon | Jan 2, 2006" .Params.releaseDate }}</h2> <h2 class="small-text center-text">Released {{ dateFormat "Mon | Jan 2, 2006" .Params.releaseDate }}</h2>
<div class="break"/>
{{ end }} {{ end }}
<h2 class="small-text">Platforms:</h2> <h2 class="small-text">Platforms:</h2>

12
layouts/partials/article-meta.html

@ -1,13 +1,13 @@
<div class="article-meta"> <section class="article-header">
<h1 class="center-text">{{ .Title | markdownify }}</h1> <h1>{{ .Title | markdownify }}</h1>
{{ $authors := .Params.authors | default (slice .Site.Params.defaultAuthor) }} {{ $authors := .Params.authors | default (slice .Site.Params.defaultAuthor) }}
{{ $primaryAuthor := index $authors 0 }} {{ $primaryAuthor := index $authors 0 }}
{{ with $primaryAuthor }} {{ with $primaryAuthor }}
<a class="center-text" href={{ printf "/%s/%s" "authors" (urlize .) }}> <a class="center-text" href={{ printf "/%s/%s" "authors" (urlize .) }}>
<h2 class="center-text">{{ . }}</h2> <h2>{{ . }}</h2>
</a> </a>
{{ end }} {{ end }}
{{ .Render "meta-extra" }} {{ .Render "meta-extra" }}
@ -18,4 +18,4 @@
{{ partial "header-image.html" (dict "image" (.Resources.GetMatch .Params.featured.url) "alt" .Params.featured.alt) }} {{ partial "header-image.html" (dict "image" (.Resources.GetMatch .Params.featured.url) "alt" .Params.featured.alt) }}
</div> </section>

2
layouts/partials/header-image.html

@ -1,4 +1,4 @@
<img class="shadow large-image" <img class="shadow featured"
{{ with .image }} {{ with .image }}
srcset=" srcset="
{{ (.Resize "320x q30").RelPermalink }} 500w, {{ (.Resize "320x q30").RelPermalink }} 500w,

Loading…
Cancel
Save