forked from melonHuang/nova
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
87 lines (74 loc) · 2.37 KB
/
index.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" / >
<title></title>
</head>
<body>
<my-button name="guaguaguagau" info='{"b":1}' date="Sat Jun 20 2015 21:15:57 GMT+0800 (CST)" >
hehe
</my-button>
<plugin-share title="share title" desc="xxx" info='{"father":"Mike"}'></plugin-share>
<div class="log"></div>
<script>
var html = '';
var logDiv = document.querySelector('.log');
window.log = function(msg) {
html += msg + '\n'
logDiv.innerHTML = (html);
}
</script>
<script src="http://s2.qhimg.com/static/a9e451ace7e1fd1d/zepto.114.js"></script>
<script src="build/nova.js"></script>
<script src="http://s0.qhimg.com/static/8b15829770ad1a0f/jquery,require.js"></script>
<script src="lib/document-register-element.js"></script>
<!--
<script src="lib/webcomponentsjs/webcomponents-lite.js?"></script>
<script src="src/nova_bootstrap.js"></script>
<script src="src/lib/css_parse.js"></script>
<script src="src/lib/case_map.js"></script>
<script src="src/style.js"></script>
<script src="src/event_behavior.js"></script>
<script src="src/properties_behavior.js"></script>
<script src="src/template_behavior.js"></script>
<script src="src/base.js"></script>
-->
<dom-module>
<style type="text/css">
.hint .text {
color: red;
}
</style>
<template>
<div class="hint">
<div class="text" data-title="{{title}}">{{title}}</div>
</div>
</template>
<script type="text/nova-javascript">
var PluginShare = Nova({
is: 'plugin-share',
props: {
title: String,
desc: String,
info: Object
},
createdHandler: function() {
}
});
</script>
</dom-module>
<script src="components/my-button/main.js"></script>
<!--
<link rel="import" href="components/my-button/main.html" />
<script src="build/nova_dev.js"></script>
-->
<script>
btn = document.querySelector('my-button');
btn.on('click', clickedHandler);
function clickedHandler() {
alert('clicked');
}
</script>
</body>
</html>