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 #11 from Metatavu/develop
Browse files Browse the repository at this point in the history
Visual update
  • Loading branch information
Eskilmar committed Jun 25, 2020
2 parents 478b2aa + df9d27e commit e5701b2
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 22 deletions.
21 changes: 21 additions & 0 deletions app/assets/stylesheets/decidim.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ $primary-rgb: 82,172,170;
justify-content: flex-end;
}
}
& .header-hero {
margin: 0px;
padding: 0px;
height: 500px;
}
}
@media screen and (max-width: 39.9375em){
.logo-bar {
Expand All @@ -81,6 +86,14 @@ $primary-rgb: 82,172,170;
& a {
color: white;
}
& .footer-div {
padding-top: 20px;
}
@media screen and (max-width: 39.9375em){
.footer-div {
padding-top: 10px;
}
}
}
.footer-logo-div {
height: 100%;
Expand All @@ -89,6 +102,14 @@ $primary-rgb: 82,172,170;
}
}

.hero-picture {
background-position: top center;
background-size: contain;
background-repeat: no-repeat;
height: 500px;
background-color: #007a86;
}

}


Expand Down
20 changes: 20 additions & 0 deletions app/cells/decidim/content_blocks/hero/show.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<section class="extended<% if !translated_welcome_text.blank? %> hero<% else %> hero-picture<% end %>" style="background-image:url(<%= background_image %>);">
<div class="hero__container">
<div class="row">
<div class="columns small-centered large-10">
<h1 class="text-highlight heading1 hero-heading">
<% if !translated_welcome_text.blank? %>
<%= decidim_sanitize translated_welcome_text %>
<% end %>
</h1>
</div>
</div>
<% if !translated_welcome_text.blank? %>
<div class="row">
<div class="columns small-centered small-6 medium-4 mediumlarge-3">
<%= cta_button %>
</div>
</div>
<% end %>
</div>
</section>
1 change: 0 additions & 1 deletion app/views/layouts/decidim/_main_footer.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
<li><%= link_to t("layouts.decidim.footer.download_open_data"), decidim.open_data_download_path %></li>
</ul>
</div>
<%= render partial: "layouts/decidim/social_media_links" %>
</div>
</div>
35 changes: 20 additions & 15 deletions app/views/layouts/decidim/_mini_footer.html.erb
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
<%
# The feedback email in the footer of the site
feedback_email = "palaute@omaidea.fi"
feedback_subject = "OmaIdea-palaute"
%>

<div class="mini-footer">
<div class="row">
<div class="medium-3 large-4 column">
<a rel="license" class="cc-badge"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank" rel="noopener">
<%= image_tag("decidim/cc-badge.png", alt: "Creative Commons License" ) %>
</a>
<%= t("layouts.decidim.footer.made_with_open_source").html_safe %>
</div>
<div class="medium-6 large-6 column footer-logo-div">
<div class="medium-6 large-6 column footer-logo-div">
<% if current_organization.official_img_footer? %>
<%= link_to current_organization.official_url, class: "footer-logo" do %>
<%= image_tag current_organization.official_img_footer.url.to_s , alt: current_organization.name %>
<% end %>
<% end %>
</div>
<div class="medium-3 large-2 column">
<div class="decidim-logo">
<a rel="decidim"
href="https://decidim.org/"
target="_blank" rel="noopener">
<%= image_tag("decidim/decidim-logo.svg", alt: "Decidim Logo" ) %>
<div class="medium-3 large-4 column">
<div class="footer-div">
<a rel="license"
href="http://creativecommons.org/licenses/by-sa/4.0/"
target="_blank" rel="noopener">
</a>
<%= t("layouts.decidim.footer.made_with_open_source").html_safe %>
</div>
</div>
<div class="medium-3 large-2 column">
<div class="footer-div">
<div class="mini-footer__copyright">
<a href="mailto:<%= feedback_email %>?subject=<%= feedback_subject %>"><%= t("layouts.footer.feedback").html_safe %></a>
</div>
</div>
</div>
</div>
Expand Down
5 changes: 0 additions & 5 deletions app/views/layouts/decidim/_wrapper.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ end
</div>
</div>
<div class="title-bar logo-bar">
<% if current_organization.official_img_header? %>
<%= link_to current_organization.official_url, class: "logo-cityhall" do %>
<%= image_tag current_organization.official_img_header.url.to_s , alt: current_organization.name %>
<% end %>
<% end %>
<div class="row column logobar">
<div class="logo-wrapper">
<%= render partial: "layouts/decidim/logo", locals: { organization: current_organization } %>
Expand Down
21 changes: 21 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,27 @@ class Application < Rails::Application
Rails.root.join("config", "locales", "overrides/*.yml").to_s,
]

# Passes a block of code to do after initialization.
config.after_initialize do
# Override the main menu
Decidim::MenuRegistry.create(:menu)
Decidim.menu :menu do |menu|
menu.item I18n.t("menu.home", scope: "decidim"),
decidim.root_path,
position: 1,
active: :exact

menu.item I18n.t("menu.processes", scope: "decidim"),
decidim_participatory_processes.participatory_processes_path,
position: 2,
active: :inclusive

menu.item I18n.t("menu.more_information", scope: "decidim"),
decidim.pages_path,
position: 3,
active: :inclusive
end

# Settings in config/environments/* take precedence over those specified here.
# Application configuration can go into files in config/initializers
# -- all .rb files in that directory are automatically loaded after loading
Expand Down
8 changes: 7 additions & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@
# available at http://guides.rubyonrails.org/i18n.html.

en:
hello: "Hello world"
decidim:
menu:
processes: 'Participate'
more_information: 'About'
layouts:
footer:
feedback: 'Give feedback'
4 changes: 4 additions & 0 deletions config/locales/fi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fi:
layouts:
footer:
feedback: 'Lähetä palautetta'
8 changes: 8 additions & 0 deletions config/locales/sv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
sv:
decidim:
menu:
processes: 'Delta'
more_information: 'Tilläggsinformation'
layouts:
footer:
feedback: 'Ge feedback'

0 comments on commit e5701b2

Please sign in to comment.