Skip to content

Commit

Permalink
Apply changes from VPS
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreMesure committed Nov 8, 2019
1 parent 9bcc426 commit 8ee4aaa
Show file tree
Hide file tree
Showing 20 changed files with 237 additions and 70 deletions.
10 changes: 10 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
GIT
remote: https://github.com/halfdan/piwik-ruby-tracking.git
revision: 5c733bd0d4deaef1f72dbfe8c9e305ddf3bca52a
specs:
piwik_analytics (2.0.0)
actionpack
activesupport
rails (>= 3.0.0)

GIT
remote: https://github.com/phatworx/devise_security_extension.git
revision: b2ee978af7d49f0fb0e7271c6ac074dfb4d39353
Expand Down Expand Up @@ -657,6 +666,7 @@ DEPENDENCIES
paranoia (~> 2.4.2)
pg (~> 0.21.0)
pg_search (~> 2.0.1)
piwik_analytics!
puma (~> 4.2.1)
rack-attack (~> 5.4.2)
rails (= 5.0.7.2)
Expand Down
2 changes: 2 additions & 0 deletions Gemfile_custom
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ group :staging, :production do
gem "heroku-deflater", "~> 0.6.3"
end

gem 'piwik_analytics', git: "https://github.com/halfdan/piwik-ruby-tracking.git"

gem "rack-attack", "~> 5.4.2"

ruby "2.4.9"
Binary file added app/assets/images/custom/consul_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/custom/logo_digidem.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
// * English: https://github.com/consul/consul/blob/master/CUSTOMIZE_EN.md#css
// * Spanish: https://github.com/consul/consul/blob/master/CUSTOMIZE_ES.md#css
//

.footer-sections {
padding-bottom: 1rem;
}
91 changes: 91 additions & 0 deletions app/views/custom/_footer.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<footer>
<div class="row">
<div class="small-12 large-4 column">
<h1 class="logo">
<%= link_to(t("layouts.footer.consul_url"), target: "blank", rel: "nofollow") do %>
<%= image_tag(image_path_for("consul_logo.png"), class: "float-left", alt: t("layouts.header.logo")) %>
<% end %>
</h1>

<p class="info">
<%= t("layouts.footer.description",
open_source: link_to(t("layouts.footer.open_source"), t("layouts.footer.open_source_url"), target: "blank", rel: "nofollow"),
consul: link_to(t("layouts.footer.consul"), t("layouts.footer.consul_url"), target: "blank", rel: "nofollow")).html_safe
%>
<%= link_to("Digidem Lab", "https://digidemlab.org", target: "blank", rel: "nofollow") %>
</p>
</div>

<div class="footer-sections small-12 large-8 column">
<div>
<%= link_to("https://digidemlab.org", target: "blank", rel: "nofollow") do %>
<%= image_tag(image_path_for("logo_digidem.png"), class: "float-right", alt: t("layouts.header.logo")) %>
<% end %>
</div>
</div>
</div>

<div class="subfooter row">
<div class="small-12 medium-8 column">
<%= t("layouts.footer.copyright", year: Time.current.year) %>&nbsp;|
<ul class="no-bullet inline-block">
<li class="inline-block"><%= link_to t("layouts.footer.privacy"), page_path("privacy") %>&nbsp;|</li>
<li class="inline-block"><%= link_to t("layouts.footer.conditions"), page_path("conditions") %>&nbsp;|</li>
<li class="inline-block"><%= link_to t("layouts.footer.accessibility"), page_path("accessibility") %></li>
</ul>
</div>

