Skip to content

Commit

Permalink
Better card spacing for API Impot Particulier
Browse files Browse the repository at this point in the history
Adding a local "compact" variable as to not disturb
API Entreprise/Particulier layout
  • Loading branch information
Samuelfaure committed Dec 30, 2024
1 parent ee70f61 commit d20a250
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<div
id="<%= dom_id(authorization_request_form) %>"
class="
fr-tile fr-tile--horizontal fr-enlarge-link authorization-request-form-card
fr-tile fr-tile--horizontal fr-enlarge-link authorization-request-form-card <%= 'fr-p-3w' if local_assigns[:compact] %>
"
>
<div class="fr-tile__body">
<div class="fr-tile__content">
<h3 class="fr-h6 fr-tile__title fr-text-title--blue-france">
<%= link_to authorization_request_form.name, new_authorization_request_form_path(form_uid: authorization_request_form.id), **(local_assigns.fetch(:additional_link_attributes, {})) %>
</h3>
<p class="fr-tile__detail">
<p class="fr-tile__detail <%= 'fr-mt-0 fr-pb-7w' if local_assigns[:compact] %>">
<%= authorization_request_form.description %>
</p>
<% if authorization_request_form.service_provider %>
Expand All @@ -22,7 +22,7 @@
</div>
</div>
<% if authorization_request_form.use_case && File.exist?(Rails.root.join("app/assets/images/pictograms/authorization_requests/#{authorization_request_form.use_case}.svg")) %>
<div class="fr-tile__header">
<div class="fr-tile__header fr-mr-1w">
<div class="fr-tile__pictogram">
<%= dsfr_custom_pictogram(
"pictograms/authorization_requests/#{authorization_request_form.use_case}.svg",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@
<div
data-choose-authorization-request-form-target="form"
data-choose-authorization-request-form-tags="<%= authorization_request_form.tags.to_json %>"
class="fr-col-md-6 fr-col-xl-6 fr-col-12 fr-p-2w"
class="fr-col-md-4 fr-col-xl-4 fr-col-12 fr-p-2w"
>
<%= render partial: "authorization_request_forms/authorization_request_form_card",
locals: {
compact: true,
authorization_request_form:,
additional_link_attributes: { "data-choose-modalite-impot-particulier-target": "links" }
} %>
Expand Down Expand Up @@ -153,10 +154,11 @@
<div
data-choose-authorization-request-form-target="form"
data-choose-authorization-request-form-tags="<%= authorization_request_form.tags.to_json %>"
class="fr-col-md-6 fr-col-xl-6 fr-col-12 fr-p-2w"
class="fr-col-md-4 fr-col-xl-4 fr-col-12 fr-p-2w"
>
<%= render partial: "authorization_request_forms/authorization_request_form_card",
locals: {
compact: true,
authorization_request_form:,
additional_link_attributes: { "data-choose-modalite-impot-particulier-target": "links" }
} %>
Expand Down

0 comments on commit d20a250

Please sign in to comment.