mirror of
https://github.com/odoo/design-themes.git
synced 2025-10-07 01:18:52 +07:00
ab8f6a8fce
*: 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>
34 lines
1.9 KiB
XML
34 lines
1.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<template id="s_text_image" inherit_id="website.s_text_image">
|
|
<!-- Section -->
|
|
<xpath expr="//section" position="attributes">
|
|
<attribute name="class" add="o_cc o_cc3" separator=" "/>
|
|
<attribute name="data-oe-shape-data">{"shape":"web_editor/Wavy/11","flip":["x"]}</attribute>
|
|
</xpath>
|
|
<!-- Title & Paragraph -->
|
|
<xpath expr="//h2" position="replace" mode="inner">
|
|
<span class="o_text_highlight o_translate_inline o_text_highlight_underline" style="--text-highlight-width: 3px; --text-highlight-color: var(--o-color-1);">Our History</span>
|
|
</xpath>
|
|
<xpath expr="//p" position="replace" mode="inner">
|
|
<br/>
|
|
</xpath>
|
|
<xpath expr="//p[2]" position="replace" mode="inner">
|
|
<p>Their early days were spent playing small gigs at local clubs, where they rapidly gained a reputation for their high-energy performances and innovative sound. As they honed their craft, their fanbase grew, fueled by word-of-mouth buzz and their undeniable chemistry on stage.</p>
|
|
<p>With each new release, Nova Pulse has continued to evolve, experimenting with different genres while staying true to their unique style. Their relentless drive and commitment to making authentic, powerful music have brought them to where they are today—a band on the brink of rock stardom.</p>
|
|
</xpath>
|
|
<!-- Remove the button -->
|
|
<xpath expr="//a[hasclass('btn')]" position="replace"/>
|
|
<!-- Image wrapper -->
|
|
<xpath expr="//div[hasclass('col-lg-6')]" position="attributes">
|
|
<attribute name="class" add="col-lg-4 offset-lg-2" remove="col-lg-6 offset-lg-1" separator=" "/>
|
|
</xpath>
|
|
<!-- Text wrapper -->
|
|
<xpath expr="//div[hasclass('col-lg-5')]" position="attributes">
|
|
<attribute name="class" add="col-lg-6" remove="col-lg-5" separator=" "/>
|
|
</xpath>
|
|
</template>
|
|
|
|
</odoo>
|