Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change components width based on url
Browse files Browse the repository at this point in the history
alexrlpz committed Sep 9, 2024
1 parent bbec5b0 commit 03320bc
Showing 4 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<section class="alternative-landing cover-full" style="background-image:url(<%= background_image %>);">
<section id="<%= id_type %>" class="alternative-landing cover-full" style="background-image:url(<%= background_image %>);">
<div class="cover-text">
<h1 class="cover-title heading1 h1">
<%= decidim_sanitize translated_title %>
Original file line number Diff line number Diff line change
@@ -15,6 +15,11 @@ def translated_body
def background_image
model.images_container.attached_uploader(:background_image).path(variant: :big)
end

def id_type
process_group_url = "processes_groups"
request.url.include?(process_group_url) ? "hero-1" : ""
end
end
end
end
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<section class="alternative-landing tiles-4">
<section id="<%= id_type %>" class="alternative-landing tiles-4">
<div class="tiles">
<h1 class="tile tile-heading heading1 h1">
<%= decidim_sanitize translated_title %>
Original file line number Diff line number Diff line change
@@ -25,6 +25,11 @@ def translated_url(item_number)
def background_image(item_number)
model.images_container.attached_uploader("background_image_#{item_number}".to_sym).path(variant: :landscape)
end

def id_type
process_group_url = "processes_groups"
request.url.include?(process_group_url) ? "hero-1" : ""
end
end
end
end

0 comments on commit 03320bc

Please sign in to comment.