From 5104f74a83491aaa482a2d795dfb010ebec4f960 Mon Sep 17 00:00:00 2001 From: Anne-Cath Date: Tue, 24 Sep 2024 10:04:06 +0200 Subject: [PATCH] Adds ... if the current message is not completely displayed on the screen. --- asset/css/communication-brick.css | 24 +++++++++++++++++++++++- view/tile.html.twig | 12 ++++++++++-- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/asset/css/communication-brick.css b/asset/css/communication-brick.css index 8442795..2cc091b 100644 --- a/asset/css/communication-brick.css +++ b/asset/css/communication-brick.css @@ -76,6 +76,24 @@ #brick-communication .has-no-type .tile_body { padding-left: 0; } + +#brick-communication .carousel-inner .unfinish:before { + content: "\f141"; + font-family: "Font Awesome 5 Free"; + font-weight: 900; + font-size: 20px; + opacity: 0.3; + position: absolute; + clear: both; + top: 150px; + right:5%; +} + +@media (min-width: 992px){ + #brick-communication .carousel-inner .unfinish:before { + top: 140px; + } +} @media (max-width: 767px) { #brick-communication .tile_decoration { display: block; @@ -84,4 +102,8 @@ position: static; margin-bottom: -2em; } -} \ No newline at end of file + #brick-communication .carousel-inner .unfinish:before{ + top: 140px; + } +} + diff --git a/view/tile.html.twig b/view/tile.html.twig index f1ed546..1e5be2c 100644 --- a/view/tile.html.twig +++ b/view/tile.html.twig @@ -15,6 +15,15 @@ $('#carousel-popup-modal').modal('show'); }); $('.slide .item a').on('click', function(ev) { ev.stopPropagation(); } ); // Hyperlinks are still clickable + + $('.carousel-inner .item').each( function(i, elt){ + $(elt).css('display','block'); + var eltHeight= $(elt).height(); + $(elt).css('display',''); + if (eltHeight>$('.carousel-inner').height()) { + $(elt).addClass('unfinish'); + } + }); }); {% endblock %} @@ -26,8 +35,7 @@