66 lines
2.7 KiB
HTML
66 lines
2.7 KiB
HTML
<html>
|
|
<head>
|
|
<title>Morse Converter</title>
|
|
<link rel="stylesheet" type="text/css" href="res/css/main.css" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
|
|
<script src="./res/js/jquery-2.1.3.min.js"></script>
|
|
<script src="http://jquery-ui.googlecode.com/svn/tags/latest/ui/jquery.effects.core.js"></script>
|
|
<script src="http://jquery-ui.googlecode.com/svn/tags/latest/ui/jquery.effects.slide.js"></script>
|
|
<link rel="shortcut icon" href="./res/img/favicon.png" type="image/x-icon" />
|
|
<link rel="image_src" href="./res/img/favicon.png" />
|
|
|
|
</head>
|
|
<body>
|
|
<span class="actionbar">
|
|
<img src="./res/img/menu.svg" class="menuicon" onclick="drawer()"/>
|
|
Morse Converter
|
|
</span>
|
|
<div class="drawer">
|
|
<img src="res/img/drawergraphic.png" class="drawerimg"/>
|
|
<div class="draweritem">writtenMorse</div>
|
|
<div class="draweritem">Normal Morse</div>
|
|
<div class="drawerdivider"></div>
|
|
<div class="draweritem">About</div>
|
|
</div>
|
|
<div class="main">
|
|
<div class="card">
|
|
<textarea class="input" id="textarea">Enter your text.</textarea>
|
|
<div class="carddivider"></div>
|
|
<div class="cardbuttons">
|
|
<span class="cardbutton" onclick="getText()">ENCODE</span>
|
|
<span class="cardbutton">DECODE</span>
|
|
</div>
|
|
</div>
|
|
<div class="card" id="outputcard">
|
|
<div class="cardtext">
|
|
<span id="output"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
<script>
|
|
var dur = 150
|
|
var drawerStatus = true
|
|
function getText(){
|
|
var input = $('#textarea').val()
|
|
$('#output').text(input)
|
|
$('#outputcard').fadeIn(dur)
|
|
}
|
|
function drawer(){
|
|
if(window.innerWidth <= 1400){
|
|
if(drawerStatus){
|
|
$('.drawer').show('slide', {direction: 'left'}, dur)
|
|
$('.actionbar').before("<div class='overlay' onclick='drawer()'></div>")
|
|
$('.overlay').animate({"opacity":"0.4"}, dur)
|
|
drawerStatus = false
|
|
} else {
|
|
$('.drawer').hide('slide', {direction: 'left'}, dur)
|
|
$('.overlay').animate({"opacity":"0"}, dur, function callback (){
|
|
$('.overlay').remove()
|
|
})
|
|
drawerStatus = true
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</html>
|