1
0
Fork 0
mirror of https://github.com/ethauvin/Clever.git synced 2025-04-25 00:47:11 -07:00

Initial commit. (yay!)

This commit is contained in:
Russell Beattie 2012-09-08 22:22:51 -07:00
commit df7ba79871
13 changed files with 271 additions and 0 deletions

BIN
assets/www/clever.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

100
assets/www/index.html Normal file
View file

@ -0,0 +1,100 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Clever</title>
<style>
body{
background-color: #000;
color: #fff;
text-align: center;
font-family: sans-serif;
}
.wrapper{
margin: 150px auto;
display: inline-block;
max-width: 100%;
}
input{
width: 500px;
max-width: 100%;
}
input, button{
font-size: 25px;
border: 3px solid #333;
border-radius: 10px;
padding: 10px;
}
.logo{
position: absolute;
bottom: 20px;
right: 20px;
width: 200px;
opacity: .4;
}
</style>
<script>
window.onload = function(){
var loc = document.getElementById('loc');
var url = document.getElementById('url');
var prevUrl = localStorage.getItem('url');
if(prevUrl){
url.value = prevUrl;
}
url.onclick = function(){
this.select();
}
loc.onsubmit = function(e){
e.preventDefault();
var urlval = url.value;
if(urlval){
if(urlval.substring(0,7) !== 'http://' && urlval.substring(0,8) !== 'https://'){
urlval = 'http://' + urlval;
}
localStorage.setItem('url', urlval);
document.location = urlval;
}
}
}
</script>
</head>
<body>
<div class="wrapper">
<form id="loc">
<input placeholder="Enter URL" id="url" type="url" name="url" value=""/> <button>Go</button>
</form>
<img class="logo" src="file:///android_asset/www/clever.png"/>
</div>
</body>
</html>