Skip to content

Commit

Permalink
[FIX] theme_bookstore: fix multiple issues in the theme
Browse files Browse the repository at this point in the history
This commit fixes multiples issues in the theme:

- Wording
- Shapes that should appear only in the configurator
- Useless xpaths

task-4221731
  • Loading branch information
anso-odoo committed Sep 30, 2024
1 parent cf227cd commit 327b189
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 31 deletions.
8 changes: 4 additions & 4 deletions theme_bookstore/views/snippets/s_accordion.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
We accept returns within 30 days of purchase, provided the book is in its original condition and accompanied by the receipt. Refunds will be issued in the original form of payment. Please note that certain items, like discounted or final sale items, may not be eligible for return.
</xpath>
<!-- Question 2 -->
<xpath expr="(//div[hasclass('accordion-item')])[1]//span" position="replace" mode="inner">
<xpath expr="(//div[hasclass('accordion-item')])[2]//span" position="replace" mode="inner">
Do you offer gift cards?
</xpath>
<xpath expr="(//div[hasclass('accordion-item')])[1]//p" position="replace" mode="inner">
<xpath expr="(//div[hasclass('accordion-item')])[2]//p" position="replace" mode="inner">
Yes, we offer both physical and digital gift cards in various amounts. Physical gift cards can be purchased in-store or online and shipped to the recipient, while digital gift cards are sent instantly via email. Both types can be used for online and in-store purchases.
</xpath>
<!-- Question 3 -->
<xpath expr="(//div[hasclass('accordion-item')])[1]//span" position="replace" mode="inner">
<xpath expr="(//div[hasclass('accordion-item')])[3]//span" position="replace" mode="inner">
Can I request a book that's out of stock?
</xpath>
<xpath expr="(//div[hasclass('accordion-item')])[1]//p" position="replace" mode="inner">
<xpath expr="(//div[hasclass('accordion-item')])[3]//p" position="replace" mode="inner">
Absolutely! If a book is out of stock, you can place a special order through our website or by visiting the store. We'll notify you once the book is back in stock, and you can choose to pick it up in-store or have it shipped to your address. Special orders typically take 1-2 weeks to fulfill, depending on availability.
</xpath>
</template>
Expand Down
2 changes: 1 addition & 1 deletion theme_bookstore/views/snippets/s_accordion_image.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</xpath>
<!-- Paragraph -->
<xpath expr="//p[hasclass('lead')]" position="replace" mode="inner">
Find quick answers to common questions about our books, services, and policies.
Find quick answers to common questions about our books, services and policies.
</xpath>
</template>

