From f4ff234b9b8f9a76fc17deff57a66b3fddc2d15a Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Sat, 7 Dec 2024 08:40:37 +0100
Subject: [PATCH] adjust

---
 app/controllers/showcase/websites_controller.rb | 1 +
 app/models/communication/website.rb             | 4 ++++
 app/views/showcase/websites/_list.html.erb      | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/app/controllers/showcase/websites_controller.rb b/app/controllers/showcase/websites_controller.rb
index 0ad75544a..754ff7793 100644
--- a/app/controllers/showcase/websites_controller.rb
+++ b/app/controllers/showcase/websites_controller.rb
@@ -3,6 +3,7 @@ class Showcase::WebsitesController < Showcase::ApplicationController
     @tags = Communication::Website::Showcase::Tag.all.ordered
     @features = Communication::Website::Showcase.features
     @websites = Communication::Website.in_showcase
+                                      .ordered_by_production_date
                                       .page(params[:page])
   end
 
diff --git a/app/models/communication/website.rb b/app/models/communication/website.rb
index 353750f60..646383a73 100644
--- a/app/models/communication/website.rb
+++ b/app/models/communication/website.rb
@@ -117,6 +117,10 @@ class Communication::Website < ApplicationRecord
   scope :for_update, -> (autoupdate, language = nil) { where(autoupdate_theme: autoupdate) }
   scope :with_url, -> { where.not(url: [nil, '']) }
   scope :with_access_token, -> { where.not(access_token: [nil, '']) }
+  scope :ordered_by_production_date, -> {
+    # TODO add in_production_at and use it
+    order(created_at: :desc)
+  }
 
   def to_s
     original_localization.to_s
diff --git a/app/views/showcase/websites/_list.html.erb b/app/views/showcase/websites/_list.html.erb
index 2f53fd5ed..7e6d60904 100644
--- a/app/views/showcase/websites/_list.html.erb
+++ b/app/views/showcase/websites/_list.html.erb
@@ -24,7 +24,7 @@ current_year = nil
           <%= kamifusen_tag website.screenshot, 
                             class: 'img-fluid rounded mb-3' %>
         <% end %>
-        <h3 class="h4">
+        <h3 class="fs-6 mt-3">
           <%= link_to website.original_localization.to_s,
                       showcase_website_path(website),
                       class: 'stretched-link' %>
-- 
GitLab