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

Add sponsors explicitly + misc style improvements #661

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
37 changes: 37 additions & 0 deletions app/components/footer/authors_component.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<p class="px-3">
Rewards by
<%= link_to "Le Wagon",
"https://www.lewagon.com",
target: :_blank,
rel: :noopener,
class: "link-explicit decoration-wagon-red" %>
&
<%= link_to "ShipOnRails",
"https://shiponrails.com",
target: :_blank,
rel: :noopener,
class: "link-explicit decoration-aoc-green" %>
| Made with ♥️ by
<%= link_to "pil0u",
"https://lewagon-alumni.slack.com/team/URZ0F4TEF",
target: :_blank,
rel: :noopener,
class: "text-white font-semibold hover:text-aoc-atmospheric" %>,
<%= link_to "Aquaj",
"https://lewagon-alumni.slack.com/team/U0J5GUEAW",
target: :_blank,
rel: :noopener,
class: "text-white font-semibold hover:text-aoc-atmospheric" %> &
<%= link_to "Joenn",
"https://lewagon-alumni.slack.com/team/U045Z0313UP",
target: :_blank,
rel: :noopener,
class: "text-white font-semibold hover:text-aoc-atmospheric" %>
<%= link_to "https://github.com/pil0u/lewagon-aoc",
target: :_blank,
rel: :noopener,
class: "text-other-green hover:link-external" do %>
<%= inline_svg_tag "icons/github.svg", class: "w-5 h-5 inline-block" %>
<% end %>
</p>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

module Footer
class CopyrightComponent < ApplicationComponent
class AuthorsComponent < ApplicationComponent
end
end
10 changes: 0 additions & 10 deletions app/components/footer/copyright_component.html.erb

This file was deleted.

3 changes: 0 additions & 3 deletions app/components/footer/nav_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<nav class="px-3">

<%= link_to "code of conduct", code_of_conduct_path, class: "link-explicit" %>
<%= link_to "stats", stats_path, class: "link-explicit" %>

Expand All @@ -8,7 +7,5 @@
<% end %>

<%= link_to "ladder of insanity", scores_insanity_path, class: "link-explicit" %>

<%= link_to "squads", scores_squads_path, class: "link-explicit" %>

</nav>
6 changes: 5 additions & 1 deletion app/components/header/title_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
</h1>

<% if current_page?("/") %>
<%= link_to "#aoc on Slack!", Aoc.slack_channel, target: :_blank, rel: :noopener, class: "hidden lg:block absolute top-9 right-9 -rotate-[8deg] text-sm link-slack" %>
<%= link_to "#aoc on Slack!",
Aoc.slack_channel,
target: :_blank,
rel: :noopener,
class: "hidden lg:block absolute top-9 right-9 -rotate-[8deg] text-sm link-slack" %>
<% end %>
</div>
4 changes: 2 additions & 2 deletions app/components/last_data_update_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p class="group">
<span class="group-hover:hidden">Data updated <%= distance_of_time_in_words(@last_update, @now) %> ago</span>
<em class="hidden group-hover:inline">Data update every ~10 minutes</em>
<span class="group-hover:hidden">Last API sync: <%= distance_of_time_in_words(@last_update, @now) %> ago</span>
<em class="hidden group-hover:inline">API sync every ~10 minutes</em>
</p>
4 changes: 2 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="GLOBAL RESPONSIVENESS // lg:text-lg" style="scrollbar-gutter: stable both-edges;">
<html lang="en" class="GLOBAL RESPONSIVENESS // lg:text-lg" style="scrollbar-gutter: stable both-edges;">
<head>
<title>Le Wagon x Advent of Code</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
Expand Down Expand Up @@ -27,7 +27,7 @@
<footer class="flex flex-col gap-y-1 mx-auto mt-auto mb-2 text-sm text-center opacity-60">
<%= render Footer::NavComponent.new(user: current_user) %>
<%= render LastDataUpdateComponent.new %>
<%= render Footer::CopyrightComponent.new %>
<%= render Footer::AuthorsComponent.new %>
</footer>
</body>
</html>
2 changes: 1 addition & 1 deletion app/views/pages/countdown.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="GLOBAL RESPONSIVENESS // lg:text-lg" style="scrollbar-gutter: stable both-edges;">
<html lang="en" class="GLOBAL RESPONSIVENESS // lg:text-lg" style="scrollbar-gutter: stable both-edges;">
<head>
<title>Le Wagon x Advent of Code</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
Expand Down
26 changes: 22 additions & 4 deletions app/views/pages/faq.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -158,19 +158,37 @@