Expand Down
16 changes: 11 additions & 5 deletions theme_bookstore/views/snippets/s_banner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" remove="pb96" add="pb128" separator=" "/>
<attribute name="data-oe-shape-data">{'shape':'web_editor/Origins/14_001', 'colors':{'c3':'o-color-3','c4':'o-color-4'}, 'flip':[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_14_001" style="background-image: url('/web_editor/shape/web_editor/Origins/14_001.svg?c3=o-color-3&amp;c4=o-color-4')"/>
</xpath>
<!-- Title -->
<xpath expr="//h1" position="replace" mode="inner">
Expand All @@ -32,4 +27,15 @@
</xpath>
</template>

<template id="configurator_s_banner" inherit_id="website.configurator_s_banner">
<!-- Shape option -->
<xpath expr="section" position="attributes">
<attribute name="data-oe-shape-data">{'shape':'web_editor/Origins/14_001', 'colors':{'c3':'o-color-3','c4':'o-color-4'}, 'flip':[]}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_14_001" style="background-image: url('/web_editor/shape/web_editor/Origins/14_001.svg?c3=o-color-3&amp;c4=o-color-4')"/>
</xpath>
</template>

</odoo>
6 changes: 1 addition & 5 deletions theme_bookstore/views/snippets/s_cover.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<template id="s_cover" inherit_id="website.s_cover">
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="oe_img_bg o_full_screen_height" remove="parallax s_parallax_is_fixed bg-black-50" separator=" "/>
<attribute name="class" add="oe_img_bg o_full_screen_height" remove="parallax s_parallax_is_fixed" separator=" "/>
<attribute name="data-scroll-background-ratio">0</attribute>
<attribute name="data-oe-shape-data">{'shape':'web_editor/Origins/09_001', 'colors':{'c3':'o-color-1'}}</attribute>
<attribute name="style">background-image: url('/web/image/website.s_cover_default_image'); background-position: 50% 55%;</attribute>
Expand All @@ -23,10 +23,6 @@
<xpath expr="//p[hasclass('lead')]" position="replace" mode="inner">
<br/>
</xpath>
<!-- Button -->
<xpath expr="//a[hasclass('btn')]/t" position="replace" mode="inner">
Discover more
</xpath>
</template>

</odoo>
16 changes: 11 additions & 5 deletions theme_bookstore/views/snippets/s_cta_box.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" remove="pt80 pb80" add="o_colored_level o_cc o_cc2 pt48 pb48" separator=" "/>
<attribute name="data-oe-shape-data">{'shape':'web_editor/Origins/04_001', 'colors':{'c3':'o-color-4'}}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_04_001" style="background-image: url('/web_editor/shape/web_editor/Origins/04_001.svg?c3=o-color-4');"/>
</xpath>
<!-- Title -->
<xpath expr="//h2" position="replace">
Expand All @@ -25,4 +20,15 @@
</xpath>
</template>

<template id="configurator_s_cta_box" inherit_id="website.configurator_s_cta_box">
<!-- Shape option -->
<xpath expr="section" position="attributes">
<attribute name="data-oe-shape-data">{'shape':'web_editor/Origins/04_001', 'colors':{'c3':'o-color-4'}}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_04_001" style="background-image: url('/web_editor/shape/web_editor/Origins/04_001.svg?c3=o-color-4');"/>
</xpath>
</template>

</odoo>
2 changes: 1 addition & 1 deletion theme_bookstore/views/snippets/s_features_wall.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</xpath>
<!-- Lead -->
<xpath expr="//p[hasclass('lead')]" position="replace" mode="inner">
We also offer these additional services, always with the same passion and care that defines everything we do.
We also offer these additional services, always with the same passion and care that define everything we do.
</xpath>
<!-- Card 1 -->
<xpath expr="//div[hasclass('g-col-lg-3')]//h3" position="replace" mode="inner">
Expand Down
2 changes: 1 addition & 1 deletion theme_bookstore/views/snippets/s_key_images.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</xpath>
<xpath expr="(//div[hasclass('col-lg-3')])[4]//p[3]" position="replace">
<h5>What I Didn't Post On Instagram</h5>
<p class="text-muted">by <em>Christy Stockton</em></p>
<p class="text-muted">by <em>Chrissy Stockton</em></p>
</xpath>
</template>

Expand Down
5 changes: 0 additions & 5 deletions theme_bookstore/views/snippets/s_showcase.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="pt128 pb128 o_cc o_cc5" remove="pt48 pb48" separator=" "/>
<attribute name="data-oe-shape-data">{'shape':'web_editor/Origins/11_001', 'colors':{'c3':'o-color-4','c4':'o-color-5'}, 'flip':['y']}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_11_001" style="background-image: url('/web_editor/shape/web_editor/Origins/11_001.svg?c3=o-color-4&amp;c4=o-color-5&amp;flip=y'); background-position: 0% 100%;"/>
</xpath>
<!-- Title -->
<xpath expr="//h3" position="replace" mode="inner">
Expand Down
15 changes: 11 additions & 4 deletions theme_bookstore/views/snippets/s_title.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,22 @@
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_bg_filter bg-black-50"/>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_11_001" style="background-image: url('/web_editor/shape/web_editor/Origins/11_001.svg?c3=o-color-4&amp;c4=o-color-5&amp;flip=y'); background-position: 50% 100%;"/>
</xpath>
<!-- Title -->
<xpath expr="//h2" position="replace">
<h2 class="display-3-fs">The most beautiful things in the world cannot be seen or touched, they are felt with the heart.</h2>
<p>— Antoine de Saint-Exupéry</p>
</xpath>
</template>

<template id="configurator_s_title" inherit_id="website.configurator_s_title">
<!-- Shape option -->
<xpath expr="section" position="attributes">
<attribute name="data-oe-shape-data">{'shape':'web_editor/Origins/04_001', 'colors':{'c3':'o-color-4'}}</attribute>
</xpath>
<!-- Shape -->
<xpath expr="//div[hasclass('container')]" position="before">
<div class="o_we_shape o_web_editor_Origins_11_001" style="background-image: url('/web_editor/shape/web_editor/Origins/11_001.svg?c3=o-color-4&amp;c4=o-color-5&amp;flip=y'); background-position: 50% 100%;"/>
</xpath>
</template>

</odoo>

0 comments on commit 327b189

Please sign in to comment.