-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.html
232 lines (199 loc) · 10.2 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
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<!-- Primary Meta Tags -->
<title>Persona 5 Calling Card Maker</title>
<meta name="title" content="Persona 5 Calling Card Maker">
<meta name="description"
content="For the sake of effortlessly making a calling card. Sending your card to the darkest desire.">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://skyventuree.github.io/p5cc/index.html">
<meta property="og:title" content="Persona 5 Calling Card Maker">
<meta property="og:description"
content="For the sake of effortlessly making a calling card. Sending your card to the darkest desire.">
<meta property="og:image" content="https://github.com/skyventuree/skyventuree/raw/main/meta.png">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://skyventuree.github.io/p5cc/index.html">
<meta property="twitter:title" content="Persona 5 Calling Card Maker">
<meta property="twitter:description"
content="For the sake of effortlessly making a calling card. Sending your card to the darkest desire.">
<meta property="twitter:image" content="https://github.com/skyventuree/skyventuree/raw/main/meta.png">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="styles/editor.css">
<link rel="stylesheet" href="styles/card.css">
<link rel="stylesheet" href="styles/main.css">
<link rel="stylesheet" href="styles/button.css">
</head>
<body>
<base target="_blank" rel="noopener noreferrer">
<div id="header">
<div id="intro-icon">
<img src="assets/icon.png">
</div>
<div id="intro-text">
<h2>Persona 5 Calling Card Maker</h2>
<p>For the sake of effortlessly making a calling card.<br>
Sending your card to the darkest desire.</p>
</div>
</div>
<hr>
<!-- Preview area -->
<div id="card-preview">
<img src="assets/canvas.png" id="canvas-bg">
<div id="canvas">
<canvas id="canvas-card" width="1770" height="1300"></canvas>
<canvas id="canvas-text" width="1770" height="1300"></canvas>
</div>
</div>
<button id="refresh" class="action-btn" onclick="redrawBg();redrawText()"><i
class="fa fa-refresh"></i>Refresh</button>
<hr>
<!-- Editor -->
<div id="editor">
<div id="content">
<label for="content">What do you want to write on the calling card?</label>
<textarea name="content" cols="30" rows="6" placeholder="TAKE YOUR HEART"></textarea>
<p>Make a new line by pressing Enter/Return on your keyboard.</p>
</div>
<div id="options">
<hr class="mobile">
<p style="text-align:center">If nothing seems to happen, click <i class="fa fa-refresh"></i>Refresh.</p>
<div class="tab-btn" id="tab-handler">
<button id="option-default" data-text-option="alignment"><i class="fa fa-arrows"
style="transform:rotate(-10deg)"></i></button>
<button data-text-option="fonts"><i class="fa fa-font" style="transform:rotate(10deg)"></i></button>
<button data-text-option="decoration"><i class="fa fa-paint-brush"
style="transform:rotate(-10deg)"></i></button>
<button data-text-option="advanced"><i class="fa fa-cog" style="transform:rotate(10deg)"></i></button>
</div>
<!-- Alignments -->
<div class="options-tab" id="alignment">
<h2>Position and alignments</h2>
<div id="text-options">
<label for="text-align"><i class="fa fa-align-center"></i>Align text: </label>
<select name="text-align" id="text-align" onchange="redrawBg();redrawText()"
style="transform:rotate(-3.5deg)">
<option value="left">left</option>
<option value="center" selected>center</option>
<option value="right">right</option>
</select>
<br><br>
<label class="cb-container">
<input type="checkbox" name="text-options" onclick="isMiddle=this.checked"
onchange="redrawText();redrawBg()" checked>
<span class="checkmark"></span>Vertically aligned text
</label>
<label for="text-top">or shift text from the top by</label>
<input type="number" name="text-top" id="text-top" min="0" max="2000" value="0" step="5"
onchange="redrawText();redrawBg()">
px
</div>
</div>
<!-- Fonts -->
<div class="options-tab" id="fonts">
<h2>Fonts</h2>
<div id="font-options">
<label for="font-family">Set family</label>
<input type="text" name="font-family" id="font-family" value="sans-serif" placeholder="sans-serif"
style="font-family:sans-serif">
<label for="font-size">with size of</label>
<input type="number" name="font-size" id="font-size" min="80" max="240" value="120" step="2"
onchange="redrawBg()">
px.
</div>
</div>
<!-- Decorations -->
<div class="options-tab" id="decoration">
<h2>Text Stroke</h2>
<div id="stroke">
<label class="cb-container">
<input type="checkbox" name="stroke" onclick="textStroke=this.checked" onchange="redrawText()"
checked>
<span class="checkmark"></span>Stroke text
</label>
<label for="stroke-width">Set width of stroke to</label>
<input type="number" name="stroke-width" id="stroke-width" min="5" max="10" value="6" step="1"
onchange="textStrokeWidth=this.value">
px.
</div>
</div>
<!-- Advanced -->
<div class="options-tab" id="advanced">
<h2>Logo options</h2>
<div id="show-logo">
<label class="cb-container">
<input type="checkbox" name="show-logo" onclick="showLogo=this.checked" onchange="redrawBg()"
checked>
<span class="checkmark"></span>
Show "Take your heart" logo
</label>
</div>
<div id="logo-size">
<label for="logo-size">Scale logo by</label>
<input type="number" name="logo-size" id="logo-size-option" min="0" max="10" value="1" step="0.05"
onchange="redrawBg()">
<label for="offset">with an offset of </label>
<input type="number" name="offset" id="logo-offset" min="0" max="1000" value="20"
onchange="redrawBg()">
px.
</div>
<hr>
<h2>Delay rate</h2>
<div id="delay-rate">
<label for="delay-rate">Delay each text being created by</label>
<input type="number" name="delay-rate" min="0" max="1000" value="100" onchange="saveDelay()"> ms
<p><i class="fa fa-info-circle"></i> Increase this value if you feels the page is laggy.</p>
</div>
</div>
<hr>
<!-- Watermarking -->
<div id="wtm-option">
<label class="cb-container">
<input type="checkbox" name="showWatermark" id="showWatermark" onclick="showWtm=this.checked" onchange="redrawBg()">
<span class="checkmark"></span>
Show watermark to this website
</label>
</div>
<button class="action-btn" onclick="exportCard()"><i class="fa fa-arrow-circle-o-down"></i>Download your
card</button>
</div>
</div>
<hr />
<div id="credits">
<p>Persona 5 © ATLUS. © SEGA. All rights reserved.</p>
<p><a href="https://github.com/skyventuree/p5cc">Persona 5 Calling Card Maker</a> website designed and written
by <a href="https://sorae42.github.io">sorae42</a>.</p>
<p>Assets used:</p>
<ul>
<li><a href="https://www.deviantart.com/elmind/art/Persona-5-Calling-Card-Base-676530039">Persona 5 Calling
Card Base</a> by <a href="https://www.deviantart.com/elmind">Elmind</a>.</li>
<li><a href="https://lzxhahaha.github.io/persona5/">Persona 5 Style Text Generator</a> by <a
href="https://github.com/LzxHahaha">LzxHahaha</a>.<br>
Ported and modified by <a href="https://sorae42.github.io">sorae42</a>.</li>
<li>Persona 5 Logo and Assets by ALTUS.</li>
</ul>
<p>All assets are all under fair use.</p>
</div>
<div id="support">
<button>
<a href="https://ko-fi.com/shigukk" style="text-decoration:none">
<i class="fa fa-coffee"></i>Buy me a coffee!
</a>
</button>
</div>
<!-- Main utility and core function-->
<script src="scripts/editor.js"></script>
<script src="scripts/card.js"></script>
<script src="scripts/exporter.js"></script>
<!-- Text generator from Persona 5 Style Text Gen @lzxhahaha -->
<script src="scripts/textgen/utils.js"></script>
<script src="scripts/textgen/char.js"></script>
<script src="scripts/textgen/text.js"></script>
</body>
</html>