-
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.
* Add png logo files * remove public/sw* files and add them to .gitignore * logo.en yml files * Add spec files and check footer locally * Correct checksum in overrides_spec.rb * i18n-tasks to fix decidim footer tests * Update spec/system/platoniq_footer_spec.rb Co-authored-by: Fran Bolívar <[email protected]> --------- Co-authored-by: Fran Bolívar <[email protected]>
- Loading branch information
Showing
12 changed files
with
132 additions
and
6 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
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.
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,32 @@ | ||
<div class="mini-footer"> | ||
<div class="container flex flex-wrap items-center gap-4 text-white pb-8"> | ||
<%= image_pack_tag "media/images/eu-logo.png", alt: t("eu.footer.logo"), class: "max-h-16 flex-none" %> | ||
<p class="text-xs max-w-md"> | ||
<%= t("eu.footer.text") %> | ||
</p> | ||
</div> | ||
<div class="mini-footer__content flex-wrap gap-8"> | ||
<div class="flex justify-start gap-10 items-center text-white"> | ||
<div> | ||
<a rel="decidim noopener noreferrer" href="https://journal.platoniq.net/" target="_blank" data-external-link="false"> | ||
<span class="text-xs"><%= t("platoniq.footer.text") %></span> | ||
<%= image_pack_tag("media/images/platoniq-logo.png", alt: t("platoniq.footer.logo"), class: "max-h-8 block") %> | ||
</a> | ||
</div> | ||
<div> | ||
<a rel="decidim noopener noreferrer" href="https://decidim.org/" target="_blank" data-external-link="false"> | ||
<%= image_pack_tag("media/images/decidim-logo.svg", alt: t("layouts.decidim.footer.decidim_logo"), class: "max-h-8 block") %> | ||
</a> | ||
<div class="text-xs mt-2 [&_a]:underline"> | ||
<%= t("layouts.decidim.footer.made_with_open_source").html_safe %> | ||
</div> | ||
</div> | ||
</div> | ||
<a class="flex gap-1 hover:opacity-50" rel="license noopener noreferrer" href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank" data-external-link="false"> | ||
<span class="sr-only"><%= t("layouts.decidim.footer.cc_by_license") %></span> | ||
<%= icon "creative-commons-line", class: "w-6 h-6 fill-current" %> | ||
<%= icon "creative-commons-by-line", class: "w-6 h-6 fill-current" %> | ||
<%= icon "creative-commons-sa-line", class: "w-6 h-6 fill-current" %> | ||
</a> | ||
</div> | ||
</div> |
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,13 @@ | ||
--- | ||
|
||
base_locale: en | ||
locales: [en] | ||
|
||
data: | ||
read: | ||
- 'config/locales/*.%{locale}.yml' | ||
|
||
ignore_missing: | ||
- layouts.decidim.footer.cc_by_license | ||
- layouts.decidim.footer.decidim_logo | ||
- layouts.decidim.footer.made_with_open_source |
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,9 @@ | ||
--- | ||
en: | ||
eu: | ||
footer: | ||
logo: 'European Union flag: Funded by the European Union' | ||
text: Views and opinions expressed are however those of the author(s) only and | ||
do not necessarily reflect those of the European Union or the European Research | ||
Executive Agency. Neither the European Union nor the granting authority can | ||
be held responsible for them. |
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,6 @@ | ||
--- | ||
en: | ||
platoniq: | ||
footer: | ||
logo: Platoniq Foundation - Creativity and Democracy | ||
text: Made with ♥ by |
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,35 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rails_helper" | ||
|
||
# We make sure that the checksum of the file overridden is the same | ||
# as the expected. If this test fails, it means that the overridden | ||
# file should be updated to match any change/bug fix introduced in the core | ||
checksums = [ | ||
{ | ||
package: "decidim-core", | ||
files: { | ||
# views | ||
"/app/views/layouts/decidim/footer/_mini.html.erb" => "ccead2f5f20557ea4db1501de943f82b" | ||
} | ||
} | ||
] | ||
|
||
describe "Overridden files", type: :view do | ||
checksums.each do |item| | ||
spec = Gem::Specification.find_by_name(item[:package]) | ||
item[:files].each do |file, signature| | ||
next unless spec | ||
|
||
it "#{spec.gem_dir}#{file} matches checksum" do | ||
expect(md5("#{spec.gem_dir}#{file}")).to eq(signature) | ||
end | ||
end | ||
end | ||
|
||
private | ||
|
||
def md5(file) | ||
Digest::MD5.hexdigest(File.read(file)) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
shared_context "when visiting organization homepage" do | ||
let(:organization) { create(:organization) } | ||
|
||
before do | ||
switch_to_host(organization.host) | ||
visit decidim.root_path | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rails_helper" | ||
|
||
describe "Has EU footer", perform_enqueued: true do | ||
include_context "when visiting organization homepage" | ||
|
||
it "renders the eu flag in the footer" do | ||
expect(page).to have_xpath("//img[@alt='European Union flag: Funded by the European Union']") | ||
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# frozen_string_literal: true | ||
|
||
require "rails_helper" | ||
|
||
describe "Has Platoniq footer", perform_enqueued: true do | ||
include_context "when visiting organization homepage" | ||
|
||
it "renders the platoniq logo in the footer" do | ||
expect(page).to have_content("Made with ♥ by") | ||
expect(page).to have_xpath("//img[@alt='Platoniq Foundation - Creativity and Democracy']") | ||
end | ||
end |