From 36207a85aeae929c8d9c57e1ff293a7d502d433b Mon Sep 17 00:00:00 2001 From: merlin Date: Wed, 1 Jan 2025 22:55:06 -0500 Subject: [PATCH] fix my rides and things --- freezing/web/templates/people/show.html | 14 ++++++++------ .../web/templates/pointless/pointlesskids.html | 4 ++-- freezing/web/templates/user/rides.html | 8 ++++---- freezing/web/views/general.py | 3 +++ leaderboards/decasleaze.yml | 2 +- leaderboards/hashtag.yml | 2 +- 6 files changed, 19 insertions(+), 14 deletions(-) diff --git a/freezing/web/templates/people/show.html b/freezing/web/templates/people/show.html index 47e56fe2..b373e910 100644 --- a/freezing/web/templates/people/show.html +++ b/freezing/web/templates/people/show.html @@ -107,12 +107,14 @@
{{ data.team.name }}
- View on Strava - {% if data.environment == 'localdev' %} - 🕵 Impersonate 👀 - {% endif %} +
+ View on Strava + {% if data.environment == 'localdev' %} + 🕵 Impersonate 👀 + {% endif %} +
diff --git a/freezing/web/templates/pointless/pointlesskids.html b/freezing/web/templates/pointless/pointlesskids.html index 92de1242..9ce0e4f0 100644 --- a/freezing/web/templates/pointless/pointlesskids.html +++ b/freezing/web/templates/pointless/pointlesskids.html @@ -6,10 +6,10 @@

- When you ride with your kids (that is, they are riding with you on their own bikes), tag your ride #withkid[kid codename] and they'll show up here. If you ride with multiple kids at once, multiple hashtags are supported. + When you ride with your kids (that is, they are riding with you on their own bikes), tag your ride #withkid[kid codename] and they'll show up here. If you ride with multiple kids at once, multiple hashtags are supported.

- Keep it consistent and make your name unique. For example, jrenaut's kids picked new names for themselves one year - pepper8cheez and socr4evr11, so when he rode with one or both of them, he added #withkidpepper8cheez or #withkidsocr4evr11, as appropriate. Keep in mind if you ride with another BAFS participant AND your kid, make sure only one of you tags the kid, or else the miles will be double counted. + Keep it consistent and make your name unique. For example, jrenaut's kids picked new names for themselves one year - pepper8cheez and socr4evr11, so when he rode with one or both of them, he added #withkidpepper8cheez or #withkidsocr4evr11, as appropriate. Keep in mind if you ride with another BAFS participant AND your kid, make sure only one of you tags the kid, or else the miles will be double counted.

For the purpose of this contest, a kid is defined as a human being younger than 14 years old. Older than that and they can have their own Strava account. diff --git a/freezing/web/templates/user/rides.html b/freezing/web/templates/user/rides.html index a7ace0d4..ee6ded0d 100644 --- a/freezing/web/templates/user/rides.html +++ b/freezing/web/templates/user/rides.html @@ -125,9 +125,9 @@

 Loading weekly points...

-
-
-
+
+
+
@@ -156,7 +156,7 @@

} function rideFormatter(value, row) { - return `${value}`; + return `${value}`; } function photosFormatter(value, row) { diff --git a/freezing/web/views/general.py b/freezing/web/views/general.py index 272fba12..61409411 100644 --- a/freezing/web/views/general.py +++ b/freezing/web/views/general.py @@ -50,6 +50,7 @@ class AccessDenied(RuntimeError): "londonbridge": "generic/londonbridge", "fsrealsuppleride": "generic/suppleride", "decasleaze": "generic/decasleaze", + "withkid": "pointlesskids", } @@ -162,6 +163,8 @@ def index(): for res in meta.scoped_session().execute(q).fetchall(): ride_tags = {} # Prevent double-tagging for hash in findall(r"(?<=#)\w+", res["name"]): + if hash.lower().startswith("withkid"): + hash = "withkid" if not fullmatch( r"(?i)(BAFS|FS|FreezingSaddles)?\d*", hash ): # Ditch useless tags diff --git a/leaderboards/decasleaze.yml b/leaderboards/decasleaze.yml index b2a5563c..7585676a 100644 --- a/leaderboards/decasleaze.yml +++ b/leaderboards/decasleaze.yml @@ -13,7 +13,7 @@ fields: label: Rider format: "{athlete_name}" - name: days - label: Decasleazes + label: Decasleaze Days rank_by: true type: number - name: points diff --git a/leaderboards/hashtag.yml b/leaderboards/hashtag.yml index 78c4323a..bbcc8020 100644 --- a/leaderboards/hashtag.yml +++ b/leaderboards/hashtag.yml @@ -144,7 +144,7 @@ tags: - tag: parks name: Park Finder description: | - Ride a bike to a park, post the ride to Strava with #parks in the title. Each park is one point. + Ride a bike to a park, post the ride to Strava with #parks in the title. Each park is one point. No daily limit, but you’ll have to break your ride into multiple Strava rides with #parks in the title to tabulate correctly. Must be a unique park to qualify in the scoring–no repeats. sponsor: arlcxrider