Skip to content

Commit

Permalink
Fix bottom gutter for landing page cards (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsundokul authored Oct 26, 2021
1 parent 3c53f5f commit c62ed7b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
9 changes: 9 additions & 0 deletions app/assets/stylesheets/custom/code4_styling.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ footer .logo a {
// "How it works" cards
.card-text-over {
position: relative;
margin-bottom: 0;
min-height: auto;
figcaption {
position: absolute;
Expand Down Expand Up @@ -68,6 +69,14 @@ footer .logo a {
margin-bottom: 1rem;
}

// Remove bottom gutter from landing page cards
.card {
margin-bottom: 3rem;
&>a {
height: auto;
}
}

// Hero financed domains
.financed-domains {
@include full-width-background;
Expand Down
8 changes: 6 additions & 2 deletions app/components/custom/welcome/financed_domains_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def cards_count
end

def header
t ['welcome.financed_domains', CITY, 'header'].join('.')
translation('header')
end

def image(name)
Expand All @@ -23,11 +23,15 @@ def cards
DATA['cards'].map do |card|
{
image: image(card['image']),
title: t(['welcome.financed_domains', CITY, card['i18n']].join'.')
title: translation(card['i18n'])
}
end
end

def translation(keys)
t ['welcome.financed_domains', CITY, *keys].join('.')
end

def bg_image
image DATA['bg_image']
end
Expand Down

0 comments on commit c62ed7b

Please sign in to comment.