Odoo18-Base/addons/website/views/snippets/s_pricelist_cafe.xml
2025-01-06 10:57:38 +07:00

127 lines
6.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="s_pricelist_cafe" name="Pricelist Cafe">
<section class="s_pricelist_cafe" data-oe-shape-data="{'shape':'web_editor/Origins/19','flip':[]}">
<div class="o_we_shape o_web_editor_Origins_19"/>
<div class="container">
<div class="row">
<div class="col-lg-5 pt64 o_cc o_cc5">
<h2 class="h3-fs">Discover our drinks</h2>
<p class="lead">Explore our curated selection of coffee, tea, and more. Delight in every sip!</p>
</div>
</div>
<div class="row align-items-center">
<div class="s_pricelist_cafe_col col-lg-4 py-5 o_cc o_cc5 s_col_no_resize">
<h3>Coffees</h3>
<ul class="list-unstyled my-3">
<t t-call="website.s_pricelist_cafe_item">
<t t-set="name">Coffee Latte</t>
<t t-set="price">$4.50</t>
<t t-set="description">Sleek, minimalist space offering meticulously brewed coffee and espresso drinks using freshly roasted beans.</t>
</t>
<t t-call="website.s_pricelist_cafe_item">
<t t-set="name">Cappuccino</t>
<t t-set="price">$4.25</t>
<t t-set="description">A vibrant spot known for its expertly crafted coffee, sourced directly from farmers and roasted to perfection.</t>
</t>
<t t-call="website.s_pricelist_cafe_item">
<t t-set="name">Espresso</t>
<t t-set="price">$4.10</t>
<t t-set="description">Artisanal espresso with a focus on direct trade and exceptional quality in a chic, comfortable setting.</t>
</t>
</ul>
</div>
<div class="s_pricelist_cafe_col col-lg-4 d-lg-block d-none o_snippet_mobile_invisible s_col_no_resize">
<img class="img img-fluid d-block mx-auto rounded-circle shadow" src="/web/image/website.s_pricelist_cafe_default_image" alt=""/>
</div>
<div class="s_pricelist_cafe_col col-lg-4 py-5 o_cc o_cc1 s_col_no_resize">
<h3>Teas</h3>
<ul class="list-unstyled my-3">
<t t-call="website.s_pricelist_cafe_item">
<t t-set="name">Earl Grey</t>
<t t-set="price">$3.50</t>
<t t-set="description">A classic black tea blend infused with the aromatic essence of bergamot, offering a fragrant, citrusy flavor.</t>
</t>
<t t-call="website.s_pricelist_cafe_item">
<t t-set="name">Jasmine Green Tea</t>
<t t-set="price">$3.00</t>
<t t-set="description">Delicate green tea scented with jasmine blossoms, providing a soothing and floral experience.</t>
</t>
<t t-call="website.s_pricelist_cafe_item">
<t t-set="name">Chamomile Tea</t>
<t t-set="price">$4.00</t>
<t t-set="description">Herbal tea made from dried chamomile flowers, known for its calming properties and gentle, apple-like flavor.</t>
</t>
</ul>
</div>
</div>
</div>
</section>
</template>
<template id="s_pricelist_cafe_item">
<li class="s_pricelist_cafe_item mb-4" data-name="Product">
<p class="s_pricelist_cafe_item_title d-flex align-items-baseline fw-bold">
<span class="d-flex flex-grow-1 align-items-center">
<span t-out="name" class="s_pricelist_cafe_item_name"/>
<span class="s_pricelist_cafe_item_line flex-grow-1 ms-2 border-top"/>
</span>
<span t-out="price" class="s_pricelist_cafe_item_price ms-auto ps-3"/>
</p>
<p t-if="description" t-out="description" class="s_pricelist_cafe_item_description d-block mt-2 pe-5 text-muted o_small"/>
</li>
</template>
<template id="s_pricelist_cafe_add_product_widget">
<we-row string="Product">
<we-button data-add-item="" data-item=".s_pricelist_cafe_item:last" data-select-item="" t-att-data-apply-to="apply_to" data-no-preview="true" class="o_we_bg_brand_primary">
Add Product
</we-button>
</we-row>
</template>
<template id="s_pricelist_cafe_options" inherit_id="website.snippet_options">
<xpath expr="//t[@t-call='website.snippet_options_background_options']" position="before">
<!-- Vertical Alignment -->
<div data-js="vAlignment" id="row_valign_snippet_option" data-selector=".s_pricelist_cafe" data-target=".row:has(.s_pricelist_cafe_col)">
<t t-call="website.vertical_alignment_option"/>
</div>
<!-- Add products -->
<div data-js="MultipleItems" data-selector=".s_pricelist_cafe">
<t t-call="website.s_pricelist_cafe_add_product_widget">
<t t-set="apply_to" t-valuef="> :has(.s_pricelist_cafe_item):not(:has(.row > div:has(.s_pricelist_cafe_item)))"/>
</t>
</div>
<div data-js="MultipleItems" data-selector=".s_pricelist_cafe .row > div">
<t t-call="website.s_pricelist_cafe_add_product_widget">
<t t-set="apply_to" t-valuef="> :has(.s_pricelist_cafe_item)"/>
</t>
</div>
</xpath>
<!-- Toggle descriptions -->
<xpath expr="." position="inside">
<div data-js="Pricelist" data-selector=".s_pricelist_cafe">
<we-checkbox string="Descriptions" data-toggle-description="true" data-items-class="s_pricelist_cafe_item" data-description-class="s_pricelist_cafe_item_description" data-no-preview="true"/>
<t t-call="website.snippet_options_border_line_widgets">
<t t-set="label">Separator</t>
<t t-set="direction" t-value="'top'"/>
<t t-set="apply_to" t-value="'.s_pricelist_cafe_item_line'"/>
</t>
</div>
<div data-selector=".s_pricelist_cafe_item" data-drop-near=".s_pricelist_cafe_item"/>
</xpath>
<xpath expr="//div[@data-js='SnippetMove']" position="attributes">
<attribute name="data-selector" add=".s_pricelist_cafe_item" separator=","/>
</xpath>
</template>
<!-- Assets -->
<record id="website.s_pricelist_cafe_000_scss" model="ir.asset">
<field name="name">Pricelist Cafe 000 SCSS</field>
<field name="bundle">web.assets_frontend</field>
<field name="path">website/static/src/snippets/s_pricelist_cafe/000.scss</field>
</record>
</odoo>