0.0.3 • Published 9 years ago

ember-cli-deeplink-component v0.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

ember-cli-deeplink-component

Code Climate Ember Observer Score Shields.io

Table of Contents

  • Live Example - external link
  • About
  • Installation
  • Properties
  • Example Code
  • Contributing

About

ember-cli-deeplink-component provides a {{deep-link}} component in both inline and block form. The component allows for linking to in-page content in much the same way you could on a non single page application site using a plain anchor tag.

Installation

cd /path/to/my-awesome-application
ember install ember-cli-deeplink-component

Properties

duration {number}

  • Duration of scroll event in milliseconds
    • Superseded by the speed property

href (req.) {string}

  • The target anchor name or id of the target element

mutable {boolean}

  • Whether scroll events can be interrupted by user interaction

speed {number}

  • Speed in pixels per second for scroll events

text {string}

  • Text content of the component
    • Superseded by content yielded via block syntax

Examples

Target an anchor using the inline syntax

{{deep-link href="waldo" text="Where is waldo?"}}

{{! the target anchor}}
<a name="waldo"></a>

Target an element by id using the block syntax

{{#deep-link href="waldo"}}
  Where is waldo?
{{/deep-link}}

{{! the target element}}
<div id="waldo">
  Here he is.
</div>

Contributing / Modifying

Clone the project and do what you want with it. If you do something neat and are feeling generous submit a PR against the feature branch (GitHub).

cd /path/to/projects
git clone git@github.com:zakmac/ember-cli-deeplink-component.git