diff --git a/README.md b/README.md index f323ac7ff..161613601 100644 --- a/README.md +++ b/README.md @@ -25,4 +25,4 @@ Redis is used in production for caching and by Resque for background jobs ## License -Copyright (c) 2007–2023 Vitalii Khustochka +Copyright (c) 2007–2024 Vitalii Khustochka diff --git a/app/controllers/lifelist_controller.rb b/app/controllers/lifelist_controller.rb index 0b5edefda..3b1ad386c 100644 --- a/app/controllers/lifelist_controller.rb +++ b/app/controllers/lifelist_controller.rb @@ -14,11 +14,10 @@ def index @list_prev_year = Lifelist::FirstSeen.over(year: Quails::CURRENT_YEAR - 1) @list_canada = Lifelist::FirstSeen.over(locus: "canada") - @list_ukraine = Lifelist::FirstSeen.over(locus: "ukraine") - @list_usa = Lifelist::FirstSeen.over(locus: "usa") @list_uk = Lifelist::FirstSeen.over(locus: "united_kingdom") + @list_pl = Lifelist::FirstSeen.over(locus: "poland") end def basic diff --git a/app/views/blog/home.html.haml b/app/views/blog/home.html.haml index b28df3f3c..cd1901eff 100644 --- a/app/views/blog/home.html.haml +++ b/app/views/blog/home.html.haml @@ -22,6 +22,14 @@ .year-summary = render @cell +%h2 + = t("blog.home.#{@cell0.type}") + – + = @cell0.year + +.year-summary + = render @cell0 + - cache [@posts, admin: current_user.admin?, locale: I18n.locale] do %h2= t(".blog") diff --git a/app/views/images/index.html.haml b/app/views/images/index.html.haml index 288f6b13b..fd1e07e6e 100644 --- a/app/views/images/index.html.haml +++ b/app/views/images/index.html.haml @@ -16,6 +16,13 @@ .year-summary = render @cell + %h2 + = t(".#{@cell0.type}") + = @cell0.year + + .year-summary + = render @cell0 + %div.header-with-subheader %h1 = page_header diff --git a/app/views/lifelist/index.html.haml b/app/views/lifelist/index.html.haml index ec3e5b83c..bb9cc4fb6 100644 --- a/app/views/lifelist/index.html.haml +++ b/app/views/lifelist/index.html.haml @@ -42,33 +42,33 @@ .row - -# .col-sm-12.col-md-6.mb-2 - -# - -# %h2.h2.top5-list-header - -# = link_to(t('lifelist.title.yearlist', year: Quails::CURRENT_YEAR - 1), list_path(year: Quails::CURRENT_YEAR - 1)) - -# - -# = render partial: "top5list", object: @list_prev_year - - .col-sm-12.col-md-6.mb-2.order-sm-first + .col-sm-12.col-md-6.mb-2 %h2.h2.top5-list-header - = link_to(t('lifelist.title.canada'), list_path(locus: 'canada')) + = link_to(t('lifelist.title.yearlist', year: Quails::CURRENT_YEAR - 1), list_path(year: Quails::CURRENT_YEAR - 1)) - = render partial: "top5list", object: @list_canada + = render partial: "top5list", object: @list_prev_year - .col-sm-12.col-md-6 + .col-sm-12.col-md-6.mb-2.order-sm-first %h2.h2.top5-list-header - = link_to(t('lifelist.title.ukraine'), list_path(locus: 'ukraine')) + = link_to(t('lifelist.title.canada'), list_path(locus: 'canada')) - = render partial: "top5list", object: @list_ukraine + = render partial: "top5list", object: @list_canada - .row - -# .col-sm-12.col-md-6.mb-2 + -# .col-sm-12.col-md-6 -# -# %h2.h2.top5-list-header -# = link_to(t('lifelist.title.ukraine'), list_path(locus: 'ukraine')) - -# (#{@list_ukraine.total_count}) + -# + -# = render partial: "top5list", object: @list_ukraine + + .row + .col-sm-12.col-md-6.mb-2 + + %h2.h2.top5-list-header + = link_to(t('lifelist.title.ukraine'), list_path(locus: 'ukraine')) + (#{@list_ukraine.total_count}) .col-sm-12.col-md-6.mb-2 @@ -76,13 +76,19 @@ = link_to(t('lifelist.title.usa'), list_path(locus: 'usa')) (#{@list_usa.total_count}) - + .row .col-sm-12.col-md-6.mb-2 %h2.h2.top5-list-header = link_to(t('lifelist.title.gb'), list_path(locus: 'united_kingdom')) (#{@list_uk.total_count}) + .col-sm-12.col-md-6.mb-2 + + %h2.h2.top5-list-header + = link_to(t('lifelist.title.poland'), list_path(locus: 'poland')) + (#{@list_pl.total_count}) + -#%div -# diff --git a/config/locales/en/lifelist.yml b/config/locales/en/lifelist.yml index 230ce1074..401787f4a 100644 --- a/config/locales/en/lifelist.yml +++ b/config/locales/en/lifelist.yml @@ -12,6 +12,7 @@ canada: Canada List usa: USA List gb: UK List + poland: Poland List index: title: The Lists diff --git a/config/locales/ru/lifelist.yml b/config/locales/ru/lifelist.yml index 8fe20bcf2..13225ca18 100644 --- a/config/locales/ru/lifelist.yml +++ b/config/locales/ru/lifelist.yml @@ -12,6 +12,7 @@ canada: Список Канады usa: Список США gb: Список Великобритании + poland: Список Польши index: title: Списки diff --git a/config/locales/uk/lifelist.yml b/config/locales/uk/lifelist.yml index b7b9eb153..e936e1550 100644 --- a/config/locales/uk/lifelist.yml +++ b/config/locales/uk/lifelist.yml @@ -12,6 +12,7 @@ canada: Список Канади usa: Список США gb: Список Великої Британії + poland: Список Польщі index: title: Списки diff --git a/lib/quails.rb b/lib/quails.rb index 5e8e8dfe5..0b83741d5 100644 --- a/lib/quails.rb +++ b/lib/quails.rb @@ -4,7 +4,7 @@ require "quails/revision" module Quails - CURRENT_YEAR = 2023 + CURRENT_YEAR = 2024 def self.env @env ||= Env.new