mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-19 03:48:18 -07:00
163 lines
10 KiB
HTML
163 lines
10 KiB
HTML
<!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>
|
|
|
|
<title>simple-overlay demo</title>
|
|
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
|
|
|
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
|
|
|
<link rel="import" href="../../iron-flex-layout/iron-flex-layout.html">
|
|
<link rel="import" href="simple-overlay.html">
|
|
<link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
|
|
<link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
|
|
|
|
<style is="custom-style" include="demo-pages-shared-styles">
|
|
demo-snippet {
|
|
--demo-snippet-code: {
|
|
max-height: 250px;
|
|
}
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body unresolved class="centered">
|
|
|
|
<h3>An element with <code>IronOverlayBehavior</code> can be opened, closed, toggled.</h3>
|
|
<demo-snippet>
|
|
<template>
|
|
<button onclick="plain.open()">Plain overlay</button>
|
|
<simple-overlay id="plain" tabindex=-1>
|
|
<h2>Hello world!</h2>
|
|
<p>This can be closed by pressing the ESC key too.</p>
|
|
<button onclick="plain.close()">Close</button>
|
|
</simple-overlay>
|
|
</template>
|
|
</demo-snippet>
|
|
|
|
<h3>Use <code>with-backdrop</code> to add a backdrop to your overlay. Tabbing will be trapped within the overlay.</h3>
|
|
<demo-snippet>
|
|
<template>
|
|
<button onclick="backdrop.open()">Overlay with backdrop</button>
|
|
<simple-overlay id="backdrop" with-backdrop>
|
|
<p>Hello world!</p>
|
|
<button>Button</button>
|
|
<button onclick="backdrop.close()">Close</button>
|
|
</simple-overlay>
|
|
</template>
|
|
</demo-snippet>
|
|
|
|
<h3>Use <code>restore-focus-on-close</code> to return the focus to the element that opened the overlay when it gets closed.</h3>
|
|
<demo-snippet>
|
|
<template>
|
|
<button onclick="returnFocus.open()">Overlay that restores focus</button>
|
|
<simple-overlay id="returnFocus" restore-focus-on-close>
|
|
<p>Hello world!</p>
|
|
<button onclick="returnFocus.close()">Close</button>
|
|
</simple-overlay>
|
|
</template>
|
|
</demo-snippet>
|
|
|
|
<h3>The child with <code>autofocus</code> gets focused when opening the overlay.</h3>
|
|
<demo-snippet>
|
|
<template>
|
|
<button onclick="withAutofocus.open()">Overlay with autofocus child</button>
|
|
<simple-overlay id="withAutofocus">
|
|
<p>Hello world!</p>
|
|
<button autofocus>autofocus</button>
|
|
<button onclick="withAutofocus.close()">Close</button>
|
|
</simple-overlay>
|
|
</template>
|
|
</demo-snippet>
|
|
|
|
<h3>Multiple overlays can be opened.</h3>
|
|
<demo-snippet>
|
|
<template>
|
|
<button onclick="multiple.open()">Open first overlay</button>
|
|
<simple-overlay id="multiple" tabindex=-1>
|
|
<p>click to open another overlay</p>
|
|
<button onclick="multiple2.open()">Open second overlay</button>
|
|
<button onclick="multiple.close()">Close this</button>
|
|
</simple-overlay>
|
|
<simple-overlay id="multiple2" tabindex=-1>
|
|
<h2>Hi!</h2>
|
|
<button onclick="multiple2.close()">Close</button>
|
|
</simple-overlay>
|
|
</template>
|
|
</demo-snippet>
|
|
|
|
<h3>An element with <code>IronOverlayBehavior</code> can be scrollable or contain scrollable content.</h3>
|
|
<demo-snippet>
|
|
<template>
|
|
<style>
|
|
.with-margin {
|
|
margin: 24px 40px;
|
|
}
|
|
.scrollable {
|
|
max-height: 300px;
|
|
overflow: auto;
|
|
}
|
|
</style>
|
|
<button onclick="scrolling.open()">Scrolling overlay</button>
|
|
|
|
<simple-overlay id="scrolling" class="with-margin scrollable" tabindex=-1>
|
|
<h2>This dialog scrolls internally.</h2>
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
|
|
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
|
|
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
|
|
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
|
|
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
|
|
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
|
|
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
<button onclick="scrolling.close()">Close</button>
|
|
</simple-overlay>
|
|
|
|
<button onclick="scrolling2.open()">Scrolling content</button>
|
|
|
|
<simple-overlay id="scrolling2" class="with-margin" tabindex=-1>
|
|
<h2>This dialog has a scrolling child.</h2>
|
|
<div class="scrollable">
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
|
|
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
|
|
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
|
|
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
|
|
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
|
|
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
|
|
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
|
</div>
|
|
<p>
|
|
<button onclick="scrolling2.close()">Close</button>
|
|
</p>
|
|
|
|
</simple-overlay>
|
|
</template>
|
|
</demo-snippet>
|
|
|
|
</body>
|
|
|
|
</html>
|