From c5a4f97c95a898377229c7c0244b3bc7f61df556 Mon Sep 17 00:00:00 2001 From: thematdev Date: Thu, 31 Mar 2022 13:58:56 +0300 Subject: [PATCH] I've made it before 1st April! --- app/__init__.py | 4 +--- app/snowfall.py | 16 ---------------- app/templates/index.html | 6 ------ 3 files changed, 1 insertion(+), 25 deletions(-) delete mode 100644 app/snowfall.py diff --git a/app/__init__.py b/app/__init__.py index 44baf60..952a087 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -3,7 +3,6 @@ from flask import Flask, url_for, render_template import os import json import numpy.random as gaussian_rnd -from app.snowfall import generate_snowfall load_dotenv() @@ -68,5 +67,4 @@ def index(): data = json.loads(file.read()) cols = data['cols'] projects = data['projects'] - snowflake_image_url = dated_url_for('static', filename='images/snowflake.png') - return render_template('index.html', random_number=generate_iq(), projects=projects, snowfall=generate_snowfall(snowflake_image_url)) + return render_template('index.html', random_number=generate_iq(), projects=projects) diff --git a/app/snowfall.py b/app/snowfall.py deleted file mode 100644 index 6026434..0000000 --- a/app/snowfall.py +++ /dev/null @@ -1,16 +0,0 @@ -''' -Source files of snowfall, including CSS you can find at https://github.com/Artimon/pure-css-snowfall -''' - - -SNOWFLAKE_CHARACTERS = ['\U0001f49d', '\U0001f31f', '\U0001f381'] -SNOWFLAKE_IMAGE_COUNT = 45 - -def generate_snowfall(snowflake_image_url): - snowfall = [] - for char in SNOWFLAKE_CHARACTERS: - snowfall.append(f'{char}') - snowfall += [f''] * SNOWFLAKE_IMAGE_COUNT - return snowfall - - diff --git a/app/templates/index.html b/app/templates/index.html index c504424..3fdeade 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -8,14 +8,8 @@ thematdev - - {% for snowflake in snowfall %} - {{snowflake|safe}} - {% endfor %} -
-

С Новым Годом!

thematdev