Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #17 from Metatavu/develop
Browse files Browse the repository at this point in the history
New version
  • Loading branch information
Eskilmar committed Jun 26, 2020
2 parents 5f36d7e + 127d573 commit e3379de
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 33 deletions.
18 changes: 14 additions & 4 deletions app/assets/stylesheets/decidim.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,21 @@ $primary-rgb: 82,172,170;
background-size: contain;
}
}
.custom-content-banner {
padding: 25px;
background-position: top center;
background-size: cover;
.card--process__column, .card__content {
background-color: transparent !important;
}
.card--full__image {
background-size: contain;
object-fit: contain;
}
.custom-process_card {
background-repeat: no-repeat;
background-size: contain;
background-position: bottom right;
}
.custom-process-header {
background-repeat: no-repeat;
background-size: cover;
}
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<section class="wrapper-home home-section">
<div class="row" id="highlighted-processes">
<h3 class="section-heading"><%= t("active_processes", scope: i18n_scope) %></h3>
<div class="row collapse">
<div class="row small-up-1 smallmedium-up-2 mediumlarge-up-3
large-up-4 card-grid">
<% highlighted_processes.each do |process| %>
<div class="column">
<article class="card card--process card--mini">
<%= link_to decidim_participatory_processes.participatory_process_path(process), class: "card__link" do %>
<div class="card__image-top"
style="background-image:url(<%= process.hero_image.url %>)"></div>
<% end %>
<div class="card__content">
<%= link_to decidim_participatory_processes.participatory_process_path(process), class: "card__link" do %>
<h4 class="card__title"><%= translated_attribute process.title %></h4>
<% end %>
<% if process.active_step %>
<span class="card--process__small">
<%= t("active_step", scope: i18n_scope) %>
<strong><%= translated_attribute process.active_step.title %></strong>
</span>
<% end %>
</div>
</article>
</div>
<% end %>
</div>
</div>
</div>
<%= render "_all_processes" %>
</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<% process = highlighted_processes.first %>
<section class="wrapper-home home-section">
<div class="row" id="highlighted-processes">
<h3 class="section-heading"><%= t("active_processes", scope: i18n_scope) %></h3>
<div class="row collapse">
<article class="card card--full card--process">
<div class="row collapse card--process__row custom-process_card" style="background-image:url(<%= process.hero_image.url %>)">
<div class="column large-6 card--process__column" >
<div class="card__content">
<%= link_to decidim_participatory_processes.participatory_process_path(process), class: "card__link" do %>
<h2 class="card__title"><%= translated_attribute process.title %></h2>
<% end %>
<%= decidim_sanitize translated_attribute(process.short_description) %>
<%= link_to t("more_information", scope: i18n_scope), decidim_participatory_processes.participatory_process_path(process), class: "button secondary small hollow" %>
</div>
</div>
<div class="column large-6 card--process__column">
<div class="card--full__image">
<div class="card__content row collapse">
<div class="large-6 large-offset-6 columns">
<%= link_to decidim_participatory_processes.participatory_process_path(process), class: "button expanded button--sc" do %>
<%= t("participate", scope: i18n_scope) %>
<% if process.active_step %>
<span class="button__info">
<%= t("active_step", scope: i18n_scope) %>
<strong><%= translated_attribute process.active_step.title %></strong>
</span>
<% end %>
<% end %>
</div>
</div>
</div>
</div>
</div>
</article>
</div>
</div>
<%= render "_all_processes" %>
</section>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<% form.fields_for :settings, form.object.settings do |settings_fields| %>
<%= settings_fields.select :max_results, [1, 4, 8, 12], prompt: "", label: label %>
<% end %>
27 changes: 27 additions & 0 deletions app/views/layouts/decidim/_process_header.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<div class="process-header">
<div class="process-header__inner custom-process-header"
style="background-image:url(<%= current_participatory_space.banner_image.url %>);">
<div class="process-header__container row collapse column">
<div class="columns mediumlarge-8 process-header__info">
<div>
<h1 class="text-highlight heading2">
<%= translated_attribute(current_participatory_space.title) %>
</h1>
</div>
</div>
<div>
<h2 class="text-highlight heading-small">
<% if current_participatory_space.hashtag.present? %>
<span class="process-header__hashtag">
<%= link_to "##{current_participatory_space.hashtag}", "https://twitter.com/hashtag/#{current_participatory_space.hashtag}", target: "_blank" %>
</span>
<% end %>
<%= translated_attribute(current_participatory_space.subtitle) %>
</h2>
</div>
</div>
<%= render partial: "layouts/decidim/process_header_steps", locals: { participatory_process: current_participatory_space } %>
</div>
</div>
<%= render partial: "layouts/decidim/process_navigation", locals: { participatory_space: current_participatory_space } %>
</div>

0 comments on commit e3379de

Please sign in to comment.