-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhome.html
67 lines (62 loc) · 4.27 KB
/
home.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html><html><head><title>Road To Polymer</title><meta name="description" content="Road To Polymer going from 0.5 to 0.8 to 1.0"><meta charset="utf-8"><meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"><link rel="shortcut icon" href="/favicon.ico"><link rel="stylesheet" href="styles/main.css"><script src="bower_components/webcomponentsjs/webcomponents.min.js"></script><link rel="import" href="bower_components/core-drawer-panel/core-drawer-panel.html"><link rel="import" href="bower_components/core-header-panel/core-header-panel.html"><link rel="import" href="bower_components/core-icon/core-icon.html"><link rel="import" href="bower_components/core-icons/core-icons.html"><link rel="import" href="bower_components/core-media-query/core-media-query.html"><link rel="import" href="bower_components/core-toolbar/core-toolbar.html"><link rel="import" href="bower_components/core-menu/core-menu.html"><link rel="import" href="bower_components/core-item/core-item.html"><link rel="import" href="bower_components/font-roboto/roboto.html"><link rel="import" href="bower_components/paper-icon-button/paper-icon-button.html"><link rel="import" href="bower_components/paper-radio-group/paper-radio-group.html"><link rel="import" href="bower_components/marked-element/marked-element.html"><style>
/*html, body {
margin: 0;
height: 100%;
font-family: 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
}*/
</style></head><body unresolved="" fullbleed="" layout="" vertical=""><template is="auto-binding" id="app"><core-drawer-panel><core-header-panel drawer="" mode="seamed"><core-toolbar><core-icon icon="polymer"></core-icon>{{appName}}</core-toolbar><core-menu selected="0"><core-item label="Overview"></core-item><core-item label="Compare Code 0.5 to 0.8"></core-item><core-item label="Polymer Repos Report" class="last-item"></core-item></core-menu></core-header-panel><core-header-panel main="" mode="seamed"><core-toolbar class="page-toolbar">Compare Code 0.5 to 0.8 -- marked-element<paper-icon-button icon="menu" core-drawer-toggle=""></paper-icon-button></core-toolbar><div class="page" fit=""><div horizontal="" layout=""><div flex="" class="left"><h3>Polymer 0.5</h3></div><div flex="" class="right"><h3>Polymer 0.8</h3></div></div><div horizontal="" layout="" class="code"><div flex="" class="left" id="code5"><marked-element>```<polymer-element name="marked-element" attributes="text"><script>
Polymer('marked-element', {
text: '',
attached: function() {
marked.setOptions({
highlight: this.highlight.bind(this)
});
if (!this.text) {
this.text = this.innerHTML;
}
},
textChanged: function (oldVal, newVal) {
if (newVal) {
this.innerHTML = marked(this.text);
} else {
this.innerHTML = "";
}
},
highlight: function(code, lang) {
var event = this.fire('marked-js-highlight', {code: code, lang: lang});
return event.detail.code || code;
}
});
</script></polymer-element>```</marked-element></div><div flex="" class="right" id="code8"><marked-element>```<dom-module id="marked-element"><template><div id="content"></div></template></dom-module><script>
'use strict';
Polymer({
is: 'marked-element',
properties: {
text: {
observer: 'textChanged',
type: String,
value: null
}
},
ready: function() {
marked.setOptions({
highlight: this.highlight.bind(this)
});
if (!this.text) {
// Use the Markdown from the first `<script>` descendant whose MIME type starts with
// "text/markdown". Script elements beyond the first are ignored.
var markdownElement = Polymer.dom(this).querySelector('[type^="text/markdown"]');
if (markdownElement != null) {
this.text = markdownElement.textContent;
}
}
},
textChanged: function (newVal, oldVal) {
this.$.content.innerHTML = newVal ? marked(this.text) : '';
},
highlight: function(code, lang) {
var event = this.fire('marked-js-highlight', {code: code, lang: lang});
return event.detail.code || code;
}
});
</script>```</marked-element></div></div></div></core-header-panel></core-drawer-panel></template><script src="scripts/app.js"></script></body></html>