Skip to content

Commit 1750009

Browse files
authored
Merge pull request #3684 from Vizzuality/feature/new-homepage-cards
Feature/update hompage cards
2 parents b7dfece + cabbe65 commit 1750009

13 files changed

+11
-9
lines changed

app/assets/images/home/card-0.png

179 KB
Loading

app/assets/images/home/card-0@2x.jpg

-43.9 KB
Binary file not shown.

app/assets/images/home/card-1.png

126 KB
Loading

app/assets/images/home/card-1@2x.jpg

-62 KB
Binary file not shown.

app/assets/images/home/card-2.png

113 KB
Loading

app/assets/images/home/card-2@2x.jpg

-42.3 KB
Binary file not shown.

app/assets/images/home/card-3.png

141 KB
Loading

app/assets/images/home/card-3@2x.jpg

-66.7 KB
Binary file not shown.

app/assets/images/home/card-4.png

79.3 KB
Loading

app/assets/images/home/card-4@2x.jpg

-49.1 KB
Binary file not shown.

app/assets/stylesheets/components/home/_c-home-summary.scss

+7-5
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ $item-padding-screen-m: rem(40px);
102102
height: rem(360px);
103103
padding: rem(17px) rem(16px);
104104
background-color: $grey-light;
105+
overflow: hidden;
105106

106107
&:before {
107108
content: "";
@@ -133,17 +134,18 @@ $item-padding-screen-m: rem(40px);
133134

134135
.c-home-summary-item__background {
135136
position: absolute;
136-
bottom: 0;
137+
bottom: -150px;
137138
width: auto;
138-
max-height: rem(235px);
139+
max-width: 160%;
140+
max-height: rem(335px);
139141
z-index: 1;
140142

141143
&.-left {
142-
left: 0;
144+
left: -150px;
143145
}
144146

145147
&.-right {
146-
right: 0;
148+
right: -150px;
147149
}
148150
}
149151

@@ -166,7 +168,7 @@ $item-padding-screen-m: rem(40px);
166168
}
167169

168170
.c-home-summary-item__background {
169-
max-height: rem(300px);
171+
max-height: rem(400px);
170172
}
171173
}
172174

app/controllers/landing_controller.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@ def index
2525
"paragraph" => "Analyze forest change and investigate trends anywhere in the world with just a few clicks.",
2626
"button" => "EXPLORE THE DASHBOARDS",
2727
"url" => "/dashboards/global",
28-
"background_orientation" => "right"
28+
"background_orientation" => "left"
2929
},
3030
{
3131
"title" => "Forest insights",
3232
"paragraph" => "Read the latest stories and findings about forests from our team of researchers on the GFW blog.",
3333
"button" => "START LEARNING",
3434
"url" => "http://blog.globalforestwatch.org/",
35-
"background_orientation" => "right"
35+
"background_orientation" => "left"
3636
},
3737
{
3838
"title" => "A suite of tools",
3939
"paragraph" => "Find out about the connections between deforestation and climate change, fires and haze, water security, and commodity supply chains with our specialized web applications.",
4040
"button" => "BROWSE OUR APPS",
4141
"url" => "http://developers.globalforestwatch.org",
42-
"background_orientation" => "right"
42+
"background_orientation" => "left"
4343
}
4444
]
4545
@uses = [

app/views/landing/_summary.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="c-home-summary-item__button">
1313
<%= render 'shared/buttons/regular', text: card['button'], color: 'green', url: card['url'], buttonClass: 'js-home-summary-item-linker' %>
1414
</div>
15-
<img class="c-home-summary-item__background -<%= card['background_orientation'] %>" src="/assets/home/card-<%= index %>@2x.jpg" width="482" />
15+
<img class="c-home-summary-item__background -<%= card['background_orientation'] %>" src="/assets/home/card-<%= index %>.png" width="482" />
1616
</div>
1717
</li>
1818
<% end %>

0 commit comments

Comments
 (0)