Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 34 additions & 50 deletions themes/beaver/layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,63 +6,47 @@
<div class="fl-row-content-wrap">
<div class="blog fl-row-content fl-row-fixed-width fl-node-content">

<div class="container fl-col-group fl-node-pr4hl12zykvn" data-node="pr4hl12zykvn">
<div class="fl-col fl-node-sfuljidq5a2h" data-node="sfuljidq5a2h">
<div class="fl-col-content fl-node-content">
<div class="fl-module fl-module-heading fl-node-bh5ja2c6xuro" data-node="bh5ja2c6xuro">
<div class="fl-module-content fl-node-content">
<h1 class="fl-heading">Blog</h1>
</div>
</div>
<div class="fl-module fl-module-rich-text fl-node-mrsav8gcfhel"
data-node="mrsav8gcfhel">
<div class="fl-module-content fl-node-content">
<div class="fl-rich-text">
<p>Browse through our blog page filled with updated information and the
latest tips to help you achieve your goals.</p>
</div>
</div>
</div>
<br />
<br />
<div class="fl-module fl-module-pp-content-grid fl-node-o6rwlh2bvzie" data-node="o6rwlh2bvzie">
<div class="fl-module-content fl-node-content">

{{ range (.Paginate (.Pages.ByParam "created_at").Reverse).Pages }}
<a class="link" href="{{ .Permalink }}">
<div class="blog-post">
<div class="post-image">
{{ $cdnPrefix := "https://imagecdn.app/v1/images/" }}
{{ $src := "" }}
{{ with .Params.cover_image }}
{{ $encodedSrc := printf "%s%s" $cdnPrefix (urlquery .) }}
{{ $src = printf "%s?width=150&height=150" $encodedSrc }}
{{ else }}
{{ $src = "/assets/img/no-image.png" }}
{{ end }}
<div style="max-width: 960px; margin:0 auto; padding-left:18px;padding-right:18px">
<div style="max-width: 43rem;">
<h1 class="fl-heading" style="margin: 0!important;padding: 0!important">Blog</h1>

<img src="{{ $src }}" alt="Placeholder Image" loading="lazy" decoding="async">
<p>Browse through our blog page filled with updated information and the
latest tips to help you achieve your goals.</p>

</div>
<div class="post-content">
<h2 class="post-title">{{ .Title }}</h2>
<div class="post-meta">
<div class="post-tags">{{ range .Params.tags }}<a href="/blog/tags/{{ . | urlize }}/">#{{ . }}</a> {{ end }}</div>
{{ if .Params.created_at }}
<span class="post-date">{{ dateFormat "Jan 2, 2006" .Params.created_at }}</span>
{{ end }}
</div>
</div>
</div>
</a>
<br>

{{ range (.Paginate (.Pages.ByParam "created_at").Reverse).Pages }}
<a class="link" href="{{ .Permalink }}">
<div class="blog-post">
<div class="post-image">
{{ $cdnPrefix := "https://imagecdn.app/v1/images/" }}
{{ $src := "" }}
{{ with .Params.cover_image }}
{{ $encodedSrc := printf "%s%s" $cdnPrefix (urlquery .) }}
{{ $src = printf "%s?width=150&height=150" $encodedSrc }}
{{ else }}
{{ $src = "/assets/img/no-image.png" }}
{{ end }}

{{ partial "pagination.html" . }}
<img src="{{ $src }}" alt="Placeholder Image" loading="lazy" decoding="async">

</div>
<div class="post-content">
<h2 class="post-title">{{ .Title }}</h2>
<div class="post-meta">
<div class="post-tags">{{ range .Params.tags }}<a href="/blog/tags/{{ . | urlize }}/">#{{ . }}</a> {{ end }}</div>
{{ if .Params.created_at }}
<span class="post-date">{{ dateFormat "Jan 2, 2006" .Params.created_at }}</span>
{{ end }}
</div>
</div>
</div>
</div>
</div>
</a>
{{ end }}

{{ partial "pagination.html" . }}
</div>

