Files
design-themes/theme_notes/views/snippets/s_company_team_shapes.xml
T
Mehdi Outagant (MOU) ab8f6a8fce [IMP] theme_*: use minimal format for highlighted text content
*: buzzy, clean, notes

A highlighted text has the following structure:

```
<span class="o_text_highlight o_text_highlight_[highlightId]"
    style="--text-highlight-width: ...; --text-highlight-color: ...;">
    <span class="o_text_highlight_item">
        text content (line 1) ...
        <svg.../>
    </span>
    [<br/>]
    <span class="o_text_highlight_item">
        text content (line 2) ...
        <svg.../>
    </span>
    ...
</span>
```

Which is saved in a minimal format that allows the JS code to rebuild
the SVGs when it's needed:

```
<span class="o_text_highlight o_text_highlight_[highlightId]"
    style="--text-highlight-width: ...; --text-highlight-color: ...;">
    text content ...
</span>
```

The goal of this commit is to use the simplified format for theme
customizations and adapt the code from the "Snippets Preview" and the
"New Page Templates Preview" to be able to build the highlights using
this format when provided in XML.

task-4215788

closes odoo/design-themes#956

Related: odoo/odoo#181884
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2024-09-28 16:52:33 +00:00

18 lines
1007 B
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="s_company_team_shapes" inherit_id="website.s_company_team_shapes">
<xpath expr="//section" position="attributes">
<attribute name="class" add="o_cc1 pt80 pb80" remove="o_cc2 pt48 pb48" separator=" "/>
<attribute name="data-oe-shape-data">{'shape':'web_editor/Origins/05','colors':{'c3':'o-color-1'},'flip':[],'showOnMobile':false,'shapeAnimationSpeed':'0'}</attribute>
</xpath>
<xpath expr="//div[hasclass('o_container_small')]" position="before">
<div class="o_we_shape o_web_editor_Origins_05" style="background-image: url('/web_editor/shape/web_editor/Origins/05.svg?c3=o-color-1');"></div>
</xpath>
<xpath expr="//h2" position="replace">
<h2 style="text-align: center;"><span class="o_text_highlight o_translate_inline o_text_highlight_underline" style="--text-highlight-width: 4px; --text-highlight-color: var(--o-color-4);">Meet The Band</span></h2>
</xpath>
</template>
</odoo>