<div class="flex flex-col gap-y-2 text-justify">
<p>
3 exceptional individuals will receive a golden ticket
Three exceptional individuals will receive a golden ticket
<%= inline_svg_tag "icons/golden_ticket.svg", class: "w-6 h-6 inline-block" %>
<ol class="ml-7 list-decimal list-inside">
<li>The greatest influencer of Le Wagon (see <%= link_to "patrons",
patrons_path,
class: "link-explicit link-internal" %>)</li>
<li>Announced soon™</li>
<li>Announced soon™</li>
</ol>
</p>
<p>
Each golden ticket unlocks a reward worth 500€.
</p>
<p>
Each golden ticket unlocks a reward package worth <code class="strong">919€</code>.
More info <%= link_to "on Slack",
Aoc.slack_channel,
target: :_blank,
rel: :noopener,
class: "link-explicit link-slack" %>.
</p>
<p>
These rewards are gifted by
<%= link_to "Le Wagon",
"https://www.lewagon.com/",
target: :_blank,
rel: :noopener,
class: "text-wagon-red link-explicit" %>
and <%= link_to "ShipOnRails",
"https://shiponrails.com/",
target: :_blank,
rel: :noopener,
class: "link-external link-explicit" %>.
</p>
</div>
</details>

Expand Down
7 changes: 5 additions & 2 deletions app/views/pages/patrons.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

<% if @current_user_referees.any? %>
<p>
You already referred <%= pluralize(@current_user_referees.count, "user") %>:
You already have referred <%= pluralize(@current_user_referees.count, "user") %>:
<%= safe_join(@current_user_referees.map do |user|
link_to user.username, profile_path(user.uid), class: "strong hover:text-gold"
end, ", ") %>
Expand All @@ -59,10 +59,13 @@
</thead>

<tbody>
<% @users.each do |user| %>
<% @users.each_with_index do |user, index| %>
<tr class="hover:bg-aoc-gray/10">
<td class="text-center">
<%= link_to user["username"], profile_path(user["uid"]), class: "hover:text-gold" %>
<% if index == 0 %>
<%= inline_svg_tag "icons/golden_ticket.svg", class: "w-6 h-6 inline-block" %>
<% end %>
</td>

<td class="text-center">
Expand Down
4 changes: 2 additions & 2 deletions app/views/pages/setup.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
</div>

<p>
Congratulations, your setup is now complete! Every 10 minutes, our platform syncs with adventofcode.com. Soon, this
page will vanish, replaced by your personal advent calendar ✨
Congratulations, your setup is now complete! Every 10 minutes, our platform syncs with adventofcode.com API. Soon,
this page will vanish, replaced by your personal advent calendar ✨
</p>

<p class="mt-4 italic text-sm opacity-80">
Expand Down
24 changes: 13 additions & 11 deletions app/views/pages/stats.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@
</div>
</div>

<p class="my-4 text-justify">
<span class="text-aoc-gold">Gold</span> indicates users who have completed both parts of a puzzle,
while <span class="text-aoc-silver">silver</span> indicates users who have completed only the first half.
Each <span class="text-aoc-gold">*</span> or <span class="text-aoc-silver">*</span> star represents
up to <span class="strong"><%= @users_per_star %></span> users.
</p>
<% if @silver_stars + @gold_stars > 0 %>
<p class="my-4 text-justify">
<span class="text-aoc-gold">Gold</span> indicates users who have completed both parts of a puzzle,
while <span class="text-aoc-silver">silver</span> indicates users who have completed only the first half.
Each <span class="text-aoc-gold">*</span> or <span class="text-aoc-silver">*</span> star represents
up to <span class="strong"><%= @users_per_star %></span> users.
</p>

<table class="block overflow-x-auto whitespace-nowrap w-full py-2">
<tbody>
<%= render Stats::TreeRowComponent.with_collection(@daily_completers.reverse, users_per_star: @users_per_star) %>
</tbody>
</table>
<table class="block overflow-x-auto whitespace-nowrap w-full py-2">
<tbody>
<%= render Stats::TreeRowComponent.with_collection(@daily_completers.reverse, users_per_star: @users_per_star) %>
</tbody>
</table>
<% end %>