Skip to content

Commit

Permalink
Year 2024 updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
khustochka committed Jan 2, 2024
1 parent c092d0e commit 0d55ebc
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions app/controllers/lifelist_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions app/views/blog/home.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
7 changes: 7 additions & 0 deletions app/views/images/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
40 changes: 23 additions & 17 deletions app/views/lifelist/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -42,47 +42,53 @@

.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

%h2.h2.top5-list-header
= 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
-#
Expand Down
1 change: 1 addition & 0 deletions config/locales/en/lifelist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
canada: Canada List
usa: USA List
gb: UK List
poland: Poland List

index:
title: The Lists
Expand Down
1 change: 1 addition & 0 deletions config/locales/ru/lifelist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
canada: Список Канады
usa: Список США
gb: Список Великобритании
poland: Список Польши

index:
title: Списки
Expand Down
1 change: 1 addition & 0 deletions config/locales/uk/lifelist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
canada: Список Канади
usa: Список США
gb: Список Великої Британії
poland: Список Польщі

index:
title: Списки
Expand Down
2 changes: 1 addition & 1 deletion lib/quails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require "quails/revision"

module Quails
CURRENT_YEAR = 2023
CURRENT_YEAR = 2024

def self.env
@env ||= Env.new
Expand Down

0 comments on commit 0d55ebc

Please sign in to comment.