Skip to content

Commit

Permalink
Show today
Browse files Browse the repository at this point in the history
  • Loading branch information
karthikb351 committed May 14, 2024
1 parent 072af7d commit df501b1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 3 additions & 1 deletion _data/aliases.csv
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ bong-bros,the-bong-bros
wellfed-workers,well-fed-workers
snakeoil-salespeople,snake-oil-sales-people
gus-team,team-gus
mango-paneer-tikkas,mango-paneer-tikka
mango-paneer-tikkas,mango-paneer-tikka
quadfecta,trifecta
difecta,trifecta
4 changes: 1 addition & 3 deletions _plugins/standings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ def find_alias_or_slug(site, team_name)
row['duration'] = "#{d/3600.floor}h"
end
minutes = (d/60) % 60
if minutes > 5
row['duration'] += "#{minutes}m"
end
row['duration'] += "#{minutes}m"
site.data['teams'][row['slug']]['results'] << {
'd' => d/60,
'duration' => row['duration'],
Expand Down
5 changes: 2 additions & 3 deletions all-standings.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2 role="heading">Events</h2>
<th>Time</th>
</tr>

{% assign events = site.data.events |where: "future", nil | reverse %}
{% assign events = site.data.events | reverse %}
{% for row in events %}
{% assign attendees = 0 %}

Expand All @@ -30,7 +30,7 @@ <h2 role="heading">Events</h2>
{% assign attendees = attendees | plus: r['Team Size'] %}

{% endfor %}
{% if attendees > 0 %}

<tr>
<td>
<a href='/standings/{{row.date|date:"%Y-%m"}}/' title='Standings for {{row.date|date:"%B %Y"}}'>
Expand All @@ -52,7 +52,6 @@ <h2 role="heading">Events</h2>
{% endif %}
</td>
</tr>
{% endif %}
{% endfor %}

</div>
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h1 role="heading">{{site.title}}</h1>
🏆 All Months Leaderboard
</a>

{% if currentEvent.date>=site.date %}
{% if lastDate==today %}
<a class="button button-default" href='/standings/{{ currentEvent | date: "%Y-%m" }}/' role="button">🏅 Leaderboard {{currentEvent | date:"%B %Y"}}</a><br>
{% endif %}

Expand Down

0 comments on commit df501b1

Please sign in to comment.