-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
175 lines (166 loc) · 11.5 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Splashtag Creator</title>
<meta name="theme-color" content="#ffff00">
<meta property="og:title" content="Splashtag Creator">
<meta name="og:type" content="website">
<meta name="description" content="Custom Splatoon 3 splashtag creator.">
<meta name="og:description" content="Custom Splatoon 3 splashtag creator.">
<meta property="og:image" content="https://seymourschlong.github.io/splashtags/assets/images/ico.png">
<link rel="icon" href="assets/images/ico.png">
<script type="text/javascript" src="main.js"></script>
<link rel="stylesheet" href="style.css">
<script>
function selectTab (i) {
document.querySelectorAll('.tab')[i].click();
}
function selectTitle (index) {
selectTab(0);
const isCustom = !!document.querySelector('.showcustom');
const titleDropdown = document.querySelector(`#titleinput${index+1}`);
const titleInput = document.querySelector('#customtitle');
(isCustom ? titleInput : titleDropdown).focus();
if (isCustom) titleInput.select();
}
function selectName () {
selectTab(0);
const nameInput = document.querySelector('#nameinput');
nameInput.focus();
nameInput.select();
}
function selectTag () {
selectTab(0);
const tagInput = document.querySelector('#taginput');
tagInput.focus();
tagInput.select();
['#', 'Nr. ', 'Nº ', 'n.º '].forEach(t => {
if (tagInput.value.startsWith(t)) {
tagInput.selectionStart = t.length;
}
})
}
function selectBadge (index) {
selectTab(2);
document.querySelectorAll('input[name="badgenum"]')[index].click();
document.querySelector('#badgecontainer .selected').parentElement.parentElement.previousElementSibling.classList.remove('collapsed');
document.querySelector('#badgecontainer .selected').scrollIntoView();
}
</script>
<link rel="preload" href="assets/fonts/SplatoonText.otf" as="font" type="font/otf" crossorigin>
<link rel="preload" href="assets/fonts/SplatoonTitle.otf" as="font" type="font/otf" crossorigin>
<link rel="preload" href="assets/fonts/JPja/Kurokane.otf" as="font" type="font/otf" crossorigin>
<link rel="preload" href="assets/fonts/JPja/Rowdy.otf" as="font" type="font/otf" crossorigin>
<link rel="preload" href="assets/fonts/KRko/AsiaKCUBE-R.otf" as="font" type="font/otf" crossorigin>
<link rel="preload" href="assets/fonts/KRko/AsiaKERIN-M.otf" as="font" type="font/otf" crossorigin>
<link rel="preload" href="assets/fonts/TWzh/DFPT_AZ5.otf" as="font" type="font/otf" crossorigin>
<link rel="preload" href="assets/fonts/TWzh/DFPT_ZY9.otf" as="font" type="font/otf" crossorigin>
<link rel="preload" href="assets/fonts/CNzh/hanyi_zongyi.ttf" as="font" type="font/ttf" crossorigin>
<link rel="preload" href="assets/fonts/CNzh/huakang_xinzongyi.ttc" as="font" type="font/ttc" crossorigin>
</head>
<body onload="load();">
<div class="sitecontent">
<br>
<div id="container">
<div id="main" class="">
<div id="clickRegions">
<div onclick="selectTitle(0)"></div>
<div onclick="selectTitle(1)"></div>
<div onclick="selectName()"></div>
<div onclick="selectTag()"></div>
<div onclick="selectBadge(0)"></div>
<div onclick="selectBadge(1)"></div>
<div onclick="selectBadge(2)"></div>
</div>
<canvas id="splashtag" width="700" height="200"></canvas><picture><source srcset="./assets/banners/Npl_Tutorial00.webp"></source><source srcset="./assets/banners/Npl_Tutorial00.png"></source><img src="./assets/banners/Npl_Tutorial00.png" style="display: none;"></picture>
<br>
<div id="tab-buttons">
<input class="tab selected" type="button" value="Text" name="tabText">
<input class="tab" type="button" value="Banners" name="tabBanners">
<input class="tab" type="button" value="Badges" name="tabBadges">
<input class="tab" type="button" value="Saved" name="tabSaved">
</div>
<div class="tabcontainer hidecustom">
<!-- Text --- Name, Tag, Titles -->
<div class="tabcontent" data-name="text">
<div class="midsection">
<div>
<div class="sectiontitle">
<span name="textName">Name</span>:
</div>
<div class="inputcomponents">
<input id="nameinput" type="text" maxlength="10000" value="Player" placeholder="Player" style="width: 10em;">
<input id="taginput" type="text" value="#0001" placeholder="#0001" maxlength="10000" style="width: 5em;">
<input id="customcolour" type="color" value="#ffffff">
<label><span> </span> <input onclick="toggleWatermark(this);" type="checkbox" style="visibility: hidden;" checked> </label>
</div>
</div>
<div>
<div class="sectiontitle">
<span name="textTitles">Title</span>:
<label>
<small>
(<span name="textCustom">Custom</span> <input id="customcheck" type="checkbox" name="customcheck" style="vertical-align: text-bottom;">)
</small>
</label>
</div>
<div class="inputcomponents" style="position:relative;">
<select id="titleinput1" class="notcustom"></select>
<select id="titleinput2" class="notcustom"></select>
<input id="customtitle" placeholder="Splatlandian Youth" value="Splatlandian Youth" maxlength="10000" class="custom" style="width: 20em;">
</div>
</div>
<div>
<div class="sectiontitle">
<span name="textRandomize">Randomize</span>:
</div>
<div class="inputcomponents">
<input id="randomtitle" value="Both Titles" type="button" name="buttonBoth">
<input id="randomtitle1" value="First" type="button" name="buttonFirst">
<input id="randomtitle2" value="Last" type="button" name="buttonLast">
<input id="randombanner" value="Banner" type="button" name="buttonBanner">
<input id="randombadge" value="Badges" type="button" name="buttonBadges">
<input id="randomall" value="All!" type="button" name="buttonAll">
</div>
</div>
</div>
<a id="downloadlink" download="splashtag.png"><input id="downloadbutton" type="button" value="Download!" disabled></a> <input id="share" type="button" value="Share!">
</div>
<!-- Banners -->
<div class="tabcontent hidden" data-name="banners" data-min="2" data-max="8" data-scale="4" style="--items: 4;">
<label class="file">(<span name="textUpload">Upload</span>)<input type="file" id="custombanner" style="display: none;" multiple accept="image/*"></label><div class="spacer"></div><select id="bannersection"></select>
<div class="imglistcontainer"><div id="bannercontainer"></div></div>
<div class="bottomcontainer">
<div id="bannercolours" style="display: inline;"><span name="textColour">Colour</span> <input type="color" value="#ffffff"> <input type="color" value="#ff0000"> <input type="color" value="#00ff00"> <input type="color" value="#0000ff"></div>
<button class="scale down" data-do="1"></button><button class="scale up" data-do="-1"></button>
</div>
</div>
<!-- Badges -->
<div class="tabcontent hidden" data-name="badges" data-min="4" data-max="20" data-scale="12" style="--items: 12;">
<label><input type="radio" name="badgenum" value="1" checked><span name="textSlot1">Slot 1</span></label> - <label><input type="radio" name="badgenum" value="2"><span name="textSlot2">Slot 2</span></label> - <label><input type="radio" name="badgenum" value="3"><span name="textSlot3">Slot 3</span></label><div class="spacer"></div><label class=>(<span name="textUpload">Upload</span>)<div class="spacer"></div><input type="file" id="custombadge" style="display: none;" multiple accept="image/*"></label> <select id="badgesection"></select>
<div class="imglistcontainer"><div id="badgecontainer"></div></div>
<div class="bottomcontainer">
<button class="scale down" data-do="1"></button><button class="scale up" data-do="-1"></button>
</div>
</div>
<!-- Saved -->
<div class="tabcontent hidden" data-name="saved" data-min="2" data-max="4" data-scale="2" style="--items: 2;">
<div class="imglistcontainer"><div id="savedcontainer"></div></div>
<div class="bottomcontainer">
<input type="button" name="buttonSaveNew" id="savedsave" value="Save new">
<button class="scale down" data-do="1"></button><button class="scale up" data-do="-1"></button>
</div>
</div>
</div>
</div>
</div>
<div id="showcredits">
<a data-alt="Hide credits" href="/credits/">Show credits</a>
</div>
<div id="languageSelector">
<span name="textLanguage">Language</span>: <select id="lang"></select>
</div>
</div>
</body>
</html>