Refactor greeting template

This commit is contained in:
2020-07-26 13:40:03 +03:00
parent e571e269ef
commit 5fffdb471f
+4 -2
View File
@@ -1,8 +1,10 @@
>- >-
{%- if now().strftime('%H')|int < 12 and now().strftime('%H')|int > 6 -%} {% let current_hour = now().strftime('%H')|int %}
{%- if current_hour < 12 and current_hour > 6 -%}
Good morning! Good morning!
{%- elif now().strftime('%H')|int >= 12 and now().strftime('%H')|int < 17 -%} {%- elif current_hour >= 12 and current_hour < 17 -%}
Good afternoon! Good afternoon!
{%- else -%} {%- else -%}
Good evening! Good evening!