Skip to content

Commit

Permalink
Merge pull request #353 from freezingsaddles/pointless-tandem
Browse files Browse the repository at this point in the history
Pointless tandem
  • Loading branch information
merlinorg authored Dec 31, 2024
2 parents 6d91d89 + e92ab44 commit cb72965
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 45 deletions.
17 changes: 10 additions & 7 deletions freezing/web/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,15 @@
<li>
<a class="dropdown-item" href="/pointless/hashtag/singlespeed">Singlespeed</a>
</li>
<li>
<a class="dropdown-item" href="/pointless/hashtag/tandem">Tandem Rides</a>
</li>
<li>
<a class="dropdown-item" href="/pointless/hashtag/tandemVI">Tandem Rides - Visually Impaired</a>
</li>
<li>
<a class="dropdown-item" href="/pointless/hashtag/tandemKid">Tandem Rides - With a Kid</a>
</li>
<li>
<hr class="dropdown-divider">
</li>
Expand Down Expand Up @@ -278,7 +287,7 @@
href="https://www.bikearlingtonforum.com/forums/topic/return-of-calvinball/">Calvinball</a>
</li>
<li>
<a class="dropdown-item" href="/pointless/billygoat-indiv">Climbing per Mile (Indiv)</a>
<a class="dropdown-item" href="/pointless/billygoat-indiv">Climbing per Mile (Individual)</a>
</li>
<li>
<a class="dropdown-item" href="/pointless/billygoat-team">Climbing per Mile (Team)</a>
Expand Down Expand Up @@ -368,12 +377,6 @@
<li>
<a class="dropdown-item" href="/pointless/generic/suppleride">Supple Ride</a>
</li>
<li>
<a class="dropdown-item" href="/pointless/hashtag/tandem">Tandem Rides</a>
</li>
<li>
<a class="dropdown-item" href="/pointless/hashtag/tandemVI">Tandem Rides - Visually Impaired</a>
</li>
<li>
<a class="dropdown-item" href="/pointless/hashtag/thetacoride">The Taco Ride</a>
</li>
Expand Down
51 changes: 24 additions & 27 deletions freezing/web/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,47 @@
{% block head %}
<style>
#cal, #map {
border-radius: var(--bs-border-radius);
width: 100%;
border: 1px solid #ced4da;
border-radius: var(--bs-border-radius);
width: 100%;
border: 1px solid #ced4da;
aspect-ratio: 1;
}

#cal {
aspect-ratio: 1.333;
}

#map {
aspect-ratio: 1;
aspect-ratio: .75;
}

@media (min-width: 768px) {
#map {
aspect-ratio: 1.333;
}
#map, #cal {
aspect-ratio: 1.333;
}
}

@media (min-width: 1200px) {
#cal:not(.bigly) {
aspect-ratio: 2.667;
}
#cal:not(.bigly) {
aspect-ratio: 2;
}

#map {
aspect-ratio: initial;
}
#map {
aspect-ratio: initial;
}
}

@media (prefers-color-scheme: dark) {
#map {
border-color: #495057;
}
#map {
border-color: #495057;
}

#cal {
border-color: #a8a19a;
}
#cal {
border-color: #a8a19a;
}
}

