Skip to content

Commit

Permalink
Merge pull request #374 from freezingsaddles/fix-my-rides
Browse files Browse the repository at this point in the history
fix my rides and things
  • Loading branch information
merlinorg authored Jan 2, 2025
2 parents a6de40c + 36207a8 commit 3f9bb2c
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
14 changes: 8 additions & 6 deletions freezing/web/templates/people/show.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,14 @@ <h5 class="card-title">
<h6 class="card-subtitle text-body-secondary mb-3">
<a href="https://www.strava.com/clubs/{{ data.team.id }}">{{ data.team.name }}</a>
</h6>
<a class="btn btn-strava btn-sm"
href="https://www.strava.com/athletes/{{ data.user.id }}">View on Strava</a>
{% if data.environment == 'localdev' %}
<a class="btn btn-impersonate btn-sm"
href="/authorization?athlete_id={{ data.user.id }}">🕵 Impersonate 👀</a>
{% endif %}
<div class="d-flex">
<a class="btn btn-strava btn-sm"
href="https://www.strava.com/athletes/{{ data.user.id }}">View on Strava</a>
{% if data.environment == 'localdev' %}
<a class="btn btn-impersonate btn-sm ms-3"
href="/authorization?athlete_id={{ data.user.id }}">🕵 Impersonate 👀</a>
{% endif %}
</div>
</div>
</div>
<div class="mt-3 mt-lg-4 d-grid grid-gap-3 grid-gap-lg-4 grid-lg-2">
Expand Down
4 changes: 2 additions & 2 deletions freezing/web/templates/pointless/pointlesskids.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ <h5 class="card-header">
</h5>
<div class="card-body">
<p>
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 <code>#withkid<em>[kid codename]</em></code> and they'll show up here. If you ride with multiple kids at once, multiple hashtags are supported.
</p>
<p>
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 <code>#withkidpepper8cheez</code> or <code>#withkidsocr4evr11</code>, 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.
</p>
<p>
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.
Expand Down
8 changes: 4 additions & 4 deletions freezing/web/templates/user/rides.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ <h2 class="clearfix">
&nbsp;Loading weekly points...
</div>
</div>
<div role="tabpanel" class="tab-pane" id="map">
<div id="track-map" class="wide-aspect">
</div>
</div>
<div role="tabpanel" class="tab-pane" id="map">
<div id="track-map" class="wide-aspect">
</div>
</div>
</div>
Expand Down Expand Up @@ -156,7 +156,7 @@ <h2 class="clearfix">
}

function rideFormatter(value, row) {
return `<a href="https://www.strava.com/activities/${row.id}">${value}</a>`;
return `<a href="https://www.strava.com/activities/${row.id}" class="hover-underline">${value}</a>`;
}

function photosFormatter(value, row) {
Expand Down
3 changes: 3 additions & 0 deletions freezing/web/views/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class AccessDenied(RuntimeError):
"londonbridge": "generic/londonbridge",
"fsrealsuppleride": "generic/suppleride",
"decasleaze": "generic/decasleaze",
"withkid": "pointlesskids",
}


Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion leaderboards/decasleaze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fields:
label: Rider
format: "<a href=\"/people/{id}\" class=\"hover-underline\">{athlete_name}</a>"
- name: days
label: Decasleazes
label: Decasleaze Days
rank_by: true
type: number
- name: points
Expand Down
2 changes: 1 addition & 1 deletion leaderboards/hashtag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>#parks</code> in the title. Each park is one point.
No daily limit, but you’ll have to break your ride into multiple Strava rides with <code>#parks</code>
in the title to tabulate correctly. Must be a unique park to qualify in the scoring–no repeats.
sponsor: arlcxrider
Expand Down

0 comments on commit 3f9bb2c

Please sign in to comment.