diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/website/views/snippets/s_share.xml | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/website/views/snippets/s_share.xml')
| -rw-r--r-- | addons/website/views/snippets/s_share.xml | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/addons/website/views/snippets/s_share.xml b/addons/website/views/snippets/s_share.xml new file mode 100644 index 00000000..bbd7ac70 --- /dev/null +++ b/addons/website/views/snippets/s_share.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + +<template id="s_share" name="Share"> + <div t-attf-class="s_share text-left #{_classes}"> + <h4 t-if="not _no_title" class="s_share_title d-none">Share</h4> + <a href="https://www.facebook.com/sharer/sharer.php?u={url}" t-attf-class="s_share_facebook #{_link_classes}" target="_blank"> + <i t-attf-class="fa fa-facebook #{not _link_classes and 'rounded shadow-sm'}"/> + </a> + <a href="https://twitter.com/intent/tweet?text={title}&url={url}" t-attf-class="s_share_twitter #{_link_classes}" target="_blank"> + <i t-attf-class="fa fa-twitter #{not _link_classes and 'rounded shadow-sm'}"/> + </a> + <a href="http://www.linkedin.com/sharing/share-offsite/?url={url}" t-attf-class="s_share_linkedin #{_link_classes}" target="_blank"> + <i t-attf-class="fa fa-linkedin #{not _link_classes and 'rounded shadow-sm'}"/> + </a> + <a href="https://wa.me/?text={title}" t-attf-class="s_share_whatsapp #{_link_classes}" target="_blank"> + <i t-attf-class="fa fa-whatsapp #{not _link_classes and 'rounded shadow-sm'}"/> + </a> + <a href="http://pinterest.com/pin/create/button/?url={url}&description={title}" t-attf-class="s_share_pinterest #{_link_classes}" target="_blank"> + <i t-attf-class="fa fa-pinterest #{not _link_classes and 'rounded shadow-sm'}"/> + </a> + <a href="mailto:?body={url}&subject={title}" t-attf-class="s_share_email #{_link_classes}"> + <i t-attf-class="fa fa-envelope #{not _link_classes and 'rounded shadow-sm'}"/> + </a> + </div> +</template> + +<template id="s_share_options" inherit_id="website.snippet_options"> + <xpath expr="." position="inside"> + <div data-selector=".s_share"> + <we-select string="Title Position" data-apply-to=".s_share_title"> + <we-button data-select-class="d-block">Top</we-button> + <we-button data-select-class="">Left</we-button> + <we-button data-select-class="d-none">None</we-button> + </we-select> + <we-select string="Layout" data-apply-to=".fa"> + <we-button data-select-class="rounded shadow-sm">Square</we-button> + <we-button data-select-class="rounded-empty-circle shadow-sm">Circle</we-button> + <we-button data-select-class="rounded-circle shadow-sm">Disk</we-button> + <we-button data-select-class="m-1">None</we-button> + </we-select> + <we-select string="Size" data-apply-to=".fa"> + <we-button data-select-class="">Small</we-button> + <we-button data-select-class="fa-2x">Medium</we-button> + <we-button data-select-class="fa-3x">Big</we-button> + </we-select> + <!-- Compatibility, keep reverse logical, don't use `icon_color` --> + <we-checkbox string="Color" data-select-class="no_icon_color|"/> + </div> + </xpath> +</template> + +<template id="assets_snippet_s_share_css_000" inherit_id="website.assets_frontend"> + <xpath expr="//link[last()]" position="after"> + <link rel="stylesheet" type="text/scss" href="/website/static/src/snippets/s_share/000.scss"/> + </xpath> +</template> + +<template id="assets_snippet_s_share_js_000" inherit_id="website.assets_frontend"> + <xpath expr="//script[last()]" position="after"> + <script type="text/javascript" src="/website/static/src/snippets/s_share/000.js"/> + </xpath> +</template> + +</odoo> |
