Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change menu and hero image opacity #127

Merged
merged 8 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/decidim_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ jobs:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
- uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: 119.0.6045.105
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
Expand Down
5 changes: 3 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ GEM
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.2.5)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
Expand Down Expand Up @@ -734,7 +734,8 @@ GEM
rb-inotify (~> 0.9, >= 0.9.7)
scout_apm (5.3.5)
parser
selenium-webdriver (4.16.0)
selenium-webdriver (4.18.1)
base64 (~> 0.2)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
Expand Down
8 changes: 8 additions & 0 deletions app/packs/stylesheets/decidim/decidim_application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ div.flash.progressing {
background-color: var(--bg-progressing-2);
border-color: var(--progressing);
}

.hero__container {
background-image: var(--hero-image);

.hero__title {
@apply bg-gray-4 bg-opacity-50;
}
}
21 changes: 14 additions & 7 deletions config/initializers/metadecidim_menu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@
position: 20,
active: :inclusive

meetings_path = Decidim::Meetings::DirectoryEngine.routes.url_helpers.root_path
menu.add_item :meetings,
I18n.t("menu.meetings", scope: "decidim"),
meetings_path,
position: 30,
active: :inclusive

governance_path = Decidim::Assemblies::Engine.routes.url_helpers.assembly_path("our-governance")
menu.add_item :governance,
I18n.t("menu.governance", scope: "decidim"),
Expand All @@ -36,6 +29,13 @@
position: 50,
active: :inclusive

conferences_path = Decidim::Conferences::Engine.routes.url_helpers.conferences_path
menu.add_item :decidim_fest,
I18n.t("menu.decidim_fest", scope: "decidim"),
conferences_path,
position: 55,
active: :inclusive

chat_url = "http://chat.decidim.org"
menu.add_item :chat,
I18n.t("menu.chat", scope: "decidim"),
Expand Down Expand Up @@ -79,6 +79,13 @@
position: 50,
active: :inclusive

conferences_path = Decidim::Conferences::Engine.routes.url_helpers.conferences_path
menu.add_item :decidim_fest,
I18n.t("menu.decidim_fest", scope: "decidim"),
conferences_path,
position: 55,
active: :inclusive

chat_url = "http://chat.decidim.org"
menu.add_item :chat,
I18n.t("menu.chat", scope: "decidim"),
Expand Down
4 changes: 2 additions & 2 deletions config/locales/ca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ ca:
decidim:
menu:
chat: Xat
governance: Com ens organitzem
meetings: Trobades
decidim_fest: Decidim Fest
governance: L'Associació
news: Notícies
participate: Participa
start_here: Comença aquí
Expand Down
4 changes: 2 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ en:
decidim:
menu:
chat: Chat
governance: Our governance
meetings: Meetings
decidim_fest: Decidim Fest
governance: The Association
news: News
participate: Participate
start_here: Start here
Expand Down
4 changes: 2 additions & 2 deletions config/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ es:
decidim:
menu:
chat: Chat
governance: Cómo nos organizamos
meetings: Encuentros
decidim_fest: Decidim Fest
governance: La Asociación
news: Noticias
participate: Participa
start_here: Comienza aquí
Expand Down
14 changes: 14 additions & 0 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,17 @@
Decidim::Assembly.first.update!(slug: 'our-governance')
Decidim::ParticipatoryProcess.last.update!(slug: "news")
Decidim::ParticipatoryProcess.last.components.where(manifest_name: 'blogs').first.update!(id: 1719, name: { en: 'news' })

seeds_root = File.join(__dir__, "seeds")
seeds_file = "homepage_image.png"

seeds_image_blob = ActiveStorage::Blob.create_and_upload!(
io: File.open(File.join(seeds_root, seeds_file)),
filename: seeds_file,
content_type: "image/png",
metadata: nil
)

hero_content_block = Decidim::ContentBlock.find_by(organization:, manifest_name: :hero, scope_name: :homepage)
hero_content_block.images_container.background_image = seeds_image_blob
hero_content_block.save!
Binary file added db/seeds/homepage_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions spec/features/menu_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
within "#home__menu" do
expect(page).to have_content("Start here")
expect(page).to have_content("Participate")
expect(page).to have_content("Meetings")
expect(page).to have_content("Our governance")
expect(page).to have_content("The Association")
expect(page).to have_content("News")
expect(page).to have_content("Decidim Fest")
expect(page).to have_content("Chat")
end
end
Expand All @@ -54,8 +54,9 @@
expect(page).to have_content("Home")
expect(page).to have_content("Start here")
expect(page).to have_content("Participate")
expect(page).to have_content("Our governance")
expect(page).to have_content("The Association")
expect(page).to have_content("News")
expect(page).to have_content("Decidim Fest")
expect(page).to have_content("Chat")
end
end
Expand All @@ -69,8 +70,9 @@
expect(page).to have_content("Home")
expect(page).to have_content("Start here")
expect(page).to have_content("Participate")
expect(page).to have_content("Our governance")
expect(page).to have_content("The Association")
expect(page).to have_content("News")
expect(page).to have_content("Decidim Fest")
expect(page).to have_content("Chat")
end
end
Expand All @@ -88,9 +90,9 @@
within "#home__menu" do
expect(page).to have_content("Comença aquí")
expect(page).to have_content("Participa")
expect(page).to have_content("Trobades")
expect(page).to have_content("Com ens organitzem")
expect(page).to have_content("L'Associació")
expect(page).to have_content("Notícies")
expect(page).to have_content("Decidim Fest")
expect(page).to have_content("Xat")
end
end
Expand Down
Loading