From b92958a59d0545a78e8ae8f72f4918677ab06372 Mon Sep 17 00:00:00 2001 From: Bogdanov Anton Date: Sun, 25 Feb 2024 22:49:47 +0300 Subject: [PATCH] pages redesign --- app/assets/images/icons/close.svg | 4 + .../stylesheets/application.tailwind.css | 29 ++- .../admin/banned_emails_controller.rb | 2 +- app/controllers/admin/base_controller.rb | 17 ++ app/controllers/admin/feedbacks_controller.rb | 2 +- app/controllers/admin/leagues_controller.rb | 2 +- app/controllers/admin/players_controller.rb | 2 +- .../seasons/games/statistics_controller.rb | 2 +- .../admin/seasons/games_controller.rb | 2 +- .../admin/seasons/injuries_controller.rb | 2 +- .../admin/seasons/teams_controller.rb | 2 +- .../admin/seasons/teams_players_controller.rb | 2 +- app/controllers/admin/seasons_controller.rb | 2 +- app/controllers/admin/users_controller.rb | 2 +- app/controllers/admin/weeks_controller.rb | 2 +- app/controllers/admin/welcome_controller.rb | 2 +- app/controllers/admin_controller.rb | 15 -- app/controllers/application_controller.rb | 1 + app/javascript/application.jsx | 14 ++ app/javascript/components/Squad/Squad.jsx | 4 +- .../components/Transfers/Transfers.jsx | 218 +++++++++--------- app/javascript/components/Week/Week.jsx | 2 +- app/javascript/components/atoms/Modal.jsx | 2 +- .../page_wrappers/guest_component.html.erb | 26 ++- .../page_wrappers/page_component.html.erb | 85 +++++-- .../page_wrappers/page_component.rb | 8 + .../show/fantasy_team_link_component.html.erb | 2 +- .../views/shared/statistic_component.erb | 110 ++++----- .../controllers/fantasy_leagues/show.html.erb | 92 ++++---- .../fantasy_teams/points/index.html.erb | 38 +-- .../controllers/fantasy_teams/show.html.erb | 4 +- .../fantasy_teams/status/index.html.erb | 4 +- .../profile/achievements/index.html.erb | 6 +- app/views/controllers/profiles/show.html.erb | 74 +++--- app/views/controllers/rules/index.html.erb | 124 +++++----- app/views/controllers/shared/_header.html.erb | 23 -- .../confirmations/failed_complete.html.erb | 6 +- .../controllers/users/recovery/new.html.erb | 2 +- .../users/registrations/confirm.html.erb | 6 +- .../users/registrations/new.html.erb | 8 +- .../controllers/users/restore/new.html.erb | 2 +- .../controllers/users/sessions/new.html.erb | 2 +- app/views/controllers/welcome/index.html.erb | 2 +- .../controllers/welcome/privacy.html.erb | 2 +- app/views/layouts/application.html.erb | 4 +- config/locales/en.yml | 6 +- config/locales/ru.yml | 6 +- config/tailwind.config.js | 11 + 48 files changed, 551 insertions(+), 434 deletions(-) create mode 100644 app/assets/images/icons/close.svg create mode 100644 app/controllers/admin/base_controller.rb delete mode 100644 app/controllers/admin_controller.rb delete mode 100644 app/views/controllers/shared/_header.html.erb diff --git a/app/assets/images/icons/close.svg b/app/assets/images/icons/close.svg new file mode 100644 index 00000000..a1e76621 --- /dev/null +++ b/app/assets/images/icons/close.svg @@ -0,0 +1,4 @@ + + + + diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index b4989c74..05e499aa 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -29,7 +29,7 @@ } .btn-primary { - @apply btn bg-amber-200 border border-amber-300 hover:bg-amber-300 text-stone-700; + @apply btn bg-goldeen-support border border-goldeen-supportMiddle text-stone-700; } .btn-info { @@ -46,26 +46,22 @@ .btn-transfer { @apply flex justify-center items-center text-stone-700 cursor-pointer rounded; - @apply bg-amber-200 hover:bg-amber-300 border border-amber-300; + @apply bg-goldeen-support border border-goldeen-supportMiddle; width: 26px; height: 26px; } .user-navigation-link { - @apply flex flex-row items-center p-2 pl-4 text-white; - } - - .user-navigation-link img { - @apply w-8 h-8 mr-2; + @apply flex flex-row items-center p-2 border-b-2 border-transparent; } .user-navigation-link:hover { - @apply bg-amber-200 text-stone-700; + @apply text-stone-700 border-goldeen-gray; } .user-navigation-link.active { - @apply bg-amber-300 shadow text-stone-700; + @apply text-stone-700 border-goldeen-supportMiddle; } .form-field { @@ -349,7 +345,7 @@ } .badge-danger { - @apply badge bg-orange-700 border border-orange-800 text-white; + @apply badge bg-goldeen-supportDark border border-orange-800 text-white; } .badge-small { @@ -432,6 +428,17 @@ } .navigation-menu:not(.hidden) { - @apply absolute w-full z-10 bg-stone-700 top-14; + @apply fixed left-0 top-0 bottom-0 w-full z-10; + } + + .navigation-menu-background { + @apply absolute left-0 top-0 bottom-0 w-full; + + background: #000; + opacity: .5; + } + + .navigation-menu-content { + @apply absolute left-0 top-0 bottom-0 bg-goldeen-dark w-full sm:w-80; } } diff --git a/app/controllers/admin/banned_emails_controller.rb b/app/controllers/admin/banned_emails_controller.rb index 34689922..986aed29 100644 --- a/app/controllers/admin/banned_emails_controller.rb +++ b/app/controllers/admin/banned_emails_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Admin - class BannedEmailsController < AdminController + class BannedEmailsController < Admin::BaseController include Deps[ create_form: 'forms.banned_emails.create', update_service: 'services.persisters.users.update' diff --git a/app/controllers/admin/base_controller.rb b/app/controllers/admin/base_controller.rb new file mode 100644 index 00000000..43aca0dd --- /dev/null +++ b/app/controllers/admin/base_controller.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Admin + class BaseController < ApplicationController + before_action :authorize_admin + + layout 'admin' + + private + + def authorize_admin + return if Current.user.admin? + + redirect_to home_path, alert: t('controllers.admin.permission') + end + end +end diff --git a/app/controllers/admin/feedbacks_controller.rb b/app/controllers/admin/feedbacks_controller.rb index 6ef35d8e..c3061fad 100644 --- a/app/controllers/admin/feedbacks_controller.rb +++ b/app/controllers/admin/feedbacks_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Admin - class FeedbacksController < AdminController + class FeedbacksController < Admin::BaseController before_action :find_feedbacks, only: %i[index] def index; end diff --git a/app/controllers/admin/leagues_controller.rb b/app/controllers/admin/leagues_controller.rb index 36525d74..785da76a 100644 --- a/app/controllers/admin/leagues_controller.rb +++ b/app/controllers/admin/leagues_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Admin - class LeaguesController < AdminController + class LeaguesController < Admin::BaseController include Deps[create_form: 'forms.leagues.create'] before_action :find_leagues, only: %i[index] diff --git a/app/controllers/admin/players_controller.rb b/app/controllers/admin/players_controller.rb index b033865b..d25e7c41 100644 --- a/app/controllers/admin/players_controller.rb +++ b/app/controllers/admin/players_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Admin - class PlayersController < AdminController + class PlayersController < Admin::BaseController include Deps[ create_form: 'forms.players.create', update_form: 'forms.players.update', diff --git a/app/controllers/admin/seasons/games/statistics_controller.rb b/app/controllers/admin/seasons/games/statistics_controller.rb index d4754c9b..c0ff84f7 100644 --- a/app/controllers/admin/seasons/games/statistics_controller.rb +++ b/app/controllers/admin/seasons/games/statistics_controller.rb @@ -3,7 +3,7 @@ module Admin module Seasons module Games - class StatisticsController < AdminController + class StatisticsController < Admin::BaseController before_action :find_game def index diff --git a/app/controllers/admin/seasons/games_controller.rb b/app/controllers/admin/seasons/games_controller.rb index 875433ef..8a591d0f 100644 --- a/app/controllers/admin/seasons/games_controller.rb +++ b/app/controllers/admin/seasons/games_controller.rb @@ -2,7 +2,7 @@ module Admin module Seasons - class GamesController < AdminController + class GamesController < Admin::BaseController include Deps[ create_form: 'forms.games.create', update_form: 'forms.games.update' diff --git a/app/controllers/admin/seasons/injuries_controller.rb b/app/controllers/admin/seasons/injuries_controller.rb index 57d27e72..267f1d5f 100644 --- a/app/controllers/admin/seasons/injuries_controller.rb +++ b/app/controllers/admin/seasons/injuries_controller.rb @@ -2,7 +2,7 @@ module Admin module Seasons - class InjuriesController < AdminController + class InjuriesController < Admin::BaseController include Deps[ create_form: 'forms.injuries.create', update_form: 'forms.injuries.update' diff --git a/app/controllers/admin/seasons/teams_controller.rb b/app/controllers/admin/seasons/teams_controller.rb index 68cbcffb..bfc09aa3 100644 --- a/app/controllers/admin/seasons/teams_controller.rb +++ b/app/controllers/admin/seasons/teams_controller.rb @@ -2,7 +2,7 @@ module Admin module Seasons - class TeamsController < AdminController + class TeamsController < Admin::BaseController before_action :find_season, only: %i[index show] before_action :find_seasons_teams, only: %i[index] before_action :find_seasons_team, only: %i[show] diff --git a/app/controllers/admin/seasons/teams_players_controller.rb b/app/controllers/admin/seasons/teams_players_controller.rb index 6e26e817..326f5ada 100644 --- a/app/controllers/admin/seasons/teams_players_controller.rb +++ b/app/controllers/admin/seasons/teams_players_controller.rb @@ -2,7 +2,7 @@ module Admin module Seasons - class TeamsPlayersController < AdminController + class TeamsPlayersController < Admin::BaseController include Deps[ create_form: 'forms.teams.players.create', update_form: 'forms.teams.players.update' diff --git a/app/controllers/admin/seasons_controller.rb b/app/controllers/admin/seasons_controller.rb index 3b0def78..2086d4d0 100644 --- a/app/controllers/admin/seasons_controller.rb +++ b/app/controllers/admin/seasons_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Admin - class SeasonsController < AdminController + class SeasonsController < Admin::BaseController include Deps[ create_form: 'forms.seasons.create', to_bool: 'to_bool' diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index df1c0e09..6e41fbe5 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Admin - class UsersController < AdminController + class UsersController < Admin::BaseController before_action :find_users, only: %i[index] def index; end diff --git a/app/controllers/admin/weeks_controller.rb b/app/controllers/admin/weeks_controller.rb index 4b847e79..efd4d14a 100644 --- a/app/controllers/admin/weeks_controller.rb +++ b/app/controllers/admin/weeks_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Admin - class WeeksController < AdminController + class WeeksController < Admin::BaseController include Deps[update_form: 'forms.weeks.update'] before_action :find_weeks, only: %i[index] diff --git a/app/controllers/admin/welcome_controller.rb b/app/controllers/admin/welcome_controller.rb index ea492a84..6053cd88 100644 --- a/app/controllers/admin/welcome_controller.rb +++ b/app/controllers/admin/welcome_controller.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true module Admin - class WelcomeController < AdminController + class WelcomeController < Admin::BaseController def index; end end end diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb deleted file mode 100644 index 0f240348..00000000 --- a/app/controllers/admin_controller.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -class AdminController < ApplicationController - before_action :authorize_admin - - layout 'admin' - - private - - def authorize_admin - return if Current.user.admin? - - redirect_to home_path, alert: t('controllers.admin.permission') - end -end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 571c92c0..8e971ccb 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -11,6 +11,7 @@ class ApplicationController < ActionController::Base include Parameterable include Watchable + # TODO: remember to skip redundant before actions in Api::Frontend::BaseController, Admin::BaseController before_action :authenticate, except: %i[page_not_found] before_action :check_email_confirmation, except: %i[page_not_found] before_action :check_email_ban, except: %i[page_not_found] diff --git a/app/javascript/application.jsx b/app/javascript/application.jsx index cfd0ca61..bb41c8a6 100644 --- a/app/javascript/application.jsx +++ b/app/javascript/application.jsx @@ -59,6 +59,20 @@ document.addEventListener('DOMContentLoaded', () => { }); }; + const mobileMenuCloseButton = document.querySelector('#navigation-menu-close-button'); + if (mobileMenuCloseButton) { + mobileMenuCloseButton.addEventListener('click', () => { + document.querySelector('.navigation-menu').classList.toggle('hidden'); + }); + }; + + const mobileMenuBackground = document.querySelector('.navigation-menu-background'); + if (mobileMenuBackground) { + mobileMenuBackground.addEventListener('click', () => { + document.querySelector('.navigation-menu').classList.toggle('hidden'); + }); + }; + // Clicking outside of an open dropdown menu closes it window.addEventListener('click', function (e) { if (!e.target.matches('.dropdown-toggle')) { diff --git a/app/javascript/components/Squad/Squad.jsx b/app/javascript/components/Squad/Squad.jsx index 36ebc0d7..e2bc47ea 100644 --- a/app/javascript/components/Squad/Squad.jsx +++ b/app/javascript/components/Squad/Squad.jsx @@ -393,13 +393,13 @@ export const Squad = ({

setPageState({ ...pageState, viewMode: 'field' })} > {strings.squadPoints.fieldView}

setPageState({ ...pageState, viewMode: 'list' })} > {strings.squadPoints.listView} diff --git a/app/javascript/components/Transfers/Transfers.jsx b/app/javascript/components/Transfers/Transfers.jsx index a2aeddb1..a52ab621 100644 --- a/app/javascript/components/Transfers/Transfers.jsx +++ b/app/javascript/components/Transfers/Transfers.jsx @@ -463,8 +463,8 @@ export const Transfers = ({ }; return ( -

-
+
+
{strings.formatString(strings.transfers.week, { number: weekPosition })} @@ -512,13 +512,13 @@ export const Transfers = ({

setPageState({ ...pageState, viewMode: 'field' })} > {strings.squadPoints.fieldView}

setPageState({ ...pageState, viewMode: 'list' })} > {strings.squadPoints.listView} @@ -617,120 +617,122 @@ export const Transfers = ({ ) : null}

{pageState.visibleMode === 'all' || pageState.visibleMode === 'seasonPlayers' ? ( -
- {pageState.visibleMode === 'seasonPlayers' ? ( - setPageState({ ...pageState, visibleMode: 'lineup' })} - > - {strings.transfers.showLineup} - - ) : null} -
- { - result[key] = localizeValue(values.name); - return result; - }, - { all: strings.transfers.allPlayers }, - )} - onSelect={(value) => setFilterState({ ...filterState, position: value, page: 0 })} - selectedValue={filterState.position} - /> - { - result[key] = localizeValue(values.name); - return result; - }, - { all: strings.transfers.allTeams }, - )} - onSelect={(value) => setFilterState({ ...filterState, team: value, page: 0 })} - selectedValue={filterState.team} - /> - setFilterState({ ...filterState, sortBy: value, page: 0 })} - selectedValue={filterState.sortBy} - /> -
- - setFilterState({ ...filterState, search: e.target.value, page: 0 })} +
+
+ {pageState.visibleMode === 'seasonPlayers' ? ( + setPageState({ ...pageState, visibleMode: 'lineup' })} + > + {strings.transfers.showLineup} + + ) : null} +
+ { + result[key] = localizeValue(values.name); + return result; + }, + { all: strings.transfers.allPlayers }, + )} + onSelect={(value) => setFilterState({ ...filterState, position: value, page: 0 })} + selectedValue={filterState.position} /> -
-
- setFilterState({ ...filterState, onlyWatched: !filterState.onlyWatched })} + { + result[key] = localizeValue(values.name); + return result; + }, + { all: strings.transfers.allTeams }, + )} + onSelect={(value) => setFilterState({ ...filterState, team: value, page: 0 })} + selectedValue={filterState.team} /> + setFilterState({ ...filterState, sortBy: value, page: 0 })} + selectedValue={filterState.sortBy} + /> +
+ + setFilterState({ ...filterState, search: e.target.value, page: 0 })} + /> +
+
+ setFilterState({ ...filterState, onlyWatched: !filterState.onlyWatched })} + /> +
-
-
-
-
- {filterState.sortBy === 'price' ? strings.transfers.points : strings.transfers.price} -
-
- {renderShortSortBy()} +
+
+
+ {filterState.sortBy === 'price' ? strings.transfers.points : strings.transfers.price} +
+
+ {renderShortSortBy()} +
+
-
-
- {filteredSlicedPlayers.map((item) => ( -
+ {filteredSlicedPlayers.map((item) => (
setPlayerUuid(item.uuid)} + className={`flex flex-row items-center px-1 py-1 border-b border-stone-200 ${isExistingTeamMember(item) ? 'bg-stone-100' : ''}`} + key={item.uuid} > - ? +
setPlayerUuid(item.uuid)} + > + ? +
+
+ + {localizeValue(item.player.shirt_name)} + + {false ? ( + {pageState.teamNames[item.team.uuid]?.short_name} + ) : null} + + {localizeValue(sportPositions[item.player.position_kind].short_name)} + +
+
+ {filterState.sortBy === 'price' ? item.points : item.team.price} +
+
+ {sortValue(item)} +
+ {renderChangeButton(item)}
-
- - {localizeValue(item.player.shirt_name)} + ))} + {pageState.seasonPlayers.length > PER_PAGE && ( +
+ + - - {false ? ( - {pageState.teamNames[item.team.uuid]?.short_name} - ) : null} - - {localizeValue(sportPositions[item.player.position_kind].short_name)} + {`${filterState.page + 1} of ${lastPageIndex}`} + + +
-
- {filterState.sortBy === 'price' ? item.points : item.team.price} -
-
- {sortValue(item)} -
- {renderChangeButton(item)} -
- ))} - {pageState.seasonPlayers.length > PER_PAGE && ( -
- - - - - {`${filterState.page + 1} of ${lastPageIndex}`} - - + - -
- )} + )} +
) : null} { ) : null}
-
+
{Object.entries(pageState.games).map(([key, games]) => (
{
-
+
X
{children} diff --git a/app/views/components/page_wrappers/guest_component.html.erb b/app/views/components/page_wrappers/guest_component.html.erb index 3c14462a..1f928f70 100644 --- a/app/views/components/page_wrappers/guest_component.html.erb +++ b/app/views/components/page_wrappers/guest_component.html.erb @@ -1,6 +1,28 @@
- <%= render 'shared/header' %> -
+
+
+ <%= link_to root_path, class: 'text-2xl font-normal tracking-tighter' do %> + FantasySports + <% end %> +
+
+ <% I18n.available_locales.each do |locale| %> + <%= link_to locale, change_locale(locale), aria: { label: t('components.page_wrappers.users_component.change_locale') } %> + <% end %> + <% if Current.user %> + <%= link_to t('views.welcome.home'), home_path %> + <%= link_to t('views.welcome.privacy'), privacy_path, data: { 'test-id' => 'logged-privacy-link' } %> + <%= link_to t('components.page_wrappers.page_component.logout'), users_logout_path %> + <% else %> +
+ <%= link_to t('views.welcome.privacy'), privacy_path, class: 'mr-4', data: { 'test-id' => 'guest-privacy-link' } %> + <%= link_to t('components.page_wrappers.users_component.login'), users_login_path, class: 'mr-4' %> + <%= link_to t('components.page_wrappers.users_component.sign_up'), users_sign_up_path %> +
+ <% end %> +
+
+
<%= content %>
diff --git a/app/views/components/page_wrappers/page_component.html.erb b/app/views/components/page_wrappers/page_component.html.erb index 3c7d9b86..1732246f 100644 --- a/app/views/components/page_wrappers/page_component.html.erb +++ b/app/views/components/page_wrappers/page_component.html.erb @@ -1,33 +1,38 @@ -
+
+
+
+
+ <%= link_to t('components.views.shared.fantasy_team_navigation_component.leagues_center'), home_path, class: 'text-xl text-white p-4' %> + <% if global_user_fantasy_teams.any? %> +
+

<%= t('components.views.shared.fantasy_team_navigation_component.existing_teams') %>

+
+ <% global_user_fantasy_teams.each do |user_fantasy_team| %> +
+ <%= link_to fantasy_team_points_path(user_fantasy_team[:uuid]), class: 'flex items-center p-4' do %> + <%= image_tag "icons/#{user_fantasy_team[:leagues_sport_kind]}.svg", class: 'w-8 h-8 mr-2' %> + <%= user_fantasy_team[:name] %> + <% end %> + <% if user_fantasy_team[:uuid] == @fantasy_team&.uuid %> +
+ <%= link_to t('components.views.shared.fantasy_team_navigation_component.points'), fantasy_team_points_path(@fantasy_team.uuid), class: "pl-8 py-1 text-white #{'active' if current_page?(fantasy_team_points_path(@fantasy_team.uuid))}" %> + <% if @fantasy_team.user_id == Current.user.id %> + <%= link_to t('components.views.shared.fantasy_team_navigation_component.team'), fantasy_team_path(@fantasy_team.uuid), class: "pl-8 py-1 text-white #{'active' if current_page?(fantasy_team_path(@fantasy_team.uuid))}" %> + <%= link_to t('components.views.shared.fantasy_team_navigation_component.transfers'), fantasy_team_transfers_path(@fantasy_team.uuid), class: "pl-8 py-1 text-white #{'active' if current_page?(fantasy_team_transfers_path(@fantasy_team.uuid))}" %> + <% end %> + <%= link_to t('components.views.shared.fantasy_team_navigation_component.status'), fantasy_team_status_index_path(@fantasy_team.uuid), class: "pl-8 py-1 text-white #{'active' if current_page?(fantasy_team_status_index_path(@fantasy_team.uuid))}" %> +
+ <% end %> +
+ <% end %> +
+ <% end %>
-
+
<%= content %>
diff --git a/app/views/components/page_wrappers/page_component.rb b/app/views/components/page_wrappers/page_component.rb index 01161c9e..d0c2de34 100644 --- a/app/views/components/page_wrappers/page_component.rb +++ b/app/views/components/page_wrappers/page_component.rb @@ -8,5 +8,13 @@ def initialize(fantasy_team: nil) super() end + + def global_user_fantasy_teams + @global_user_fantasy_teams ||= + Current.user + .fantasy_teams.completed + .joins(season: :league) + .hashable_pluck(:uuid, :name, 'leagues.sport_kind') + end end end diff --git a/app/views/components/views/homes/show/fantasy_team_link_component.html.erb b/app/views/components/views/homes/show/fantasy_team_link_component.html.erb index f5887bb8..1e37f736 100644 --- a/app/views/components/views/homes/show/fantasy_team_link_component.html.erb +++ b/app/views/components/views/homes/show/fantasy_team_link_component.html.erb @@ -2,7 +2,7 @@ <% if @fantasy_team[:completed] %> <%= link_to fantasy_team_points_path(@fantasy_team[:uuid]), class: 'season-link' do %> <%= image_tag league_background(@season[:leagues_name]['en']), alt: 'league-background', class: 'season-link-background' %> -
+
<%= @fantasy_team[:name] %>
<% if @deadline %> diff --git a/app/views/components/views/shared/statistic_component.erb b/app/views/components/views/shared/statistic_component.erb index 352e3a3c..9ffd1593 100644 --- a/app/views/components/views/shared/statistic_component.erb +++ b/app/views/components/views/shared/statistic_component.erb @@ -1,67 +1,69 @@
-
-
-

<%= t('views.shared.statistic.title') %>

-
-
-

<%= t('views.shared.statistic.overall') %>

-

<%= overall_points %>

-
-
-

<%= t('views.shared.statistic.rank') %>

-

<%= overall_rank %>

-
-
-

<%= t('views.shared.statistic.players') %>

-

<%= fantasy_teams_amount %>

-
-
-
-
-

<%= t('views.shared.statistic.leagues') %>

-
- <% fantasy_leagues.each do |fantasy_league| %> +
+
+
+

<%= t('views.shared.statistic.title') %>

+
+
+

<%= t('views.shared.statistic.overall') %>

+

<%= overall_points %>

+
-

<%= link_to fantasy_league[:name], fantasy_league_path(fantasy_league[:uuid]), class: 'simple-link' %>

-

<%= fantasy_league[:place] %>

+

<%= t('views.shared.statistic.rank') %>

+

<%= overall_rank %>

- <% end %> - <% lineups_fantasy_leagues.each do |fantasy_league| %>
-

<%= link_to fantasy_league[:name], fantasy_league_path(fantasy_league[:uuid]), class: 'simple-link' %>

-

<%= fantasy_league[:place] %>

+

<%= t('views.shared.statistic.players') %>

+

<%= fantasy_teams_amount %>

+
+
+
+
+

<%= t('views.shared.statistic.leagues') %>

- <% end %> - <% if false # TODO: open for rendering cups %> - <% if fantasy_cups.present? %> -
-

<%= t('views.shared.statistic.cups') %>

+ <% fantasy_leagues.each do |fantasy_league| %> +
+

<%= link_to fantasy_league[:name], fantasy_league_path(fantasy_league[:uuid]), class: 'simple-link' %>

+

<%= fantasy_league[:place] %>

- <% fantasy_cups.each do |cup| %> -
-

<%= link_to cup[:name], cup_path(cup[:uuid]), class: 'simple-link' %>

-

- <%= cup[:game_week] %> - <%= cup[:pair_result] %> -

+ <% end %> + <% lineups_fantasy_leagues.each do |fantasy_league| %> +
+

<%= link_to fantasy_league[:name], fantasy_league_path(fantasy_league[:uuid]), class: 'simple-link' %>

+

<%= fantasy_league[:place] %>

+
+ <% end %> + <% if false # TODO: open for rendering cups %> + <% if fantasy_cups.present? %> +
+

<%= t('views.shared.statistic.cups') %>

+ <% fantasy_cups.each do |cup| %> +
+

<%= link_to cup[:name], cup_path(cup[:uuid]), class: 'simple-link' %>

+

+ <%= cup[:game_week] %> + <%= cup[:pair_result] %> +

+
+ <% end %> <% end %> <% end %> - <% end %> - <%= react_component 'FantasyLeagueForm', uuid: @fantasy_team.uuid %> -
-
-
-

<%= t('views.shared.statistic.finance') %>

-
-
-

<%= t('views.shared.statistic.squad_value') %>

-

<%= squad_value %>

+ <%= react_component 'FantasyLeagueForm', uuid: @fantasy_team.uuid %>
-
-

<%= t('views.shared.statistic.bank') %>

-

<%= squad_budget %>

+
+
+

<%= t('views.shared.statistic.finance') %>

+
+
+

<%= t('views.shared.statistic.squad_value') %>

+

<%= squad_value %>

+
+
+

<%= t('views.shared.statistic.bank') %>

+

<%= squad_budget %>

+
+ <%= react_component 'FantasyTeamDestroyForm', uuid: @fantasy_team.uuid %>
- <%= react_component 'FantasyTeamDestroyForm', uuid: @fantasy_team.uuid %>
diff --git a/app/views/controllers/fantasy_leagues/show.html.erb b/app/views/controllers/fantasy_leagues/show.html.erb index dfb6655c..d1c7ddaa 100644 --- a/app/views/controllers/fantasy_leagues/show.html.erb +++ b/app/views/controllers/fantasy_leagues/show.html.erb @@ -1,55 +1,59 @@ <%= render PageWrappers::PageComponent.new(fantasy_team: @fantasy_team) do %>
-

<%= @fantasy_league.name %>

- - - - - - - - - - <% @fantasy_league_members.each.with_index(1) do |member, index| %> +
+

<%= @fantasy_league.name %>

+
<%= t('views.fantasy_leagues.show.rank') %><%= t('views.fantasy_leagues.show.team_name') %><%= t('views.fantasy_leagues.show.points') %>
+ - - - + + + - <% end %> - -
<%= index %> - <% if @fantasy_team&.id === member[:id] %> - <%= member[:name] %> - <% else %> - <%= link_to member[:name], fantasy_team_points_path(member[:uuid]), class: 'text-blue-500 underline' %> - <% end %> - <%= member[:points] %><%= t('views.fantasy_leagues.show.rank') %><%= t('views.fantasy_leagues.show.team_name') %><%= t('views.fantasy_leagues.show.points') %>
+ + + <% @fantasy_league_members.each.with_index(1) do |member, index| %> + + <%= index %> + + <% if @fantasy_team&.id === member[:id] %> + <%= member[:name] %> + <% else %> + <%= link_to member[:name], fantasy_team_points_path(member[:uuid]), class: 'text-blue-500 underline' %> + <% end %> + + <%= member[:points] %> + + <% end %> + + +
<% if @fantasy_league.invitational? %>
-

<%= t('views.fantasy_leagues.show.title') %> <%= localized_value(@fantasy_league.season.league.name) %>

-

<%= t('views.fantasy_leagues.show.link') %>

-
- - <%= fantasy_league_joins_url(fantasy_league_id: @fantasy_league.uuid, invite_code: @fantasy_league.invite_code) %> - -
-
-

<%= t('views.fantasy_leagues.show.email') %>

-
- - Hi, bro -

- For the <%= @fantasy_league.season.name %> <%= localized_value(@fantasy_league.season.league.name) %> Fantasy League why don't you join my mini-league "<%= @fantasy_league.name %>"? -

- Joining the league couldn't be easier. Simply use the link below and you'll be added automatically after you've entered the game. -

- <%= fantasy_league_joins_url(fantasy_league_id: @fantasy_league.uuid, invite_code: @fantasy_league.invite_code) %> -

- Looking forward to playing against you this season! -
+
+

<%= t('views.fantasy_leagues.show.title') %> <%= localized_value(@fantasy_league.season.league.name) %>

+

<%= t('views.fantasy_leagues.show.link') %>

+
+ + <%= fantasy_league_joins_url(fantasy_league_id: @fantasy_league.uuid, invite_code: @fantasy_league.invite_code) %> + +
+
+

<%= t('views.fantasy_leagues.show.email') %>

+
+ + Hi, bro +

+ For the <%= @fantasy_league.season.name %> <%= localized_value(@fantasy_league.season.league.name) %> Fantasy League why don't you join my mini-league "<%= @fantasy_league.name %>"? +

+ Joining the league couldn't be easier. Simply use the link below and you'll be added automatically after you've entered the game. +

+ <%= fantasy_league_joins_url(fantasy_league_id: @fantasy_league.uuid, invite_code: @fantasy_league.invite_code) %> +

+ Looking forward to playing against you this season! +
+
<% end %> diff --git a/app/views/controllers/fantasy_teams/points/index.html.erb b/app/views/controllers/fantasy_teams/points/index.html.erb index a99a169f..a7ce18d7 100644 --- a/app/views/controllers/fantasy_teams/points/index.html.erb +++ b/app/views/controllers/fantasy_teams/points/index.html.erb @@ -1,24 +1,28 @@ <%= render PageWrappers::PageComponent.new(fantasy_team: @fantasy_team) do %> <% if @week %> -
- <%= - react_component 'SquadPoints', - component_class: 'xl:col-span-7', - seasonUuid: @season.uuid, - sportKind: @season.league.sport_kind, - lineupUuid: @lineup&.uuid, - activeChips: @lineup&.active_chips, - weekUuid: @week.uuid, - weekPosition: @week.position, - points: @lineup&.points, - averagePoints: @lineups_data.any? ? (@lineups_data.sum(0) / @lineups_data.size).round(1) : 0, - maxPoints: @lineups_data.max, - previousPointsUrl: @week.position > 1 && @week.opponent_visible? ? fantasy_team_points_url(@fantasy_team.uuid, week: @week.position - 1) : nil, - nextPointsUrl: @week.finished? ? fantasy_team_points_url(@fantasy_team.uuid, week: @week.position + 1) : nil - %> +
+
+ <%= + react_component 'SquadPoints', + component_class: 'p-4 bg-white border border-stone-300 rounded', + seasonUuid: @season.uuid, + sportKind: @season.league.sport_kind, + lineupUuid: @lineup&.uuid, + activeChips: @lineup&.active_chips, + weekUuid: @week.uuid, + weekPosition: @week.position, + points: @lineup&.points, + averagePoints: @lineups_data.any? ? (@lineups_data.sum(0) / @lineups_data.size).round(1) : 0, + maxPoints: @lineups_data.max, + previousPointsUrl: @week.position > 1 && @week.opponent_visible? ? fantasy_team_points_url(@fantasy_team.uuid, week: @week.position - 1) : nil, + nextPointsUrl: @week.finished? ? fantasy_team_points_url(@fantasy_team.uuid, week: @week.position + 1) : nil + %> +
<%= render Views::Shared::StatisticComponent.new(fantasy_team: @fantasy_team, week: @week) %>
<% else %> -

<%= t('views.fantasy_teams.points.index.no_lineups') %>

+
+

<%= t('views.fantasy_teams.points.index.no_lineups') %>

+
<% end %> <% end %> diff --git a/app/views/controllers/fantasy_teams/show.html.erb b/app/views/controllers/fantasy_teams/show.html.erb index 97ad7ae6..b273fced 100644 --- a/app/views/controllers/fantasy_teams/show.html.erb +++ b/app/views/controllers/fantasy_teams/show.html.erb @@ -1,8 +1,8 @@ <%= render PageWrappers::PageComponent.new(fantasy_team: @fantasy_team) do %> -
+
<%= react_component 'Squad', - component_class: 'xl:col-span-7', + component_class: 'xl:col-span-7 p-4 bg-white border border-stone-300 rounded', seasonUuid: @season.uuid, sportKind: @season.league.sport_kind, lineupUuid: @lineup.uuid, diff --git a/app/views/controllers/fantasy_teams/status/index.html.erb b/app/views/controllers/fantasy_teams/status/index.html.erb index affe4381..21a5946d 100644 --- a/app/views/controllers/fantasy_teams/status/index.html.erb +++ b/app/views/controllers/fantasy_teams/status/index.html.erb @@ -4,6 +4,8 @@ <%= react_component 'BestPlayers', weekUuid: @week.uuid, seasonUuid: @season.uuid, sportKind: @season.league.sport_kind %> <%= react_component 'TransfersStatus', weekUuid: @week.uuid, seasonUuid: @season.uuid, sportKind: @season.league.sport_kind %> <% else %> -

<%= t('views.fantasy_teams.points.index.no_lineups') %>

+
+

<%= t('views.fantasy_teams.points.index.no_lineups') %>

+
<% end %> <% end %> diff --git a/app/views/controllers/profile/achievements/index.html.erb b/app/views/controllers/profile/achievements/index.html.erb index be0d7e63..9f8bf0a7 100644 --- a/app/views/controllers/profile/achievements/index.html.erb +++ b/app/views/controllers/profile/achievements/index.html.erb @@ -1,4 +1,6 @@ <%= render PageWrappers::PageComponent.new do %> -

<%= t('views.profile.achievements.index.title') %>

- <%= react_component 'Achievements' %> +
+

<%= t('views.profile.achievements.index.title') %>

+ <%= react_component 'Achievements' %> +
<% end %> diff --git a/app/views/controllers/profiles/show.html.erb b/app/views/controllers/profiles/show.html.erb index 666526f3..0e04551e 100644 --- a/app/views/controllers/profiles/show.html.erb +++ b/app/views/controllers/profiles/show.html.erb @@ -1,40 +1,42 @@ <%= render PageWrappers::PageComponent.new do %> -

<%= t('views.profiles.show.title') %>

-
-

<%= t('views.profiles.show.email_title') %>

-

<%= Current.user.email %>

-
-
-

<%= t('views.profiles.show.identities_title') %>

- <% @identities.each do |identity| %> -
-

- <%= identity[:provider].capitalize %> <%= t('views.profiles.show.identity_created') %> <%= identity[:created_at].strftime('%d.%m.%Y %H:%M') %> UTC -

- <%= button_to 'X', identity_path(identity[:id]), class: 'btn-primary btn-small', method: :delete %> -
- <% end %> - <% if @need_identities.present? %> -
- <% @need_identities.each do |provider| %> - <% if provider == 'telegram' %> - +
+

<%= t('views.profiles.show.title') %>

+
+

<%= t('views.profiles.show.email_title') %>

+

<%= Current.user.email %>

+
+
+

<%= t('views.profiles.show.identities_title') %>

+ <% @identities.each do |identity| %> +
+

+ <%= identity[:provider].capitalize %> <%= t('views.profiles.show.identity_created') %> <%= identity[:created_at].strftime('%d.%m.%Y %H:%M') %> UTC +

+ <%= button_to 'X', identity_path(identity[:id]), class: 'btn-primary btn-small', method: :delete %> +
+ <% end %> + <% if @need_identities.present? %> +
+ <% @need_identities.each do |provider| %> + <% if provider == 'telegram' %> + + <% end %> <% end %> - <% end %> -
- <% end %> -
-
-

<%= t('views.profiles.show.notifications_title') %>

- <%= react_component 'Notifications', notifications: @notifications, identities: @identities %> +
+ <% end %> +
+
+

<%= t('views.profiles.show.notifications_title') %>

+ <%= react_component 'Notifications', notifications: @notifications, identities: @identities %> +
<% end %> diff --git a/app/views/controllers/rules/index.html.erb b/app/views/controllers/rules/index.html.erb index 86e9d595..cc021070 100644 --- a/app/views/controllers/rules/index.html.erb +++ b/app/views/controllers/rules/index.html.erb @@ -1,66 +1,68 @@ <%= render PageWrappers::PageComponent.new do %> -

<%= t('views.rules.index.title') %>

-
-
-

<%= t('views.rules.index.basketball') %>

-
- <%= - react_component 'Toggle', - header: t('views.rules.index.squad'), - children: render( - partial: 'select_squad', - locals: { - sport: Sport.find_by(title: 'basketball'), - positions: Sports::Position.where(sport: 'basketball').to_a - } - ).html_safe - %> - <%= - react_component 'Toggle', - header: t('views.rules.index.managing'), - children: render(partial: 'managing_basketball').html_safe - %> - <%= - react_component 'Toggle', - header: t('views.rules.index.transfers'), - children: render(partial: 'transfers').html_safe - %> - <%= - react_component 'Toggle', - header: t('views.rules.index.points'), - children: render(partial: 'points_basketball').html_safe - %> +
+

<%= t('views.rules.index.title') %>

+
+
+

<%= t('views.rules.index.basketball') %>

+
+ <%= + react_component 'Toggle', + header: t('views.rules.index.squad'), + children: render( + partial: 'select_squad', + locals: { + sport: Sport.find_by(title: 'basketball'), + positions: Sports::Position.where(sport: 'basketball').to_a + } + ).html_safe + %> + <%= + react_component 'Toggle', + header: t('views.rules.index.managing'), + children: render(partial: 'managing_basketball').html_safe + %> + <%= + react_component 'Toggle', + header: t('views.rules.index.transfers'), + children: render(partial: 'transfers').html_safe + %> + <%= + react_component 'Toggle', + header: t('views.rules.index.points'), + children: render(partial: 'points_basketball').html_safe + %> +
-
-
-

<%= t('views.rules.index.football') %>

-
- <%= - react_component 'Toggle', - header: t('views.rules.index.squad'), - children: render( - partial: 'select_squad', - locals: { - sport: Sport.find_by(title: 'football'), - positions: Sports::Position.where(sport: 'football').to_a - } - ).html_safe - %> - <%= - react_component 'Toggle', - header: t('views.rules.index.managing'), - children: render(partial: 'managing_football').html_safe - %> - <%= - react_component 'Toggle', - header: t('views.rules.index.transfers'), - children: render(partial: 'transfers').html_safe - %> - <%= - react_component 'Toggle', - header: t('views.rules.index.points'), - children: render(partial: 'points_football').html_safe - %> +
+

<%= t('views.rules.index.football') %>

+
+ <%= + react_component 'Toggle', + header: t('views.rules.index.squad'), + children: render( + partial: 'select_squad', + locals: { + sport: Sport.find_by(title: 'football'), + positions: Sports::Position.where(sport: 'football').to_a + } + ).html_safe + %> + <%= + react_component 'Toggle', + header: t('views.rules.index.managing'), + children: render(partial: 'managing_football').html_safe + %> + <%= + react_component 'Toggle', + header: t('views.rules.index.transfers'), + children: render(partial: 'transfers').html_safe + %> + <%= + react_component 'Toggle', + header: t('views.rules.index.points'), + children: render(partial: 'points_football').html_safe + %> +
diff --git a/app/views/controllers/shared/_header.html.erb b/app/views/controllers/shared/_header.html.erb deleted file mode 100644 index f7077b57..00000000 --- a/app/views/controllers/shared/_header.html.erb +++ /dev/null @@ -1,23 +0,0 @@ -
-
- <%= link_to root_path, class: 'text-2xl font-normal tracking-tighter' do %> - fantasysports - <% end %> -
-
- <% I18n.available_locales.each do |locale| %> - <%= link_to locale, change_locale(locale), aria: { label: t('components.page_wrappers.users_component.change_locale') } %> - <% end %> - <% if Current.user %> - <%= link_to t('views.welcome.home'), home_path %> - <%= link_to t('views.welcome.privacy'), privacy_path, data: { 'test-id' => 'logged-privacy-link' } %> - <%= link_to t('components.page_wrappers.page_component.logout'), users_logout_path %> - <% else %> -
- <%= link_to t('views.welcome.privacy'), privacy_path, class: 'mr-4', data: { 'test-id' => 'guest-privacy-link' } %> - <%= link_to t('components.page_wrappers.users_component.login'), users_login_path, class: 'mr-4' %> - <%= link_to t('components.page_wrappers.users_component.sign_up'), users_sign_up_path %> -
- <% end %> -
-
diff --git a/app/views/controllers/users/confirmations/failed_complete.html.erb b/app/views/controllers/users/confirmations/failed_complete.html.erb index d3e55608..661545df 100644 --- a/app/views/controllers/users/confirmations/failed_complete.html.erb +++ b/app/views/controllers/users/confirmations/failed_complete.html.erb @@ -1,6 +1,8 @@ <%= render PageWrappers::GuestComponent.new do %>
-

<%= t('views.users.confirmations.failed_complete.title') %>

-

<%= t('views.users.confirmations.failed_complete.description') %>

+
+

<%= t('views.users.confirmations.failed_complete.title') %>

+

<%= t('views.users.confirmations.failed_complete.description') %>

+
<% end %> diff --git a/app/views/controllers/users/recovery/new.html.erb b/app/views/controllers/users/recovery/new.html.erb index 5010840c..c1eb5a7e 100644 --- a/app/views/controllers/users/recovery/new.html.erb +++ b/app/views/controllers/users/recovery/new.html.erb @@ -1,6 +1,6 @@ <%= render PageWrappers::GuestComponent.new do %>
- <%= form_with model: @user, url: users_recovery_path(email: @user.email, restore_token: @user.restore_token), method: :post do |form| %> + <%= form_with model: @user, url: users_recovery_path(email: @user.email, restore_token: @user.restore_token), method: :post, class: 'p-4 bg-white rounded border border-stone-300' do |form| %>

<%= t('views.users.recovery.new.title') %>

<%= form.label :password, t('views.users.registrations.new.password'), class: 'form-label' %> diff --git a/app/views/controllers/users/registrations/confirm.html.erb b/app/views/controllers/users/registrations/confirm.html.erb index c57583b6..2d012881 100644 --- a/app/views/controllers/users/registrations/confirm.html.erb +++ b/app/views/controllers/users/registrations/confirm.html.erb @@ -1,6 +1,8 @@ <%= render PageWrappers::GuestComponent.new do %>
-

<%= t('views.users.registrations.confirm.title') %>

-

<%= t('views.users.registrations.confirm.description') %>

+
+

<%= t('views.users.registrations.confirm.title') %>

+

<%= t('views.users.registrations.confirm.description') %>

+
<% end %> diff --git a/app/views/controllers/users/registrations/new.html.erb b/app/views/controllers/users/registrations/new.html.erb index a5a61d46..d82ef8ff 100644 --- a/app/views/controllers/users/registrations/new.html.erb +++ b/app/views/controllers/users/registrations/new.html.erb @@ -1,18 +1,18 @@ <%= render PageWrappers::GuestComponent.new do %>
- <%= form_with model: @user, url: users_sign_up_path, method: :post do |form| %> + <%= form_with model: @user, url: users_sign_up_path, method: :post, class: 'p-4 bg-white rounded border border-stone-300' do |form| %>

<%= t('views.users.registrations.new.sign_up') %>

<%= form.label :email, 'Email', class: 'form-label' %> - <%= form.text_field :email, class: 'form-value' %> + <%= form.text_field :email, class: 'form-value w-full' %>
<%= form.label :password, t('views.users.registrations.new.password', value: Rails.application.config.minimum_password_length), class: 'form-label' %> - <%= form.password_field :password, class: 'form-value' %> + <%= form.password_field :password, class: 'form-value w-full' %>
<%= form.label :password_confirmation, t('views.users.registrations.new.password_confirmation'), class: 'form-label' %> - <%= form.password_field :password_confirmation, class: 'form-value' %> + <%= form.password_field :password_confirmation, class: 'form-value w-full' %>
<%= link_to image_tag('google.svg', width: 20, height: 20, alt: 'google'), omniauth_link(:google), 'aria-label': 'Login with Google', class: 'flex justify-center mr-4' %> diff --git a/app/views/controllers/users/restore/new.html.erb b/app/views/controllers/users/restore/new.html.erb index adee4312..d8c1e91f 100644 --- a/app/views/controllers/users/restore/new.html.erb +++ b/app/views/controllers/users/restore/new.html.erb @@ -1,6 +1,6 @@ <%= render PageWrappers::GuestComponent.new do %>
- <%= form_with url: users_restore_path, method: :post do |form| %> + <%= form_with url: users_restore_path, method: :post, class: 'p-4 bg-white rounded border border-stone-300' do |form| %>

<%= t('views.users.restore.new.title') %>

<%= t('views.users.restore.new.description') %>

diff --git a/app/views/controllers/users/sessions/new.html.erb b/app/views/controllers/users/sessions/new.html.erb index 83197626..b56e25ac 100644 --- a/app/views/controllers/users/sessions/new.html.erb +++ b/app/views/controllers/users/sessions/new.html.erb @@ -1,6 +1,6 @@ <%= render PageWrappers::GuestComponent.new do %>
- <%= form_with model: User.new, url: users_login_path, method: :post do |form| %> + <%= form_with model: User.new, url: users_login_path, method: :post, class: 'p-4 bg-white rounded border border-stone-300' do |form| %>

<%= t('views.users.sessions.new.login') %>

<%= form.label :email, 'Email', class: 'form-label' %> diff --git a/app/views/controllers/welcome/index.html.erb b/app/views/controllers/welcome/index.html.erb index 2e30a534..5e018999 100644 --- a/app/views/controllers/welcome/index.html.erb +++ b/app/views/controllers/welcome/index.html.erb @@ -2,7 +2,7 @@ <% cache(['welcome_index_v1', Current.user&.id, I18n.locale], expires_in: 24.hours) do %>
-

Fantasy Sports

+

<%= t('views.welcome.title') %>

<%= t('views.welcome.description') %>

<% if Current.user.nil? %>
diff --git a/app/views/controllers/welcome/privacy.html.erb b/app/views/controllers/welcome/privacy.html.erb index ec16e5d1..dbca76d3 100644 --- a/app/views/controllers/welcome/privacy.html.erb +++ b/app/views/controllers/welcome/privacy.html.erb @@ -1,6 +1,6 @@ <%= render PageWrappers::GuestComponent.new do %> <% cache(['welcome_privacy_v1', I18n.locale], expires_in: 24.hours) do %> -
+

<%= t('views.privacy.title') %>

<%= t('views.privacy.h1') %>

<%= t('views.privacy.p1') %>

diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index e5defbdf..5e11b41c 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -5,7 +5,7 @@ - + <%= csrf_meta_tags %> @@ -13,7 +13,7 @@ <%= stylesheet_link_tag 'tailwind', 'inter-font' %> <%= stylesheet_link_tag 'application', media: 'all' %> - + <% if @watches %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 715166a0..eb6801e2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -36,13 +36,14 @@ en: logout: Logout change_locale: Change locale fantasy_team_navigation_component: - home: Championships team: Team squad transfers: Transfers points: Points rules: Rules status: Status profile: Profile + leagues_center: Leagues center + existing_teams: Existing teams profile_navigation_component: achievements: Achievements controllers: @@ -283,8 +284,9 @@ en: identity_created: identity is created notifications_title: Notifications welcome: + title: Free to play fantasy sport games with friends home: View fantasy leagues - description: Fantasy sports engine system. Fantasy Sports gives you the opportunity to run your own teams of professional players. You draft your teams of the best players from across the leagues and receive points based on those players' performance in games each week. + description: Fantasy Sports gives you the opportunity to run your own teams of professional players from across the leagues and receive points based on their performance in games each week. Join with friends in leagues and find whose team is the best. active_leagues: Active fantasy leagues active_leagues_list: List of active fantasy leagues changes through the time. All active and supported leagues you can see below. privacy: Privacy diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 21c8a640..c15d43bd 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -36,13 +36,14 @@ ru: logout: Выход change_locale: Изменить локаль fantasy_team_navigation_component: - home: Чемпионаты team: Состав команды transfers: Трансферы points: Результаты rules: Правила status: Статус недели profile: Профиль + leagues_center: Все лиги + existing_teams: Собранные команды profile_navigation_component: achievements: Достижения controllers: @@ -283,8 +284,9 @@ ru: identity_created: просоединён notifications_title: Уведомления welcome: + title: Соревнуйтесь с друзьями в фэнтези спорте home: Просмотр лиг - description: Система менеджмента фэнтези лиг. Движок позволяет вам создавать свои фэнтези команды из профессиональных игроков. Вы собираете свои команды из лучших игроков и получаете очки на основе их эффективности в реальных играх сезона. + description: FantasySports позволяет вам создавать свои фэнтези команды из профессиональных игроков и получать очки на основе их эффективности в реальных играх сезона. Объединяйтесь с друзьями в лиги и соревнуйтесь, у кого лучше команда. active_leagues: Активные фэнтези лиги active_leagues_list: Список активных фэнтези лиг постоянно обновляется. Все активные и поддерживаемые лиги вы можете увидеть ниже. privacy: Конфиденциальность diff --git a/config/tailwind.config.js b/config/tailwind.config.js index db6f3c55..47799744 100644 --- a/config/tailwind.config.js +++ b/config/tailwind.config.js @@ -17,6 +17,16 @@ module.exports = { }, maxWidth: { '8xl': '90rem', + }, + colors: { + goldeen: { + light: '#f8f8f8', + support: '#ffc57b', + supportMiddle: '#ee7b41', + supportDark: '#d54110', + gray: '#d5d5de', + dark: '#0e0e0e' + } } }, }, @@ -27,3 +37,4 @@ module.exports = { require('@tailwindcss/container-queries'), ] } +