Files
design-themes/theme_buzzy/views/snippets/s_showcase.xml
T
Mehdi Outagant (MOU) 662c399420 [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#964

X-original-commit: ab8f6a8fce
Related: odoo/odoo#182003
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2024-09-29 19:51:44 +00:00

17 lines
669 B
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="s_showcase" inherit_id="website.s_showcase">
<xpath expr="//img" position="attributes">
<attribute name="src">/web_editor/shape/theme_buzzy/s_showcase.svg?c1=o-color-2</attribute>
</xpath>
<xpath expr="//h3" position="replace" mode="inner">
Features <span class="o_text_highlight o_translate_inline o_text_highlight_scribble_3 o_text_highlight_fill">showcase</span>
</xpath>
<xpath expr="(//div[hasclass('col-lg-6')])[2]" position="attributes">
<attribute name="class" add="col-lg-5 offset-lg-1" remove="col-lg-6" separator=" "/>
</xpath>
</template>
</odoo>