From dc839b97a8fd1b820e8787f91cdab068dd2f416a Mon Sep 17 00:00:00 2001 From: Louisa Goncharenko <93098869+lougoncharenko@users.noreply.github.com> Date: Wed, 21 Jun 2023 13:21:21 -0400 Subject: [PATCH] made the test/default blog post 3 by default (#2670) * made the test/default blog post 3 by default * blog default posts are not mobile responsive and on a slider. created snippet for blog-placeholder that renders into featured-blog with changable arguments * removed commented out code * default blog posts now are modifiable by post-limit and column number presets * reformated code, reverted header back to h1, removed snippet, and made changes as suggested * noticed the blog section needs a margin bottom when color scheme is applied * removed padding from blog and removed date and author presets * Fix link formatting in Related Products heading (#2680) * fix default UI for dropdown and mega menu (#2644) * added vertical padding and made l2 bold to mega menu * added vertical padding to drop down * fixed default UI for dropdown and mega menu * added hover effect to all l2 links and fixed overlapping or mega menu * adding padding to l3 links and fixed hover effect for dropdown * reverted the mega menu back to the current setting * changed horizontal grid gap on mega menu and vertical paddings on dropdown menu * made vertical grid gap at 1.8 rem to match the 3 rem vertical paddings on mega-menu container * removed the unnecessary lines of code * removed the text-thickness that was making l2/l3 links a different size from l1 links * added a hover effect over active link * removed uneccessary link size and white space * Add release/v10.0.0 branch fixes to main (#2693) * Fix color for image in password (#2608) * [Image behavior] fixed background jitter fix on mobile (#2611) * [Animation in editor] Remove transform translate when re rendering and re ordering blocks (#2614) * Remove transform translate when re rendering and re ordering blocks * target only what's needed * [bug] Horizontal scrolling on mobile. (#2617) * Add overflow-x:hidden to prevent horizontal scrolling on mobile. * Change margin for slider for mobile and tablet. * Remove redundant preconnect to cdn.shopify.com (#2621) * Update reverse scheme (#2626) * [Footer] Remove Global Media settings inheritance from images (#2631) * Send timezone offset as string instead of integer (#2636) * Fix slider scrolling issue (#2635) * Fix background gradient for Related Products. (#2641) * Update from Shopify for theme dawn/release/10.0.0 Committed from shop: Skeleton Theme * Quick add remove animation from image and content (#2657) * Add default values for color scheme group (#2660) * Revert unwanted changes (#2669) * Update from Shopify for theme dawn/release/10.0.0 Committed from shop: Skeleton Theme * Revert "Update from Shopify for theme dawn/release/10.0.0" This reverts commit 89d927ebe8d353904daaa58c11f638f4beb15ea4. * Remove forced white text color in Image Banner & Slideshow (#2663) * Remove forced white color. * Change color scheme for Dawn's default homepage Image Banner.. * Remove warning about color scheme usage. * Fix bug with transparent buttons on mobile. * Remove unused info key from translated files. * Update display of button when it's in a mobile container. * Update existing placeholder images (#2610) * Update existing placeholder images * Featured collection and product card * Featured product section * Collection list section * Featured blog and multirow sections * Slideshow: change order of placeholder images * Collage adjustments for product and collection cards * Image with text adjustments * Featured product: re-add `.product--no-media` selectors * Update featured product section * Update `card-collection` * Cleanup `card-collection` --------- Co-authored-by: Ludo * Gradient fix for transparent background medias and cards (#2651) * Fix media, product, and collection cards placeholder (#2682) * Fix missing else for collection cards (#2692) --------- Co-authored-by: Sofia Matulis Co-authored-by: Eugene Kasimov <105315663+eugenekasimov@users.noreply.github.com> Co-authored-by: Mateusz Krzeszowiak Co-authored-by: Lucas Lacerda <37168033+LucasLacerdaUX@users.noreply.github.com> Co-authored-by: Kjell Reigstad Co-authored-by: shopify[bot] <79544226+shopify[bot]@users.noreply.github.com> Co-authored-by: Ken Meleta <30790058+kmeleta@users.noreply.github.com> Co-authored-by: Andrew Etchen * made the test/default blog post 3 by default * added updated placeholder image * added the different placeholder images, while maintaining ability to edit with presets * blog card theme settings work on default blog posts * removed css that wasn't being used * reverted to original code without theme settings * fixed prettier error by removing extra quotation mark and made test blog default instead of news --------- Co-authored-by: Jon Neill Co-authored-by: Ludo Co-authored-by: Sofia Matulis Co-authored-by: Eugene Kasimov <105315663+eugenekasimov@users.noreply.github.com> Co-authored-by: Mateusz Krzeszowiak Co-authored-by: Lucas Lacerda <37168033+LucasLacerdaUX@users.noreply.github.com> Co-authored-by: Kjell Reigstad Co-authored-by: shopify[bot] <79544226+shopify[bot]@users.noreply.github.com> Co-authored-by: Ken Meleta <30790058+kmeleta@users.noreply.github.com> Co-authored-by: Andrew Etchen --- assets/section-featured-blog.css | 10 ++-- sections/featured-blog.liquid | 87 ++++++++++++++++++-------------- 2 files changed, 57 insertions(+), 40 deletions(-) diff --git a/assets/section-featured-blog.css b/assets/section-featured-blog.css index d98d7d0baf3..286a9143ed6 100644 --- a/assets/section-featured-blog.css +++ b/assets/section-featured-blog.css @@ -1,12 +1,16 @@ +.blog-container{ + display: flex; + gap: 1.5rem; +} + .blog-placeholder { - margin: 0 1.5rem; background: rgb(var(--color-background)); + width: 100%; } @media screen and (min-width: 750px) { .blog-placeholder { text-align: center; - width: 50%; margin: 0; } } @@ -21,7 +25,7 @@ } .blog-placeholder .placeholder .placeholder-svg { - height: auto; + height: 100%; } .blog-placeholder h2 { diff --git a/sections/featured-blog.liquid b/sections/featured-blog.liquid index 1781e6bdbee..309bebbbab3 100644 --- a/sections/featured-blog.liquid +++ b/sections/featured-blog.liquid @@ -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 assign posts_displayed = section.settings.post_limit endif @@ -51,33 +51,69 @@ {%- endif -%} {%- endunless -%} - {%- if section.settings.blog != blank and section.settings.blog.articles_count > 0 -%} +
    - {%- 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 -%} +
  • + {% 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 + %} +
  • + {%- 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 -%}
  • - {% 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 - %} +
    + {%- if section.settings.show_image == true -%} +
    + {{ placeholder_image | placeholder_svg_tag: 'placeholder-svg' }} +
    + {% endif %} +
    +

    + {{ 'sections.featured_blog.onboarding_title' | t }} +

    +

    + {{ 'sections.featured_blog.onboarding_content' | t }} +

    +
    +
  • {%- endfor -%} + {%- endif -%}
{%- if posts_exceed_limit -%}
@@ -124,26 +160,6 @@
{%- endif -%} - {%- else -%} -
-
- {{ 'blog-apparel-1' | placeholder_svg_tag: 'placeholder-svg' }} -
-
-

- {{ 'sections.featured_blog.onboarding_title' | t }} -

-

- {{ 'sections.featured_blog.onboarding_content' | t }} -

-
-
- {%- endif -%} @@ -263,10 +279,7 @@ ], "presets": [ { - "name": "t:sections.featured-blog.presets.name", - "settings": { - "blog": "News" - } + "name": "t:sections.featured-blog.presets.name" } ] }