mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
merge from dev
This commit is contained in:
parent
1c8f02ce0f
commit
33b01d778c
911 changed files with 34157 additions and 57125 deletions
|
@ -2,152 +2,86 @@
|
|||
<!--
|
||||
@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
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
|
||||
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
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>paper-icon-button</title>
|
||||
<title>paper-icon-button demo</title>
|
||||
<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-icons/iron-icons.html">
|
||||
<link rel="import" href="../../paper-styles/color.html">
|
||||
<link rel="import" href="../../paper-styles/demo-pages.html">
|
||||
<link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
|
||||
<link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
|
||||
<link rel="import" href="../paper-icon-button.html">
|
||||
|
||||
<style is="custom-style">
|
||||
.horizontal-section {
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
<style is="custom-style" include="demo-pages-shared-styles">
|
||||
paper-icon-button {
|
||||
margin-left: 30px;
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
paper-icon-button.blue {
|
||||
color: var(--paper-light-blue-500);
|
||||
}
|
||||
|
||||
paper-icon-button.red {
|
||||
color: var(--paper-red-500);
|
||||
}
|
||||
|
||||
paper-icon-button.orange {
|
||||
color: var(--paper-orange-500);
|
||||
}
|
||||
|
||||
paper-icon-button.green {
|
||||
color: var(--paper-green-500);
|
||||
}
|
||||
|
||||
paper-icon-button.blue:hover {
|
||||
background: var(--paper-light-blue-50);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
paper-icon-button.red:hover {
|
||||
background: var(--paper-red-50);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
paper-icon-button.orange:hover {
|
||||
background: var(--paper-orange-50);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
paper-icon-button.green:hover {
|
||||
background: var(--paper-green-50);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
paper-icon-button.huge {
|
||||
margin-left: 0px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
--paper-icon-button-ink-color: var(--paper-indigo-500);
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body onclick="clickAction(event);" unresolved>
|
||||
|
||||
<div class="horizontal-section-container">
|
||||
<div>
|
||||
<h4>Enabled</h4>
|
||||
<div class="horizontal-section">
|
||||
<paper-icon-button icon="menu" alt="menu" title="menu"></paper-icon-button>
|
||||
<paper-icon-button icon="favorite" alt="heart" title="heart"></paper-icon-button>
|
||||
<paper-icon-button icon="arrow-back" alt="arrow-back" title="arrow-back"></paper-icon-button>
|
||||
<paper-icon-button icon="arrow-forward" alt="arrow-forward" title="arrow-forward"></paper-icon-button>
|
||||
<paper-icon-button icon="clear" alt="clear" title="clear"></paper-icon-button>
|
||||
<paper-icon-button icon="polymer" alt="polymer" title="polymer"></paper-icon-button>
|
||||
<body unresolved>
|
||||
<div class="vertical-section-container centered">
|
||||
<h3>Buttons can use iron-icons or external images, and can be disabled</h3>
|
||||
<demo-snippet class="centered-demo">
|
||||
<template>
|
||||
<paper-icon-button icon="favorite" title="heart"></paper-icon-button>
|
||||
<paper-icon-button src="https://assets-cdn.github.com/images/modules/logos_page/Octocat.png" alt="octocat" title="octocat"></paper-icon-button>
|
||||
</div>
|
||||
</div>
|
||||
<paper-icon-button disabled icon="reply" title="reply"></paper-icon-button>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<div>
|
||||
<h4>Disabled</h4>
|
||||
<div class="horizontal-section">
|
||||
<paper-icon-button icon="menu" alt="menu" disabled></paper-icon-button>
|
||||
<paper-icon-button icon="favorite" alt="heart" disabled></paper-icon-button>
|
||||
<paper-icon-button icon="arrow-back" alt="arrow-back" disabled></paper-icon-button>
|
||||
<paper-icon-button icon="arrow-forward" alt="arrow-forward" disabled></paper-icon-button>
|
||||
<paper-icon-button icon="clear" alt="clear" disabled></paper-icon-button>
|
||||
<paper-icon-button icon="polymer" alt="polymer" disabled></paper-icon-button>
|
||||
<paper-icon-button src="https://assets-cdn.github.com/images/modules/logos_page/Octocat.png" alt="octocat" disabled></paper-icon-button>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Buttons can hide the ripple effect using the <i>noink</i> attribute</h3>
|
||||
<demo-snippet class="centered-demo">
|
||||
<template>
|
||||
<paper-icon-button noink icon="find-in-page" title="find"></paper-icon-button>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<div>
|
||||
<h4>Color</h4>
|
||||
<div class="horizontal-section">
|
||||
<paper-icon-button icon="menu" alt="menu" class="blue"></paper-icon-button>
|
||||
<paper-icon-button icon="favorite" alt="heart" class="red"></paper-icon-button>
|
||||
<paper-icon-button icon="arrow-back" alt="arrow-back" class="orange"></paper-icon-button>
|
||||
<paper-icon-button icon="arrow-forward" alt="arrow-forward" class="green"></paper-icon-button>
|
||||
<paper-icon-button icon="clear" alt="clear" class="blue"></paper-icon-button>
|
||||
<paper-icon-button icon="polymer" alt="polymer" class="red"></paper-icon-button>
|
||||
<paper-icon-button class="blue" src="https://assets-cdn.github.com/images/modules/logos_page/Octocat.png" alt="octocat"></paper-icon-button>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Buttons can be styled using regular CSS and custom properties</h3>
|
||||
<demo-snippet class="centered-demo">
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
paper-icon-button.pink {
|
||||
color: var(--paper-pink-500);
|
||||
--paper-icon-button-ink-color: var(--paper-indigo-500);
|
||||
}
|
||||
paper-icon-button.pink:hover {
|
||||
background-color: var(--paper-pink-500);
|
||||
color: white;
|
||||
}
|
||||
paper-icon-button.blue {
|
||||
--paper-icon-button-ink-color: var(--paper-orange-500);
|
||||
background-color: var(--paper-light-blue-500);
|
||||
color: white;
|
||||
border-radius: 3px;
|
||||
padding: 2px;
|
||||
}
|
||||
</style>
|
||||
<paper-icon-button icon="favorite" title="heart" class="pink"></paper-icon-button>
|
||||
<paper-icon-button icon="flight-takeoff" title="take off" class="blue"></paper-icon-button>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<div>
|
||||
<h4>Size</h4>
|
||||
<div class="horizontal-section">
|
||||
<paper-icon-button icon="favorite" alt="heart" class="huge"></paper-icon-button>
|
||||
<br><br><br>
|
||||
<paper-icon-button icon="polymer" alt="polymer" class="huge"></paper-icon-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h4>Noink</h4>
|
||||
<div class="horizontal-section">
|
||||
<paper-icon-button noink icon="favorite" alt="heart"></paper-icon-button>
|
||||
<br><br><br>
|
||||
<paper-icon-button noink icon="polymer" alt="polymer"></paper-icon-button>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Buttons can be resized</h3>
|
||||
<demo-snippet class="centered-demo">
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
paper-icon-button.giant {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
<paper-icon-button icon="alarm-on" title="wake up" class="giant"></paper-icon-button>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function clickAction(e) {
|
||||
var t = e.target;
|
||||
if (t.localName === 'paper-icon-button') {
|
||||
if (t.hasAttribute('disabled')) {
|
||||
console.error('should not be able to click disabled button', t);
|
||||
} else {
|
||||
console.log('click', t);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue