thematdevdotorg/app/snowfall.py

17 lines
468 B
Python
Raw Normal View History

'''
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