-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·112 lines (98 loc) · 6.8 KB
/
index.html
File metadata and controls
executable file
·112 lines (98 loc) · 6.8 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Quickwriter</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
<link href="css/app.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.0.0/ace.js"></script>
<script src="js/app.js"></script>
</head>
<body ng-app="qkwrtr">
<div class="writer container" ng-controller="aceCtrl as c">
<div class="row">
<div class="btn-group btn-group-justified">
<a type="button" class="btn btn-primary" ng-click="c.ace.selectAll()">Select All</a>
<a type="button" class="btn btn-primary" ng-click="c.ace.clearAll()">Clear All</a>
</div>
<svg
width="400"
height="400"
viewBox="0 0 100 100"
ng-mouseleave="c.stop()"
ng-mouseup="c.stop()">
<polygon
fill="white"
points="0,0 50,50 100,0"
ng-mouseenter="c.on() && c.addPath('1')"
ng-click="c.ace.return()"/>
<polygon
fill="white"
points="100,0 50,50 100,100"
ng-mouseenter="c.on() && c.addPath('2')"
ng-click="c.ace.backspace()"/>
<polygon
fill="white"
points="100,100 50,50 0,100"
ng-mouseenter="c.on() && c.addPath('3')"/>
<polygon
fill="white"
points="0,100 50,50 0,0"
ng-mouseenter="c.on() && c.addPath('4')"
ng-click="c.ace.space()"/>
<line x1="50" y1="50" x2="0" y2="0" stroke="blue" stroke-width="3"/>
<line x1="50" y1="50" x2="0" y2="100" stroke="red" stroke-width="3"/>
<line x1="50" y1="50" x2="100" y2="100" stroke="yellow" stroke-width="3"/>
<line x1="50" y1="50" x2="100" y2="0" stroke="green" stroke-width="3"/>
<circle cx="50" cy="50" r="15" stroke="black" stroke-width="2"
ng-attr-fill="{{c.on() && 'blue' || 'white'}}"
ng-mousedown="c.begin()"
ng-mouseup="!c.on() && c.cancel()"
ng-mouseleave="!c.on() && c.cancel()"
ng-mouseenter="c.on() && c.consume()"/>
<text x="36" y="32" ng-attr-fill="{{c.cl('s') && 'red' || c.cl('S') && 'blue' || 'gray'}}">s</text>
<text x="26" y="23" ng-attr-fill="{{c.cl('d') && 'red' || c.cl('D') && 'blue' || 'gray'}}">d</text>
<text x="18" y="12" ng-attr-fill="{{c.cl('g') && 'red' || c.cl('G') && 'blue' || 'gray'}}">g</text>
<text x="12" y="8" ng-attr-fill="{{c.cl('\'') && 'red' || 'gray'}}">'</text>
<text x="26" y="45" ng-attr-fill="{{c.cl('t') && 'red' || c.cl('T') && 'blue' || 'gray'}}">t</text>
<text x="16" y="36" ng-attr-fill="{{c.cl('c') && 'red' || c.cl('C') && 'blue' || 'gray'}}">c</text>
<text x="8" y="26" ng-attr-fill="{{c.cl('z') && 'red' || c.cl('Z') && 'blue' || 'gray'}}">z</text>
<text x="0" y="12" ng-attr-fill="{{c.cl('.') && 'red' || 'gray'}}">.</text>
<text x="56" y="32" ng-attr-fill="{{c.cl('y') && 'red' || c.cl('Y') && 'blue' || 'gray'}}">y</text>
<text x="64" y="26" ng-attr-fill="{{c.cl('b') && 'red' || c.cl('B') && 'blue' || 'gray'}}">b</text>
<text x="72" y="16" ng-attr-fill="{{c.cl('p') && 'red' || c.cl('P') && 'blue' || 'gray'}}">p</text>
<text x="78" y="8" ng-attr-fill="{{c.cl('q') && 'red' || c.cl('Q') && 'blue' || 'gray'}}">q</text>
<text x="66" y="45" ng-attr-fill="{{c.cl('a') && 'red' || c.cl('A') && 'blue' || 'gray'}}">a</text>
<text x="76" y="36" ng-attr-fill="{{c.cl('r') && 'red' || c.cl('R') && 'blue' || 'gray'}}">r</text>
<text x="84" y="26" ng-attr-fill="{{c.cl('x') && 'red' || c.cl('X') && 'blue' || 'gray'}}">x</text>
<text x="92" y="20" ng-attr-fill="{{c.cl('?') && 'red' || 'gray'}}">?</text>
<text x="67" y="62" ng-attr-fill="{{c.cl('n') && 'red' || c.cl('N') && 'blue' || 'gray'}}">n</text>
<text x="76" y="72" ng-attr-fill="{{c.cl('m') && 'red' || c.cl('M') && 'blue' || 'gray'}}">m</text>
<text x="88" y="84" ng-attr-fill="{{c.cl('f') && 'red' || c.cl('F') && 'blue' || 'gray'}}">f</text>
<text x="94" y="92" ng-attr-fill="{{c.cl('!') && 'red' || 'gray'}}">!</text>
<text x="56" y="74" ng-attr-fill="{{c.cl('o') && 'red' || c.cl('O') && 'blue' || 'gray'}}">o</text>
<text x="64" y="82" ng-attr-fill="{{c.cl('u') && 'red' || c.cl('U') && 'blue' || 'gray'}}">u</text>
<text x="72" y="92" ng-attr-fill="{{c.cl('v') && 'red' || c.cl('V') && 'blue' || 'gray'}}">v</text>
<text x="78" y="100"ng-attr-fill="{{c.cl('w') && 'red' || c.cl('W') && 'blue' || 'gray'}}">w</text>
<text x="36" y="74" ng-attr-fill="{{c.cl('e') && 'red' || c.cl('E') && 'blue' || 'gray'}}">e</text>
<text x="32" y="82" ng-attr-fill="{{c.cl('l') && 'red' || c.cl('L') && 'blue' || 'gray'}}">l</text>
<text x="24" y="91" ng-attr-fill="{{c.cl('k') && 'red' || c.cl('K') && 'blue' || 'gray'}}">k</text>
<text x="12" y="100"ng-attr-fill="{{c.cl('@') && 'red' || 'gray'}}">@</text>
<text x="26" y="62" ng-attr-fill="{{c.cl('i') && 'red' || c.cl('I') && 'blue' || 'gray'}}">i</text>
<text x="16" y="72" ng-attr-fill="{{c.cl('h') && 'red' || c.cl('H') && 'blue' || 'gray'}}">h</text>
<text x="10" y="82" ng-attr-fill="{{c.cl('j') && 'red' || c.cl('J') && 'blue' || 'gray'}}">j</text>
<text x="0" y="92" ng-attr-fill="{{c.cl(',') && 'red' || 'gray'}}">,</text>
</svg>
</div>
<div class="row editor">
<div ace-editor="" class="editor" class="xs-col-12"></div>
</div>
<div class="row">
<h6>{{c.ace.length()}}</h6>
</div>
</div>
</body>
</html>