2022-02-11 11:26:19 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<link rel="stylesheet" href="../../css/spectre.min.css">
|
|
|
|
<style>
|
|
|
|
input[type=checkbox] {
|
|
|
|
opacity:0;
|
|
|
|
}
|
|
|
|
input[type=checkbox] + label {
|
|
|
|
opacity:0.2;
|
|
|
|
}
|
|
|
|
input[type=checkbox]:checked + label {
|
|
|
|
opacity:1;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
2022-12-10 09:13:06 +00:00
|
|
|
<h1> Select Fonts to upload:</h1>
|
2022-02-11 11:26:19 +00:00
|
|
|
<form>
|
2022-12-10 09:13:06 +00:00
|
|
|
<script>
|
|
|
|
FontList = ["BarlowCond", "BebasNeue", "Dekko", "DinAlternate",
|
|
|
|
"Impact", "Nunito", "OpenSansEC", "Phosphate", "Quicksand", "SairaEC",
|
|
|
|
"Yumaro", "YuseiMagic"]
|
|
|
|
for (fontName of FontList) {
|
|
|
|
var cb = document.createElement('input');
|
|
|
|
cb.type = 'checkbox';
|
|
|
|
cb.id = fontName;
|
|
|
|
var lb = document.createElement('label');
|
|
|
|
lb.for = fontName;
|
|
|
|
var img1 = document.createElement('img')
|
|
|
|
img1.src = "fonts/"+fontName+"-p1.png";
|
|
|
|
var img2 = document.createElement('img')
|
|
|
|
img2.src = "fonts/"+fontName+"-p2.png";
|
|
|
|
//<input type="checkbox" id="BarlowCond">
|
|
|
|
//<label for="BarlowCond"><img src="fonts/BarlowCond-p1.png"> <img src="fonts/BarlowCond-p2.png"></label><br>
|
|
|
|
document.forms[0].appendChild(cb);
|
|
|
|
lb.appendChild(img1);
|
|
|
|
lb.appendChild(img2);
|
|
|
|
document.forms[0].appendChild(lb);
|
|
|
|
document.forms[0].appendChild(document.createElement('br'));
|
|
|
|
}
|
|
|
|
</script>
|
2022-02-11 11:26:19 +00:00
|
|
|
<p><button id="upload" class="btn btn-primary">Upload selected Fonts</button></p>
|
|
|
|
<script src="../../core/lib/customize.js"></script>
|
|
|
|
<script>
|
2022-12-10 09:13:56 +00:00
|
|
|
FontList = ["BarlowCond", "BebasNeue", "Dekko"]//, "DinAlternate",
|
2022-02-11 11:26:19 +00:00
|
|
|
"Impact", "Nunito", "OpenSansEC", "Phosphate", "Quicksand", "SairaEC",
|
|
|
|
"Yumaro", "YuseiMagic"]
|
|
|
|
// When the 'upload' button is clicked...
|
|
|
|
document.getElementById("upload").addEventListener("click", function() {
|
|
|
|
var n=0;
|
|
|
|
var fonts = [];
|
|
|
|
for (fontName of FontList) {
|
|
|
|
if (document.getElementById(fontName).checked==true) {
|
|
|
|
var f = new Object();
|
|
|
|
fonts.push({
|
|
|
|
name:"contourclock-"+n+".json",
|
|
|
|
url:"font-"+fontName+".json"
|
|
|
|
});
|
|
|
|
n++;
|
2022-02-11 08:24:57 +00:00
|
|
|
}
|
2022-02-11 11:26:19 +00:00
|
|
|
}
|
|
|
|
if (n>0)
|
2022-02-11 08:45:20 +00:00
|
|
|
sendCustomizedApp({storage:fonts});
|
2022-02-11 11:26:19 +00:00
|
|
|
else
|
|
|
|
alert("Please select at least one Font!");
|
|
|
|
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</form>
|
|
|
|
</body>
|
|
|
|
</html>
|