Files
design-themes/theme_notes/views/snippets/s_framed_intro.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

26 lines
1.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="s_framed_intro" inherit_id="website.s_framed_intro">
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="o_cc o_cc3 pt80 pb80" remove="pt56 pb56" separator=" "/>
</xpath>
<!-- Title -->
<xpath expr="//h1" position="replace" mode="inner">
Unplug &amp; Unwind: The <span class="o_text_highlight o_translate_inline o_text_highlight_underline" style="--text-highlight-width: 6px; --text-highlight-color: var(--o-color-1);">Ultimate</span> Music Experience
</xpath>
<!-- Image -->
<xpath expr="//div[hasclass('col-lg-5')]" position="attributes">
<attribute name="class" add="o_cc4" remove="o_cc2" separator=" "/>
</xpath>
<xpath expr="//img" position="attributes">
<attribute name="src">/web/image/website.s_three_columns_default_image_2</attribute>
</xpath>
<xpath expr="//p" position="replace" mode="inner">
A groundbreaking force in modern rock, bringing an electrifying blend of high-energy performances and innovative sound
</xpath>
</template>
</odoo>