-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a new home content block with partner logos (#16)
* add content block * add logos * add logos --------- Co-authored-by: Ivan Vergés <ivan@pokecode.net>
- Loading branch information
1 parent
a586b29
commit b0efca1
Showing
24 changed files
with
110 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<section id="partner-logos" class="extended home-section partner-logos"> | ||
<div class="wrapper-home"> | ||
<div class="row column text-center"> | ||
<h2 class="heading3"><%= I18n.t(".decidim.content_blocks.partner_logos.title1") %></h2> | ||
<div class="row small-up-1 medium-up-<%= [first_row.size, 3].min %> home-bullets"> | ||
<% first_row.each do |image_path| %> | ||
<div class="column"> | ||
<%= image_tag image_path %> | ||
</div> | ||
<% end %> | ||
</div> | ||
<h2 class="heading3"><%= I18n.t(".decidim.content_blocks.partner_logos.title2") %></h2> | ||
<div class="row small-up-1 medium-up-<%= [second_row.size, 3].min %> home-bullets"> | ||
<% second_row.each do |image_path| %> | ||
<div class="column"> | ||
<%= image_tag image_path %> | ||
</div> | ||
<% end %> | ||
</div> | ||
<h2 class="heading3"><%= I18n.t(".decidim.content_blocks.partner_logos.title3") %></h2> | ||
<div class="row small-up-1 medium-up-<%= [third_row.size, 3].min %> home-bullets"> | ||
<% third_row.each do |image_path| %> | ||
<div class="column"> | ||
<%= image_tag image_path %> | ||
</div> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
module Decidim | ||
module ContentBlocks | ||
class PartnerLogosCell < Cell::ViewModel | ||
def show | ||
render | ||
end | ||
|
||
def partner_images(row) | ||
dir = "partners#{row}/" | ||
image_directory = Rails.public_path.join(dir.to_s) | ||
Dir["#{image_directory}/*.png"].map do |file_path| | ||
"/#{dir}/#{File.basename(file_path)}" | ||
end | ||
end | ||
|
||
def first_row | ||
@first_row ||= partner_images(1) | ||
end | ||
|
||
def second_row | ||
@second_row ||= partner_images(2) | ||
end | ||
|
||
def third_row | ||
@third_row ||= partner_images(3) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,45 @@ | ||
.promo-video { | ||
background-color: $capitalitat-violet; | ||
background-color: $capitalitat-violet !important; | ||
padding: 4rem 0; | ||
@media print, screen and (max-width: 40em) { | ||
padding: 0; | ||
} | ||
} | ||
|
||
.democracy-innovation { | ||
background-color: $capitalitat-violet; | ||
background-color: $capitalitat-violet !important; | ||
padding: 4rem 0; | ||
color: #ffffff; | ||
|
||
.button { | ||
color: #ffffff; | ||
border-color: #fff; | ||
} | ||
|
||
.heading3 { | ||
margin-bottom: 2rem; | ||
} | ||
} | ||
|
||
.partner-logos { | ||
h2 { | ||
color: #fff; | ||
} | ||
.home-bullets { | ||
.column { | ||
margin: 2rem 0; | ||
} | ||
} | ||
background-color: $capitalitat-violet !important; | ||
.column img { | ||
height: 70px; | ||
} | ||
.column { | ||
@media print, screen and (max-width: 40em) { | ||
margin-top: 2rem; | ||
img { | ||
height: 50px; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
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.
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.
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.
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.
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.