From a55e9c42597aea973e91dd2c16183bcbd4e8d081 Mon Sep 17 00:00:00 2001 From: zellerbaptiste Date: Fri, 28 Jul 2023 15:42:46 +0200 Subject: [PATCH] fix(quote): ajoute un exemple avec un seul detail --- src/component/quote/example/index.ejs | 2 +- src/component/quote/style/_module.scss | 5 +---- src/component/quote/template/ejs/quote.ejs | 6 +++++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/component/quote/example/index.ejs b/src/component/quote/example/index.ejs index f9eed9ee4..308807e94 100755 --- a/src/component/quote/example/index.ejs +++ b/src/component/quote/example/index.ejs @@ -4,7 +4,7 @@ const sample = getSample(include); <%- sample('Citation par défaut (texte taille xl)', './sample/quote-default', {}, true); %> -<%- sample('Citation taille lg', './sample/quote-default', {quote:{size:'lg'}}, true); %> +<%- sample('Citation taille lg', './sample/quote-default', {quote:{size:'lg', sources: ['Un seul détail']}}, true); %> <%- sample('Citation avec image', './sample/quote-with-image', {}, true); %> diff --git a/src/component/quote/style/_module.scss b/src/component/quote/style/_module.scss index 1afb2500e..4d059f448 100644 --- a/src/component/quote/style/_module.scss +++ b/src/component/quote/style/_module.scss @@ -101,10 +101,7 @@ figcaption { @include disable-list-style; - - li { - @include text-style(xs); - } + @include text-style(xs); #{ns(quote)}__source { @include display-flex(row,null,flex-start,wrap); diff --git a/src/component/quote/template/ejs/quote.ejs b/src/component/quote/template/ejs/quote.ejs index c5a892475..c7c6b1c55 100644 --- a/src/component/quote/template/ejs/quote.ejs +++ b/src/component/quote/template/ejs/quote.ejs @@ -48,12 +48,16 @@ if (size) sizeClasses = [prefix+'-text--'+size];

<%= author %>

<% } %> - <% if (sources.length > 0) { %> + <% if (sources && sources.length > 1) { %> + <% } else { %> +
+ <%- sources[0] %> +
<% } %> <% if (image) { %>