Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor sponsor data and introduce small logo sponsors on homepage #740

3 changes: 3 additions & 0 deletions _data/sponsor_logos_l.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
logo,name,url,last_payment,all_time,since,level
sponsors/84.png,84 codes,https://www.84codes.com/,"€22,000","€369,000","Apr 1, 2018",5000
manas-orange.svg,Manas.Tech,https://manas.tech/,"$5,000","$1,300,000","Jun 19, 2009",5000
2 changes: 2 additions & 0 deletions _data/sponsor_logos_s.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
logo,name,url,last_payment,all_time,since,level
sponsors/woa.png,Works on Arm,https://developer.arm.com/solutions/infrastructure/works-on-arm,$500,$0,"Jul 22, 2021",500
2 changes: 2 additions & 0 deletions scripts/merge.cr
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ end
all_sponsors.sort_by! { |s| {-s.last_payment, -s.all_time, s.since, s.name} }

write_csv("sponsors.csv", all_sponsors)
write_csv("sponsor_logos_l.csv", all_sponsors.select { |sponsor| sponsor.last_payment.to_i > 1000 })
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (might) need adjustment once we get the new levels.

straight-shoota marked this conversation as resolved.
Show resolved Hide resolved
write_csv("sponsor_logos_s.csv", all_sponsors.select { |sponsor| sponsor.last_payment.to_i.in?(350...1000) })
straight-shoota marked this conversation as resolved.
Show resolved Hide resolved

def write_csv(filename, sponsors)
open_csv(filename) do |csv|
Expand Down