thematdevdotorg/app/snowfall.py
thematdev fc593405bb Happy New Year!
Signed-off-by: thematdev <thematdev@gmail.com>
2021-12-31 18:50:07 +03:00

17 lines
468 B
Python

'''
Source files of snowfall, including CSS you can find at https://github.com/Artimon/pure-css-snowfall
'''
SNOWFLAKE_CHARACTERS = ['\U0001f342', '\U0001f49d', '\U0001f31f', '\U0001f381']
SNOWFLAKE_IMAGE_COUNT = 15
def generate_snowfall(snowflake_image_url):
snowfall = []
for char in SNOWFLAKE_CHARACTERS:
snowfall.append(f'<span>{char}</span>')
snowfall += [f'<img src="{snowflake_image_url}">'] * SNOWFLAKE_IMAGE_COUNT
return snowfall