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

Try adding a CSS-only announcement bar marquee option #1777

Closed
wants to merge 14 commits into from
Closed
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
35 changes: 35 additions & 0 deletions assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -2192,6 +2192,41 @@ input[type='checkbox'] {
letter-spacing: 0.1rem;
}

.announcement-bar.marquee {
overflow: hidden;
}

.announcement-bar.marquee .announcement-bar__message {
display: inline-block;
white-space: nowrap;
width: 25vw;
text-align: initial;
animation: announcement-bar-marquee 8s linear infinite;

/* Use shadows to repeat the text */
text-shadow: 25vw 0 currentColor, calc(25vw * 2) 0 currentColor, calc(25vw * 3) 0 currentColor, calc(25vw * 4) 0 currentColor;
}

@keyframes announcement-bar-marquee {
0% { transform: translateX(0); }
100% { transform: translateX(-100%); }
}

@media (prefers-reduced-motion) {
.announcement-bar.marquee {
overflow: inherit;
}

.announcement-bar.marquee .announcement-bar__message {
display: block;
white-space: inherit;
width: auto;
text-align: inherit;
animation: none;
text-shadow: none;
}
}

/* section-header */
#shopify-section-header {
z-index: 3;
Expand Down
210 changes: 193 additions & 17 deletions config/settings_data.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,197 @@
{
"current": "Default",
"current": {
"colors_solid_button_labels": "#ffffff",
"colors_accent_1": "#121212",
"gradient_accent_1": "",
"colors_accent_2": "#334fb4",
"gradient_accent_2": "",
"colors_text": "#121212",
"colors_outline_button_labels": "#121212",
"colors_background_1": "#ffffff",
"gradient_background_1": "",
"colors_background_2": "#f3f3f3",
"gradient_background_2": "",
"type_header_font": "assistant_n4",
"heading_scale": 100,
"type_body_font": "assistant_n4",
"body_scale": 100,
"page_width": 1200,
"spacing_sections": 0,
"spacing_grid_horizontal": 8,
"spacing_grid_vertical": 8,
"buttons_border_thickness": 1,
"buttons_border_opacity": 100,
"buttons_radius": 0,
"buttons_shadow_opacity": 0,
"buttons_shadow_horizontal_offset": 0,
"buttons_shadow_vertical_offset": 4,
"buttons_shadow_blur": 5,
"variant_pills_border_thickness": 1,
"variant_pills_border_opacity": 55,
"variant_pills_radius": 40,
"variant_pills_shadow_opacity": 0,
"variant_pills_shadow_horizontal_offset": 0,
"variant_pills_shadow_vertical_offset": 4,
"variant_pills_shadow_blur": 5,
"inputs_border_thickness": 1,
"inputs_border_opacity": 55,
"inputs_radius": 0,
"inputs_shadow_opacity": 0,
"inputs_shadow_horizontal_offset": 0,
"inputs_shadow_vertical_offset": 4,
"inputs_shadow_blur": 5,
"card_style": "standard",
"card_image_padding": 0,
"card_text_alignment": "left",
"card_color_scheme": "background-2",
"card_border_thickness": 0,
"card_border_opacity": 10,
"card_corner_radius": 0,
"card_shadow_opacity": 0,
"card_shadow_horizontal_offset": 0,
"card_shadow_vertical_offset": 4,
"card_shadow_blur": 5,
"text_boxes_border_thickness": 0,
"text_boxes_border_opacity": 10,
"text_boxes_radius": 0,
"text_boxes_shadow_opacity": 0,
"text_boxes_shadow_horizontal_offset": 0,
"text_boxes_shadow_vertical_offset": 4,
"text_boxes_shadow_blur": 5,
"media_border_thickness": 1,
"media_border_opacity": 5,
"media_radius": 0,
"media_shadow_opacity": 0,
"media_shadow_horizontal_offset": 0,
"media_shadow_vertical_offset": 4,
"media_shadow_blur": 5,
"popup_border_thickness": 1,
"popup_border_opacity": 10,
"popup_corner_radius": 0,
"popup_shadow_opacity": 0,
"popup_shadow_horizontal_offset": 0,
"popup_shadow_vertical_offset": 4,
"popup_shadow_blur": 5,
"drawer_border_thickness": 1,
"drawer_border_opacity": 10,
"drawer_shadow_opacity": 0,
"drawer_shadow_horizontal_offset": 0,
"drawer_shadow_vertical_offset": 4,
"drawer_shadow_blur": 5,
"badge_position": "bottom left",
"badge_corner_radius": 40,
"sale_badge_color_scheme": "accent-2",
"sold_out_badge_color_scheme": "inverse",
"accent_icons": "text",
"social_twitter_link": "",
"social_facebook_link": "",
"social_pinterest_link": "",
"social_instagram_link": "",
"social_tiktok_link": "",
"social_tumblr_link": "",
"social_snapchat_link": "",
"social_youtube_link": "",
"social_vimeo_link": "",
"predictive_search_enabled": true,
"predictive_search_show_vendor": false,
"predictive_search_show_price": false,
"currency_code_enabled": true,
"sections": {
"header": {
"type": "header",
"settings": {
"color_scheme": "background-1",
"logo_width": 90,
"logo_position": "middle-left",
"menu": "main-menu",
"menu_type_desktop": "dropdown",
"show_line_separator": true,
"enable_sticky_header": true,
"margin_bottom": 0,
"padding_top": 20,
"padding_bottom": 20
}
},
"footer": {
"type": "footer",
"blocks": {
"footer-0": {
"type": "link_list",
"settings": {
"heading": "Quick links",
"menu": "footer"
}
},
"footer-1": {
"type": "link_list",
"settings": {
"heading": "Info",
"menu": "footer"
}
},
"footer-2": {
"type": "text",
"settings": {
"heading": "Our mission",
"subtext": "<p>Share contact information, store details, and brand content with your customers.<\/p>"
}
}
},
"block_order": [
"footer-0",
"footer-1",
"footer-2"
],
"settings": {
"color_scheme": "background-1",
"newsletter_enable": true,
"newsletter_heading": "Subscribe to our emails",
"show_social": true,
"enable_country_selector": false,
"enable_language_selector": false,
"payment_enable": true,
"margin_top": 48,
"padding_top": 36,
"padding_bottom": 36
}
},
"main-password-header": {
"type": "main-password-header",
"settings": {
"logo_max_width": 100,
"color_scheme": "background-1"
}
},
"main-password-footer": {
"type": "main-password-footer",
"settings": {
"color_scheme": "background-1"
}
},
"announcement-bar": {
"type": "announcement-bar",
"blocks": {
"announcement-bar-0": {
"type": "announcement",
"settings": {
"text": "Welcome to our store",
"color_scheme": "accent-1",
"link": "",
"marquee": false
}
}
},
"block_order": [
"announcement-bar-0"
],
"settings": {
}
}
},
"content_for_index": [

]
},
"presets": {
"Default": {
"colors_solid_button_labels": "#ffffff",
Expand Down Expand Up @@ -99,22 +291,6 @@
"predictive_search_show_price": false,
"currency_code_enabled": true,
"sections": {
"announcement-bar": {
"type": "announcement-bar",
"blocks": {
"announcement-bar-0": {
"type": "announcement",
"settings": {
"text": "Welcome to our store",
"color_scheme": "background-1",
"link": ""
}
}
},
"block_order": [
"announcement-bar-0"
]
},
"header": {
"type": "header",
"settings": {
Expand Down
3 changes: 3 additions & 0 deletions locales/cs.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@
},
"link": {
"label": "Odkaz"
},
"marquee": {
"label": "Skrolující běžící text"
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions locales/da.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@
},
"link": {
"label": "Link"
},
"marquee": {
"label": "Rullende lysavis"
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions locales/de.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@
},
"link": {
"label": "Link"
},
"marquee": {
"label": "Scrollbarer Lauftext"
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions locales/en.default.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@
},
"link": {
"label": "Link"
},
"marquee": {
"label": "Scrolling marquee"
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions locales/es.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@
},
"link": {
"label": "Enlace"
},
"marquee": {
"label": "Desplazamiento de escaparate"
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions locales/fi.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@
},
"link": {
"label": "Linkki"
},
"marquee": {
"label": "Vierivä tekstielementti"
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions locales/fr.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@
},
"link": {
"label": "Lien"
},
"marquee": {
"label": "Bannière défilante"
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions locales/it.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@
},
"link": {
"label": "Link"
},
"marquee": {
"label": "Area di selezione per lo scorrimento"
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions locales/ja.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@
},
"link": {
"label": "リンク"
},
"marquee": {
"label": "マーキーをスクロール"
}
},
"name": "告知"
Expand Down
3 changes: 3 additions & 0 deletions locales/ko.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@
},
"link": {
"label": "링크"
},
"marquee": {
"label": "움직이는 텍스트 스크롤"
}
},
"name": "공지"
Expand Down
3 changes: 3 additions & 0 deletions locales/nb.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@
},
"link": {
"label": "Kobling"
},
"marquee": {
"label": "Skrollbanner"
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions locales/nl.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@
},
"link": {
"label": "Link"
},
"marquee": {
"label": "Scrolling marquee"
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions locales/pl.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@
},
"link": {
"label": "Link"
},
"marquee": {
"label": "Przewijany baner"
}
}
}
Expand Down
Loading