Skip to content

Commit

Permalink
fix demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Zecat committed Jul 13, 2016
1 parent 8743f35 commit 0fece81
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 77 deletions.
2 changes: 2 additions & 0 deletions all-imports.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<link rel="import" href="iron-auto-scroll-spy.html">
<link rel="import" href="iron-scroll-spy.html">
2 changes: 1 addition & 1 deletion demo/auto-scroll-spy.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<paper-tab>Section D</paper-tab>
</paper-tabs>
</paper-toolbar>
<iron-auto-scroll-spy selected="{{scrollSelected}}" id="autoScroll">
<iron-auto-scroll-spy selected="{{scrollSelected}}" fallback-selection="2" id="autoScroll">
<div>
<h1>Section A</h1>
<span>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reiciendis, provident asperiores. Itaque quas architecto commodi, quam dicta beatae blanditiis obcaecati, voluptatibus, quisquam sint necessitatibus aliquid vero sunt dolor iusto quos!</span>
Expand Down
71 changes: 0 additions & 71 deletions demo/index.html

This file was deleted.

2 changes: 1 addition & 1 deletion demo/routing.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<body unresolved>

<template is="dom-bind" id="scope">
<app-location route="{{route}}" use-hash-as-path></app-location>
<app-location route="{{route}}" hash="#"></app-location>
<app-route
route="{{route}}"
pattern="/:section"
Expand Down
51 changes: 51 additions & 0 deletions demo/scroll-spy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!doctype html>
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>iron-scroll-spy Demo</title>
<script src="../../webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="../iron-scroll-spy.html">
</head>
<style>
body {
margin: 0;
height: 100vh;
}
iron-scroll-spy div {
padding: 180px;
}
iron-scroll-spy div.iron-selected {
background: lightgrey;
}
</style>
<body unresolved>

<template is="dom-bind" id="scope">
<iron-scroll-spy selected="{{scrollSelected}}" id="scrollSpy">
<div>
<h1>Section A</h1>
</div>
<div>
<h1>Section B</h1>
</div>
<div>
<h1>Section C</h1>
</div>
<div>
<h1>Section D</h1>
</div>
</iron-scroll-spy>
</template>

</body>
</html>
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
match the folder name, add a src="&lt;main-component&gt;.html" attribute,
where &lt;main-component&gt;.html" is a file that imports all of the
components you want documented. -->
<iron-component-page></iron-component-page>
<iron-component-page src="all-imports.html"></iron-component-page>

</body>
</html>
3 changes: 1 addition & 2 deletions iron-auto-scroll-spy.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
Specify the scroll-target and it will select the current element in the viewport as the scroll change.
Change the selected attribute will result in a smooth scroll to the associated element.
@demo demo/index.html
@demo demo/routing.html
@demo demo/auto-scroll-spy.html
@hero hero.svg
-->

Expand Down
2 changes: 1 addition & 1 deletion iron-scroll-spy.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Specify the scroll-target and it will select the current element in the viewport as the scroll change.
Change the selected attribute will result in a smooth scroll to the associated element.
@demo demo/index.html
@demo demo/scroll-spy.html
@demo demo/routing.html
@hero hero.svg
-->
Expand Down

0 comments on commit 0fece81

Please sign in to comment.