mirror of
https://github.com/CoderSherlock/CoderSherlock.github.io.git
synced 2026-06-13 08:08:10 -07:00
I_changed_another_theme
This commit is contained in:
+45
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "paper-material",
|
||||
"version": "1.0.0",
|
||||
"description": "A material design container that looks like a lifted sheet of paper",
|
||||
"private": true,
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"web-component",
|
||||
"polymer",
|
||||
"paper",
|
||||
"container"
|
||||
],
|
||||
"main": [
|
||||
"paper-material.html"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/paper-material"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/paper-material",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"paper-styles": "polymerelements/paper-styles#^1.0.0",
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "*",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"_release": "1.0.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.0",
|
||||
"commit": "bd769d2b8c4f9ab000aee22582d76b5935793dc1"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/paper-material.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/paper-material"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
bower_components
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
# paper-material
|
||||
A Material Design container that looks like a lifted piece of paper.
|
||||
|
||||
`paper-material` is a container that renders two shadows on top of each other to
|
||||
create the effect of a lifted piece of paper.
|
||||
|
||||
Example:
|
||||
|
||||
```html
|
||||
<paper-material elevation="1">
|
||||
... content ...
|
||||
</paper-material>
|
||||
```
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"name": "paper-material",
|
||||
"version": "1.0.0",
|
||||
"description": "A material design container that looks like a lifted sheet of paper",
|
||||
"private": true,
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"web-component",
|
||||
"polymer",
|
||||
"paper",
|
||||
"container"
|
||||
],
|
||||
"main": [
|
||||
"paper-material.html"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/paper-material"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/paper-material",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"paper-styles": "polymerelements/paper-styles#^1.0.0",
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "*",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
}
|
||||
}
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
<!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>paper-material 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/classes/iron-flex-layout.html">
|
||||
<link rel="import" href="../../paper-styles/typography.html">
|
||||
<link rel="import" href="../paper-material.html">
|
||||
|
||||
<link rel="stylesheet" href="../../paper-styles/demo.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<template is="dom-bind" id="demo">
|
||||
<style>
|
||||
paper-material {
|
||||
display: inline-block;
|
||||
background: white;
|
||||
box-sizing: border-box;
|
||||
margin: 16px;
|
||||
padding: 16px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.fab {
|
||||
display: inline-block;
|
||||
background: white;
|
||||
box-sizing: border-box;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
margin: 16px;
|
||||
padding: 16px;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<section>
|
||||
<div>Paper Elevations</div>
|
||||
|
||||
<paper-material elevation="0">
|
||||
elevation = 0
|
||||
</paper-material>
|
||||
|
||||
<paper-material elevation="1">
|
||||
elevation = 1
|
||||
</paper-material>
|
||||
|
||||
<paper-material elevation="2">
|
||||
elevation = 2
|
||||
</paper-material>
|
||||
|
||||
<paper-material elevation="3">
|
||||
elevation = 3
|
||||
</paper-material>
|
||||
|
||||
<paper-material elevation="4">
|
||||
elevation = 4
|
||||
</paper-material>
|
||||
|
||||
<paper-material elevation="5">
|
||||
elevation = 5
|
||||
</paper-material>
|
||||
</section>
|
||||
|
||||
<section on-click="tapAction">
|
||||
<div>Animated</div>
|
||||
|
||||
<paper-material elevation="0" animated>
|
||||
tap
|
||||
</paper-material>
|
||||
|
||||
<paper-material class="fab layout center-center" elevation="0" animated>
|
||||
tap
|
||||
</paper-material>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
demo.tapAction = function(e) {
|
||||
var target = e.target;
|
||||
if (!target.down) {
|
||||
target.elevation += 1;
|
||||
if (target.elevation === 5) {
|
||||
target.down = true;
|
||||
}
|
||||
} else {
|
||||
target.elevation -= 1;
|
||||
if (target.elevation === 0) {
|
||||
target.down = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
<!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>paper-material</title>
|
||||
|
||||
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-component-page/iron-component-page.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<iron-component-page></iron-component-page>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,98 @@
|
||||
<!--
|
||||
@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-styles/shadow.html">
|
||||
|
||||
<!--
|
||||
|
||||
`paper-material` is a container that renders two shadows on top of each other to
|
||||
create the effect of a lifted piece of paper.
|
||||
|
||||
Example:
|
||||
|
||||
<paper-material elevation="1">
|
||||
... content ...
|
||||
</paper-material>
|
||||
|
||||
@group Paper Elements
|
||||
@class paper-material
|
||||
@demo demo/index.html
|
||||
-->
|
||||
|
||||
<dom-module id="paper-material">
|
||||
<style>
|
||||
:host {
|
||||
display: block;
|
||||
position: relative;
|
||||
@apply(--shadow-transition);
|
||||
}
|
||||
|
||||
:host([elevation="1"]) {
|
||||
@apply(--shadow-elevation-2dp);
|
||||
}
|
||||
|
||||
:host([elevation="2"]) {
|
||||
@apply(--shadow-elevation-4dp);
|
||||
}
|
||||
|
||||
:host([elevation="3"]) {
|
||||
@apply(--shadow-elevation-6dp);
|
||||
}
|
||||
|
||||
:host([elevation="4"]) {
|
||||
@apply(--shadow-elevation-8dp);
|
||||
}
|
||||
|
||||
:host([elevation="5"]) {
|
||||
@apply(--shadow-elevation-16dp);
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<content></content>
|
||||
</template>
|
||||
</dom-module>
|
||||
<script>
|
||||
Polymer({
|
||||
is: 'paper-material',
|
||||
|
||||
properties: {
|
||||
|
||||
/**
|
||||
* The z-depth of this element, from 0-5. Setting to 0 will remove the
|
||||
* shadow, and each increasing number greater than 0 will be "deeper"
|
||||
* than the last.
|
||||
*
|
||||
* @attribute elevation
|
||||
* @type number
|
||||
* @default 1
|
||||
*/
|
||||
elevation: {
|
||||
type: Number,
|
||||
reflectToAttribute: true,
|
||||
value: 1
|
||||
},
|
||||
|
||||
/**
|
||||
* Set this to true to animate the shadow when setting a new
|
||||
* `elevation` value.
|
||||
*
|
||||
* @attribute animated
|
||||
* @type boolean
|
||||
* @default false
|
||||
*/
|
||||
animated: {
|
||||
type: Boolean,
|
||||
reflectToAttribute: true,
|
||||
value: false
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
<!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>paper-material tests</title>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
WCT.loadSuites([
|
||||
'paper-material.html'
|
||||
]);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,92 @@
|
||||
<!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">
|
||||
<title>paper-material basic tests</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<script src="../../test-fixture/test-fixture-mocha.js"></script>
|
||||
|
||||
<link href="../../test-fixture/test-fixture.html" rel="import">
|
||||
<link href="../../layout/layout.html" rel="import">
|
||||
<link href="../paper-material.html" rel="import">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<test-fixture id="TrivialCard">
|
||||
<template>
|
||||
<paper-material elevation="1"></paper-material>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="ProgressiveElevations">
|
||||
<template>
|
||||
<paper-material elevation="1"></paper-material>
|
||||
<paper-material elevation="2"></paper-material>
|
||||
<paper-material elevation="3"></paper-material>
|
||||
<paper-material elevation="4"></paper-material>
|
||||
<paper-material elevation="5"></paper-material>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
suite('<paper-material>', function() {
|
||||
suite('with a non-zero elevation attribute', function() {
|
||||
var style;
|
||||
var card;
|
||||
|
||||
setup(function() {
|
||||
card = fixture('TrivialCard');
|
||||
style = window.getComputedStyle(card);
|
||||
});
|
||||
|
||||
test('has a shadow', function() {
|
||||
expect(style.boxShadow).to.be.ok;
|
||||
expect(style.boxShadow).to.not.be.eql('none');
|
||||
});
|
||||
|
||||
test('loses shadow with elevation value 0', function() {
|
||||
card.elevation = 0;
|
||||
expect(style.boxShadow).to.be.eql('none');
|
||||
});
|
||||
});
|
||||
|
||||
suite('progressively increasing values of elevation', function() {
|
||||
var cards;
|
||||
|
||||
setup(function() {
|
||||
cards = fixture('ProgressiveElevations');
|
||||
});
|
||||
|
||||
test('yield progressively "deeper" cards', function() {
|
||||
var lastStyle;
|
||||
var style;
|
||||
|
||||
expect(cards.length).to.be.eql(5);
|
||||
|
||||
cards.forEach(function (card) {
|
||||
style = window.getComputedStyle(card);
|
||||
|
||||
expect(style.boxShadow).to.be.ok;
|
||||
expect(style.boxShadow).to.not.be.eql('none');
|
||||
expect(style.boxShadow).to.not.be.eql(lastStyle && lastStyle.boxShadow);
|
||||
|
||||
lastStyle = style;
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user