Skip to content

Commit

Permalink
Merge branch 'design-2024' of github.com:parisrb/paris-rb.org into de…
Browse files Browse the repository at this point in the history
…sign-2024
  • Loading branch information
adrienpoly committed May 4, 2024
2 parents 9a2f7d3 + e5e9b7a commit cbc9500
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 54 deletions.
4 changes: 4 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@ class ApplicationController < ActionController::Base
include Analytics
include Internationalisation
protect_from_forgery with: :exception

def memory_cache
$memory_cache
end
end
9 changes: 9 additions & 0 deletions app/controllers/welcome_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
class WelcomeController < ApplicationController
before_action :set_counters, only: :index

def index
@videos = Video.order("created_at DESC").limit(3)
@sponsors = Sponsor.with_attached_logo.latest(4)
@lineup_talks = Talk.lineup
end

private

def set_counters
@videos_count = $memory_cache.fetch("videos_count", expires_in: 1.day) { Video.count }
@sponsors_count = $memory_cache.fetch("sponsors_count", expires_in: 1.day) { Sponsor.count }
end
end
38 changes: 38 additions & 0 deletions app/views/welcome/_data.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<section id="next-meetup" class="container flex flex-col gap-8">
<div>
<h2 class="text-center text-primary mb-6"><%= t(".title") %></h2>
</div>
<div class="flex flex-wrap justify-evenly gap-8">
<div class="stats shadow w-full sm:w-auto sm:min-w-64">
<div class="stat">
<div class="stat-figure text-accent">
<%= lucide_icon "users" %>
</div>
<div class="stat-title"><%= t(".data_1_title") %></div>
<div class="stat-value text-accent"><%= t(".data_1_value") %></div>
<div class="stat-desc"><%= t(".data_1_desc") %></div>
</div>
</div>

