-
Notifications
You must be signed in to change notification settings - Fork 1
/
builder.min.html
1 lines (1 loc) · 2 KB
/
builder.min.html
1
<!DOCTYPE html><html><head> <meta charset="utf-8"> <meta name="robots" content="noindex"> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <title>Badge Builder</title> <style type="text/css"> body{font-family: "Noto Sans", "Verdana", "Open Sans", sans-serif;}.container{padding: 20px;}</style></head><body> <div class="container"> <label for="event">Event:</label><br><select id="event" onchange="handleFormSubmit();"> <option value="" selected>Please select</option> <option value="ffm">Frankfurt</option> <option value="ber">Berlin</option> <option value="hh">Hamburg</option> <option value="asia">Asia</option> <option value="hd">Heidelberg</option> <option value="ulm">Ulm</option> <option value="mv">Mecklenburg-Vorpommern</option> <option value="at">Österreich</option> <option value="ch">Schweiz</option> <option value="rem">Remote</option> </select><br><label for="year">Year:</label><br><input type="number" id="year" min="2013" max="" oninput="handleFormSubmit();"/><br><label for="noyear">Hide Year:</label><br><input type="checkbox" id="noyear" onchange="handleFormSubmit()"/> <p> <b>URL:</b><br><code id="url"> https://jhbadge.com/?year=&evt=</code> </p><p> <b>Badge:</b><br><br><img src="https://jhbadge.com/?year=&evt=" id="image"> </p><br><p> <small> <a href="https://github.com/Jugendhackt/Badges-Improved" target="_blank">Github</a> | <a href="https://jugendhackt.org" target="_blank">Jugend hackt</a> </small> </p></div><script type="application/javascript"> document.querySelector('#year').setAttribute('max', new Date().getFullYear()); function handleFormSubmit(){var year=document.querySelector("#year").value; var event=document.querySelector("#event").value; var hideYear=document.querySelector("#noyear").checked; document.querySelector("#url").innerHTML="https://jhbadge.com/?year=" + year + "&evt=" + event + ((hideYear) ? "&noyear=true" : ""); document.querySelector("#image").src="https://jhbadge.com/?year=" + year + "&evt=" + event + ((hideYear) ? "&noyear=true" : "");}; </script></body></html>