Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/forestryio/hugo-theme-novela.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRegis Philibert <login@regisphilibert.com>2019-10-02 18:57:39 +0300
committerRegis Philibert <login@regisphilibert.com>2019-10-02 18:57:39 +0300
commited82213fe11961b66e72b49263eaebbe9f4a1ab6 (patch)
treeff886dd58e8fae17f462b6b7102bfdad4ea88584
parent37513fde6d39d66e2aa45f2353df7e028401c4be (diff)
Refactor Authors list page pending taxonomy specimprove-hugo-logic
-rw-r--r--.gitignore1
-rw-r--r--content/posts/2017-04-27-building-hoppers-media-centre.md2
-rw-r--r--content/posts/2017-04-28-understanding-the-gatsby-lifecycle.md2
-rw-r--r--content/posts/2017-04-30-how-figma-changed-how-we-design.md2
-rw-r--r--content/posts/2017-04-30-why-we-built-a-company-before-a-product.md2
-rw-r--r--content/posts/2017-04-31-how-figma-changed-how-we-design.md2
-rw-r--r--content/posts/2018-04-26-how-figma-changed-how-we-design.md2
-rw-r--r--content/posts/2018-04-27-building-hoppers-media-centre-secret.md2
-rw-r--r--content/posts/2018-04-27-how-figma-changed-how-we-design.md2
-rw-r--r--content/posts/2018-04-28-building-hoppers-media-centre.md2
-rw-r--r--content/posts/2018-04-29-understanding-the-gatsby-lifecycle.md2
-rw-r--r--content/posts/2018-04-30-why-we-built-a-company-before-a-product.md2
-rw-r--r--content/posts/2018-04-31-building-the-new-hopper-com.md2
-rw-r--r--content/posts/2019-04-26-building-hoppers-media-centre.md2
-rw-r--r--content/posts/2019-04-27-how-figma-changed-how-we-design.md2
-rw-r--r--content/posts/2019-04-28-how-figma-changed-how-we-design.md2
-rw-r--r--content/posts/2019-04-29-building-the-new-hopper-com.md2
-rw-r--r--content/posts/2019-04-30-why-we-built-a-company-before-a-product.md2
-rw-r--r--content/posts/2019-04-31-understanding-the-gatsby-lifecycle.md8
-rw-r--r--layouts/partials/author/author_articles_list.html71
-rw-r--r--layouts/partials/func/GetArticleAuthors.html39
-rw-r--r--layouts/partials/func/GetAuthorArticles.html4
22 files changed, 87 insertions, 70 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d70ebaa
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+public \ No newline at end of file
diff --git a/content/posts/2017-04-27-building-hoppers-media-centre.md b/content/posts/2017-04-27-building-hoppers-media-centre.md
index 2e5d07a..d3bb1c9 100644
--- a/content/posts/2017-04-27-building-hoppers-media-centre.md
+++ b/content/posts/2017-04-27-building-hoppers-media-centre.md
@@ -5,7 +5,7 @@ hero: /images/heros/hero-3.jpg
excerpt: Creating a new website for Hopper, one of the top 4 most downloaded travel apps in the U.S, along with Uber, Lyft.
timeToRead: 8
authors:
- - "authors/dennis-brotzky"
+ - "authors/dennis-brotzky.md"
type: post
layout: post
---
diff --git a/content/posts/2017-04-28-understanding-the-gatsby-lifecycle.md b/content/posts/2017-04-28-understanding-the-gatsby-lifecycle.md
index db4f97b..70b0ea7 100644
--- a/content/posts/2017-04-28-understanding-the-gatsby-lifecycle.md
+++ b/content/posts/2017-04-28-understanding-the-gatsby-lifecycle.md
@@ -5,7 +5,7 @@ hero: /images/heros/hero-2.jpg
excerpt: With the growing community interest in Gatsby, we hope to create more resources that make it easier for anyone to grasp the power of this incredible tool.
timeToRead: 4
authors:
- - "authors/dennis-brotzky"
+ - "authors/dennis-brotzky.md"
type: post
layout: post
---
diff --git a/content/posts/2017-04-30-how-figma-changed-how-we-design.md b/content/posts/2017-04-30-how-figma-changed-how-we-design.md
index 2192eb0..9220c49 100644
--- a/content/posts/2017-04-30-how-figma-changed-how-we-design.md
+++ b/content/posts/2017-04-30-how-figma-changed-how-we-design.md
@@ -5,7 +5,7 @@ hero: /images/heros/hero-5.jpg
excerpt: To understand why Figma is the best design tool for our company, you have to understand what we do. As a designer.
timeToRead: 8
authors:
- - "authors/thiago-costa"
+ - "authors/thiago-costa.md"
type: post
layout: post
---
diff --git a/content/posts/2017-04-30-why-we-built-a-company-before-a-product.md b/content/posts/2017-04-30-why-we-built-a-company-before-a-product.md
index 472061f..beec56e 100644
--- a/content/posts/2017-04-30-why-we-built-a-company-before-a-product.md
+++ b/content/posts/2017-04-30-why-we-built-a-company-before-a-product.md
@@ -5,7 +5,7 @@ hero: /images/heros/hero-6.jpg
excerpt: Creating a new website for Hopper, one of the top 4 most downloaded travel apps in the U.S, along with Uber, Lyft.
timeToRead: 3
authors:
- - "authors/thiago-costa"
+ - "authors/thiago-costa.md"
type: post
layout: post
---
diff --git a/content/posts/2017-04-31-how-figma-changed-how-we-design.md b/content/posts/2017-04-31-how-figma-changed-how-we-design.md
index 405cb80..8b6f208 100644
--- a/content/posts/2017-04-31-how-figma-changed-how-we-design.md
+++ b/content/posts/2017-04-31-how-figma-changed-how-we-design.md
@@ -5,7 +5,7 @@ hero: /images/heros/hero-4.jpg
excerpt: To understand why Figma is the best design tool for our company, you have to understand what we do. As a designer.
timeToRead: 8
authors:
- - "authors/dennis-brotzky"
+ - "authors/dennis-brotzky.md"
type: post
layout: post
---
diff --git a/content/posts/2018-04-26-how-figma-changed-how-we-design.md b/content/posts/2018-04-26-how-figma-changed-how-we-design.md
index 90de75c..d9dff46 100644
--- a/content/posts/2018-04-26-how-figma-changed-how-we-design.md
+++ b/content/posts/2018-04-26-how-figma-changed-how-we-design.md
@@ -5,7 +5,7 @@ hero: /images/heros/hero-4.jpg
excerpt: To understand why Figma is the best design tool for our company, you have to understand what we do. As a designer.
timeToRead: 8
authors:
- - "authors/dennis-brotzky"
+ - "authors/dennis-brotzky.md"
type: post
layout: post
---
diff --git a/content/posts/2018-04-27-building-hoppers-media-centre-secret.md b/content/posts/2018-04-27-building-hoppers-media-centre-secret.md
index 6594b07..f6ac9f1 100644
--- a/content/posts/2018-04-27-building-hoppers-media-centre-secret.md
+++ b/content/posts/2018-04-27-building-hoppers-media-centre-secret.md
@@ -6,7 +6,7 @@ excerpt: Creating a new website for Hopper, one of the top 4 most downloaded tra
secret: true
timeToRead: 8
authors:
- - "authors/dennis-brotzky"
+ - "authors/dennis-brotzky.md"
type: post
layout: post
---
diff --git a/content/posts/2018-04-27-how-figma-changed-how-we-design.md b/content/posts/2018-04-27-how-figma-changed-how-we-design.md
index f4c05c7..f90cb15 100644
--- a/content/posts/2018-04-27-how-figma-changed-how-we-design.md
+++ b/content/posts/2018-04-27-how-figma-changed-how-we-design.md
@@ -5,7 +5,7 @@ hero: /images/heros/hero-5.jpg
excerpt: To understand why Figma is the best design tool for our company, you have to understand what we do. As a designer.
timeToRead: 8
authors:
- - "authors/thiago-costa"
+ - "authors/thiago-costa.md"
type: post
layout: post
---
diff --git a/content/posts/2018-04-28-building-hoppers-media-centre.md b/content/posts/2018-04-28-building-hoppers-media-centre.md
index 75f61fa..cf3afbc 100644
--- a/content/posts/2018-04-28-building-hoppers-media-centre.md
+++ b/content/posts/2018-04-28-building-hoppers-media-centre.md
@@ -5,7 +5,7 @@ hero: /images/heros/hero-3.jpg
excerpt: Creating a new website for Hopper, one of the top 4 most downloaded travel apps in the U.S, along with Uber, Lyft.
timeToRead: 8
authors:
- - "authors/dennis-brotzky"
+ - "authors/dennis-brotzky.md"
type: post
layout: post
---
diff --git a/content/posts/2018-04-29-understanding-the-gatsby-lifecycle.md b/content/posts/2018-04-29-understanding-the-gatsby-lifecycle.md
index 6112237..5874b67 100644
--- a/content/posts/2018-04-29-understanding-the-gatsby-lifecycle.md
+++ b/content/posts/2018-04-29-understanding-the-gatsby-lifecycle.md
@@ -5,7 +5,7 @@ hero: /images/heros/hero-2.jpg
excerpt: With the growing community interest in Gatsby, we hope to create more resources that make it easier for anyone to grasp the power of this incredible tool.
timeToRead: 4
authors:
- - "authors/dennis-brotzky"
+ - "authors/dennis-brotzky.md"
type: post
layout: post
---
diff --git a/content/posts/2018-04-30-why-we-built-a-company-before-a-product.md b/content/posts/2018-04-30-why-we-built-a-company-before-a-product.md
index b15017a..a0fb100 100644
--- a/content/posts/2018-04-30-why-we-built-a-company-before-a-product.md
+++ b/content/posts/2018-04-30-why-we-built-a-company-before-a-product.md
@@ -5,7 +5,7 @@ hero: /images/heros/hero-6.jpg
excerpt: Creating a new website for Hopper, one of the top 4 most downloaded travel apps in the U.S, along with Uber, Lyft.
timeToRead: 3
authors:
- - "authors/thiago-costa"
+ - "authors/thiago-costa.md"
type: post
layout: post
---
diff --git a/content/posts/2018-04-31-building-the-new-hopper-com.md b/content/posts/2018-04-31-building-the-new-hopper-com.md
index fc2b410..da20e81 100644
--- a/content/posts/2018-04-31-building-the-new-hopper-com.md
+++ b/content/posts/2018-04-31-building-the-new-hopper-com.md
@@ -5,7 +5,7 @@ hero: /images/heros/hero-2.jpg
excerpt: Creating a new website for Hopper, one of the top 4 most downloaded travel apps in the U.S, along with Uber, Lyft.
timeToRead: 4
authors:
- - "authors/dennis-brotzky"
+ - "authors/dennis-brotzky.md"
type: post
layout: post
---
diff --git a/content/posts/2019-04-26-building-hoppers-media-centre.md b/content/posts/2019-04-26-building-hoppers-media-centre.md
index 95186c3..eb5d9ac 100644
--- a/content/posts/2019-04-26-building-hoppers-media-centre.md
+++ b/content/posts/2019-04-26-building-hoppers-media-centre.md
@@ -5,7 +5,7 @@ hero: /images/heros/hero-3.jpg
excerpt: Creating a new website for Hopper, one of the top 4 most downloaded travel apps in the U.S, along with Uber, Lyft.
timeToRead: 8
authors:
- - "authors/dennis-brotzky"
+ - "authors/dennis-brotzky.md"
type: post
layout: post
---
diff --git a/content/posts/2019-04-27-how-figma-changed-how-we-design.md b/content/posts/2019-04-27-how-figma-changed-how-we-design.md
index 3ce3780..d3f0082 100644
--- a/content/posts/2019-04-27-how-figma-changed-how-we-design.md
+++ b/content/posts/2019-04-27-how-figma-changed-how-we-design.md
@@ -5,7 +5,7 @@ hero: /images/heros/hero-4.jpg
excerpt: To understand why Figma is the best design tool for our company, you have to understand what we do. As a designer.
timeToRead: 8
authors:
- - "authors/dennis-brotzky"
+ - "authors/dennis-brotzky.md"
type: post
layout: post
---
diff --git a/content/posts/2019-04-28-how-figma-changed-how-we-design.md b/content/posts/2019-04-28-how-figma-changed-how-we-design.md
index 1da5e04..c1ebe0b 100644
--- a/content/posts/2019-04-28-how-figma-changed-how-we-design.md
+++ b/content/posts/2019-04-28-how-figma-changed-how-we-design.md
@@ -5,7 +5,7 @@ hero: /images/heros/hero-5.jpg
excerpt: To understand why Figma is the best design tool for our company, you have to understand what we do. As a designer.
timeToRead: 8
authors:
- - "authors/thiago-costa"
+ - "authors/thiago-costa.md"
type: post
layout: post
---
diff --git a/content/posts/2019-04-29-building-the-new-hopper-com.md b/content/posts/2019-04-29-building-the-new-hopper-com.md
index c30b0cf..a36b0c0 100644
--- a/content/posts/2019-04-29-building-the-new-hopper-com.md
+++ b/content/posts/2019-04-29-building-the-new-hopper-com.md
@@ -6,7 +6,7 @@ excerpt: Creating a new website for Hopper, one of the top 4 most downloaded tra
show_subscription: true
timeToRead: 4
authors:
- - "authors/dennis-brotzky"
+ - "authors/dennis-brotzky.md"
type: post
layout: post
---
diff --git a/content/posts/2019-04-30-why-we-built-a-company-before-a-product.md b/content/posts/2019-04-30-why-we-built-a-company-before-a-product.md
index 37f20eb..305aae8 100644
--- a/content/posts/2019-04-30-why-we-built-a-company-before-a-product.md
+++ b/content/posts/2019-04-30-why-we-built-a-company-before-a-product.md
@@ -5,7 +5,7 @@ hero: /images/heros/hero-6.jpg
excerpt: this is my excerpt
timeToRead: 3
authors:
- - "authors/thiago-costa"
+ - "authors/thiago-costa.md"
type: post
layout: post
---
diff --git a/content/posts/2019-04-31-understanding-the-gatsby-lifecycle.md b/content/posts/2019-04-31-understanding-the-gatsby-lifecycle.md
index 92c283d..5780dbf 100644
--- a/content/posts/2019-04-31-understanding-the-gatsby-lifecycle.md
+++ b/content/posts/2019-04-31-understanding-the-gatsby-lifecycle.md
@@ -5,10 +5,10 @@ hero: /images/heros/hero-2.jpg
excerpt: With the growing community interest in Gatsby, we hope to create more resources that make it easier for anyone to grasp the power of this incredible tool.
timeToRead: 6
authors:
- - "authors/thiago-costa"
- - "authors/dennis-brotzky"
- - "authors/brad-tiller"
- - "authors/mack-mansouri"
+ - "authors/thiago-costa.md"
+ - "authors/dennis-brotzky.md"
+ - "authors/brad-tiller.md"
+ - "authors/mack-mansouri.md"
type: post
layout: post
---
diff --git a/layouts/partials/author/author_articles_list.html b/layouts/partials/author/author_articles_list.html
index c1c08bb..b3b74ca 100644
--- a/layouts/partials/author/author_articles_list.html
+++ b/layouts/partials/author/author_articles_list.html
@@ -1,57 +1,30 @@
<section class="section nartrow author-alc-section">
<div id="articlesList" class="articles-list-container show-details author-alc">
- {{ $scratch :=newScratch }}
- {{ $scratch.Set "authorName" .Page.Params.name }}
- {{ $scratch.Set "biggerFirst" true }}
- {{ $scratch.Set "biggerPlaced" false }}
+ {{ $articles := partial "func/GetAuthorArticles" . }}
<div class="post-row-alt">
- {{ range $index, $article := where .Site.RegularPages "Type" "post" }}
-
- {{ $scratch.Set "authorMatch" false }}
- {{ range $author := $article.Params.authors }}
- {{ $authorPage := $.Site.GetPage $author }}
-
- {{ if eq $authorPage.Params.name ($scratch.Get "authorName") }}
- {{ $scratch.Set "authorMatch" true }}
- {{ end }}
- {{ end }}
-
- {{ $counter := mod $index 2 }}
- {{ if eq ($scratch.Get "authorMatch") true }}
- <a href="{{ $article.Permalink }}" class="article-link">
- <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") }}
- {{ end }}
- {{ end }}
+ {{ range $index, $article := $articles }}
+ {{ $counter := mod $index 2 }}
+ <a href="{{ $article.Permalink }}" class="article-link">
+ <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>
+ {{ end }}
</div>
</div>
-
- <nav aria-label="Page navigation">
- <ul class="pagination">
- <li class="page-item active"><a href="/" class="page-link">1</a></li>
- <li class="page-item"><a href="/page/2/" class="page-link">2</a></li>
- <li class="page-item"><a href="/page/3/" class="page-link">3</a></li>
- <li class="page-item"><a href="/page/2/" rel="next" class="page-link page-next">Next</a></li>
- </ul>
- </nav>
-
</section>
{{ $script := resources.Get "js/toggleBorder.js" }}
diff --git a/layouts/partials/func/GetArticleAuthors.html b/layouts/partials/func/GetArticleAuthors.html
new file mode 100644
index 0000000..c6041e4
--- /dev/null
+++ b/layouts/partials/func/GetArticleAuthors.html
@@ -0,0 +1,39 @@
+{{/*
+ GetArticle Authors
+ Retrieve the authors assigned to a given article
+
+ @author @regisphilibert
+
+ @context Page (.) The article in quest
+
+ @access public
+
+ @return Slice
+ - String (.name)
+ - String (.URL)
+ - String (.name)
+ - String (.firstname)
+
+ @example - Go Template
+ {{ $authors := partialCached "func/GetArticleAuthors" . .File.UniqueID }}
+*/}}
+{{ $authors := slice }}
+{{ with .Params.authors }}
+ {{ range . }}
+ {{ with site.GetPage . }}
+ {{ $firstname := "" }}
+ {{ $name := "" }}
+ {{ $avatar := false }}
+ {{ with .Params.name }}
+ {{ $name = . }}
+ {{ $firstname = index (split . " ") 0 }}
+ {{ end }}
+ {{ with .Params.avatar }}
+ {{ $avatar = . }}
+ {{ end }}
+ {{ $authors = $authors | append (dict "URL" .RelPermalink "name" $name "firstname" $firstname "avatar" $avatar) }}
+ {{ end }}
+ {{ end }}
+{{ end }}
+
+{{ return $authors }} \ No newline at end of file
diff --git a/layouts/partials/func/GetAuthorArticles.html b/layouts/partials/func/GetAuthorArticles.html
new file mode 100644
index 0000000..318dfe6
--- /dev/null
+++ b/layouts/partials/func/GetAuthorArticles.html
@@ -0,0 +1,4 @@
+{{ $articles := slice }}
+{{ $articles = where .Site.RegularPages "Type" "post" }}
+{{ $articles = where $articles "Params.authors" "intersect" (slice .File.Path) }}
+{{ return $articles }} \ No newline at end of file