mirror of
https://github.com/odoo/design-themes.git
synced 2025-10-07 01:18:52 +07:00
662c399420
*: 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>
31 lines
1.3 KiB
XML
31 lines
1.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<template id="s_banner" inherit_id="website.s_banner">
|
|
<xpath expr="//section" position="attributes">
|
|
<attribute name="class" add="pb48" remove="pb96" separator=" "/>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('row')]" position="attributes">
|
|
<attribute name="class" remove="o_grid_mode" separator=" "/>
|
|
<attribute name="data-row-count"/>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('row')]//div" position="attributes">
|
|
<attribute name="class">col-lg-4</attribute>
|
|
<attribute name="style"/>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('row')]//div[2]" position="attributes">
|
|
<attribute name="class">col-lg-6 offset-lg-2</attribute>
|
|
<attribute name="style"/>
|
|
</xpath>
|
|
<xpath expr="//h1" position="replace" mode="inner">
|
|
Unleash your <strong class="o_default_snippet_text"><span class="o_text_highlight o_translate_inline o_text_highlight_scribble_3 o_text_highlight_fill">potential</span>.</strong>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('row')]//div[2]//img" position="attributes">
|
|
<attribute name="src">/web_editor/shape/theme_buzzy/s_banner_2.svg?c1=o-color-2</attribute>
|
|
</xpath>
|
|
<xpath expr="//div[hasclass('row')]//div[3]" position="replace"/>
|
|
<xpath expr="//div[hasclass('row')]//div[3]" position="replace"/>
|
|
</template>
|
|
|
|
</odoo>
|