Created
October 29, 2013 10:49
-
-
Save ahomu/7212425 to your computer and use it in GitHub Desktop.
遊び捨てたpolymer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width"> | |
<!-- Place favicon.ico and apple-touch-icon.png in the root directory --> | |
<link rel="stylesheet" href="styles/main.css"> | |
<!-- build:js scripts/vendor/modernizr.js --> | |
<script src="bower_components/modernizr/modernizr.js"></script> | |
<!-- endbuild --> | |
<!-- Place your HTML imports here --> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="hero-unit"> | |
<h1>'Allo, 'Allo!</h1> | |
<p>You now have</p> | |
<ul> | |
<li>HTML5 Boilerplate</li> | |
<li>Polymer</li> | |
</ul> | |
<p>installed.</p> | |
<h3>Enjoy coding! - Yeoman</h3> | |
</div> | |
</div> | |
<post-element type="button" color="orange"></post-element> | |
<post-element type="text" color="blue"></post-element> | |
<script> | |
document.addEventListener('WebComponentsReady', function() { | |
// Perform some behaviour | |
console.log('hogehoge'); | |
}); | |
</script> | |
<!-- build:js scripts/vendor.js --> | |
<script src="bower_components/polymer/polymer.min.js"></script> | |
<!-- endbuild --> | |
<polymer-element name="post-element" attributes="type color"> | |
<template> | |
<style> | |
@host { :scope {display: block;} } | |
</style> | |
<span>あほむぽりまーカスタム要素(∩´∀`)∩</span> | |
<input type="{{type}}" style="color: {{color}}" value="オーバーライド?"> | |
<sub-elm></sub-elm> | |
</template> | |
<script> | |
Polymer('post-element', { | |
//applyAuthorStyles: true, | |
//resetStyleInheritance: true, | |
created: function() { }, | |
enteredView: function() { console.log(this.getAttribute('type')) }, | |
leftView: function() { }, | |
attributeChanged: function(attrName, oldVal, newVal) { } | |
}); | |
</script> | |
</polymer-element> | |
<polymer-element name="sub-elm" attributes=""> | |
<template> | |
<span>サブ</span> | |
</template> | |
<script> | |
Polymer('sub-elm', { | |
created: function() { }, | |
enteredView: function() { }, | |
leftView: function() { }, | |
attributeChanged: function(attrName, oldVal, newVal) { } | |
}); | |
</script> | |
</polymer-element> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment