Skip to content

Commit

Permalink
HTML 5!
Browse files Browse the repository at this point in the history
* rewrite to use html 5
* autofocus input
* remove javascript
  • Loading branch information
solsticedhiver committed Jan 26, 2015
1 parent 537e75f commit 9435f2e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 118 deletions.
81 changes: 24 additions & 57 deletions main.html
@@ -1,77 +1,44 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html>

<html>
<head>
<meta charset="utf-8">
<title>mirror - ɹoɹɹıɯ</title>
<link rel="stylesheet" href="static/base.css" type="text/css" charset="utf-8"/>
<link rel="icon" href="/favicon.ico" type="image/vnd.microsoft.icon" />
<script type="text/javascript" charset="utf-8">
var activeColor = "#000000";
var disabledColor = "#959595";
var defaultValue = "type url here...";

function loadBox() {
var box = document.getElementById("url_entry");
if (box.value != defaultValue) {
box.style.color = activeColor;
}
}

function focusBox() {
var box = document.getElementById("url_entry");
if (box.value == defaultValue) {
box.value = "";
box.style.color = activeColor;
}
}

function blurBox() {
var box = document.getElementById("url_entry");
if (box.value == "") {
box.style.color = disabledColor;
box.value = defaultValue;
}
}
</script>
<link rel="stylesheet" href="static/base.css">
<link rel="icon" href="/favicon.ico" type="image/x-icon">
</head>
<body onload="loadBox();">

<div id="wrapper">
<div id="container">
<body>

<div id="header">
<span>mıɾɾoɾ</span><span> - ɹoɹɹıɯ</span>
</div>
<header>
<h1>mıɾɾoɾ - ɹoɹɹıɯ</h1>
</header>

<section>

<div id="form_wrapper">
<form action="" method="get" accept-charset="utf-8">
<form action="" method="GET" accept-charset="utf-8">
<div id="input_wrapper">
<span id="http_prefix">http://</span><input onfocus="focusBox();" onblur="blurBox();" type="text" name="url" value="type url here..." id="url_entry"/><input id="go_button" type="submit" value="Go"/>
<span id="http_prefix">http://</span>
<input type="text" name="url" placeholder="type url here..." id="url_entry" autofocus><input id="go_button" type="submit" value="Go">
</div>
</form>

<div id="warning">
Fair use: All content belongs to the original copyright holders, respectively.
</div>
</div>

<div class="secure">
{% if secure_url %}<a href="{{secure_url}}">{% endif %}<img src="/static/{% if secure_url %}no{% endif %}lock.png" width="16" height="16"> {% if secure_url %}not secure</a>{% else %}secure{% endif %}
<div id="warning">
Fair use: All content belongs to the original copyright holders, respectively.
</div>

</div>
</div>
</section>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-1725949-3");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<footer class="secure">
{% if secure_url %}
<a href="{{secure_url}}">
{% endif %}
<img src="/static/{% if secure_url %}no{% endif %}lock.png" width="16" height="16">
{% if secure_url %}not secure</a>
{% else %}secure{% endif %}
</footer>

</body>
</html>
63 changes: 2 additions & 61 deletions static/base.css
Expand Up @@ -11,24 +11,14 @@ body {
color: #000000;
}

#header {
header {
text-align: center;
font-size: 20px;
letter-spacing: 10px;
margin-bottom: 40px;
margin-top: 40px;
}

#wrapper {
width: 100%;
}

#container {
margin-left: auto;
margin-right: auto;
width: 600px;
}

#form_wrapper {
margin-top: 10px;
width: 100%;
Expand Down Expand Up @@ -66,58 +56,9 @@ body {
margin-top: 20px;
letter-spacing: 3px;
color: #7f7f7f;
text-align: center;
}

#recent {
margin-top: 50px;
}

#recent_entries {
margin-left: 20px;
}

.url_container {
margin-top: 3px;
padding-left: 5px;
}

.info {
font-family: sans-serif;
font-size: 10px;
color: #606060;
margin-left: 5px;
}

.url {
font-size: 12px;
}

.url1 { color: #000000 !important; }
.url2 { color: #0a0a0a !important; }
.url3 { color: #151515 !important; }
.url4 { color: #1f1f1f !important; }
.url5 { color: #2a2a2a !important; }
.url6 { color: #353535 !important; }
.url7 { color: #3f3f3f !important; }
.url8 { color: #4a4a4a !important; }
.url9 { color: #555555 !important; }
.url10 { color: #5f5f5f !important; }
.url11 { color: #6a6a6a !important; }
.url12 { color: #757575 !important; }
.url13 { color: #7f7f7f !important; }
.url14 { color: #8a8a8a !important; }
.url15 { color: #959595 !important; }
.url16 { color: #9f9f9f !important; }
.url17 { color: #aaaaaa !important; }
.url18 { color: #b5b5b5 !important; }
.url19 { color: #bfbfbf !important; }
.url20 { color: #cacaca !important; }
.url21 { color: #d5d5d5 !important; }
.url22 { color: #dfdfdf !important; }
.url23 { color: #eaeaea !important; }
.url24 { color: #f5f5f5 !important; }
.url25 { color: #ffffff !important; }

/* secure link */
.secure {
text-align: center;
Expand Down

0 comments on commit 9435f2e

Please sign in to comment.