<div class="small-12 medium-4 column social">
<div class="text-right">
<ul>
<% if setting["twitter_handle"] %>
<li class="inline-block">
<%= link_to "https://twitter.com/#{setting["twitter_handle"]}", target: "_blank",
title: t("shared.go_to_page") + t("social.twitter", org: setting["org_name"]) + t("shared.target_blank") do %>
<span class="show-for-sr"><%= t("social.twitter", org: setting["org_name"]) %></span>
<span class="icon-twitter" aria-hidden="true"></span>
<% end %>
</li>
<% end %>
<% if setting["facebook_handle"] %>
<li class="inline-block">
<%= link_to "https://www.facebook.com/#{setting["facebook_handle"]}/", target: "_blank",
title: t("shared.go_to_page") + t("social.facebook", org: setting["org_name"]) + t("shared.target_blank") do %>
<span class="show-for-sr"><%= t("social.facebook", org: setting["org_name"]) %></span>
<span class="icon-facebook" aria-hidden="true"></span>
<% end %>
</li>
<% end %>
<% if setting["youtube_handle"] %>
<li class="inline-block">
<%= link_to "https://www.youtube.com/#{setting["youtube_handle"]}", target: "_blank",
title: t("shared.go_to_page") + t("social.youtube", org: setting["org_name"]) + t("shared.target_blank") do %>
<span class="show-for-sr"><%= t("social.youtube", org: setting["org_name"]) %></span>
<span class="icon-youtube" aria-hidden="true"></span>
<% end %>
</li>
<% end %>
<% if setting["telegram_handle"] %>
<li class="inline-block">
<%= link_to "https://www.telegram.me/#{setting["telegram_handle"]}", target: "_blank",
title: t("shared.go_to_page") + t("social.telegram", org: setting["org_name"]) + t("shared.target_blank") do %>
<span class="show-for-sr"><%= t("social.telegram", org: setting["org_name"]) %></span>
<span class="icon-telegram" aria-hidden="true"></span>
<% end %>
</li>
<% end %>
<% if setting["instagram_handle"] %>
<li class="inline-block">
<%= link_to "https://www.instagram.com/#{setting["instagram_handle"]}", target: "_blank",
title: t("shared.go_to_page") + t("social.instagram", org: setting["org_name"]) + t("shared.target_blank") do %>
<span class="show-for-sr"><%= t("social.instagram", org: setting["org_name"]) %></span>
<span class="icon-instagram" aria-hidden="true"></span>
<% end %>
</li>
<% end %>
<%= raw content_block("footer", I18n.locale) %>
</ul>
</div>
</div>
</div>
</footer>
1 change: 1 addition & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<%= content_for :social_media_meta_tags %>

<%= raw setting["html.per_page_code_head"] %>
<%= piwik_tracking_tag %>
</head>
<body class="<%= yield (:body_class) %>">
<%= raw setting["html.per_page_code_body"] %>
Expand Down
12 changes: 3 additions & 9 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,14 @@ class Application < Rails::Application

# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
config.i18n.default_locale = :en
config.i18n.default_locale = :sv
available_locales = [
"sv",
"en",
"de",
"es",
"fr"
"en"
]
config.i18n.available_locales = available_locales
config.i18n.fallbacks = {
'sv' => 'en',
'de' => 'en',
'es' => 'en',
'fr' => 'en',
'sv' => 'en'
}

config.i18n.load_path += Dir[Rails.root.join("config", "locales", "**[^custom]*", "*.{rb,yml}")]
Expand Down
5 changes: 4 additions & 1 deletion config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ development: &development
# The staging, preproduction and production dbs are only needed
# for running rake assets:precompile locally before deploying
staging:
<<: *default
url: <%= ENV['DATABASE_URL'] %>

preproduction:
<<: *development
<<: *default
url: <%= ENV['DATABASE_URL'] %>

production:
<<: *default
url: <%= ENV['DATABASE_URL'] %>

test:
Expand Down
4 changes: 4 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.

# The seeds are adding content in Spanish so Spanish is needed in dev env.
config.i18n.default_locale = :sv
config.i18n.available_locales = %w[en es sv]

# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]

# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = false
config.force_ssl = true

# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
Expand Down
12 changes: 6 additions & 6 deletions config/locales/en/general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,13 @@ en:
footer:
accessibility: Accessibility
conditions: Terms and conditions of use
consul: CONSUL application
consul_url: https://github.com/consul/consul
contact_us: For technical assistance visit
copyright: CONSUL, %{year}
description: This portal uses the %{consul} which is %{open_source}.
consul: CONSUL
consul_url: http://consulproject.org/en/
contact_us: Digidem Lab
copyright: Göteborgs stad & Digidem Lab, %{year}
description: This portal uses %{consul} which is %{open_source}. Do you want to use CONSUL in your city? Contact
open_source: open-source software
open_source_url: http://www.gnu.org/licenses/agpl-3.0.html
open_source_url: https://github.com/digidemlab/consul
participation_text: Decide how to shape the city you want to live in.
participation_title: Participation
privacy: Privacy Policy
Expand Down
14 changes: 7 additions & 7 deletions config/locales/sv-SE/general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,17 +212,17 @@ sv:
other: "Stöd"
footer:
accessibility: Tillgänglighet
conditions: användarvillkoren
conditions: Användarvillkoren
consul: CONSUL
consul_url: https://github.com/consul/consul
contact_us: För teknisk support gå till
copyright: CONSUL, %{year}
description: Den här webbplatsen använder %{consul} som är %{open_source}.
consul_url: http://consulproject.org/en/
contact_us: Digidem Lab
copyright: Göteborgs stad & Digidem Lab, %{year}
description: Den här webbplatsen använder %{consul} som är %{open_source}. Vill du använda CONSUL i din stad? Kontakta
open_source: en plattform med öppen källkod
open_source_url: http://www.gnu.org/licenses/agpl-3.0.html
open_source_url: https://github.com/digidemlab/consul
participation_text: Skapa den stad du vill ha.
participation_title: Deltagande
privacy: sekretesspolicyn
privacy: Sekretesspolicyn
header:
administration_menu: Admin
administration: Administration
Expand Down
101 changes: 63 additions & 38 deletions config/locales/sv-SE/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ sv:
pages:
conditions:
title: användarvillkoren
subtitle: LEGAL NOTICE ON THE CONDITIONS OF USE, PRIVACY AND PROTECTION OF PERSONAL DATA OF THE OPEN GOVERNMENT PORTAL
description: Information page on the conditions of use, privacy and protection of personal data.
help:
title: "%{org} är en plattform för medborgardeltagande"
guide: "Den här guiden förklarar de olika delarna av %{org} och hur de fungerar."
Expand Down Expand Up @@ -65,54 +67,77 @@ sv:
title: sekretesspolicyn
accessibility:
title: Tillgänglighet
description: |-
Web accessibility refers to the possibility of access to the web and its contents by all people, regardless of the disabilities (physical, intellectual or technical) that may arise or from those that derive from the context of use (technological or environmental) .
When websites are designed with accessibility in mind, all users can access content in equal conditions, for example:
examples:
- Providing alternative text to the images, blind or visually impaired users can use special readers to access the information.
- When videos have subtitles, users with hearing difficulties can fully understand them.
- If the contents are written in a simple and illustrated language, users with learning problems are better able to understand them.
- If the user has mobility problems and it is difficult to use the mouse, the alternatives with the keyboard help in navigation.
keyboard_shortcuts:
title: Keyboard shortcuts
navigation_table:
description: To be able to navigate through this website in an accessible way, a group of quick access keys has been programmed that gather the main sections of general interest in which the site is organized.
caption: Keyboard shortcuts for the navigation menu
key_header: Key
page_header: Sida
rows:
-
key_column: 0
page_column: Hem
-
key_column: 1
page_column: Debatter
-
key_column: 2
page_column: Förslag
-
key_column: 3
page_column: Röster
-
key_column: 4
page_column: Medborgarbudgetar
-
key_column: 5
- key_column: 0
page_column: Home
- key_column: 1
page_column: Debates
- key_column: 2
page_column: Proposals
- key_column: 3
page_column: Votes
- key_column: 4
page_column: Participatory budgets
- key_column: 5
page_column: Legislative processes
browser_table:
description: "Depending on the operating system and the browser used, the key combination will be as follows:"
caption: Key combination depending on the operating system and browser
browser_header: Browser
key_header: Key combination
rows:
-
browser_column: IE
-
browser_column: Firefox
-
browser_column: Chrome
-
browser_column: Safari
-
browser_column: Opera
- browser_column: Explorer
key_column: ALT + shortcut then ENTER
- browser_column: Firefox
key_column: ALT + CAPS + shortcut
- browser_column: Chrome
key_column: ALT + shortcut (CTRL + ALT + shortcuts for MAC)
- browser_column: Safari
key_column: ALT + shortcut (CMD + shortcut for MAC)
- browser_column: Opera
key_column: CAPS + ESC + shortcut
textsize:
title: Textstorlek
browser_settings_table:
description: The accessible design of this website allows the user to choose the size of the text that suits him. This action can be carried out in different ways depending on the browser used.
browser_header: Browser
action_header: Action to be taken
rows:
-
browser_column: IE
action_column: Visa > Textstorlek
-
browser_column: Firefox
action_column: Visa > Storlek
-
browser_column: Chrome
-
-
browser_column: Opera
- browser_column: Explorer
action_column: View > Text size
- browser_column: Firefox
action_column: View > Size
- browser_column: Chrome
action_column: Settings (icon) > Options > Advanced > Web Content > Text size
- browser_column: Safari
action_column: View > Zoom In/Zoom out
- browser_column: Opera
action_column: View > scale
browser_shortcuts_table:
description: "Another way to modify the text size is to use the keyboard shortcuts defined in browsers, in particular the key combination:"
rows:
- shortcut_column: CTRL and + (CMD and + on MAC)
description_column: Increases text size
- shortcut_column: CTRL and - (CMD and - on MAC)
description_column: Decreases text size
compatibility:
title: Compatibility with standards and visual design
description_html: 'All pages of this website comply with the <strong>Accessibility Guidelines</strong> or General Principles of Accessible Design established by the Working Group <abbr title="Web Accessibility Initiative" lang="en">WAI</abbr> belonging to W3C.'
titles:
help: "Vad är %{org}? - Medborgardeltagande"
verify:
Expand Down
Loading

0 comments on commit 8ee4aaa

Please sign in to comment.