Skip to content

Commit

Permalink
refactoring: Initial refactoring of Homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
martintomas committed Aug 25, 2024
1 parent 716afe8 commit c6a90ec
Show file tree
Hide file tree
Showing 40 changed files with 295 additions and 709 deletions.
10 changes: 9 additions & 1 deletion app/admin/tpi_sector_clusters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

menu priority: 8, parent: 'TPI'

permit_params :name
permit_params :name, sector_ids: []

filter :name_contains

Expand All @@ -25,4 +25,12 @@
column :name, &:name_link
actions
end

form do |f|
f.inputs do
f.input :name
f.input :sectors, as: :check_boxes, collection: TPISector.all.order(:name)
end
f.actions
end
end
Binary file added app/assets/images/tpi/funders/climate-arc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/tpi/funders/climateworks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/tpi/funders/fte-russell.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/tpi/home/aum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/tpi/home/banks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/tpi/home/energy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/tpi/home/food.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/tpi/home/industry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/tpi/home/supporters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/tpi/home/transport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/tpi.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ html {

body {
overflow-x: hidden;
font-family: $family-sans-serif;
font-family: $font-family-regular;

@include desktop {
overflow-x: visible;
Expand Down
12 changes: 2 additions & 10 deletions app/assets/stylesheets/tpi/_banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,17 @@
.partners__title {
display: flex;
justify-content: flex-end;
font-size: $size-7;
font-size: $size-8;
color: $grey-dark;
line-height: 0.938rem;
margin-bottom: 20px;
margin-bottom: 5px;
}

.partners {
display: flex;
align-items: center;
justify-content: end;
gap: 30px;

&__grantham {
max-height: 38px;
}

&__lse {
max-height: 42px;
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/tpi/_filters.scss
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
padding: 6px 12px;
cursor: pointer;
font-size: 14px;
font-family: $family-sans-serif;
font-family: $font-family-regular;
margin-right: 16px;
margin-bottom: 10px;
}
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/tpi/_latest-information.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $dots-space: 1.3rem;

&__header {
margin-bottom: 36px;
font-family: $family-sans-serif-bold;
font-family: $font-family-bold;
}

&__description {
Expand Down Expand Up @@ -79,7 +79,7 @@ $dots-space: 1.3rem;

&__button-text {
font-size: 16px;
font-family: $family-sans-serif-bold;
font-family: $font-family-bold;
color: $white;
}

Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/tpi/_pages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ $margin-between-list-items: 20px;

&.text-description {
display: flex;
font-family: $family-sans-serif;
font-family: $font-family-regular;

.pages__content-logos {
grid-template-columns: repeat(2, 1fr);
Expand Down Expand Up @@ -167,7 +167,7 @@ $margin-between-list-items: 20px;

&.logo-description {
display: block;
font-family: $family-sans-serif;
font-family: $font-family-regular;

.pages__content-logos {
grid-template-columns: repeat(2, 1fr);
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/tpi/_publications.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ $max-lines: 3;
&__title-text {
margin-bottom: 20px;
font-size: 20px !important;
font-family: $family-sans-serif-bold;
font-family: $font-family-bold;
color: $dark;

@include desktop {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/tpi/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
margin-top: 20px;

> a {
font-family: $family-sans-serif-bold;
font-family: $font-family-bold;
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/tpi/_selector.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
.selector__option {
padding-inline: 16px;
color: $ascor-color;
font-family: $family-sans-serif;
font-family: $font-family-regular;
font-size: 16px;
font-style: normal;
font-weight: 400;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/tpi/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
$button-border-width: 4px;

.link {
font-family: $family-sans-serif-bold;
font-family: $font-family-bold;
cursor: pointer;

&.is-hovered,
Expand Down Expand Up @@ -32,7 +32,7 @@ $button-border-width: 4px;
$button-height: 40px;
min-width: 160px;
height: $button-height;
font-family: $family-sans-serif-bold;
font-family: $font-family-bold;
cursor: pointer;
border-radius: 0 !important;

Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/tpi/charts/companies_accordion.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $tpi-level-chart-colors: #86A9F9 #5587F7 #2465F5 #0A4BDC #083AAB #9747FF;

.item-title {
display: flex;
font-family: $family-sans-serif-bold;
font-family: $font-family-bold;
font-size: $size-5;
justify-content: space-between;
margin-bottom: 0.75rem;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/tpi/charts/cp-performance.scss
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
background-color: $blue;
border: none;
color: $white;
font-family: $family-sans-serif-bold;
font-family: $font-family-bold;
width: 160px;
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/tpi/charts/mq-sector-pie-chart.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $tpi-pie-chart-colors: #86A9F9 #5587F7 #2465F5 #0A4BDC #083AAB #9747FF;
tspan {
&:not(.highcharts-strong) {
font-size: $size-7;
font-family: $family-sans-serif;
font-family: $font-family-bold;
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions app/assets/stylesheets/tpi/pages/ascor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ $see-more-width-tablet: 130px;

&__title {
color: $dark;
font-family: $family-sans-serif;
font-family: $font-family-regular;
font-size: 24px !important;
line-height: 1.7rem;
font-weight: 400;
Expand All @@ -287,7 +287,7 @@ $see-more-width-tablet: 130px;

&__subtitle {
color: $grey-dark;
font-family: $family-sans-serif;
font-family: $font-family-regular;
font-size: 12px;
}

Expand All @@ -304,7 +304,7 @@ $see-more-width-tablet: 130px;
display: flex;

&__title {
font-family: $family-sans-serif;
font-family: $font-family-regular;
font-size: 20px !important;
display: flex;
align-items: center;
Expand Down Expand Up @@ -378,7 +378,7 @@ $see-more-width-tablet: 130px;
display: flex;

&__title {
font-family: $family-sans-serif;
font-family: $font-family-regular;
font-weight: 700;
font-size: 16px;
display: flex;
Expand All @@ -388,7 +388,7 @@ $see-more-width-tablet: 130px;
}

&__source {
font-family: $family-sans-serif;
font-family: $font-family-regular;
font-size: 14px !important;
line-height: 40px;

Expand Down Expand Up @@ -449,7 +449,7 @@ $see-more-width-tablet: 130px;
}

&__source {
font-family: $family-sans-serif;
font-family: $font-family-regular;
font-size: 14px !important;

a {
Expand Down Expand Up @@ -574,7 +574,7 @@ $see-more-width-tablet: 130px;
width: 400px;

h3 {
font-family: $family-sans-serif;
font-family: $font-family-regular;
font-size: 24px !important;
font-weight: 700;
padding: 20px 0;
Expand Down Expand Up @@ -655,4 +655,4 @@ $see-more-width-tablet: 130px;
}
}
}
}
}
19 changes: 19 additions & 0 deletions app/assets/stylesheets/tpi/pages/banks-index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
@import "../variables";

.banks-index-page {
&__info {
background-color: $blue;
padding: 40px 0;
border-bottom: 1px solid #FFFFFF1F;

.title {
color: $white;
font-size: $size-4;
font-family: $font-family-bold;
margin-bottom: 25px;
}

.description {
color: $white;
font-size: $size-6;
font-family: $font-family-regular;
}
}

.banks-header {
min-height: 100px;
display: flex;
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/tpi/pages/company.scss
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@

.level-description {
color: $dark;
font-family: $family-sans-serif-bold;
font-family: $font-family-bold;
padding: 0 30px;
}

.assessment-count {
font-family: $family-sans-serif-bold;
font-family: $font-family-bold;
}
}
}
Expand Down
Loading

0 comments on commit c6a90ec

Please sign in to comment.