Skip to content

Commit 1134541

Browse files
committedJul 5, 2020
Add 2020 page to header and add 2020 banners
1 parent 64dec4c commit 1134541

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed
 

‎_data/banners.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
2020:
3+
- Haymarket Safety Award
24
2019:
35
- Oxon Hill District Event Winner
46
- Oxon Hill Innovation in Control

‎_includes/banners.html

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
<ul class="banners">
2-
{% for banner in site.data.banners[include.year] %}
3-
<li><img src="/images/first.svg">{{ include.year }}<br> {{ banner }}</li>
4-
{% endfor %}
5-
</ul>
1+
{% if site.data.banners[include.year] %}
2+
<ul class="banners">
3+
{% for banner in site.data.banners[include.year] %}
4+
<li><img src="/images/first.svg">{{ include.year }}<br> {{ banner }}</li>
5+
{% endfor %}
6+
</ul>
7+
{% endif %}

‎_includes/header.html

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ <h3><a href="/">FRC Team 1418 - George Mason High School</a></h3>
2121
<li><a href="/">Home</a></li>
2222
<li><a href="/robots">Robots</a>
2323
<ul>
24+
<li><a href="/robot/2020">2020</a></li>
2425
<li><a href="/robot/2019">2019</a></li>
2526
<li><a href="/robot/2018">2018</a></li>
2627
<li><a href="/robot/2017">2017</a></li>

‎banner-locator.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require 'tbarb'
22
require 'yaml'
3+
require 'date'
34

45
TEAM = 1418
56
tba = TBA.new('AykWePEZPKTjZxW6y7MbiTEpTfUlWrszcX5QBpIDUEZPBCJydltvhfd88MsBXxdS')
@@ -26,4 +27,4 @@
2627
award_map[year] = award_list
2728
year -= 1
2829
end
29-
File.open("_data/banners.yml", "w") { |file| file.write(award_map.to_yaml)}
30+
File.open("_data/banners.yml", "w") { |file| file.write(award_map.to_yaml)}

‎index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<h1 id="welcome">Welcome!</h1>
2525
<!-- TODO: Replace this tagline with something less narcissistic -->
2626
<h3>Striving for student enrichment, technical advancement, and success in the FIRST Robotics Competition.</h3>
27-
<a href="/robot/2019" class="button">View our 2019 Robot</a>
27+
<a href="/robot/2020" class="button">View our 2020 Robot</a>
2828
</div>
2929
<main>
3030
<div>

0 commit comments

Comments
 (0)
Please sign in to comment.