<div class="stats shadow w-full sm:w-auto sm:min-w-64">
<div class="stat">
<div class="stat-figure text-accent">
<%= lucide_icon "video" %>
</div>
<div class="stat-title"><%= t(".data_2_title") %></div>
<div class="stat-value text-accent"><%= videos_count %></div>
<div class="stat-desc"><%= t(".data_2_desc") %></div>
</div>
</div>
<div class="stats shadow w-full sm:w-auto sm:min-w-64">
<div class="stat">
<div class="stat-figure text-accent">
<%= lucide_icon "handshake" %>
</div>
<div class="stat-title"><%= t(".data_3_title") %></div>
<div class="stat-value text-accent"><%= sponsors_count %></div>
<div class="stat-desc"><%= t(".data_3_desc") %></div>
</div>
</div>
</div>
</section>
1 change: 1 addition & 0 deletions app/views/welcome/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,6 @@
</div>
<%= render "latest_videos", videos: @videos %>
<%= render "next_meetup", lineup_talks: @lineup_talks %>
<%= render "data", videos_count: @videos_count, sponsors_count: @sponsors_count %>
<%= render "sponsors", sponsors: @sponsors %>
</div>
1 change: 1 addition & 0 deletions config/initializers/memory_cache.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$memory_cache = ActiveSupport::Cache.lookup_store(:memory_store, { size: 1.megabytes })
28 changes: 1 addition & 27 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,9 @@
en:
or: or
by: by
welcome:
index:
title_html: Paris<span class="text-primary">.rb</span>
subtitle_html: "Bringing together the <highlighed>French-speaking Ruby developers</highlighed> community around the values of sharing, mutual aid, and meetings."
subtitle_2_html: "The Paris.rb meetup takes place <highlighed>on the first Tuesday of each month</highlighed>, a unique opportunity to meet IRL and exchange."
hero_cta: Participate in the next meetup
join_us_on: Join the community on
twitch_html: "Join us on <a href='https://www.twitch.tv/parisrb'>Twitch</a> to follow the talks live !"
suggest_talk: suggest a talk
latest_videos:
title: Latest videos
subtitle: All presentations are filmed, available live on Twitch and replayed on YouTube.
see_all: See all videos
sponsors:
title: Our sponsors
subtitle: Thank you to our latest sponsors for their support.
sponsor_an_event: Would you like to strengthen your visibility in the Ruby community? Sponsor a Paris.rb event!
sponsor_cta: Sponsor
see_all: See all Paris.rb sponsors
next_meetup:
title: Next meetup
subtitle_html: Join us for the next <highlighed>meetup on %{date}</highlighed>.
line_up_description: "The program currently includes the following talks:"
see_past_videos: See videos from previous meetups
no_line_up_html: No talks have been announced for this meetup yet. Don't worry, there are always last-minute proposals! And why not propose yours?
propose_talk: Propose a talk
meetup_information_html: To participate, find all the information (location, terms) of the next meetup on our page
navbar:
coc: Code of conduct
videos: Videos
sponsors: Sponsors
suggest_talk: Suggest a talk
job_board: Job board
27 changes: 0 additions & 27 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,6 @@
fr:
or: ou
by: par
welcome:
index:
title_html: Paris<span class="text-primary">.rb</span>
subtitle_html: "Regroupe la communauté des <highlighed>développeurs et développeuses Ruby</highlighed> francophones autour des valeurs du partage, de l'entraide et des rencontres."
subtitle_2_html: "Le meetup Paris.rb c'est <highlighed>le premier mardi de chaque mois</highlighed>, une occasion unique de se rencontrer IRL et d'échanger."
hero_cta: Participer au prochain meetup
join_us_on: Rejoins la communauté sur
twitch_html: "Rejoins-nous sur <a href='https://www.twitch.tv/parisrb'>Twitch</a> pour suivre les talks en direct !"
suggest_talk: proposer un talk
latest_videos:
title: Derniers talks en vidéo
subtitle: Toutes les présentations sont filmées, disponible en live sur Twitch et en replay sur YouTube.
see_all: Voir toutes les vidéos
sponsors:
title: Nos sponsors
subtitle: Merci à nos derniers sponsors pour leur soutien.
sponsor_an_event: Vous souhaitez renforcer votre visibilité dans la communauté Ruby ? Sponsorisez un événement Paris.rb !
sponsor_cta: Sponsoriser
see_all: Voir tous les sponsors de Paris.rb
next_meetup:
title: Prochain meetup
subtitle_html: Rejoins nous pour le prochain <highlighed>meetup le %{date}</highlighed>.
line_up_description: "Au programme nous avons à ce jour les talks suivants :"
see_past_videos: Voir les videos des meetups précédents
no_line_up_html: Aucun talk n'a encore été annoncé pour ce meetup. Pas d'inquétude, il y a toujours des propositions de dernière minute ! Et pourquoi pas proposer le tiens ?
propose_talk: Proposer un talk
meetup_information_html: Pour participer, retrouve toutes les informations (lieu, modalités) du prochain meetup sur notre page
navbar:
coc: Code de conduite
videos: Vidéos
Expand Down
39 changes: 39 additions & 0 deletions config/locales/views/welcome.en.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
en:
welcome:
data:
data_1_desc: and 700+ on the help channel
data_1_title: Members on Slack
data_1_value: 2172
data_2_desc: all talks are filmed
data_2_title: Videos on YouTube
data_3_desc: thank you to them
data_3_title: Sponsors
data_3_value: 100
title: In numbers
index:
hero_cta: Participate in the next meetup
join_us_on: Join the community on
subtitle_2_html: The Paris.rb meetup takes place <highlighed>on the first Tuesday of each month</highlighed>, a unique opportunity to meet IRL and exchange.
subtitle_html: Bringing together the <highlighed>French-speaking Ruby developers</highlighed> community around the values of sharing, mutual aid, and meetings.
suggest_talk: suggest a talk
title_html: Paris<span class="text-primary">.rb</span>
twitch_html: Join us on <a href='https://www.twitch.tv/parisrb'>Twitch</a> to follow the talks live !
latest_videos:
see_all: See all videos
subtitle: All presentations are filmed, available live on Twitch and replayed on YouTube.
title: Latest videos
next_meetup:
line_up_description: 'The program currently includes the following talks:'
meetup_information_html: To participate, find all the information (location, terms) of the next meetup on our page
no_line_up_html: No talks have been announced for this meetup yet. Don't worry, there are always last-minute proposals! And why not propose yours?
propose_talk: Propose a talk
see_past_videos: See videos from previous meetups
subtitle_html: Join us for the next <highlighed>meetup on %{date}</highlighed>.
title: Next meetup
sponsors:
see_all: See all Paris.rb sponsors
sponsor_an_event: Would you like to strengthen your visibility in the Ruby community? Sponsor a Paris.rb event!
sponsor_cta: Sponsor
subtitle: Thank you to our latest sponsors for their support.
title: Our sponsors
39 changes: 39 additions & 0 deletions config/locales/views/welcome.fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
fr:
welcome:
data:
data_1_desc: et 700+ sur le channel help
data_1_title: Membres sur le Slack
data_1_value: 2172
data_2_desc: tous les talks sont filmés
data_2_title: Videos sur YouTube
data_3_desc: merci à eux
data_3_title: Sponsors
data_3_value: 100
title: Quelques chiffres
index:
hero_cta: Participer au prochain meetup
join_us_on: Rejoins la communauté sur
subtitle_2_html: Le meetup Paris.rb c'est <highlighed>le premier mardi de chaque mois</highlighed>, une occasion unique de se rencontrer IRL et d'échanger.
subtitle_html: Regroupe la communauté des <highlighed>développeurs et développeuses Ruby</highlighed> francophones autour des valeurs du partage, de l'entraide et des rencontres.
suggest_talk: proposer un talk
title_html: Paris<span class="text-primary">.rb</span>
twitch_html: Rejoins-nous sur <a href='https://www.twitch.tv/parisrb'>Twitch</a> pour suivre les talks en direct !
latest_videos:
see_all: Voir toutes les vidéos
subtitle: Toutes les présentations sont filmées, disponible en live sur Twitch et en replay sur YouTube.
title: Derniers talks en vidéo
next_meetup:
line_up_description: 'Au programme nous avons à ce jour les talks suivants :'
meetup_information_html: Pour participer, retrouve toutes les informations (lieu, modalités) du prochain meetup sur notre page
no_line_up_html: Aucun talk n'a encore été annoncé pour ce meetup. Pas d'inquétude, il y a toujours des propositions de dernière minute ! Et pourquoi pas proposer le tiens ?
propose_talk: Proposer un talk
see_past_videos: Voir les videos des meetups précédents
subtitle_html: Rejoins nous pour le prochain <highlighed>meetup le %{date}</highlighed>.
title: Prochain meetup
sponsors:
see_all: Voir tous les sponsors de Paris.rb
sponsor_an_event: Vous souhaitez renforcer votre visibilité dans la communauté Ruby ? Sponsorisez un événement Paris.rb !
sponsor_cta: Sponsoriser
subtitle: Merci à nos derniers sponsors pour leur soutien.
title: Nos sponsors

0 comments on commit cbc9500

Please sign in to comment.