diff --git a/app/controllers/showcase/websites_controller.rb b/app/controllers/showcase/websites_controller.rb index 0ad75544a6c620b02a8a142888e7da46433b782f..754ff7793400eadc9f59f3347dd0fac09cf5125b 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 353750f604c1af587e46e856752e5e094f775fdd..646383a73b11fcb399b8dbeaf2dfcdf51e37b438 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 2f53fd5edca7f7b6c2c273f02795955c8f15f46c..7e6d609044c684758028544e79b940aace38d2af 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' %>