changes working
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
|
||||
<Section className="section narrow">
|
||||
{{ partial "articles/list.html" . }}
|
||||
<div class="articles-paginator">
|
||||
|
||||
</div>
|
||||
</Section>
|
||||
<div class="articles-gradient"></div>
|
||||
@@ -0,0 +1,19 @@
|
||||
<Section class="section" relative id="Articles__Hero">
|
||||
<div class="heading-container" style="maxWidth: {{ .Page.Params.hero.maxWidthPX }}px;">
|
||||
<h1 class="hero-heading">{{ .Page.Params.hero.heading }}</h1>
|
||||
</div>
|
||||
<div class="subheading-container">
|
||||
{{ partial "bio.html" . }}
|
||||
<div class="grid-controls-container">
|
||||
<button id="btnGrid" class="grid-button">
|
||||
{{ partial "icons/ui/tiles.html" . }}
|
||||
</button>
|
||||
<button id="btnRows" class="grid-button">
|
||||
{{ partial "icons/ui/rows.html" . }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</Section>
|
||||
|
||||
{{ $script := resources.Get "js/toggleLayout.js" }}
|
||||
<script src="{{ $script.RelPermalink }}"></script>
|
||||
@@ -0,0 +1,55 @@
|
||||
<section class="section nartrow">
|
||||
<div id="articlesList" class="articles-list-container show-details">
|
||||
{{ $posts := partialCached "func/GetArticles" . "articles" }}
|
||||
{{ $paginator := .Paginate $posts }}
|
||||
{{ $biggerFirst := true }}
|
||||
{{ $biggerPlaced := false }}
|
||||
{{ range $index, $article := $paginator.Pages }}
|
||||
{{ $counter := mod $index 2 }}
|
||||
{{ if not $counter }}
|
||||
<div class="post-row">
|
||||
{{ end }}
|
||||
<a href="{{ $article.RelPermalink }}" class="article-link"
|
||||
{{ if and (eq ($biggerFirst) true) (eq ($biggerPlaced) false) }}
|
||||
{{ if eq $counter 0 }}
|
||||
id="article-link-bigger"
|
||||
{{ $biggerPlaced = true }}
|
||||
{{ end }}
|
||||
{{ else if and (not $biggerFirst) (not $biggerPlaced) }}
|
||||
{{ if ne $counter 0 }}
|
||||
id="article-link-bigger"
|
||||
{{ $biggerPlaced = true }}
|
||||
{{ end }}
|
||||
{{ end }}>
|
||||
<div class="article-data-outer">
|
||||
<div class="image-container">
|
||||
<img src="{{ $article.Params.hero }}" class="article-image" />
|
||||
</div>
|
||||
<div class="article-data">
|
||||
<h2 class="article-title">
|
||||
{{ $article.Params.title }}
|
||||
</h2>
|
||||
<p class="article-excerpt">
|
||||
{{ $article.Params.excerpt }}
|
||||
</p>
|
||||
<div class="article-metadata">
|
||||
{{ $article.Date.Format "January 2, 2006" }}{{ if $article.Params.timetoread }} • {{ $article.Params.timetoread }} min read{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
{{ $counter := mod (add $index 1) 2 }}
|
||||
{{ $len := (where .Pages "Type" "posts") }}
|
||||
{{ if or (eq $counter 0) (eq (add $index 1) $len) }}
|
||||
</div>
|
||||
{{ $biggerPlaced = false }}
|
||||
{{ if $biggerFirst }}
|
||||
{{ $biggerFirst = false }}
|
||||
{{ else }}
|
||||
{{ $biggerFirst = true }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ partial "paginator/paginator.html" . }}
|
||||
</section>
|
||||
Reference in New Issue
Block a user