Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2.21.0 #349

Merged
merged 5 commits into from
Dec 30, 2022
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
33 changes: 13 additions & 20 deletions assets/css/compiled/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1330,10 +1330,6 @@ select {
margin-top: 0px;
}

.mb-5 {
margin-bottom: 1.25rem;
}

.mt-10 {
margin-top: 2.5rem;
}
Expand All @@ -1346,6 +1342,10 @@ select {
margin-bottom: 1.5rem;
}

.mb-5 {
margin-bottom: 1.25rem;
}

.mt-3 {
margin-top: 0.75rem;
}
Expand Down Expand Up @@ -1522,14 +1522,14 @@ select {
width: 3rem;
}

.w-screen {
width: 100vw;
}

.w-full {
width: 100%;
}

.w-screen {
width: 100vw;
}

.w-24 {
width: 6rem;
}
Expand Down Expand Up @@ -1905,6 +1905,11 @@ select {
padding-right: 0px;
}

.px-\[30px\] {
padding-left: 30px;
padding-right: 30px;
}

.py-8 {
padding-top: 2rem;
padding-bottom: 2rem;
Expand Down Expand Up @@ -1960,14 +1965,6 @@ select {
padding-bottom: 4rem;
}

.pl-8 {
padding-left: 2rem;
}

.pr-8 {
padding-right: 2rem;
}

.pt-8 {
padding-top: 2rem;
}
Expand Down Expand Up @@ -3728,10 +3725,6 @@ body:has(#menu-controller:checked) {
}

@media (min-width: 1536px) {
.\32xl\:w-1\/5 {
width: 20%;
}

.\32xl\:grid-cols-5 {
grid-template-columns: repeat(5, minmax(0, 1fr));
}
Expand Down
3 changes: 3 additions & 0 deletions config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ buildFuture = false

# googleAnalytics = "G-XXXXXXXXX"

[imaging]
anchor = 'Center'

[taxonomies]
tag = "tags"
category = "categories"
Expand Down
3 changes: 3 additions & 0 deletions exampleSite/config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ buildFuture = false

googleAnalytics = "G-PEDMYR1V0K"

[imaging]
anchor = 'Center'

[taxonomies]
tag = "tags"
category = "categories"
Expand Down
4 changes: 2 additions & 2 deletions exampleSite/config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ defaultBackgroundImage = "/img/iceland.jpg"
showRecentItems = 10
showMoreLink = true
showMoreLinkDest = "docs"
cardView = true
cardView = false
cardViewScreenWidth = false
layoutBackgroundBlur = true # only used when layout equals background

Expand Down Expand Up @@ -101,7 +101,7 @@ defaultBackgroundImage = "/img/iceland.jpg"
showLikes = true
showTableOfContents = true
groupByYear = false
cardView = false
cardView = true
cardViewScreenWidth = false


Expand Down
Binary file removed exampleSite/content/examples/cover.jpg
Binary file not shown.
24 changes: 3 additions & 21 deletions exampleSite/layouts/partials/recent-articles-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,15 @@ <h2 class="mt-8 text-2xl font-extrabold mb-10">{{ i18n "shortcode.recent_article
</div>

<div id="CardViewScreenWidth" class="">
<section
class="relative w-screen max-w-[1600px] grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"
style="left: calc(max(-50vw,-800px) + 50%);">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
.Site.Params.mainSections)).Pages }}
{{ partial "article-link-card.html" . }}
{{ end }}
</section>
{{ partial "recent-articles-cardview-fullwidth.html" . }}
</div>

<div id="CardViewProse" class="hidden h-full">
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
.Site.Params.mainSections)).Pages }}
{{ partial "article-link-card.html" . }}
{{ end }}
</section>
{{ partial "recent-articles-cardview.html" . }}
</div>

<div id="NormalView" class="hidden h-full">
<section class="space-y-10 w-full">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
.Site.Params.mainSections)).Pages
}}
{{ partial "article-link.html" . }}
{{ end }}
</section>
{{ partial "recent-articles-list.html" . }}
</div>

{{ if .Site.Params.homepage.showMoreLink | default false }}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
139 changes: 72 additions & 67 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,88 +45,93 @@ <h1 class="mt-5 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .
</section>
{{ if gt .Pages 0 }}

