From ba2d13219fa405d179fb3de49ebe2e2695a68168 Mon Sep 17 00:00:00 2001 From: pil0u <8350914+pil0u@users.noreply.github.com> Date: Mon, 4 Nov 2024 23:39:11 +0100 Subject: [PATCH 01/12] Update the FAQ prizes section with the sponsors --- app/views/pages/faq.html.erb | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/app/views/pages/faq.html.erb b/app/views/pages/faq.html.erb index 4df57f15..1cdce355 100644 --- a/app/views/pages/faq.html.erb +++ b/app/views/pages/faq.html.erb @@ -158,19 +158,37 @@

- 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" %> +

    +
  1. The greatest influencer of Le Wagon (see <%= link_to "patrons", + patrons_path, + class: "link-explicit link-internal" %>)
  2. +
  3. Announced soon™
  4. +
  5. Announced soon™
  6. +

- Each golden ticket unlocks a reward worth 500€. -

-

+ Each golden ticket unlocks a reward package worth 919€. More info <%= link_to "on Slack", Aoc.slack_channel, target: :_blank, rel: :noopener, class: "link-explicit link-slack" %>.

+

+ These rewards are funded 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-explicit link-external" %>. +

From 3d2e347e5245ad65eaf6508491e4e8f89382fffc Mon Sep 17 00:00:00 2001 From: pil0u <8350914+pil0u@users.noreply.github.com> Date: Mon, 4 Nov 2024 23:43:42 +0100 Subject: [PATCH 02/12] Add the golden ticket next to the first user of the patrons page --- app/views/pages/patrons.html.erb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/pages/patrons.html.erb b/app/views/pages/patrons.html.erb index 6ac4ceac..7a9647ec 100644 --- a/app/views/pages/patrons.html.erb +++ b/app/views/pages/patrons.html.erb @@ -59,10 +59,13 @@ - <% @users.each do |user| %> + <% @users.each_with_index do |user, index| %> <%= 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 %> From c9a8e532acdedb21ceca681abb5f81c89a3683a3 Mon Sep 17 00:00:00 2001 From: pil0u <8350914+pil0u@users.noreply.github.com> Date: Mon, 4 Nov 2024 23:59:34 +0100 Subject: [PATCH 03/12] Wording --- app/views/pages/patrons.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/pages/patrons.html.erb b/app/views/pages/patrons.html.erb index 7a9647ec..aee53b6e 100644 --- a/app/views/pages/patrons.html.erb +++ b/app/views/pages/patrons.html.erb @@ -42,7 +42,7 @@ <% if @current_user_referees.any? %>

- 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, ", ") %> From ef8a42cc6bd1c637095580f3ef5adff2542f1d5f Mon Sep 17 00:00:00 2001 From: pil0u <8350914+pil0u@users.noreply.github.com> Date: Tue, 5 Nov 2024 00:00:49 +0100 Subject: [PATCH 04/12] Alignment --- app/components/header/title_component.html.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/components/header/title_component.html.erb b/app/components/header/title_component.html.erb index d9d4a855..20bd031a 100644 --- a/app/components/header/title_component.html.erb +++ b/app/components/header/title_component.html.erb @@ -8,6 +8,10 @@ <% 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 %> From 59c71a4087bf90dda7af7789827d0f95c67d16c9 Mon Sep 17 00:00:00 2001 From: pil0u <8350914+pil0u@users.noreply.github.com> Date: Tue, 5 Nov 2024 00:05:52 +0100 Subject: [PATCH 05/12] Add the lang property to the HTML tag --- app/views/layouts/application.html.erb | 2 +- app/views/pages/countdown.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 3ff328d6..63e718b3 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,5 +1,5 @@ - + Le Wagon x Advent of Code diff --git a/app/views/pages/countdown.html.erb b/app/views/pages/countdown.html.erb index 3ad3f7bf..33807aa6 100644 --- a/app/views/pages/countdown.html.erb +++ b/app/views/pages/countdown.html.erb @@ -1,5 +1,5 @@ - + Le Wagon x Advent of Code From 0e4b494b478a63c6c91f973e07fce6e31b5be683 Mon Sep 17 00:00:00 2001 From: pil0u <8350914+pil0u@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:31:08 +0100 Subject: [PATCH 06/12] Hide tree of stars if event has not started --- app/views/pages/stats.html.erb | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/app/views/pages/stats.html.erb b/app/views/pages/stats.html.erb index c9ee11fc..1574758a 100644 --- a/app/views/pages/stats.html.erb +++ b/app/views/pages/stats.html.erb @@ -17,15 +17,17 @@ -

- Gold indicates users who have completed both parts of a puzzle, - while silver indicates users who have completed only the first half. - Each * or * star represents - up to <%= @users_per_star %> users. -

+<% if @silver_stars + @gold_stars > 0 %> +

+ Gold indicates users who have completed both parts of a puzzle, + while silver indicates users who have completed only the first half. + Each * or * star represents + up to <%= @users_per_star %> users. +

