Skip to content

Commit 48c3852

Browse files
committed
[IMP] website, web_editor: introduce s_quotes_carousel_compact snippet
This commit adds the new `s_quotes_carousel_compact` snippet. task-4174008 Part of task-4077427 closes #184670 Related: odoo/design-themes#993 Signed-off-by: Serge Bayet (seba) <[email protected]>
1 parent 87d2eb2 commit 48c3852

File tree

5 files changed

+115
-2
lines changed

5 files changed

+115
-2
lines changed

addons/web_editor/static/src/scss/wysiwyg_snippets.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2931,6 +2931,9 @@ we-select.o_grid we-toggler {
29312931
[data-snippet="s_quotes_carousel"] {
29322932
height: 550px;
29332933
}
2934+
[data-snippet="s_quotes_carousel_compact"] {
2935+
height: 350px;
2936+
}
29342937
[data-snippet="s_three_columns"] .figure-img[style*="height:50vh"] {
29352938
/* In Travel theme. */
29362939
height: 500px !important;

addons/website/__manifest__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
'views/snippets/s_quotes_carousel.xml',
102102
'views/snippets/s_numbers_grid.xml',
103103
'views/snippets/s_quotes_carousel_minimal.xml',
104+
'views/snippets/s_quotes_carousel_compact.xml',
104105
'views/snippets/s_numbers.xml',
105106
'views/snippets/s_contact_info.xml',
106107
'views/snippets/s_numbers_boxed.xml',

addons/website/static/src/components/dialog/add_page_dialog.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export class AddPageTemplatePreview extends Component {
139139
section[data-snippet="s_carousel_intro"],
140140
section[data-snippet="s_carousel_cards"],
141141
section[data-snippet="s_quotes_carousel_minimal"],
142+
section[data-snippet="s_quotes_carousel_compact"],
142143
section[data-snippet="s_quotes_carousel"] {
143144
height: ${carouselHeight} !important;
144145
}
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<odoo>
3+
4+
<template id="s_quotes_carousel_compact" name="Quotes Compact">
5+
<section class="s_quotes_carousel_wrapper" data-vxml="001" data-vcss="002">
6+
<t t-set="uniq" t-value="datetime.datetime.now().microsecond"/>
7+
<div t-attf-id="myQuoteCarouselCompact{{uniq}}" class="s_quotes_carousel s_quotes_carousel_compact s_carousel_default carousel carousel-dark slide" data-bs-ride="true" data-bs-interval="10000" data-option-name="CarouselBottomControllers">
8+
<!-- Content -->
9+
<div class="carousel-inner">
10+
<!-- #01 -->
11+
<div class="o_cc o_cc2 carousel-item active pt40 pb80 px-md-0" data-name="Slide">
12+
<div class="container">
13+
<div class="row">
14+
<blockquote data-name="Blockquote" data-snippet="s_blockquote" class="s_blockquote s_blockquote_default o_animable position-relative d-flex flex-column gap-4 w-100 me-auto my-4 p-1 fst-normal" data-vcss="001">
15+
<div class="s_blockquote_line_elt position-absolute top-0 start-0 bottom-0 bg-o-color-1"/>
16+
<div class="s_blockquote_wrap_icon position-absolute top-0 start-50 translate-middle w-100">
17+
<i class="s_blockquote_icon fa fa-quote-right fa-3x d-block mx-auto" role="img"/>
18+
</div>
19+
<p class="s_blockquote_quote my-auto h2-fs">" This company transformed our business. <br/>Their solutions are innovative and reliable. "</p>
20+
<div class="s_blockquote_infos gap-2 flex-row align-items-start justify-content-start w-100 text-start">
21+
<img src="/web/image/website.s_quotes_carousel_demo_image_3" class="s_blockquote_avatar img rounded-circle" alt=""/>
22+
<div class="s_blockquote_author">
23+
<span class="o_small">
24+
<strong>Jane DOE</strong><br/>
25+
<span class="text-muted">CEO of MyCompany</span>
26+
</span>
27+
</div>
28+
</div>
29+
</blockquote>
30+
</div>
31+
</div>
32+
</div>
33+
<!-- #02 -->
34+
<div class="o_cc o_cc2 carousel-item pt40 pb80 px-md-0" data-name="Slide">
35+
<div class="container">
36+
<div class="row">
37+
<blockquote data-name="Blockquote" data-snippet="s_blockquote" class="s_blockquote s_blockquote_default o_animable position-relative d-flex flex-column gap-4 w-100 me-auto my-4 p-1 fst-normal" data-vcss="001">
38+
<div class="s_blockquote_line_elt position-absolute top-0 start-0 bottom-0 bg-o-color-1"/>
39+
<div class="s_blockquote_wrap_icon position-absolute top-0 start-50 translate-middle w-100">
40+
<i class="s_blockquote_icon fa fa-quote-right fa-3x d-block mx-auto" role="img"/>
41+
</div>
42+
<p class="s_blockquote_quote my-auto h2-fs">" A trusted partner for growth. <br/>Professional, efficient, and always ahead of the curve. "</p>
43+
<div class="s_blockquote_infos gap-2 flex-row align-items-start justify-content-start w-100 text-start">
44+
<img src="/web/image/website.s_quotes_carousel_demo_image_4" class="s_blockquote_avatar img rounded-circle" alt=""/>
45+
<div class="s_blockquote_author">
46+
<span class="o_small">
47+
<strong>John DOE</strong><br/>
48+
<span class="text-muted">CCO of MyCompany</span>
49+
</span>
50+
</div>
51+
</div>
52+
</blockquote>
53+
</div>
54+
</div>
55+
</div>
56+
<!-- #03 -->
57+
<div class="o_cc o_cc2 carousel-item pt40 pb80 px-md-0" data-name="Slide">
58+
<div class="container">
59+
<div class="row">
60+
<blockquote data-name="Blockquote" data-snippet="s_blockquote" class="s_blockquote s_blockquote_default o_animable position-relative d-flex flex-column gap-4 w-100 me-auto my-4 p-1 fst-normal" data-vcss="001">
61+
<div class="s_blockquote_line_elt position-absolute top-0 start-0 bottom-0 bg-o-color-1"/>
62+
<div class="s_blockquote_wrap_icon position-absolute top-0 start-50 translate-middle w-100">
63+
<i class="s_blockquote_icon fa fa-quote-right fa-3x d-block mx-auto" role="img"/>
64+
</div>
65+
<p class="s_blockquote_quote my-auto h2-fs">" Outstanding service and results! <br/>They exceeded our expectations in every project. "</p>
66+
<div class="s_blockquote_infos gap-2 flex-row align-items-start justify-content-start w-100 text-start">
67+
<img src="/web/image/website.s_quotes_carousel_demo_image_5" class="s_blockquote_avatar img rounded-circle" alt=""/>
68+
<div class="s_blockquote_author">
69+
<span class="o_small">
70+
<strong>Iris DOE</strong><br/>
71+
<span class="text-muted">Manager of MyCompany</span>
72+
</span>
73+
</div>
74+
</div>
75+
</blockquote>
76+
</div>
77+
</div>
78+
</div>
79+
</div>
80+
<div class="o_horizontal_controllers container position-absolute start-50 bottom-0 translate-middle-x w-100 mb-md-4 o_not_editable">
81+
<div class="o_horizontal_controllers_row row gap-3 gap-lg-5 justify-content-between flex-nowrap flex-row-reverse mx-0">
82+
<!-- Controls -->
83+
<div class="o_arrows_wrapper gap-2 w-auto p-0">
84+
<button class="carousel-control-prev o_not_editable" contenteditable="false" t-attf-data-bs-target="#myQuoteCarouselCompact{{uniq}}" data-bs-slide="prev" aria-label="Previous" title="Previous">
85+
<span class="carousel-control-prev-icon" aria-hidden="true"/>
86+
<span class="visually-hidden">Previous</span>
87+
</button>
88+
<button class="carousel-control-next o_not_editable" contenteditable="false" t-attf-data-bs-target="#myQuoteCarouselCompact{{uniq}}" data-bs-slide="next" aria-label="Next" title="Next">
89+
<span class="carousel-control-next-icon" aria-hidden="true"/>
90+
<span class="visually-hidden">Next</span>
91+
</button>
92+
</div>
93+
<!-- Indicators -->
94+
<div class="s_carousel_indicators_numbers carousel-indicators align-items-center flex-shrink-1 w-auto">
95+
<button type="button" t-attf-data-bs-target="#myQuoteCarouselCompact{{uniq}}" data-bs-slide-to="0" class="active" aria-label="Carousel indicator"/>
96+
<button type="button" t-attf-data-bs-target="#myQuoteCarouselCompact{{uniq}}" data-bs-slide-to="1" aria-label="Carousel indicator"/>
97+
<button type="button" t-attf-data-bs-target="#myQuoteCarouselCompact{{uniq}}" data-bs-slide-to="2" aria-label="Carousel indicator"/>
98+
</div>
99+
</div>
100+
</div>
101+
</div>
102+
</section>
103+
</template>
104+
105+
</odoo>

addons/website/views/snippets/snippets.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,9 @@
340340
<t t-snippet="website.s_quotes_carousel_minimal" string="Quotes Minimal" group="people" label="Carousel">
341341
<keywords>cite, testimonials, endorsements, reviews, feedback, statements, references, sayings, comments, appreciations, citations, carousel</keywords>
342342
</t>
343+
<t t-snippet="website.s_quotes_carousel_compact" string="Quotes Compact" group="people" label="Carousel">
344+
<keywords>cite, testimonials, endorsements, reviews, feedback, statements, references, sayings, comments, appreciations, citations, carousel</keywords>
345+
</t>
343346

344347
<!-- Text group -->
345348
<t t-snippet="website.s_title" string="Title" group="text">
@@ -656,7 +659,7 @@
656659
<template id="snippet_options_carousel">
657660
<div data-js="Carousel"
658661
data-selector="section"
659-
data-exclude=".s_carousel_intro_wrapper, .s_carousel_cards_wrapper"
662+
data-exclude=".s_carousel_intro_wrapper, .s_carousel_cards_wrapper, .s_quotes_carousel_wrapper"
660663
data-target="> .carousel">
661664
<we-row string="Slide">
662665
<we-button data-add-slide="true" data-no-preview="true" class="o_we_bg_brand_primary">Add Slide</we-button>
@@ -691,7 +694,7 @@
691694

692695
<template id="snippet_options_carousel_bottom_controllers" inherit_id="website.snippet_options_carousel" primary="True">
693696
<xpath expr="//div" position="attributes">
694-
<attribute name="data-target">.s_carousel_intro</attribute>
697+
<attribute name="data-target">.s_carousel_intro, .s_quotes_carousel_compact</attribute>
695698
<attribute name="data-exclude"/>
696699
<attribute name="data-js">Carousel</attribute>
697700
</xpath>

0 commit comments

Comments
 (0)