{{ if .Params.cardView | default (.Site.Params.list.cardView | default false) }}

{{ $cardViewScreenWidth := .Site.Params.list.cardViewScreenWidth}}

{{ if not $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}

{{ if $cardViewScreenWidth }}
<section class="relative w-screen" style="left: calc(-50vw + 50%);">
<div class="flex flex-wrap pl-8 pr-8">
{{ else }}
<section class="w-full">
<div class="flex flex-wrap">
{{ $cardView := .Params.cardView | default (.Site.Params.list.cardView | default false) }}
{{ $cardViewScreenWidth := .Site.Params.list.cardViewScreenWidth | default false }}
{{ $groupByYear := .Params.groupByYear | default ($.Site.Params.list.groupByYear | default false) }}

{{ if not $cardView }}

<section class="space-y-10 w-full">
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
{{ if $groupByYear }}
<h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
{{ .Key }}
</h2>
{{ end }}
{{ range .Pages }}
{{ partial "article-link.html" . }}
{{ end }}
{{ end }}
</section>

{{ else if and $cardView (not $cardViewScreenWidth) }}

{{ if $groupByYear }}

{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
<h2 class="mt-12 mb-3 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
{{ .Key }}
</h2>
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
{{ range .Pages }}
{{ partial "article-link-card.html" . }}
{{ end }}
</section>
{{ end }}

{{ end }}

{{ else }}

<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3">
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
{{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
<h2 class="mt-12 mb-5 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
{{ .Key }}
</h2>
{{ else }}
{{ range .Pages }}
{{ partial "article-link-card.html" . }}
{{ end }}
{{ end }}
</section>

{{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}

{{ if $cardViewScreenWidth}}
<section class="relative w-screen" style="left: calc(-50vw + 50%);">
<div class="flex flex-wrap pl-8 pr-8">
{{ else }}
<section class="w-full">
<div class="flex flex-wrap">
{{ end }}
{{ end }}

{{ range .Pages }}

{{ if $cardViewScreenWidth }}
<div class="flex flex-wrap w-full p-4 sm:w-1/2 md:w-1/3 xl:w-1/4 2xl:w-1/5">
{{ else }}
<div class="flex flex-wrap w-full p-4 sm:w-1/2 md:w-1/3">
{{ end }}

{{ partial "article-link-card.html" . }}
</div>
{{ end }}
{{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
</div>
</section>
{{ end }}
{{ end }}

{{ else if and $cardView $cardViewScreenWidth }}

{{ end }}
{{ if $groupByYear }}

{{ if not $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
</div>
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
<div class="relative w-screen max-w-[1600px] px-[30px]" style="left: calc(max(-50vw,-800px) + 50%);">
<h2 class="mt-12 mb-3 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
{{ .Key }}
</h2>
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
{{ range .Pages }}
{{ partial "article-link-card.html" . }}
{{ end }}
</section>
{{ end }}
</div>
{{ end }}

{{ else }}
<section class="space-y-10 w-full">
{{ else }}

<div class="relative w-screen max-w-[1600px] px-[30px]" style="left: calc(max(-50vw,-800px) + 50%);">
<section class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5">
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
{{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
<h2 class="mt-12 text-2xl font-bold text-neutral-700 first:mt-8 dark:text-neutral-300">
{{ .Key }}
</h2>
{{ end }}
{{ range .Pages }}
{{ partial "article-link.html" . }}
{{ partial "article-link-card.html" . }}
{{ end }}
{{ end }}
</section>
{{ end }}
</div>

{{ else }}
<section class="mt-10 prose dark:prose-invert">
<p class="py-8 border-t">
<em>{{ i18n "list.no_articles" | emojify }}</em>
</p>
</section>
{{ end }}
{{ end }}

{{end}}

{{ else }}
<section class="mt-10 prose dark:prose-invert">
<p class="py-8 border-t">
<em>{{ i18n "list.no_articles" | emojify }}</em>
</p>
</section>
{{ end }}

{{ partial "pagination.html" . }}
{{ partial "pagination.html" . }}

{{ end }}
{{ end }}
Loading