diff options
| author | qsm-odoo <qsm@odoo.com> | 2019-12-18 02:53:22 +0100 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2019-12-18 02:55:13 +0100 |
| commit | 46cdb3e4c7414a6790ea3da96d39b1f512f53e79 (patch) | |
| tree | 1aaa02fd13b0e8534740ad24a5f70c47db81798e | |
| parent | aee452da482c673f04da5a4d5b70fbb5a674c214 (diff) | |
| parent | 049dcc764f24527a6e052309eac19d346a72add7 (diff) | |
[REF] website: move s_faq_collapse to dedicated files
| -rw-r--r-- | addons/website/__manifest__.py | 1 | ||||
| -rw-r--r-- | addons/website/static/src/scss/website.scss (renamed from temp_scss) | 36 | ||||
| -rw-r--r-- | addons/website/static/src/snippets/s_faq_collapse/000.scss | 35 | ||||
| -rw-r--r-- | addons/website/views/snippets/s_faq_collapse.xml | 53 | ||||
| -rw-r--r-- | addons/website/views/snippets/snippets.xml (renamed from temp_xml) | 43 |
5 files changed, 89 insertions, 79 deletions
diff --git a/addons/website/__manifest__.py b/addons/website/__manifest__.py index e97d99a39c8..d5ec473daa1 100644 --- a/addons/website/__manifest__.py +++ b/addons/website/__manifest__.py @@ -50,6 +50,7 @@ 'views/snippets/s_company_team.xml', 'views/snippets/s_call_to_action.xml', 'views/snippets/s_references.xml', + 'views/snippets/s_faq_collapse.xml', 'views/website_views.xml', 'views/website_visitor_views.xml', 'views/res_config_settings_views.xml', diff --git a/temp_scss b/addons/website/static/src/scss/website.scss index 1f73c37c41e..5fa38c7bc97 100644 --- a/temp_scss +++ b/addons/website/static/src/scss/website.scss @@ -410,42 +410,6 @@ table.table_desc tr td { } } -// FAQ -.s_faq_collapse { - .accordion .card { - .card-header { - cursor: pointer; - display: inline-block; - width: 100%; - padding: .5em 0; - border-radius: 0; - outline: none; - &:before { - content:'\f056'; - font-family: 'FontAwesome'; - display: inline-block; - margin: 0 .5em 0 .75em; - color: $gray-600; - } - &.collapsed:before { - content:'\f055'; - font-family: 'FontAwesome'; - } - &:hover, - &:focus { - text-decoration: none; - } - } - .card-body { - padding: 1em 2.25em; - } - } - .card-body p:last-child, - .card-body ul:last-child { - margin-bottom: 0; - } -} - // Carousel -> TODO: should be versioned in 000.scss file but how ? .s_carousel, .s_quotes_carousel { diff --git a/addons/website/static/src/snippets/s_faq_collapse/000.scss b/addons/website/static/src/snippets/s_faq_collapse/000.scss new file mode 100644 index 00000000000..af236dea178 --- /dev/null +++ b/addons/website/static/src/snippets/s_faq_collapse/000.scss @@ -0,0 +1,35 @@ + +.s_faq_collapse { + .accordion .card { + .card-header { + cursor: pointer; + display: inline-block; + width: 100%; + padding: .5em 0; + border-radius: 0; + outline: none; + &:before { + content:'\f056'; + font-family: 'FontAwesome'; + display: inline-block; + margin: 0 .5em 0 .75em; + color: $gray-600; + } + &.collapsed:before { + content:'\f055'; + font-family: 'FontAwesome'; + } + &:hover, + &:focus { + text-decoration: none; + } + } + .card-body { + padding: 1em 2.25em; + } + } + .card-body p:last-child, + .card-body ul:last-child { + margin-bottom: 0; + } +} diff --git a/addons/website/views/snippets/s_faq_collapse.xml b/addons/website/views/snippets/s_faq_collapse.xml new file mode 100644 index 00000000000..7cb20fad7b6 --- /dev/null +++ b/addons/website/views/snippets/s_faq_collapse.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + +<template id="s_faq_collapse" name="Accordion"> + <section class="s_faq_collapse pt48 pb32"> + <div class="container"> + <div class="row s_nb_column_fixed"> + <div class="col-lg-12 s_title pt16 pb16"> + <h1 class="s_title_thin"><font style="font-size: 62px;">FAQ</font></h1> + </div> + </div> + <div class="row s_col_no_bgcolor"> + <div class="col-lg-12 pt16 pb16"> + <div id="myCollapse" class="accordion" role="tablist"> + <div class="card bg-white"> + <a href="#" role="tab" data-toggle="collapse" aria-expanded="true" class="card-header">Terms of service</a> + <div class="collapse show" role="tabpanel"> + <div class="card-body"> + <p class="card-text">These terms of service ("Terms", "Agreement") are an agreement between the website ("Website operator", "us", "we" or "our") and you ("User", "you" or "your"). This Agreement sets forth the general terms and conditions of your use of this website and any of its products or services (collectively, "Website" or "Services").</p> + </div> + </div> + </div> + <div class="card bg-white"> + <a href="#" role="tab" data-toggle="collapse" aria-expanded="false" class="collapsed card-header">Links to other Websites</a> + <div class="collapse" role="tabpanel"> + <div class="card-body"> + <p class="card-text">Although this Website may be linked to other websites, we are not, directly or indirectly, implying any approval, association, sponsorship, endorsement, or affiliation with any linked website, unless specifically stated herein.</p> + <p class="card-text">You should carefully review the legal statements and other conditions of use of any website which you access through a link from this Website. Your linking to any other off-site pages or other websites is at your own risk.</p> + </div> + </div> + </div> + <div class="card bg-white"> + <a href="#" role="tab" data-toggle="collapse" aria-expanded="false" class="collapsed card-header">Use of Cookies</a> + <div class="collapse" role="tabpanel"> + <div class="card-body"> + <p class="card-text">Website may use cookies to personalize and facilitate maximum navigation of the User by this site. The User may configure his / her browser to notify and reject the installation of the cookies sent by us.</p> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </section> +</template> + +<template id="assets_snippet_s_faq_collapse_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_faq_collapse/000.scss"/> + </xpath> +</template> + +</odoo> diff --git a/temp_xml b/addons/website/views/snippets/snippets.xml index e8eef757d14..c863716563b 100644 --- a/temp_xml +++ b/addons/website/views/snippets/snippets.xml @@ -1,49 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <odoo> -<template id="s_faq_collapse" name="Accordion"> - <section class="s_faq_collapse pt48 pb32"> - <div class="container"> - <div class="row s_nb_column_fixed"> - <div class="col-lg-12 s_title pt16 pb16"> - <h1 class="s_title_thin"><font style="font-size: 62px;">FAQ</font></h1> - </div> - </div> - <div class="row s_col_no_bgcolor"> - <div class="col-lg-12 pt16 pb16"> - <div id="myCollapse" class="accordion" role="tablist"> - <div class="card bg-white"> - <a href="#" role="tab" data-toggle="collapse" aria-expanded="true" class="card-header">Terms of service</a> - <div class="collapse show" role="tabpanel"> - <div class="card-body"> - <p class="card-text">These terms of service ("Terms", "Agreement") are an agreement between the website ("Website operator", "us", "we" or "our") and you ("User", "you" or "your"). This Agreement sets forth the general terms and conditions of your use of this website and any of its products or services (collectively, "Website" or "Services").</p> - </div> - </div> - </div> - <div class="card bg-white"> - <a href="#" role="tab" data-toggle="collapse" aria-expanded="false" class="collapsed card-header">Links to other Websites</a> - <div class="collapse" role="tabpanel"> - <div class="card-body"> - <p class="card-text">Although this Website may be linked to other websites, we are not, directly or indirectly, implying any approval, association, sponsorship, endorsement, or affiliation with any linked website, unless specifically stated herein.</p> - <p class="card-text">You should carefully review the legal statements and other conditions of use of any website which you access through a link from this Website. Your linking to any other off-site pages or other websites is at your own risk.</p> - </div> - </div> - </div> - <div class="card bg-white"> - <a href="#" role="tab" data-toggle="collapse" aria-expanded="false" class="collapsed card-header">Use of Cookies</a> - <div class="collapse" role="tabpanel"> - <div class="card-body"> - <p class="card-text">Website may use cookies to personalize and facilitate maximum navigation of the User by this site. The User may configure his / her browser to notify and reject the installation of the cookies sent by us.</p> - </div> - </div> - </div> - </div> - </div> - </div> - </div> - </section> -</template> - <template id="s_features_grid" name="Features Grid"> <section class="s_features_grid pt48 pb24"> <div class="container"> |
