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

updates to the homepage background setup #195

Merged
merged 1 commit into from
Nov 6, 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
6 changes: 5 additions & 1 deletion assets/css/compiled/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1743,6 +1743,10 @@ select {
max-width: 65ch;
}

.max-w-\[1600px\] {
max-width: 1600px;
}

.max-w-3xl {
max-width: 48rem;
}
Expand Down Expand Up @@ -3065,7 +3069,7 @@ body:has(#menu-controller:checked) {
}

.thumbnail_card {
height: 300px;
height: 250px;
background-repeat:no-repeat;
background-size:cover;
background-position:center;
Expand Down
2 changes: 1 addition & 1 deletion assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ body:has(#menu-controller:checked) {
}

.thumbnail_card {
height: 300px;
height: 250px;
background-repeat:no-repeat;
background-size:cover;
background-position:center;
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/assets/js/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ window.addEventListener("DOMContentLoaded", (event) => {
});

var list_config = [
"CardViewProse",
"CardViewScreenWidth",
"CardViewProse",
"NormalView"
]

Expand Down
2 changes: 1 addition & 1 deletion exampleSite/config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mainSections = ["docs"]
layout = "custom" # valid options: page, profile, hero, card, background, custom
homepageImage = "/img/iceland.jpg" # used in: hero, and card
showRecent = false
showRecentItems = 9
showRecentItems = 10
showMoreLink = true
showMoreLinkDest = "docs"
cardView = true
Expand Down
8 changes: 5 additions & 3 deletions exampleSite/layouts/partials/recent-articles-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h2 class="mt-8 text-2xl font-extrabold mb-10">{{ i18n "shortcode.recent_article
</span>
</div>

<div id="CardViewProse" class="">
<div id="CardViewProse" class="hidden h-full">
<section class="w-full">
<div class="flex flex-wrap">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
Expand All @@ -28,8 +28,9 @@ <h2 class="mt-8 text-2xl font-extrabold mb-10">{{ i18n "shortcode.recent_article
</div>
</section>
</div>
<div id="CardViewScreenWidth" class="hidden h-full">
<section class="relative w-screen" style="left: calc(-50vw + 50%);">

<div id="CardViewScreenWidth" class="">
<section class="relative w-screen max-w-[1600px]" style="left: calc(max(-50vw,-800px) + 50%);">
<div class="flex flex-wrap pl-8 pr-8">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
.Site.Params.mainSections)).Pages }}
Expand All @@ -40,6 +41,7 @@ <h2 class="mt-8 text-2xl font-extrabold mb-10">{{ i18n "shortcode.recent_article
</div>
</section>
</div>

<div id="NormalView" class="hidden h-full">
<section class="space-y-10 w-full">
{{ range first $recentArticles (.Paginate (where .Site.RegularPages "Type" "in"
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/recent-articles.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h2 class="mt-8 text-2xl font-extrabold mb-10">{{ i18n "shortcode.recent_article

{{ if .Site.Params.homepage.cardView | default false }}
{{ if .Site.Params.homepage.cardViewScreenWidth | default false }}
<section class="relative w-screen" style="left: calc(-50vw + 50%);">
<section class="relative w-screen max-w-[1600px]" style="left: calc(max(-50vw,-800px) + 50%);">
<div class="flex flex-wrap pl-8 pr-8">
{{ else }}
<section class="w-full">
Expand Down