Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions website_anchor_smooth_scroll/README.rst
Original file line number Diff line number Diff line change
@@ -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
<https://github.com/OCA/website/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
<https://github.com/OCA/
website/issues/new?body=module:%20
website_anchor_smooth_scroll%0Aversion:%20
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Credits
=======

Images
------

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.

Contributors
------------

* Rafael Blasco <rafabn@antiun.com>
* Jairo Llopis <yajo.sk8@gmail.com>

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.
Empty file.
27 changes: 27 additions & 0 deletions website_anchor_smooth_scroll/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
# © 2016 Antiun Ingeniería S.L. - Jairo Llopis

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pedrobaeza is this line needed I don't now if it could be delete or not, or if we need to add all contributors.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is to collect here all the contributors, and when touched, on the respective files.

# 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",
],
}
85 changes: 85 additions & 0 deletions website_anchor_smooth_scroll/demo/pages.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- © 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->

<odoo>

<template id="demo_page_view" name="Anchor smooth scroll demo">
<t t-call="website.layout">
<div id="wrap" class="oe_structure oe_empty">
<section class="jumbotron mt16 mb16" id="top">
<div class="container">
<h1>Try smooth scrolling. Easily.</h1>
<p>
Press the button below and enjoy a smooth experience.
</p>
<p>
<a class="btn btn-primary btn-lg" href="#bottom">
Scroll to bottom
</a>
</p>
</div>
</section>
<section class="oe_dark mt16 mb16">
<div class="container">
<div class="row">
<div class="col-md-12 text-center mt32 mb32">
<h2>This is dummy content</h2>
</div>
<div class="col-md-12">
<img
alt="Odoo CMS - a big picture"
class="img img-responsive"
src="/website/static/src/img/backgrounds/building-profile.jpg"/>
</div>
</div>
</div>
</section>
<section class="oe_dark mt16 mb16">
<div class="container">
<div class="row">
<div class="col-md-12 text-center mt32 mb32">
<h2>More dummy content</h2>
</div>
<div class="col-md-12">
<img
alt="Odoo CMS - a big picture"
class="img img-responsive"
src="/website/static/src/img/backgrounds/building-profile.jpg"/>
</div>
</div>
</div>
</section>
<section class="jumbotron mt16 mb16" id="bottom">
<div class="container">
<h1>Smooth? Nice.</h1>
<p>
It works for any links to #anchors in your website!
</p>
<p>
<a class="btn btn-primary btn-lg" href="#top">
Scroll to top
</a>
</p>
</div>
</section>
</div>
</t>
</template>

<record id="demo_page" model="website.page">
<field name="website_published">True</field>
<field name="url">/page/website_anchor_smooth_scroll.demo_page</field>
<field name="view_id" ref="demo_page_view" />
</record>

<record id="menu_demo_page" model="website.menu">
<field name="name">Anchor smooth scroll demo</field>
<field name="url">page/website_anchor_smooth_scroll.demo_page</field>
<field name="parent_id" ref="website.main_menu" />
<field name="sequence" type="int">50</field>
<field name="website_id" ref="website.default_website"/>
<field name="page_id" ref="demo_page"/>
</record>

</odoo>
69 changes: 69 additions & 0 deletions website_anchor_smooth_scroll/i18n/bg.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_anchor_smooth_scroll
#
# Translators:
# Kaloyan Naumov <kaloyan@lumnus.net>, 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 <kaloyan@lumnus.net>, 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 "Оптиайте гладкото местене. С лекота."
69 changes: 69 additions & 0 deletions website_anchor_smooth_scroll/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * website_anchor_smooth_scroll
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 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 <transbot@odoo-community.org>, 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 ""
Loading