Git Product home page Git Product logo

bookmarkts's Introduction

bookmark.ts

Bookmark.ts is the simplest version of Bookmark.js but recreated in clear TypeScript.

version

- Bookmark.ts Bookmark.js
dependencies no jQuery
make BM tree yes yes
show tree onHover beside scrollbar yes yes
activates onScroll yes yes
scrollbar associate with links in panel yes yes
hash in browser search bar (/uri#hash) yes yes
active links (shows where user now) no yes
auto-naming (I think no need in that) no yes

Browsers Support

Script works in all modern browsers (I think). I test it only in some of them, so:

Browser Support Browser version
Chrome yes 80.0.3987.122 64-bit
Firefox yes 73.0.1 64-bit
Edge* yes 44.18362.449.0
Safari yes iOS 13.3

* Edge is not on Chromium.

Installation

  1. clone repo
  2. go to repo folder and find build folder
  3. in build/assets you can find styles and js folders
  4. copy from styles file named bookmark.css to your styles folder
  5. copy from js file named bookmark.js to your scripts folder
  6. open your layout, template, view or .. and before </head> add next:
<link rel="preload" href="PATH_TO_YOUR_STYLES/bookmark.css" as="style">
<link rel="preload" href="PATH_TO_YOUR_SCRIPTS/bookmark.js" as="script">
<link rel="stylesheet" href="PATH_TO_YOUR_STYLES/bookmark.css">
  1. before </body> add next:
<script src="PATH_TO_YOUR_SCRIPTS/bookmark.js" charset="utf-8" defer></script>
  1. Okay, installation now completed.

Don't forget to change PATH_TO_YOUR_STYLES and PATH_TO_YOUR_SCRIPTS to your paths.

Usage

To add new bookmark into panel just follow next steps:

  • to any element e.g. h1,h2.. p, div, etc add class bookmark and
  • in the same element add data-bookmark-title="Your_title_here"

Don't forget to change Your_title_here to your title.

bookmarkts's People

Contributors

tomasci avatar

Stargazers

Alexander Petrov avatar  avatar

Watchers

 avatar  avatar

bookmarkts's Issues

hide afer scroll

state mouse_over_panel is not back to default state after mouse is leave, so when scrolled again and mouse is not over panel it is not hide

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.