-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
140 lines (118 loc) · 4.2 KB
/
index.html
File metadata and controls
140 lines (118 loc) · 4.2 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ComicStripScript.js</title>
<script src="./lib/jquery.js"></script>
<script src="./lib/jqconsole.js"></script>
<script src="./lib/sugar.js"></script>
<script src="./lib/peg.js"></script>
<script src="./lib/plt.js"></script>
<script src="./lib/canvas-toBlob.js"></script>
<script src="./lib/FileSaver.min.js"></script>
<script src="./ComicStripScript.js"></script>
<script src="./main.js"></script>
<link rel ="stylesheet" href="./css/style.css" type="text/css">
</head>
<body>
<!-- DON'T NEED TO TOUCH*************************************************************************************************************** -->
<grammar>
start = title cast panels+ {ComicStripScript.run(ComicStripScript.tree)}
title = sp '---TITLE' sp t:titleString sp {ComicStripScript.tree.title = t;}
titleString = s:[^\n]* sp {return s.join("")}
cast = sp '---CAST' starring
starring = sp c:casts* sp {ComicStripScript.addToCasts(c);}
casts = sp 'Starring' space path:string space 'as' space name:string sp {return {name:name, path:path}}
panels = sp '---' sp contents:(left/right)+ sp { ComicStripScript.addToPanels(contents);}
left = sp name:string sp ':' sp emoticon:emoticon space '<(' caption:caption ')' {return {name:name, caption:caption, emoticon:emoticon, direction:"left"} }
right = sp name:string sp ':' sp '(' caption:caption ')>' space emoticon:emoticon {return {name:name, caption:caption, emoticon:emoticon, direction:"right"} }
caption = '"' s:[^"]* '"' {return s.join("")}
emoticon = s:[^ \n]+ { return s.join("")}
sp = [ \n\t]*
space = ' '
string = s:[a-zA-Z0-9'"]* {return s.join("")}
number = d:[0-9\.-]+ sp {return parseFloat(d.join(""));}
</grammar>
<!-- *************************************************************************************************************** -->
<div id="about">
<h1>ComicStripScript</h1>
<h4>ComicStripScript is a javascript-based language which allows you to draw a comic strip with emoticons and speech bubbles.</h4>
</div>
<div id="trial">
<div id="comic"></div>
<div id="code">
<div id="description">
<b>Syntax</b><br/>
Who : Expression <("Caption") <br/>
A : ('-') <("make sure to have a space between Expression and the speech bubble.")<br/>
<br/>
You can refer the emoticon-table for Expression.<br/>
Currently 5 expressions are available.
<table>
<tr>
<th>Index</th>
<th>|</th>
<th>Expression</th>
</tr>
<tr>
<th>0</th>
<th>|</th>
<th>('-')</th>
</tr>
<tr>
<th>1</th>
<th>|</th>
<th>(;゚ロ゚)</th>
</tr>
<tr>
<th>2</th>
<th>|</th>
<th>(^o^)</th>
</tr>
<tr>
<th>3</th>
<th>|</th>
<th>(`ε´)</th>
</tr>
<tr>
<th>4</th>
<th>|</th>
<th>(・_・)</th>
</tr>
<tr>
<th>5</th>
<th>|</th>
<th>(:_;)</th>
</tr>
</table>
<br/>
You can add your custom emoticons but using default table is recommended to keep compatibility between characters.<br/>
Find out more on the <a href="./documentation.html" target="_blank">documentation</a>.
<br/>
<br/>
Loop, if, random functions will be implemented in the next updates.
</div>
<br/>
<div class="parse_btn" type="button">DRAW YOUR COMIC STRIP</div>
<textarea id="code_input" cols=40 rows=40 style="opacity:100">
---TITLE
ONE DAY
---CAST
Starring mickey as M
Starring cat as C
---
M : ('-') <("HELLO \nI AM THE BEST\nMOUSE IN THE WORLD.")
---
C : ("I KNOW YOU.\nDOESN'T MATTER.")> (`ε´)
---
M : (`ε´) <("YES. \nYOU KNOW ME? \nI AM THE BEST.")
---
M : (・_・) <("")
C : ("NO MORE TALK. \nLET'S DANCE!!")> (^o^)
</textarea>
<div class="parse_btn" type="button">DRAW YOUR COMIC STRIP</div>
</div>
</div>
<a href="https://github.com/yukiy/ComicStripScript"><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://camo.githubusercontent.com/567c3a48d796e2fc06ea80409cc9dd82bf714434/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_darkblue_121621.png"></a>
</body>
</html>