diff --git a/.gitignore b/.gitignore index b5993a7..93d2f8b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ __pycache__/ app/__pycache__/ app/static/avatars/ +app/static/images/trophies/ ## Devlopement files diff --git a/app/__init__.py b/app/__init__.py index 8a53d17..01ca7d3 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -5,6 +5,7 @@ from flask_login import LoginManager from flask_mail import Mail from config import Config import time +import slugify app = Flask(__name__) app.config.from_object(Config) @@ -49,3 +50,8 @@ from app.routes.forum import index, topic from app.utils import pluralize # To use pluralize into the templates from app.utils import date from app.utils import is_title + +# Add slugify into the available functions in every template +app.jinja_env.globals.update( + slugify=slugify.slugify +) diff --git a/app/data/trophies.png b/app/data/trophies.png new file mode 100644 index 0000000..c4a7c17 Binary files /dev/null and b/app/data/trophies.png differ diff --git a/app/data/trophies.yaml b/app/data/trophies.yaml index c6b6857..54e5dca 100644 --- a/app/data/trophies.yaml +++ b/app/data/trophies.yaml @@ -2,6 +2,7 @@ # name Trophy name as displayed on the site. # is_title If True, the trophy can be worn as a title next to the avatar. # description Detailed description to be shown on profile page. +# hidden Not shown unless awarded (for unique titles). # Manually awarded - @@ -185,3 +186,8 @@ is_title: True description: Foudroyer les cœurs à 5 reprises ! hidden: False +- + name: Survivant de la v42 + is_title: False + description: A connu la v42 de Planète Casio. + hidden: True diff --git a/app/static/css/widgets.css b/app/static/css/widgets.css index 4b4ee68..8d06ef7 100644 --- a/app/static/css/widgets.css +++ b/app/static/css/widgets.css @@ -61,7 +61,7 @@ border-radius: 2px; } .trophy img { - height: 50px; margin-right: 5px; + height: 48px; margin-right: 8px; } .trophy div > * { display: block; diff --git a/app/templates/account/user.html b/app/templates/account/user.html index d2473bc..dc80ac9 100644 --- a/app/templates/account/user.html +++ b/app/templates/account/user.html @@ -46,7 +46,7 @@