Skip to content

Commit

Permalink
Merge pull request #478 from Vizzuality/client/feature/LSE-152-fe-cha…
Browse files Browse the repository at this point in the history
…nges-in-download-button

Update green buttons
  • Loading branch information
barbara-chaves authored Nov 17, 2023
2 parents 2dcac9b + 5316fd6 commit da64870
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 5 deletions.
6 changes: 6 additions & 0 deletions app/assets/stylesheets/tpi/_emissions-chart.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
&__country-selector {
.button {
padding: 12px 16px;
color: $ascor-color;
}

&__countries {
Expand Down Expand Up @@ -73,6 +74,11 @@
&__button {
display: flex;
justify-content: flex-end;
button {
border: 2px solid $ascor-green !important;
background-color: white !important;
color: $ascor-green !important;
}
}
}
}
Expand Down
11 changes: 11 additions & 0 deletions app/assets/stylesheets/tpi/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,17 @@ $button-border-width: 4px;
}
}

&.is-emphasis {
background-color: $ascor-green !important;
color: $ascor-color !important;
img {
filter: brightness(0.1);
}
&:hover {
background-color: transparentize($ascor-green, 0.4) !important;
}
}

&.with-icon {
img {
margin-right: 10px;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/tpi/pages/ascor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ $see-more-width-tablet: 130px;

.base-tooltip__default-trigger {
background-color: $ascor-green;

color: $ascor-color;
&:hover {
background-color: transparentize($ascor-green, 0.4);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const CountrySelector = ({
return (
<div className="emissions__filters__country-selector">
<button
className="button is-primary"
className="button is-emphasis"
onClick={() => setCountriesOpen((open) => !open)}
type="button"
>
Expand Down
4 changes: 2 additions & 2 deletions app/views/tpi/ascor/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</a>
</div>

<%= link_to user_download_tpi_ascor_index_path, class: 'button is-primary is-pulled-right with-icon with-border' do %>
<%= link_to user_download_tpi_ascor_index_path, class: 'button is-emphasis is-pulled-right with-icon with-border' do %>
<img src="<%= asset_path 'icons/download.svg'%>" alt="download icon" />
Download ASCOR data
<% end %>
Expand Down Expand Up @@ -114,7 +114,7 @@
<div class="promoted-publications__title">
<div class="promoted-publications__title-text">Publications and news</div>

<%= link_to 'View all publications and news', tpi_publications_path, class: 'button is-secondary is-hidden-touch' %>
<%= link_to 'View all publications and news', tpi_publications_path, class: 'button is-emphasis is-hidden-touch' %>
</div>

<% if @publications_and_articles.any? %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/tpi/ascor/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</div>
</div>

<%= link_to user_download_tpi_ascor_index_path, class: 'button is-primary is-pulled-right with-icon with-border' do %>
<%= link_to user_download_tpi_ascor_index_path, class: 'button is-emphasis is-pulled-right with-icon with-border' do %>
<img src="<%= asset_path 'icons/download.svg'%>" alt="download icon" />
Download ASCOR data
<% end %>
Expand Down

0 comments on commit da64870

Please sign in to comment.