Skip to content

Commit

Permalink
♻️ Limite l'usage de svg_tag_base64 aux cas de svg présent dans le pd…
Browse files Browse the repository at this point in the history
…f de restitution
  • Loading branch information
etienneCharignon committed Jan 8, 2025
1 parent 65bedad commit 7b687c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def rapport_colonne_class
'col-4 px-5 mb-4'
end

# cette fonction n'est nécessaire que pour les svg dans les PDF.
# Utiliser prioritairement `image_tag` même pour les SVG
def svg_tag_base64(chemin_avec_extension, options = {})
## Ne pas oublier de rajouter l'extension au path sinon ça ne build pas en production

Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/campagnes/_banniere_test_campagne.html.arb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

div class: 'card__banner card__banner--green d-flex justify-content-between' do
div class: 'd-flex align-items-end' do
svg_tag_base64 'avatar_bienvenue.svg', class: 'banner__icone', alt: ''
image_tag 'avatar_bienvenue.svg', class: 'banner__icone', alt: ''
end
div class: 'card__banner__texte' do
div class: 'card__banner__description' do
Expand Down

0 comments on commit 7b687c7

Please sign in to comment.