</div>
</div>
</div>
Expand Down
84 changes: 34 additions & 50 deletions themes/beaver/layouts/blog/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,63 +6,47 @@
<div class="fl-row-content-wrap">
<div class="blog fl-row-content fl-row-fixed-width fl-node-content">

<div class="container fl-col-group fl-node-pr4hl12zykvn" data-node="pr4hl12zykvn">
<div class="fl-col fl-node-sfuljidq5a2h" data-node="sfuljidq5a2h">
<div class="fl-col-content fl-node-content">
<div class="fl-module fl-module-heading fl-node-bh5ja2c6xuro" data-node="bh5ja2c6xuro">
<div class="fl-module-content fl-node-content">
<h1 class="fl-heading">Blog</h1>
</div>
</div>
<div class="fl-module fl-module-rich-text fl-node-mrsav8gcfhel"
data-node="mrsav8gcfhel">
<div class="fl-module-content fl-node-content">
<div class="fl-rich-text">
<p>Browse through our blog page filled with updated information and the
latest tips to help you achieve your goals.</p>
</div>
</div>
</div>
<br />
<br />
<div class="fl-module fl-module-pp-content-grid fl-node-o6rwlh2bvzie" data-node="o6rwlh2bvzie">
<div class="fl-module-content fl-node-content">

{{ range (.Paginate (.Pages.ByParam "created_at").Reverse).Pages }}
<a class="link" href="{{ .Permalink }}">
<div class="blog-post">
<div class="post-image">
{{ $cdnPrefix := "https://imagecdn.app/v1/images/" }}
{{ $src := "" }}
{{ with .Params.cover_image }}
{{ $encodedSrc := printf "%s%s" $cdnPrefix (urlquery .) }}
{{ $src = printf "%s?width=150&height=150" $encodedSrc }}
{{ else }}
{{ $src = "/assets/img/no-image.png" }}
{{ end }}
<div style="max-width: 960px; margin:0 auto; padding-left:18px;padding-right:18px">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this to separate css file

<div style="max-width: 43rem;">
<h1 class="fl-heading" style="margin: 0!important;padding: 0!important">Blog</h1>

<img src="{{ $src }}" alt="Placeholder Image" loading="lazy" decoding="async">
<p>Browse through our blog page filled with updated information and the
latest tips to help you achieve your goals.</p>

</div>
<div class="post-content">
<h2 class="post-title">{{ .Title }}</h2>
<div class="post-meta">
<div class="post-tags">{{ range .Params.tags }}<a href="/blog/tags/{{ . | urlize }}/">#{{ . }}</a> {{ end }}</div>
{{ if .Params.created_at }}
<span class="post-date">{{ dateFormat "Jan 2, 2006" .Params.created_at }}</span>
{{ end }}
</div>
</div>
</div>
</a>
<br>

{{ range (.Paginate (.Pages.ByParam "created_at").Reverse).Pages }}
<a class="link" href="{{ .Permalink }}">
<div class="blog-post">
<div class="post-image">
{{ $cdnPrefix := "https://imagecdn.app/v1/images/" }}
{{ $src := "" }}
{{ with .Params.cover_image }}
{{ $encodedSrc := printf "%s%s" $cdnPrefix (urlquery .) }}
{{ $src = printf "%s?width=150&height=150" $encodedSrc }}
{{ else }}
{{ $src = "/assets/img/no-image.png" }}
{{ end }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dgorodnichy please schedule to cleanup this code: move to shortcode I believe would be enough


{{ partial "pagination.html" . }}
<img src="{{ $src }}" alt="Placeholder Image" loading="lazy" decoding="async">

</div>
<div class="post-content">
<h2 class="post-title">{{ .Title }}</h2>
<div class="post-meta">
<div class="post-tags">{{ range .Params.tags }}<a href="/blog/tags/{{ . | urlize }}/">#{{ . }}</a> {{ end }}</div>
{{ if .Params.created_at }}
<span class="post-date">{{ dateFormat "Jan 2, 2006" .Params.created_at }}</span>
{{ end }}
</div>
</div>
</div>
</div>
</div>
</a>
{{ end }}

{{ partial "pagination.html" . }}
</div>

</div>
</div>
</div>
Expand Down