GithubHelp home page GithubHelp logo

bitrixinfo / tilda-router Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marksto/tilda-router

0.0 1.0 0.0 34 KB

A ready-to-use component for enhanced in-page routing on Tilda-based websites.

License: Apache License 2.0

JavaScript 100.00%

tilda-router's Introduction

Tilda Router

A ready-to-use component for enhanced in-page routing on Tilda-based websites.

Demo

See how the very same hash-based navigation ups Tera kulta to the next level of UX.

How to use

  1. For all built-in Tilda navigation-related blocks that you use, take their overrides from the tilda-overrides directory and add them at the top of your page (or at the bottom of the "header") within a dedicated HTML block.

  2. Similarly, add the tilda-router.js (or its minified version) and then the following snippet:

    window.router = new TildaRouter(window.location);
    
  3. Add a dedicated anchor link (block T173) in front of each navigable block. Note that popup links have to be in the standard Tilda #popup:name-of-your-popup format to work properly.

  4. In case you want some blocks to attract navigation (e.g. when the product's popup is opened from outside the parent block and you want to keep the user focused on what is open now), pass their dedicated anchors upon the TildaRouter construction as shown below:

    window.router = new TildaRouter(window.location, { attractors: [ '#my-very', '#important', '#blocks' ] });
    
  5. Enjoy the new in-page routing!

Changelog

  • Update to support a newer version of Tilda Catalog:
    • tilda-catalog-1.1
  • Initial version built upon:
    • tilda-blocks-2.7
    • tilda-catalog-1.0
    • tilda-products-1.0
    • tilda-slds-1.4

tilda-router's People

Contributors

marksto avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.