From e58e59f732a7a27e7e79df398bf5a8bafc2b5b6e Mon Sep 17 00:00:00 2001 From: anishDalvi Date: Tue, 21 Nov 2023 18:15:15 +0530 Subject: [PATCH 1/5] notification bar modified --- sections/notification-bar.liquid | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/sections/notification-bar.liquid b/sections/notification-bar.liquid index fcc02d33..ee657fc8 100644 --- a/sections/notification-bar.liquid +++ b/sections/notification-bar.liquid @@ -2,11 +2,17 @@

{% if section.settings.notification_text != 'This is notification bar' %} - {{ section.settings.notification_text }} + {{ section.settings.notification_text }} + {% else %} + New: Yummygums Sleep ZzzzZzzZ 🌚 {% endif %} - Nieuw: - Yummygums Sleep - ZzzzZzzZ 🌚 + +

+ {% if section.settings.sub_notification_text != 'Sub Notification' %} + {{ section.settings.sub_notification_text }} + {% endif %} +

+

@@ -19,7 +25,19 @@ "label": "Notification Text", "id": "notification_text", "default": "This is notification bar" + }, + { + "type": "url", + "label": "Link URL", + "id": "linkUrl" + }, + { + "type": "text", + "label": "Sub Notification Text", + "id": "sub_notification_text", + "default": "Sub Notification" } + ], "presets": [ { From d6317a66529d02ee07cac7ebaa601edb204ed16b Mon Sep 17 00:00:00 2001 From: anishDalvi Date: Wed, 22 Nov 2023 13:17:34 +0530 Subject: [PATCH 2/5] removed if tags --- sections/notification-bar.liquid | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/sections/notification-bar.liquid b/sections/notification-bar.liquid index ee657fc8..de467910 100644 --- a/sections/notification-bar.liquid +++ b/sections/notification-bar.liquid @@ -1,17 +1,10 @@

- {% if section.settings.notification_text != 'This is notification bar' %} {{ section.settings.notification_text }} - {% else %} - New: Yummygums Sleep ZzzzZzzZ 🌚 - {% endif %} - -

- {% if section.settings.sub_notification_text != 'Sub Notification' %} - {{ section.settings.sub_notification_text }} - {% endif %} -

+

+ {{ section.settings.sub_notification_text }} +

@@ -24,7 +17,7 @@ "type": "text", "label": "Notification Text", "id": "notification_text", - "default": "This is notification bar" + "default": "Notification URL Text" }, { "type": "url", From afdca92762b845664b664b581b79d13072af0868 Mon Sep 17 00:00:00 2001 From: anishDalvi Date: Wed, 22 Nov 2023 13:22:12 +0530 Subject: [PATCH 3/5] removed white space --- sections/notification-bar.liquid | 1 - 1 file changed, 1 deletion(-) diff --git a/sections/notification-bar.liquid b/sections/notification-bar.liquid index de467910..4f5b6aef 100644 --- a/sections/notification-bar.liquid +++ b/sections/notification-bar.liquid @@ -5,7 +5,6 @@

{{ section.settings.sub_notification_text }}

-

From d5acaa11e19e33d2167fb50c9d6b884b83219cbf Mon Sep 17 00:00:00 2001 From: anishDalvi Date: Wed, 22 Nov 2023 21:03:18 +0530 Subject: [PATCH 4/5] changes done (if statement added) --- sections/notification-bar.liquid | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/sections/notification-bar.liquid b/sections/notification-bar.liquid index 4f5b6aef..cf41d550 100644 --- a/sections/notification-bar.liquid +++ b/sections/notification-bar.liquid @@ -1,11 +1,16 @@
-

- {{ section.settings.notification_text }} -

- {{ section.settings.sub_notification_text }} -

-

+ {% if section.settings.notification_text != blank %} +

+ {% assign linkUrl = section.settings.linkUrl | default: 'https://www.yummygums.com/' %} + {{ section.settings.notification_text }} + {% if section.settings.sub_notification_text != blank %} +

+ {{ section.settings.sub_notification_text }} +

+ {% endif %} +

+ {% endif %}
{% schema %} @@ -15,8 +20,7 @@ { "type": "text", "label": "Notification Text", - "id": "notification_text", - "default": "Notification URL Text" + "id": "notification_text" }, { "type": "url", @@ -26,8 +30,7 @@ { "type": "text", "label": "Sub Notification Text", - "id": "sub_notification_text", - "default": "Sub Notification" + "id": "sub_notification_text" } ], From 5362bba67dcaa6bf8ae08eeec644bc763eef81ca Mon Sep 17 00:00:00 2001 From: anishDalvi Date: Wed, 22 Nov 2023 21:11:09 +0530 Subject: [PATCH 5/5] changes done (if statement added, removed defaults) --- sections/notification-bar.liquid | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sections/notification-bar.liquid b/sections/notification-bar.liquid index cf41d550..66a07318 100644 --- a/sections/notification-bar.liquid +++ b/sections/notification-bar.liquid @@ -1,9 +1,8 @@
- {% if section.settings.notification_text != blank %} + {% if section.settings.notification_text != blank and section.settings.linkUrl != blank %}

- {% assign linkUrl = section.settings.linkUrl | default: 'https://www.yummygums.com/' %} - {{ section.settings.notification_text }} + {{ section.settings.notification_text }} {% if section.settings.sub_notification_text != blank %}

{{ section.settings.sub_notification_text }}