-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
1 lines (1 loc) · 4.87 KB
/
index.html
File metadata and controls
1 lines (1 loc) · 4.87 KB
1
<!DOCTYPE html> <html manifest="spellit.appcache"> <head> <meta charset="utf-8"> <link rel="icon" href="morse-code64.png"> <link rel="shortcut icon" href="morse-code64.png"> <link rel="apple-touch-icon" sizes="128x128" href="morse-code128.png"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"> <title>Spell it!</title> <style>html{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}body{background:#fefefa}footer{font-size:.75em;position:fixed;bottom:0}*,*:before,*:after{-webkit-box-sizing:inherit;-moz-box-sizing:inherit;box-sizing:inherit}#phonetic_box{text-align:justify;display:none}#splash_box{text-align:center;display:block}.alpha{display:inline-block;text-align:center;padding:0;border:1px solid;border-color:#0A0;border-radius:5px;box-sizing:border-box;margin-right:10px;margin-top:5px;margin-bottom:5px;font-size:1.5em}.alpha>span{box-sizing:border-box}.alpha.chars{background:#090;color:#FFF}.alpha.nums{background:#0C0;color:#FFF}.alpha.space{background:#9F3}.alpha.others{background:#9C0;font-weight:900}.center{text-align:center}.top-space{margin-top:5px}#feedback{position:absolute;bottom:5px;right:0;border-top-left-radius:7px;border-bottom-left-radius:7px;border-color:#000;border-top:1px solid;border-bottom:1px solid;border-left:1px solid;background:#fafafa;padding:2px}#feedback:hover{cursor:pointer}</style> </head> <body> <div class="container-fluid"> <div class="row"> <div class="col-xs-12"> <div class="form-group"> <input class="form-control input-lg top-space" type="text" id="word" placeholder="Type in your name or a word …" value="" data-toggle="tooltip" data-placement="bottom" title="Type in your name or a word..."> </div> </div> </div> <div class="row"> <div id="phonetic_box" class="col-xs-12"></div> <div id="splash_box" class="col-xs-12"> <img src="morse-code256.png" alt="Spell it!"/> <h1 class="center">Spell it!</h1> </div> </div> </div> <div id="feedback"><img src="support32.png" alt="support"/></div> <footer class="blockquote-footer"> <div id="author">Follow on <a href="https://github.com/lordloh/spellit">github</a> | <a href="https://twitter.com/lordloh">twitter</a> | <a href="https://www.linkedin.com/in/lohray/">linkedin</a> | <a href="https://bharath.lohray.com/cv/">www</a></div> <div id="iconmaker">Icons made by <a href="http://www.freepik.com" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></div> </footer> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> <script>var nato={A:"Alfa",B:"Bravo",C:"Charlie",D:"Delta",E:"Echo",F:"Foxtrot",G:"Golf",H:"Hotel",I:"India",J:"Juliett",K:"Kilo",L:"Lima",M:"Mike",N:"November",O:"Oscar",P:"Papa",Q:"Qubec",R:"Romeo",S:"Sierra",T:"Tango",U:"Uniform",V:"Victor",W:"Whiskey",X:"Xray",Y:"Yankee",Z:"Zulu"};window.onload=function(){console.log("Loaded!");document.getElementById("word").oninput=function(){word2phonetic(document.getElementById("word").value);$("#word").tooltip("hide")}};$(document).ready(function(){var a=window.setTimeout(function(){$("#iconmaker").remove();$("#word").tooltip("hide")},6000);$("#word").tooltip({trigger:"manual",placement:"bottom",html:false}).tooltip("show");$("#feedback").click(function(){window.location.href="https://github.com/lordloh/spellit/issues"})});function word2phonetic(c){var b="";var a=c.toUpperCase().split("");a.forEach(function(e){var d="";if(e>="A"&&e<="Z"){d+='<span class="alpha chars"> '+nato[e]+" </span> "}else{if(e==" "){d+='<span class="alpha space">« space »</span> '}else{if(e>=0&&e<=9){d+='<span class="alpha nums"> '+e+" </span> "}else{d+='<span class="alpha others"> '+e+" </span> "}}}b+=d});document.getElementById("phonetic_box").innerHTML=b;if(b==""){$("#phonetic_box").hide();$("#splash_box").show()}else{$("#splash_box").hide();$("#phonetic_box").show()}};</script> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-28154703-9"></script> <script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag("js",new Date());gtag("config","UA-28154703-9");</script> </body> </html>