.mini-img {
border-radius: .5rem;
max-width: 100%;
max-height: 12rem;
margin-bottom: .5rem;
border-radius: .5rem;
max-width: 100%;
max-height: 12rem;
margin-bottom: .5rem;
}
</style>
<link rel="stylesheet"
Expand Down
6 changes: 5 additions & 1 deletion freezing/web/templates/pointless/hashtag.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ <h2 class="mb-3">
</p>
{% endif %}
{% if meta.sponsor %}
{% set sponsors = meta.sponsor.split(',') %}
<p>
Sponsored by <em><a href="https://www.bikearlingtonforum.com/forums/users/{{ meta.sponsor }}/">{{ meta.sponsor }}</a></em>.
Sponsored by
{% for sp in sponsors %}
{# djlint:off #}<em><a href="https://www.bikearlingtonforum.com/forums/users/{{ sp }}/">{{ sp }}</a></em>{% if loop.last %}.{% else %}, {% endif %}{# djlint:on #}
{% endfor %}
</p>
{% else %}
<p class="text-muted">
Expand Down
8 changes: 7 additions & 1 deletion freezing/web/utils/hashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ def load_hashtag(hashtag) -> HashtagBoardTag:
schema = HashtagBoardSchema()
board: HashtagBoard = schema.load(doc)

matches = [tag for tag in board.tags if tag.tag == hashtag or tag.alt == hashtag]
matches = [
tag
for tag in board.tags
if tag.tag.lower() == hashtag.lower()
or tag.alt
and tag.alt.lower() == hashtag.lower()
]

return None if len(matches) == 0 else matches[0]
23 changes: 14 additions & 9 deletions leaderboards/hashtag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tags:
- tag: bob
name: Baby on Board
description: |
Remember the ubiquitous yellow caution sign “Baby of Board” signs of the 1980s? Well, this year, snap a photo each time to see a unique design/style of one during a ride, share it on your Strava ride and hashtag your Strava ride title with #BoB.
Remember the ubiquitous yellow caution sign “Baby of Board” signs of the 1980s? Well, this year, snap a photo each time to see a unique design/style of one during a ride, share it on your Strava ride and hashtag your Strava ride title with <code>#BoB</code>.
url: https://www.bikearlingtonforum.com/forums/topic/2025-pointless-prize-baby-on-board-bob/
sponsor: bigredboiler
rank_by_rides: True
Expand Down Expand Up @@ -45,7 +45,7 @@ tags:
name: Civil War Forts
description: |
During the American Civil War (1861-1865) Washington was surrounded by a chain of fortifications. Mostly in DC and northern Virginia, I think maybe a couple in Maryland.
Your mission, should you choose to accept it, is to ride to as many of them as possible, take a photo of your bike there, and post the hashtag #civilwarforts on Strava.
Your mission, should you choose to accept it, is to ride to as many of them as possible, take a photo of your bike there, and post the hashtag <code>#civilwarforts</code> on Strava.
url: https://www.bikearlingtonforum.com/forums/topic/pointless-prize-civilwarforts/
sponsor: lordofthemark
rank_by_rides: True
Expand Down Expand Up @@ -214,20 +214,25 @@ tags:
- tag: tandem
name: Tandem
description: |
Ride your tandem bike and tag the ride with <code>#tandem</code>. The rider who has the most tandem rides wins. Bonus points awarded for rides with a blind or visually impaired stoker (tag <code>#tandemVI</code>) or with a partner age 15 or under (<code>#tandemchild</code>).
url: https://www.bikearlingtonforum.com/forums/topic/pointless-prize-tandem-rides-2/
Ride your tandem bike and tag the ride with <code>#tandem</code>. The rider who has the most tandem rides wins. Bonus points awarded for rides with a blind or visually impaired stoker (tag <code>#tandemVI</code>) or with a partner age 15 or under (<code>#tandemKid</code>).
sponsor: shirag,NoVaNoobGA
url: https://www.bikearlingtonforum.com/forums/topic/tandem-pointless-prize-2025/
rank_by_rides: True

- tag: tandemvi
- tag: tandemVI
name: Tandem - Visually Impaired
description: |
Ride your tandem bike and tag the ride with <code>#tandem</code>. The rider who has the most tandem rides wins. Bonus points awarded for rides with a blind or visually impaired stoker (tag <code>#tandemVI</code>) or with a partner age 15 or under (<code>#tandemchild</code>).
Ride your tandem bike and tag the ride with <code>#tandem</code>. The rider who has the most tandem rides wins. Bonus points awarded for rides with a blind or visually impaired stoker (tag <code>#tandemVI</code>) or with a partner age 15 or under (<code>#tandemKid</code>).
sponsor: shirag,NoVaNoobGA
url: https://www.bikearlingtonforum.com/forums/topic/tandem-pointless-prize-2025/
rank_by_rides: True

- tag: tandemchild
name: Tandem Child
- tag: tandemKid
name: Tandem Kid
description: |
Ride your tandem bike and tag the ride with <code>#tandem</code>. The rider who has the most tandem rides wins. Bonus points awarded for rides with a blind or visually impaired stoker (tag <code>#tandemVI</code>) or with a partner age 15 or under (<code>#tandemchild</code>).
Ride your tandem bike and tag the ride with <code>#tandem</code>. The rider who has the most tandem rides wins. Bonus points awarded for rides with a blind or visually impaired stoker (tag <code>#tandemVI</code>) or with a partner age 15 or under (<code>#tandemKid</code>).
sponsor: shirag,NoVaNoobGA
url: https://www.bikearlingtonforum.com/forums/topic/tandem-pointless-prize-2025/
rank_by_rides: True

- tag: treats
Expand Down

0 comments on commit cb72965

Please sign in to comment.