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

made the test/default blog post 3 by default #2670

Merged
merged 19 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
71018b6
made the test/default blog post 3 by default
lougoncharenko May 24, 2023
1a33599
blog default posts are not mobile responsive and on a slider. created…
lougoncharenko May 25, 2023
182b08a
removed commented out code
lougoncharenko May 25, 2023
f229782
default blog posts now are modifiable by post-limit and column number…
lougoncharenko May 30, 2023
9cc340b
reformated code, reverted header back to h1, removed snippet, and mad…
lougoncharenko May 31, 2023
6f00f65
noticed the blog section needs a margin bottom when color scheme is a…
lougoncharenko May 31, 2023
87a5688
removed padding from blog and removed date and author presets
lougoncharenko Jun 6, 2023
509a2c3
Fix link formatting in Related Products heading (#2680)
qui-gon-jon Jun 5, 2023
9a31d16
fix default UI for dropdown and mega menu (#2644)
lougoncharenko Jun 5, 2023
6bffc93
Add release/v10.0.0 branch fixes to main (#2693)
ludoboludo Jun 6, 2023
37685fc
made the test/default blog post 3 by default
lougoncharenko May 24, 2023
8b0a3e4
added updated placeholder image
lougoncharenko Jun 7, 2023
e8b832a
Merge branch 'main' into louisa-update-blog-post-default-state
lougoncharenko Jun 7, 2023
8602cb9
added the different placeholder images, while maintaining ability to …
lougoncharenko Jun 7, 2023
9e390bd
blog card theme settings work on default blog posts
lougoncharenko Jun 8, 2023
54243d0
removed css that wasn't being used
lougoncharenko Jun 8, 2023
f6c2947
reverted to original code without theme settings
lougoncharenko Jun 8, 2023
3ae6e90
fixed prettier error by removing extra quotation mark and made test b…
lougoncharenko Jun 20, 2023
b4ff7d7
removed settings from blog preset
lougoncharenko Jun 21, 2023
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
10 changes: 7 additions & 3 deletions assets/section-featured-blog.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
.blog-container{
display: flex;
gap: 1.5rem;
}

.blog-placeholder {
margin: 0 1.5rem;
lougoncharenko marked this conversation as resolved.
Show resolved Hide resolved
background: rgb(var(--color-background));
width: 100%;
andrewetchen marked this conversation as resolved.
Show resolved Hide resolved
}

@media screen and (min-width: 750px) {
.blog-placeholder {
text-align: center;
width: 50%;
margin: 0;
}
}
Expand All @@ -21,7 +25,7 @@
}

.blog-placeholder .placeholder .placeholder-svg {
height: auto;
height: 100%;
}

.blog-placeholder h2 {
Expand Down
84 changes: 50 additions & 34 deletions sections/featured-blog.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

{%- liquid
assign posts_displayed = section.settings.blog.articles_count
if section.settings.post_limit <= section.settings.blog.articles_count
if section.settings.post_limit <= section.settings.blog.articles_count or section.settings.post_limit <= 4
assign posts_exceed_limit = true
lougoncharenko marked this conversation as resolved.
Show resolved Hide resolved
assign posts_displayed = section.settings.post_limit
endif
Expand Down Expand Up @@ -51,33 +51,69 @@
{%- endif -%}
</div>
{%- endunless -%}
{%- if section.settings.blog != blank and section.settings.blog.articles_count > 0 -%}

<slider-component class="slider-mobile-gutter{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}">
lougoncharenko marked this conversation as resolved.
Show resolved Hide resolved
<ul
id="Slider-{{ section.id }}"
class="blog__posts articles-wrapper contains-card contains-card--article{% if settings.card_style == 'standard' %} contains-card--standard{% endif %} grid grid--peek grid--2-col-tablet grid--{{ section.settings.columns_desktop }}-col-desktop slider {% if posts_displayed > 2 %}slider--tablet{% else %}slider--mobile{% endif %}"
role="list"
>
{%- for article in section.settings.blog.articles limit: section.settings.post_limit -%}
{%- if section.settings.blog != blank and section.settings.blog.articles_count > 0 -%}
{%- for article in section.settings.blog.articles limit: section.settings.post_limit -%}
<li
id="Slide-{{ section.id }}-{{ forloop.index }}"
class="blog__post grid__item article slider__slide slider__slide--full-width{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}"
{% if settings.animations_reveal_on_scroll %}
data-cascade
style="--animation-order: {{ forloop.index }};"
{% endif %}
>
{% render 'article-card',
blog: section.settings.blog,
article: article,
media_aspect_ratio: 1.66,
show_image: section.settings.show_image,
show_date: section.settings.show_date,
show_author: section.settings.show_author,
show_excerpt: true
%}
</li>
{%- endfor -%}
{%- else -%}
{% for i in (1..section.settings.post_limit) -%}
{%- assign placeholder_image_index = forloop.index0 | modulo: 3 | plus: 1 -%}
{%- assign placeholder_image = 'blog-apparel-' | append: placeholder_image_index -%}
<li
id="Slide-{{ section.id }}-{{ forloop.index }}"
class="blog__post grid__item article slider__slide slider__slide--full-width{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}"
{% if settings.animations_reveal_on_scroll %}
data-cascade
style="--animation-order: {{ forloop.index }};"
{% endif %}
{% endif %}
>
{% render 'article-card',
blog: section.settings.blog,
article: article,
media_aspect_ratio: 1.66,
show_image: section.settings.show_image,
show_date: section.settings.show_date,
show_author: section.settings.show_author,
show_excerpt: true
%}
<div
class="blog-placeholder{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}"
{% if settings.animations_reveal_on_scroll %}
data-cascade
{% endif %}
>
{%- if section.settings.show_image == true -%}
<div class="placeholder media media--hover-effect media--landscape">
{{ placeholder_image | placeholder_svg_tag: 'placeholder-svg' }}
</div>
{% endif %}
<div class="blog-placeholder__content">
<h2>
{{ 'sections.featured_blog.onboarding_title' | t }}
</h2>
<p class="rte-width">
{{ 'sections.featured_blog.onboarding_content' | t }}
</p>
</div>
</div>
</li>
{%- endfor -%}
{%- endif -%}
</ul>
{%- if posts_exceed_limit -%}
<div class="slider-buttons no-js-hidden{% if section.settings.post_limit < 3 %} medium-hide{% endif %}{% if section.settings.post_limit < 2 %} small-hide{% endif %}">
Expand Down Expand Up @@ -124,26 +160,6 @@
</a>
</div>
{%- endif -%}
{%- else -%}
<div
class="blog-placeholder{% if settings.animations_reveal_on_scroll %} scroll-trigger animate--slide-in{% endif %}"
{% if settings.animations_reveal_on_scroll %}
data-cascade
{% endif %}
>
<div class="placeholder media media--landscape">
{{ 'blog-apparel-1' | placeholder_svg_tag: 'placeholder-svg' }}
</div>
<div class="blog-placeholder__content">
<h2>
{{ 'sections.featured_blog.onboarding_title' | t }}
</h2>
<p class="rte-width">
{{ 'sections.featured_blog.onboarding_content' | t }}
</p>
</div>
</div>
{%- endif -%}
</div>
</div>

Expand Down Expand Up @@ -265,7 +281,7 @@
{
"name": "t:sections.featured-blog.presets.name",
"settings": {
"blog": "News"
"blog": "test"
Copy link
Contributor

@kmeleta kmeleta Jun 21, 2023

Choose a reason for hiding this comment

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

Is there a reason we opted to use a fake, or I guess an empty blog here instead of just removing the setting preset altogether?

}
}
]
Expand Down