mirror of
https://github.com/odoo/design-themes.git
synced 2025-10-07 01:18:52 +07:00
[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>
This commit is contained in:
committed by
qsm-odoo
parent
971b323f58
commit
ab8f6a8fce
@@ -8,7 +8,7 @@
|
||||
</xpath>
|
||||
<!-- Title -->
|
||||
<xpath expr="//h1" position="replace" mode="inner">
|
||||
Unplug & 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);"><span class="o_text_highlight_item">Ultimate<svg fill="none" class="o_text_highlight_svg o_content_no_merge position-absolute overflow-visible top-0 start-0 w-100 h-100 pe-none"><path stroke-width="var(--text-highlight-width)" stroke="var(--text-highlight-color)" stroke-linecap="round" d="M 0,59 h 208.65625" class="o_text_highlight_path_underline"></path></svg></span></span> Music Experience
|
||||
Unplug & 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">
|
||||
|
||||
Reference in New Issue
Block a user