-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
102 lines (102 loc) · 6.73 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>placard generator</title>
<link rel="stylesheet" href="./style.css">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🚩</text></svg>">
</head>
<body>
<div id="container">
<div class="noPrint">
<h1>Placard Generator</h1>
<p>A versitile and needlessly arduous placard generator for Model United Nations</p>
<hr>
<div class="flexCont" style="margin-top: 20px;">
<div style="width: 100%; margin-right: 30px;">
<p style="margin-top: 0px;"><b>Image / Font size</b></p>
<div class="flexCont" style="height: fit-content;">
<input class="flexInput" type="number" value="45" min="1" max="45" name="size" onblur=enforceMinMax(this) id="image-size">
<input class="flexInput" type="number" value="80" min="1" max="85" name="size" onblur=enforceMinMax(this) id="size">
</div>
<p><b>Font styles</b></p>
<div class="flexCont" style="height: fit-content;">
<select id="fonts" name="fonts">
<option value="sans-serif">sans-serif</option>
<option value="'Times New Roman', Times, serif">Times New Roman</option>
<option value="cursive">cursive</option>
<option value="monospace">monospace</option>
<option value="Impact">Impact</option>
</select>
<select id="style" name="style">
<option value="bold">bold</option>
<option value="">normal</option>
<option value="italic">italic</option>
</select>
</div>
<p><b>School Footer</b></p>
<div class="flexCont" style="height: fit-content; margin-top: 10px;">
<input type="text" style="width: calc(80% - 10px);" value="The Highschool Dublin" onkeydown="changeSchool(this, document.getElementById('remove'))">
<label for="upload" class="crest">Upload</label>
<input id="upload" type="file" onchange="upload(document.getElementById('remove'))" accept="image/*">
<button style="margin-right: 10px;" onclick="removeCrest(this)" id="remove">Remove</button>
</div>
<p><b>Output Text (For debug or people that like to do things manually)</b></p>
<textarea name="output" id="output" onblur="checkList(this)" placeholder="Registered flags go here as a list separated with forward slashes. Semicolons separate name and quantity. 
E.g., 'Brazil : 2 / China : 1 / Ireland : 3 /'

You can directly edit this and press the 'save' button"></textarea>
<button style="float: right; margin-right: 10px; display: none;" id="saveBtn" onclick="this.style.display='none';saveList()">Save</button>
</div>
<div class="right">
<p style="margin-top: 0px;"><b>Flag Preview</b></p>
<div id="preview">
</div>
<p><b>General Settings</b></p>
<label class="control">
Flag Background
<span class="rightSpan" id="loader">Not loaded yet...</span>
<input onchange="toggleBackground(this)" type="checkbox" id="background" name="background" value="flags">
<div class="substitute"></div>
</label>
<label class="control">
Placard Counter
<span class="rightSpan">Show No. of placards</span>
<input onchange="toggleCounter()" type="checkbox" checked="true" id="counting" name="counting" value="flags">
<div class="substitute"></div>
</label>
<a href="https://github.com/flippont/placard-generator" target="_blank">Github Repository</a>
<span class="rightSpan">Source code</span>
</div>
</div>
</br>
<p id="counter">You have no placards</p>
<datalist id="countrylist">
</datalist>
</div>
<div class="flexCont sticky">
<input type="text" class="hideprint" name="country" list="countrylist" id="input" onkeydown="search(this)"
placeholder="Enter a country name">
<input type="number" name="quantity" value="1" id="quantity" class="quantity hideprint" min="1" max="50" onkeydown="getElementById('input')" onblur=enforceMinMax(this) step="1">
<button onclick="search(document.getElementById('input'), 'button')" class="hideprint">Add</button>
<div class="right">
<button class="leftButton" onclick="changeView('list', this);">☰</button>
<button class="rightButton active" onclick="changeView('grid', this);">⋮⋮⋮</button>
<button onclick="openModal(this);" class="hideprint" data-confirm="Are you sure you want to delete all items in this list?">Clear list</button>
<button onclick="openModal(this);" class="hideprint" data-share="Copy the text in the textbox below, or more conveniently click the clipboard button.">Share</button>
<button onclick="printer();">Print</button>
</div>
</div>
<div id="content" class="grid">
</div>
</div>
<div class="modal" id="modal">
<div class="closeModal" onclick="closeModal()">✖</div>
<div id="modalContent">
</div>
</div>
<div class="cover" id="cover" onclick="closeModal()"></div>
<script src="./src/data.js"></script>
<script src="./src/init.js"></script>
<script src="./src/functions.js"></script>
<script src="./src/events.js"></script>
</body>
</html>