Skip to content

Instantly share code, notes, and snippets.

@rezzz-dev
Created August 25, 2021 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rezzz-dev/1f2e18913e03c9b77c123fdad7473b3e to your computer and use it in GitHub Desktop.
Save rezzz-dev/1f2e18913e03c9b77c123fdad7473b3e to your computer and use it in GitHub Desktop.
{% assign rightNow = 'now' %}
{% assign good_morning = "Enjoy the rest of your the_day!+++Have an awesome the_day name! 🀘+++Make today your best the_day name!+++Take care, name! 😊+++Thanks for reading, name! Have a great day πŸŒ…+++Have a good one, name!" | split: "+++" %}
{% assign good_day = "Catch you later name 😎+++Have a great day! 🀘+++Today is your day name!+++Until next time, name!+++Alright, I'm out!+++That's it from me, have a great the_day! πŸ™Œ+++As always, name β€” thanks for reading πŸ™πŸ€˜+++All the best 🀘" | split: "+++" %}
{% assign good_night = "Hope you had a great day, name! 😊+++Cheers name, have a nice evening! πŸŒ›+++Thanks, name! Have a good night! 😊+++What was a win you had today, name? 🌜" | split: "+++" %}
{% assign randomMorning = rightNow | date: "%s" | modulo: good_morning.size %}
{% assign randomDay = rightNow | date: "%s" | modulo: good_day.size %}
{% assign randomEvening = rightNow | date: "%s" | modulo: good_night.size %}
{% assign subname = subscriber.first_name | capitalize %}
{% assign the_hour = rightNow | date:"%k" %}
{% assign the_day = rightNow | date:"%A" %}
{% assign the_date = rightNow | date:"%B %e" %}
{% capture signoff%}
{% if subscriber.first_name == blank%}As always, thanks for reading! πŸ™πŸ€˜
{% elsif the_date == "December 31"%}Happy New Year, name! All the best to you and your inner circle for {{ 'now' | date:"%Y" | plus: 1}}! πŸ₯‚
{% elsif the_date == "January 1"%}Cheers to a fun and successful {{ 'now' | date:"%Y"}}! πŸ™πŸ€˜
{% elsif the_date == "December 25"%}Have a wonderful Christmas, name! Take care! πŸŽ…
{% elsif the_day == "Saturday"%}Cheers, name! Enjoy the rest of your weekend!
{% elsif the_hour < "10" %}{{good_morning[randomMorning]}}
{% elsif the_hour >= "10" and the_hour < "17" %}{{good_day[randomDay]}}
{% elsif the_hour >= "17" %}{{good_night[randomEvening]}}
{% endif %}
{% endcapture %} {{signoff | replace: "name", subname | replace: "the_day", the_day}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment