forked from riot/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·35 lines (29 loc) · 852 Bytes
/
index.html
File metadata and controls
executable file
·35 lines (29 loc) · 852 Bytes
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
<!doctype html>
<html>
<head>
<title>Riot Example: Pre-process LESS</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="style.css">
</head>
<body>
<message-one></message-one>
<message-two></message-two>
<!-- riot tags -->
<script src="message-one.tag" type="riot/tag"></script>
<script src="message-two.tag" type="riot/tag"></script>
<!-- scripts we need -->
<script src="https://cdn.jsdelivr.net/less/2.2.0/less.min.js"></script>
<script src="https://rawgit.com/riot/riot/master/riot%2Bcompiler.min.js"></script>
<!-- mount this app -->
<script>
riot.parsers.css.less = function(tagName, style) {
var css = ''
less.render(style, {}, function(error, output) {
css = output.css
})
return css
}
riot.mount('*')
</script>
</body>
</html>