- - - <%= render Stats::TreeRowComponent.with_collection(@daily_completers.reverse, users_per_star: @users_per_star) %> - -
+ + + <%= render Stats::TreeRowComponent.with_collection(@daily_completers.reverse, users_per_star: @users_per_star) %> + +
+<% end %> From 0f7e01eb7b24e0eb0bc588bf1c335c93991bb2cb Mon Sep 17 00:00:00 2001 From: pil0u <8350914+pil0u@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:41:13 +0100 Subject: [PATCH 07/12] Reword 'data update' to 'API sync' --- app/components/last_data_update_component.html.erb | 4 ++-- app/views/pages/setup.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/components/last_data_update_component.html.erb b/app/components/last_data_update_component.html.erb index adf98cf6..7fcad977 100644 --- a/app/components/last_data_update_component.html.erb +++ b/app/components/last_data_update_component.html.erb @@ -1,4 +1,4 @@

- Data updated <%= distance_of_time_in_words(@last_update, @now) %> ago - + Last API sync: <%= distance_of_time_in_words(@last_update, @now) %> ago +

diff --git a/app/views/pages/setup.html.erb b/app/views/pages/setup.html.erb index 4b7ebd48..8f05a90a 100644 --- a/app/views/pages/setup.html.erb +++ b/app/views/pages/setup.html.erb @@ -123,8 +123,8 @@

- 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 ✨

From d7768f5eff42e4767acc3853555755f7ec98cdae Mon Sep 17 00:00:00 2001 From: pil0u <8350914+pil0u@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:43:12 +0100 Subject: [PATCH 08/12] Rename CopyrightComponent to AuthorsComponent --- ...{copyright_component.html.erb => authors_component.html.erb} | 0 .../footer/{copyright_component.rb => authors_component.rb} | 2 +- app/views/layouts/application.html.erb | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename app/components/footer/{copyright_component.html.erb => authors_component.html.erb} (100%) rename app/components/footer/{copyright_component.rb => authors_component.rb} (52%) diff --git a/app/components/footer/copyright_component.html.erb b/app/components/footer/authors_component.html.erb similarity index 100% rename from app/components/footer/copyright_component.html.erb rename to app/components/footer/authors_component.html.erb diff --git a/app/components/footer/copyright_component.rb b/app/components/footer/authors_component.rb similarity index 52% rename from app/components/footer/copyright_component.rb rename to app/components/footer/authors_component.rb index 73385e65..acc5a5fa 100644 --- a/app/components/footer/copyright_component.rb +++ b/app/components/footer/authors_component.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module Footer - class CopyrightComponent < ApplicationComponent + class AuthorsComponent < ApplicationComponent end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 63e718b3..5647a35f 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -27,7 +27,7 @@

From 2bde8f80176eb128e98f392c804bb03ae7bd6ad4 Mon Sep 17 00:00:00 2001 From: pil0u <8350914+pil0u@users.noreply.github.com> Date: Tue, 5 Nov 2024 23:13:37 +0100 Subject: [PATCH 09/12] Rewording --- app/views/pages/faq.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/pages/faq.html.erb b/app/views/pages/faq.html.erb index 1cdce355..3941863b 100644 --- a/app/views/pages/faq.html.erb +++ b/app/views/pages/faq.html.erb @@ -177,7 +177,7 @@ class: "link-explicit link-slack" %>.

- These rewards are funded by + These rewards are gifted by <%= link_to "Le Wagon", "https://www.lewagon.com/", target: :_blank, @@ -187,7 +187,7 @@ "https://shiponrails.com/", target: :_blank, rel: :noopener, - class: "link-explicit link-external" %>. + class: "link-external link-explicit" %>.

From d99dc4059b51d06c01e44809358e8229b33a7d8d Mon Sep 17 00:00:00 2001 From: pil0u <8350914+pil0u@users.noreply.github.com> Date: Tue, 5 Nov 2024 23:13:56 +0100 Subject: [PATCH 10/12] Add sponsors in the footer --- app/components/footer/sponsors_component.html.erb | 14 ++++++++++++++ app/components/footer/sponsors_component.rb | 6 ++++++ app/views/layouts/application.html.erb | 9 ++++++--- 3 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 app/components/footer/sponsors_component.html.erb create mode 100644 app/components/footer/sponsors_component.rb diff --git a/app/components/footer/sponsors_component.html.erb b/app/components/footer/sponsors_component.html.erb new file mode 100644 index 00000000..127a9c40 --- /dev/null +++ b/app/components/footer/sponsors_component.html.erb @@ -0,0 +1,14 @@ +

+ Rewards gifted 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" %> +

diff --git a/app/components/footer/sponsors_component.rb b/app/components/footer/sponsors_component.rb new file mode 100644 index 00000000..1a585640 --- /dev/null +++ b/app/components/footer/sponsors_component.rb @@ -0,0 +1,6 @@ +# frozen_string_literal: true + +module Footer + class SponsorsComponent < ApplicationComponent + end +end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 5647a35f..2f1e9be4 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -24,9 +24,12 @@ <%= yield %> -