Skip to content

Commit

Permalink
Lotsa nits
Browse files Browse the repository at this point in the history
  • Loading branch information
merlinorg committed Dec 31, 2024
1 parent 495897d commit 6afe834
Show file tree
Hide file tree
Showing 39 changed files with 120 additions and 108 deletions.
12 changes: 12 additions & 0 deletions freezing/web/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ table.dataTable.no-footer {
}
}

.hover-underline {
text-decoration: none;

&:hover, &:focus {
text-decoration: underline;
}
}

.ekko-lightbox-container .img-responsive {
border-radius: .25rem;
max-width: 100%;
Expand Down Expand Up @@ -195,6 +203,10 @@ nav.bg-light {
/* Align cells with numbers to the right */
.number {
text-align: right;

&.rank {
width: 3%;
}
}

/* Align cells with emoji in them in the middle */
Expand Down
4 changes: 2 additions & 2 deletions freezing/web/templates/alt_scoring/team_riders.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h5 class="card-header">
</p>
<table class="table table-condensed">
<tr>
<th class="number">
<th class="number rank">
Rank
</th>
<th>
Expand All @@ -22,7 +22,7 @@ <h5 class="card-header">
</tr>
{% for a, b in team_riders %}
<tr>
<td class="number">
<td class="number rank">
{{ loop.index }}
</td>
<td>
Expand Down
2 changes: 1 addition & 1 deletion freezing/web/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h4 class="modal-title text-truncate" id="myLargeModalLabel-1">
{# djlint:on #}
</div>
<div class="modal-footer">
Taken by <a href="/people/{{ photo.ride.athlete.id }}">{{ photo.ride.athlete.display_name }}</a>.
Taken by <a href="/people/{{ photo.ride.athlete.id }}" class="hover-underline">{{ photo.ride.athlete.display_name }}</a>
{% if photo.ref %}
<a href='{{ photo.ref }}'>View in Instagram</a>
{% endif %}
Expand Down
6 changes: 3 additions & 3 deletions freezing/web/templates/leaderboard/indiv_text.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ <h1>
<ol>
{% for indiv_row in indiv_rows[:10] %}
<li>
<h4>
<a href="/people/{{ indiv_row['athlete_id'] }}">{{ indiv_row['athlete_name'] }}</a>
<h4 class="mb-0">
<a href="/people/{{ indiv_row['athlete_id'] }}" class="hover-underline">{{ indiv_row['athlete_name'] }}</a>
{{ indiv_row['total_score']|round|int|groupnum }} points
</h4>
({{ indiv_row['days_ridden'] }} days, {{ indiv_row['total_distance']|round|int|groupnum }} miles) {{ indiv_row['team_name'] }}
</li>
{% endfor %}
{% for indiv_row in indiv_rows[10:] %}
<li>
<a href="/people/{{ indiv_row['athlete_id'] }}">{{ indiv_row['athlete_name'] }}</a>
<a href="/people/{{ indiv_row['athlete_id'] }}" class="hover-underline">{{ indiv_row['athlete_name'] }}</a>
<strong>{{ indiv_row['total_score']|round|int|groupnum }}</strong> points
({{ indiv_row['days_ridden'] }} days, {{ indiv_row['total_distance']|round|int|groupnum }} miles) {{ indiv_row['team_name'] }}
</li>
Expand Down
5 changes: 3 additions & 2 deletions freezing/web/templates/leaderboard/team_text.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ <h1>
{% for team_row in team_rows %}
<li>
<h4>
<a href="https://www.strava.com/clubs/{{ team_row['team_id'] }}">{{ team_row['team_name'] }}</a>:
<a href="https://www.strava.com/clubs/{{ team_row['team_id'] }}"
class="hover-underline">{{ team_row['team_name'] }}</a>:
<strong>{{ team_row['total_score']|round|int|groupnum }}</strong> points ({{ team_row['total_distance']|round|int|groupnum }} miles)
</h4>
<ol class="people">
{% for member_row in team_members[team_row['team_id']] %}
<li>
<a href="/people/{{ member_row['athlete_id'] }}">{{ member_row['athlete_name'] }}</a>:
<a href="/people/{{ member_row['athlete_id'] }}" class="hover-underline">{{ member_row['athlete_name'] }}</a>:
{{ member_row['total_score']|round|int|groupnum }} points ({{ member_row['days_ridden'] }} days, {{ member_row['total_distance']|round|int|groupnum }} miles)
</li>
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion freezing/web/templates/people/friends.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h1>
<ul>
{% for indiv_row in indiv_rows %}
<li>
<a href="/people/{{ indiv_row['athlete_id'] }}">{{ indiv_row['athlete_name'] }}</a>
<a href="/people/{{ indiv_row['athlete_id'] }}" class="hover-underline">{{ indiv_row['athlete_name'] }}</a>
<strong>{{ indiv_row['total_score']|round|int|groupnum }}</strong> points
({{ indiv_row['days_ridden'] }} days, {{ indiv_row['total_distance']|round|int|groupnum }} miles)
</li>
Expand Down
4 changes: 2 additions & 2 deletions freezing/web/templates/people/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h1>
<thead>
<tr>
<th>
User
Rider
</th>
<th class"number">
Rides This Week
Expand All @@ -56,7 +56,7 @@ <h1>
{% for u in users %}
<tr>
<td>
<a href="/people/{{ u.id }}">{{ u.name }}</a>
<a href="/people/{{ u.id }}" class="hover-underline">{{ u.name }}</a>
</td>
<td class="number">
{{ u.weekrides }}
Expand Down
12 changes: 6 additions & 6 deletions freezing/web/templates/people/ridedays.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ <h5 class="card-header">
</tr>
{% for a, b, c, d in ride_days %}
{% if c >= num_days %}
{% set class = "success" %}
{% set class = "text-success" %}
{% elif c == (num_days - 1) and not all_done %}
{% set class = "warning" %}
{% elif c < num_days %}
{% set class = "danger" %}
{% set class = "text-warning" %}
{% else %}
{% set class = "text-danger" %}
{% endif %}
<tr class="{{ class }}">
<tr>
<td>
<a href="/people/{{ a }}">{{ b }}</a>
<a href="/people/{{ a }}" class="{{ class }} hover-underline">{{ b }}</a>
</td>
<td class="number">
{{ c }}
Expand Down
2 changes: 1 addition & 1 deletion freezing/web/templates/photos.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h1 class="page-header mb-4">
data-title="{{ photo.caption | default(photo.ride.name, true) }}"
data-parent=".gallery-wrapper"
{# djlint:off #}
data-footer='<p>Taken by <a href=/people/{{ photo.ride.athlete.id }}>{{ photo.ride.athlete.display_name }}</a> {% if photo.ref %}<a href='{{photo.ref}}'>View in Instagram</a>{% endif %}</p>'
data-footer='<p>Taken by <a href="/people/{{ photo.ride.athlete.id }}" class="hover-underline">{{ photo.ride.athlete.display_name }}</a> {% if photo.ref %}<a href='{{photo.ref}}'>View in Instagram</a>{% endif %}</p>'
style="background-image: url('{{ photo.img_l }}');">
{# djlint:on #}
</a>
Expand Down
6 changes: 3 additions & 3 deletions freezing/web/templates/pointless/civilwarhistory.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h1>
<table id="scores" class="table table-striped">
<thead>
<tr>
<th class="number">
<th class="number rank">
Rank
</th>
<th>
Expand All @@ -50,11 +50,11 @@ <h1>
<tbody>
{% for a,b,c,d,e,f,g in data.tdata %}
<tr>
<td class="number">
<td class="number rank">
{{ loop.index }}
</td>
<td>
<a href="/people/{{ a }}">{{ b }}</a>
<a href="/people/{{ a }}" class="hover-underline">{{ b }}</a>
</td>
<td class="number">
{{ c }}
Expand Down
8 changes: 4 additions & 4 deletions freezing/web/templates/pointless/coffeeride.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ <h5 class="card-header">
</p>
<table class="table table-condensed">
<tr>
<th class="number">
<th class="number rank">
Rank
</th>
<th>
Player
Rider
</th>
<th class="number">
{{ data.hashtag }} Rides
Expand All @@ -25,11 +25,11 @@ <h5 class="card-header">
</tr>
{% for a, b, c, d in data.tdata %}
<tr>
<td class="number">
<td class="number rank">
{{ loop.index }}
</td>
<td>
<a href="/people/{{ a }}">{{ b }}</a>
<a href="/people/{{ a }}" class="hover-underline">{{ b }}</a>
</td>
<td class="number">
{{ c }}
Expand Down
13 changes: 6 additions & 7 deletions freezing/web/templates/pointless/daily_variance.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ <h1>
<div class="row">
<div class="col-md-12">
<p>
While the <em>Least Daily Variance</em> price is currently retired, the leaderboard is cool so we're keeping it, and moving this to the Data Exploration area.
</p>
<p>
While the <em>Least Daily Variance</em> prize is currently retired, the leaderboard is cool so we're keeping it.
To qualify as a Least Daily Variance leader you <em>both</em> have to ride at least <b>50</b> days,
which is about 2/3 of the total days in the Freezing Saddles season,
<em>and</em> average more than 2 miles per ride day. If your name is in red, you don't qualify.
Expand All @@ -28,7 +26,7 @@ <h1>
This prize was given to the player with the lowest average variance in miles per day.
</p>
<p>
This prize has been in search of a new sponsor since jrenaut is absolutely the worst prize sponsor ever (in his own mind) and never actually gives prizes. (jrenaut wrote this, you can ask him). obscurerichard may have nailed this prize in 2020 definitively but is still waiting for his prize. However he forgives jreneaut. Actual prizes are overrated, <b>bragging rights are FOREVER</b>.
This prize has been in search of a new sponsor since jrenaut is absolutely the worst prize sponsor ever (in his own mind) and never actually gives prizes. (jrenaut wrote this, you can ask him). obscurerichard may have nailed this prize in 2020 definitively but is still waiting for his prize. However he forgives jrenaut. Actual prizes are overrated, <b>bragging rights are FOREVER</b>.
</p>
<hr>
</div>
Expand All @@ -40,7 +38,7 @@ <h1>
<thead>
<tr>
<th>
Athlete
Rider
</th>
<th class="number">
Ride Days
Expand Down Expand Up @@ -76,9 +74,10 @@ <h1>
</thead>
<tbody>
{% for a,b,c,dist,can_win,d,e,f,g,h,i,j,k in data.tdata %}
<tr {% if not can_win %} class="number danger"{% else %}class="number"{% endif %}>
<tr>
<td>
<a href="/people/{{ a }}">{{ b }}</a>
<a href="/people/{{ a }}"
{% if not can_win %}class="hover-underline text-danger"{% else %}class="hover-underline"{% endif %}>{{ b }}</a>
</td>
<td class="number">
{{ c }}
Expand Down
6 changes: 3 additions & 3 deletions freezing/web/templates/pointless/distance.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h5 class="card-header">
</p>
<table class="table table-condensed">
<tr>
<th class="number">
<th class="number rank">
Rank
</th>
<th>
Expand All @@ -22,11 +22,11 @@ <h5 class="card-header">
</tr>
{% for a, b, c in avg %}
<tr {% if loop.index==7 %} class="success" {% endif %}>
<td class="number">
<td class="number rank">
{{ loop.index }}
</td>
<td>
<a href="/people/{{ a }}">{{ b }}</a>
<a href="/people/{{ a }}" class="hover-underline">{{ b }}</a>
</td>
<td class="number">
{{ c | round(2) }}
Expand Down
8 changes: 4 additions & 4 deletions freezing/web/templates/pointless/foodrescue.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ <h5 class="card-header">
</p>
<table class="table table-condensed">
<tr>
<th class="number">
<th class="number rank">
Rank
</th>
<th>
Player
Rider
</th>
<th class="number">
Rescues
Expand All @@ -46,11 +46,11 @@ <h5 class="card-header">
</tr>
{% for a, b, d, e, f in data.tdata %}
<tr>
<td class="number">
<td class="number rank">
{{ f }}
</td>
<td>
<a href="/people/{{ a }}">{{ b }}</a>
<a href="/people/{{ a }}" class="hover-underline">{{ b }}</a>
</td>
<td class="number">
{{ d }}
Expand Down
4 changes: 2 additions & 2 deletions freezing/web/templates/pointless/generic.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ <h5 class="card-header">
<table class="table table-condensed">
<thead>
<tr>
<th class="number">
<th class="number rank">
Rank
</th>
{% for field in fields %}
Expand All @@ -39,7 +39,7 @@ <h5 class="card-header">
<tbody>
{% for row in data %}
<tr>
<td class="number">
<td class="number rank">
{{ row.rank }}
</td>
{% for field in fields %}
Expand Down
14 changes: 7 additions & 7 deletions freezing/web/templates/pointless/hashtag.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,32 +84,32 @@ <h3 class="accordion-header">
<div class="accordion-body py-2 leaderboard-overflow">
<table class="table table-condensed">
<tr>
<th class="number">
<th class="number rank">
Rank
</th>
<th>
Player
Rider
</th>
<th class="number">
{{ data.hashtag }} Rides
Rides
</th>
<th class="number">
{{ data.hashtag }} Distance
Distance
</th>
</tr>
{% for a, b, c, d in data.tdata %}
<tr>
<td class="number">
<td class="number rank">
{{ loop.index }}
</td>
<td>
<a href="/people/{{ a }}">{{ b }}</a>
<a href="/people/{{ a }}" class="hover-underline">{{ b }}</a>
</td>
<td class="number">
{{ c }}
</td>
<td class="number">
{{ d | round(1) }}
{{ d | round(1) }} mi
</td>
</tr>
{% endfor %}
Expand Down
8 changes: 4 additions & 4 deletions freezing/web/templates/pointless/kidsathlon.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ <h5 class="card-header">
</p>
<table class="table table-condensed">
<tr>
<th class="number">
<th class="number rank">
Rank
</th>
<th>
Athlete
Rider
</th>
<th class="number">
Kidical
Expand All @@ -33,8 +33,8 @@ <h5 class="card-header">
</th>
</tr>
{% for a, b, c, d, e in data.tdata %}
<tr {% if a==1873089 %}class="danger"{% endif %}>
<td class="number">
<tr>
<td class="number rank">
{{ loop.index }}
</td>
<td>
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 @@ -25,7 +25,7 @@ <h5 class="card-header">
</p>
<table class="table table-condensed">
<tr>
<th class="number">
<th class="number rank">
Rank
</th>
<th>
Expand All @@ -37,7 +37,7 @@ <h5 class="card-header">
</tr>
{% for a, b in data.tdata %}
<tr>
<td class="number">
<td class="number rank">
{{ loop.index }}
</td>
<td>
Expand Down
Loading

0 comments on commit 6afe834

Please sign in to comment.