mirror of
https://github.com/CoderSherlock/CoderSherlock.github.io.git
synced 2026-06-13 16:18:09 -07:00
I_changed_another_theme
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
<!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 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">
|
||||
|
||||
<title>paper-behaviors demo</title>
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
|
||||
<link href="paper-button.html" rel="import">
|
||||
<link href="paper-radio-button.html" rel="import">
|
||||
|
||||
<style>
|
||||
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
padding: 24px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h3>Normal</h3>
|
||||
|
||||
<paper-button tabindex="0">Hello World</paper-button>
|
||||
|
||||
<h3>Toggles</h3>
|
||||
|
||||
<paper-button toggles tabindex="0">Hello World</paper-button>
|
||||
|
||||
<h3>Disabled</h3>
|
||||
|
||||
<paper-button disabled tabindex="0">Hello World</paper-button>
|
||||
|
||||
<h3>Radio button with focus state</h3>
|
||||
|
||||
<paper-radio-button tabindex="0" title="Radio button with focus state"></paper-radio-button>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,71 @@
|
||||
<!--
|
||||
@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
|
||||
-->
|
||||
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
<link rel="import" href="../../paper-material/paper-material.html">
|
||||
<link rel="import" href="../paper-button-behavior.html">
|
||||
|
||||
<dom-module id="paper-button">
|
||||
|
||||
<style>
|
||||
|
||||
:host {
|
||||
display: inline-block;
|
||||
background-color: #4285F4;
|
||||
color: #fff;
|
||||
border-radius: 3px;
|
||||
text-transform: uppercase;
|
||||
outline: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
paper-material {
|
||||
border-radius: inherit;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
:host([disabled]) {
|
||||
background-color: #888;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
:host([active]),
|
||||
:host([pressed]) {
|
||||
background-color: #3367D6;
|
||||
box-shadow: inset 0 3px 5px rgba(0,0,0,.2);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<template>
|
||||
|
||||
<paper-material class="content" elevation="[[_elevation]]" animated>
|
||||
<content></content>
|
||||
</paper-material>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
is: 'paper-button',
|
||||
|
||||
behaviors: [
|
||||
Polymer.PaperButtonBehavior
|
||||
]
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</dom-module>
|
||||
@@ -0,0 +1,116 @@
|
||||
<!--
|
||||
@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
|
||||
-->
|
||||
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
<link rel="import" href="../../paper-ripple/paper-ripple.html">
|
||||
<link rel="import" href="../paper-inky-focus-behavior.html">
|
||||
|
||||
<dom-module id="paper-radio-button">
|
||||
|
||||
<style>
|
||||
:host {
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
:host(:focus) {
|
||||
outline: none
|
||||
}
|
||||
|
||||
#radioContainer {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#offRadio {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border-radius: 50%;
|
||||
border: solid 2px;
|
||||
border-color: black;
|
||||
transition: border-color 0.28s;
|
||||
}
|
||||
|
||||
#onRadio {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 4px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background-color: red;
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0);
|
||||
transition: -webkit-transform ease 0.28s;
|
||||
transition: transform ease 0.28s;
|
||||
}
|
||||
|
||||
:host([disabled]) {
|
||||
opacity: 0.3;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
:host([pressed]) #offRadio,
|
||||
:host([active]) #offRadio {
|
||||
border-color: red;
|
||||
}
|
||||
|
||||
:host([pressed]) #onRadio,
|
||||
:host([active]) #onRadio {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
#ink {
|
||||
position: absolute;
|
||||
top: -16px;
|
||||
left: -16px;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div id="radioContainer">
|
||||
<div id="offRadio"></div>
|
||||
<div id="onRadio"></div>
|
||||
<paper-ripple id="ink" class="circle" center></paper-ripple>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
behaviors: [
|
||||
Polymer.PaperInkyFocusBehavior
|
||||
],
|
||||
|
||||
hostAttributes: {
|
||||
role: 'radio'
|
||||
},
|
||||
|
||||
ready: function() {
|
||||
this.toggles = true;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</dom-module>
|
||||
Reference in New Issue
Block a user