thematdevdotorg/app/snowfall.py

17 lines
454 B
Python
Raw Normal View History

'''
Source files of snowfall, including CSS you can find at https://github.com/Artimon/pure-css-snowfall
'''
2021-12-31 23:50:39 +03:00
SNOWFLAKE_CHARACTERS = ['\U0001f49d', '\U0001f31f', '\U0001f381']
SNOWFLAKE_IMAGE_COUNT = 45
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