diff --git a/website_anchor_smooth_scroll/README.rst b/website_anchor_smooth_scroll/README.rst new file mode 100644 index 0000000000..3b82cacfbe --- /dev/null +++ b/website_anchor_smooth_scroll/README.rst @@ -0,0 +1,76 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +================================= +Smooth Scroll for Website Anchors +================================= + +This module extends the functionality of website links to support smooth +scrolling and allow you to have it for free and with zero configuration. + +Installation +============ + +You might be interested in the module ``website_snippet_anchor``, that lets you +assign anchors and link to them easily, but it is not required. + +Usage +===== + +To use this module, you need to: + +#. Go to any website view. +#. Create any link whose URL starts with ``#``. +#. Save. +#. Click on it. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/186/8.0 + +Known issues / Roadmap +====================== + +* Add option to smooth when changing page. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed `feedback +`_. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Rafael Blasco +* Jairo Llopis + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/website_anchor_smooth_scroll/__init__.py b/website_anchor_smooth_scroll/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/website_anchor_smooth_scroll/__manifest__.py b/website_anchor_smooth_scroll/__manifest__.py new file mode 100644 index 0000000000..68de413f17 --- /dev/null +++ b/website_anchor_smooth_scroll/__manifest__.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# © 2016 Antiun Ingeniería S.L. - Jairo Llopis +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + 'name': 'Smooth Scroll for Website Anchors', + 'summary': 'Replace default behavior for internal links (anchor only) with' + ' smooth scroll', + 'version': '11.0.1.0.0', + 'category': 'Website', + 'website': 'https://www.tecnativa.com', + 'author': 'Tecnativa, ' + 'LasLabs, ' + 'Nicolas JEUDY, ' + 'Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'application': False, + 'installable': True, + 'depends': [ + 'website', + ], + "data": [ + "views/assets.xml", + ], + "demo": [ + "demo/pages.xml", + ], +} diff --git a/website_anchor_smooth_scroll/demo/pages.xml b/website_anchor_smooth_scroll/demo/pages.xml new file mode 100644 index 0000000000..e22d12a6c9 --- /dev/null +++ b/website_anchor_smooth_scroll/demo/pages.xml @@ -0,0 +1,85 @@ + + + + + + + + + True + /page/website_anchor_smooth_scroll.demo_page + + + + + Anchor smooth scroll demo + page/website_anchor_smooth_scroll.demo_page + + 50 + + + + + diff --git a/website_anchor_smooth_scroll/i18n/bg.po b/website_anchor_smooth_scroll/i18n/bg.po new file mode 100644 index 0000000000..83b4b9b717 --- /dev/null +++ b/website_anchor_smooth_scroll/i18n/bg.po @@ -0,0 +1,69 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_anchor_smooth_scroll +# +# Translators: +# Kaloyan Naumov , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-29 03:55+0000\n" +"PO-Revision-Date: 2016-11-29 03:55+0000\n" +"Last-Translator: Kaloyan Naumov , 2016\n" +"Language-Team: Bulgarian (https://www.transifex.com/oca/teams/23907/bg/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: bg\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: website_anchor_smooth_scroll +#: model:website.menu,name:website_anchor_smooth_scroll.website_anchor_smooth_scroll_menu +msgid "Anchor Smooth Scroll Demo" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "It works for any links to #anchors in your website!" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "More dummy content" +msgstr "Още примерно съдържание" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Odoo CMS - a big picture" +msgstr "Odoo CMS - голяма снимка." + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Press the button below and enjoy a smooth experience." +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Scroll to bottom" +msgstr "Отиди в края" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Scroll to top" +msgstr "Отиди в началото" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Smooth? Nice." +msgstr "Гладко? Готино!" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "This is dummy content" +msgstr "Това е примерно съдържание" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Try smooth scrolling. Easily." +msgstr "Оптиайте гладкото местене. С лекота." diff --git a/website_anchor_smooth_scroll/i18n/de.po b/website_anchor_smooth_scroll/i18n/de.po new file mode 100644 index 0000000000..1cb0e29b25 --- /dev/null +++ b/website_anchor_smooth_scroll/i18n/de.po @@ -0,0 +1,69 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_anchor_smooth_scroll +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-26 16:36+0000\n" +"PO-Revision-Date: 2016-08-26 16:36+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: website_anchor_smooth_scroll +#: model:website.menu,name:website_anchor_smooth_scroll.website_anchor_smooth_scroll_menu +msgid "Anchor Smooth Scroll Demo" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "It works for any links to #anchors in your website!" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "More dummy content" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Odoo CMS - a big picture" +msgstr "Odoo CMS - Ein großes Bild" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Press the button below and enjoy a smooth experience." +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Scroll to bottom" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Scroll to top" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Smooth? Nice." +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "This is dummy content" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Try smooth scrolling. Easily." +msgstr "" diff --git a/website_anchor_smooth_scroll/i18n/es.po b/website_anchor_smooth_scroll/i18n/es.po new file mode 100644 index 0000000000..88ed9c38b1 --- /dev/null +++ b/website_anchor_smooth_scroll/i18n/es.po @@ -0,0 +1,70 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_anchor_smooth_scroll +# +# Translators: +# OCA Transbot , 2016 +# Pedro M. Baeza , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-29 03:55+0000\n" +"PO-Revision-Date: 2016-11-29 03:55+0000\n" +"Last-Translator: Pedro M. Baeza , 2016\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: website_anchor_smooth_scroll +#: model:website.menu,name:website_anchor_smooth_scroll.website_anchor_smooth_scroll_menu +msgid "Anchor Smooth Scroll Demo" +msgstr "Demo desplaz. suave de ancla" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "It works for any links to #anchors in your website!" +msgstr "¡Funciona para cualquier enlace a #anclas en su sitio web!" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "More dummy content" +msgstr "Más contenido de relleno" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Odoo CMS - a big picture" +msgstr "CMS Odoo - una imagen grande" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Press the button below and enjoy a smooth experience." +msgstr "Pulse el botón a continuación para disfrutar de una experiencia suave" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Scroll to bottom" +msgstr "Desplazamiento a la parte de abajo" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Scroll to top" +msgstr "Desplazamiento a la parte de arriba" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Smooth? Nice." +msgstr "¿Suave? Es agradable." + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "This is dummy content" +msgstr "Esto es un contenido de relleno" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Try smooth scrolling. Easily." +msgstr "Pruebe el desplazamiento suave. Fácilmente." diff --git a/website_anchor_smooth_scroll/i18n/fr.po b/website_anchor_smooth_scroll/i18n/fr.po new file mode 100644 index 0000000000..62cd1030ae --- /dev/null +++ b/website_anchor_smooth_scroll/i18n/fr.po @@ -0,0 +1,71 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_anchor_smooth_scroll +# +# Translators: +# OCA Transbot , 2016 +# Sébastien Alix , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-29 03:55+0000\n" +"PO-Revision-Date: 2016-11-29 03:55+0000\n" +"Last-Translator: Sébastien Alix , 2016\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: website_anchor_smooth_scroll +#: model:website.menu,name:website_anchor_smooth_scroll.website_anchor_smooth_scroll_menu +msgid "Anchor Smooth Scroll Demo" +msgstr "Démonstration du défilement fluide sur les liens ancrés" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "It works for any links to #anchors in your website!" +msgstr "Cela fonctionne pour tous les liens ancrés de votre site web !" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "More dummy content" +msgstr "Plus de contenu factice" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Odoo CMS - a big picture" +msgstr "Odoo CMS - une grande image" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Press the button below and enjoy a smooth experience." +msgstr "" +"Appuyez sur le bouton ci-dessous et profitez d'une expérience agréable." + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Scroll to bottom" +msgstr "Faire défiler vers le bas" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Scroll to top" +msgstr "Faire défiler vers le haut" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Smooth? Nice." +msgstr "Fluide? Agréable." + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "This is dummy content" +msgstr "Ceci est un contenu factice" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Try smooth scrolling. Easily." +msgstr "Essayez le défilement fluide. Facilement." diff --git a/website_anchor_smooth_scroll/i18n/it.po b/website_anchor_smooth_scroll/i18n/it.po new file mode 100644 index 0000000000..e89d25bfaf --- /dev/null +++ b/website_anchor_smooth_scroll/i18n/it.po @@ -0,0 +1,69 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_anchor_smooth_scroll +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-26 16:36+0000\n" +"PO-Revision-Date: 2016-08-26 16:36+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: website_anchor_smooth_scroll +#: model:website.menu,name:website_anchor_smooth_scroll.website_anchor_smooth_scroll_menu +msgid "Anchor Smooth Scroll Demo" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "It works for any links to #anchors in your website!" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "More dummy content" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Odoo CMS - a big picture" +msgstr "Odoo CMS - un'immagine grande" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Press the button below and enjoy a smooth experience." +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Scroll to bottom" +msgstr "Scorri in basso" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Scroll to top" +msgstr "Scorri in alto" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Smooth? Nice." +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "This is dummy content" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Try smooth scrolling. Easily." +msgstr "" diff --git a/website_anchor_smooth_scroll/i18n/pt_BR.po b/website_anchor_smooth_scroll/i18n/pt_BR.po new file mode 100644 index 0000000000..84d65e25ad --- /dev/null +++ b/website_anchor_smooth_scroll/i18n/pt_BR.po @@ -0,0 +1,69 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_anchor_smooth_scroll +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-26 16:36+0000\n" +"PO-Revision-Date: 2016-08-26 16:36+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: website_anchor_smooth_scroll +#: model:website.menu,name:website_anchor_smooth_scroll.website_anchor_smooth_scroll_menu +msgid "Anchor Smooth Scroll Demo" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "It works for any links to #anchors in your website!" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "More dummy content" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Odoo CMS - a big picture" +msgstr "Odoo CMS - Uma imagem grande" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Press the button below and enjoy a smooth experience." +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Scroll to bottom" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Scroll to top" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Smooth? Nice." +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "This is dummy content" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Try smooth scrolling. Easily." +msgstr "" diff --git a/website_anchor_smooth_scroll/i18n/sl.po b/website_anchor_smooth_scroll/i18n/sl.po new file mode 100644 index 0000000000..4619bf203e --- /dev/null +++ b/website_anchor_smooth_scroll/i18n/sl.po @@ -0,0 +1,69 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * website_anchor_smooth_scroll +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-26 16:36+0000\n" +"PO-Revision-Date: 2016-08-26 16:36+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" + +#. module: website_anchor_smooth_scroll +#: model:website.menu,name:website_anchor_smooth_scroll.website_anchor_smooth_scroll_menu +msgid "Anchor Smooth Scroll Demo" +msgstr "" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "It works for any links to #anchors in your website!" +msgstr "Deluje za katerokoli povezavo na #sidra na vaši spletni strani!" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "More dummy content" +msgstr "Več nadomestne vsebine" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Odoo CMS - a big picture" +msgstr "Odoo CMS - velika slika" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Press the button below and enjoy a smooth experience." +msgstr "Pritisnite spodnji gumb in uživajte gladko izkušnjo." + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Scroll to bottom" +msgstr "Pomik na dno" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Scroll to top" +msgstr "Pomik na vrh" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Smooth? Nice." +msgstr "Gladko? Lepo." + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "This is dummy content" +msgstr "To je nadomestna vsebina" + +#. module: website_anchor_smooth_scroll +#: model:ir.ui.view,arch_db:website_anchor_smooth_scroll.demo +msgid "Try smooth scrolling. Easily." +msgstr "Poskusite gladko pomikanje. Enostavno." diff --git a/website_anchor_smooth_scroll/static/description/icon.png b/website_anchor_smooth_scroll/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/website_anchor_smooth_scroll/static/description/icon.png differ diff --git a/website_anchor_smooth_scroll/static/src/js/website_anchor_smooth_scroll.js b/website_anchor_smooth_scroll/static/src/js/website_anchor_smooth_scroll.js new file mode 100644 index 0000000000..0c8844e169 --- /dev/null +++ b/website_anchor_smooth_scroll/static/src/js/website_anchor_smooth_scroll.js @@ -0,0 +1,26 @@ +/* © 2016 Antiun Ingeniería S.L. - Jairo Llopis + * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */ +odoo.define('website_anchor_smooth_scroll.website_anchor_smooth_scroll', function (require) { + +"use strict"; + +function website_anchor_smooth_scroll(event) { + event.preventDefault(); + var target = $(event.target.hash); + + return $('html, body') + .stop() + .animate({ + 'scrollTop': target.offset().top - 100 + }) + .promise() + .done(function(element) { + history.pushState(null, document.title, event.target.hash); + }); +} + +require('web.dom_ready'); + +$("a[href^='#']:not([href=#])").on("click", website_anchor_smooth_scroll); + +}); diff --git a/website_anchor_smooth_scroll/views/assets.xml b/website_anchor_smooth_scroll/views/assets.xml new file mode 100644 index 0000000000..35a4696e2c --- /dev/null +++ b/website_anchor_smooth_scroll/views/assets.xml @@ -0,0 +1,15 @@ + + + + +