Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make investors and supporters clickable on TPI homepage #211

Merged
merged 1 commit into from
Dec 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions app/assets/images/icons/plus-blue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions app/assets/stylesheets/tpi/_hero.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,29 @@
}
}

.section-clickable {
&:hover {
.subsection-button__container {
.section-button {
background-color: $yellow;
background-image: image-url('icons/plus-blue.svg');
}

.button__title {
text-decoration: underline;
}
}
}
}

.section-title {
margin-bottom: 20px;
color: $white;
}

.section-description {
margin-bottom: 20px;
color: $white;

@media #{$tablet-portrait} {
margin-bottom: 64px;
Expand All @@ -104,6 +121,9 @@
justify-content: center;
align-items: center;
margin-right: 10px;
background-image: image-url('icons/plus.svg');
background-repeat: no-repeat;
background-position: center;
}

.subsection-button__container {
Expand Down
17 changes: 8 additions & 9 deletions app/views/tpi/home/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,29 @@
<section class="section tpi-home__hero is-secondary">
<div class="container tpi-hero__body">
<div class="columns">
<div class="column is-half section-separator">
<%= link_to '/tpi/investors', class: "column is-half section-separator section-clickable" do %>
<h4 class="section-title">How investors can use the TPI</h4>

<p class="section-description">
The TPI is designed to support investors. Find out how they can use its findings.
</p>
<div class="subsection-button__container">
<button class="section-button"><%= image_tag "icons/plus.svg" %></button>
<a href="tpi/investors" class="button__title">TPI for investors</a>
<button class="section-button"></button>
<span class="button__title">TPI for investors</span>
</div>
</div>

<div class="column is-half right-column">
<% end %>
<%= link_to '/tpi/supporters', class: "column is-half right-column section-clickable" do %>
<h4 class="section-title">Supporters</h4>

<p class="section-description">
The TPI is supported globally by over 50 investors with over $16.3 trillion combined Assets Under Management and Advice.
</p>

<div class="subsection-button__container">
<button class="section-button"><%= image_tag "icons/plus.svg" %></button>
<a href="/tpi/supporters" class="button__title">Who supports the TPI?</a>
<button class="section-button"></button>
<span class="button__title">Who supports the TPI?</span>
</div>
</div>
<% end %>
</div>
</div>
</section>
Expand Down