haste-server/static/index.html

96 lines
2.8 KiB
HTML

<html>
<head>
<title>hastebin</title>
<link rel="stylesheet" type="text/css" href="themes.css"/>
<link rel="stylesheet" type="text/css" href="application.css"/>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="highlight.min.js"></script>
<script type="text/javascript" src="application.min.js"></script>
<meta name="robots" content="noindex,nofollow"/>
<script type="text/javascript">
var app = null;
// Handle pops
var handlePop = function(evt) {
var path = evt.target.location.pathname;
if (path === '/') { app.newDocument(true); }
else { app.loadDocument(path.substring(1, path.length)); }
};
// Set up the pop state to handle loads, skipping the first load
// to make chrome behave like others:
// http://code.google.com/p/chromium/issues/detail?id=63040
setTimeout(function() {
window.onpopstate = function(evt) {
try { handlePop(evt); } catch(err) { /* not loaded yet */ }
};
}, 1000);
// Construct app and load initial path
$(function() {
app = new haste('hastebin', { twitter: true });
handlePop({ target: window });
$('.dropdown dt span').click(function() {
$('.dropdown dd ul').toggle();
});
$('.dropdown dd ul li > span').click(function() {
$('.dropdown dd ul').hide();
app.setTheme($(this).find('.value').text());
});
app.setTheme($('.dropdown dd ul li:first > span .value').text());
});
</script>
</head>
<body>
<ul id="messages"></ul>
<div id="key">
<div id="pointer" style="display:none;"></div>
<div id="box1">
<a href="/about.md" class="logo"></a>
</div>
<div id="box2">
<div class="save function"></div>
<div class="new function"></div>
<div class="duplicate function"></div>
<div class="raw function"></div>
<div class="twitter function"></div>
</div>
<div id="box3" style="display:none;">
<div class="function-info">
<div class="label"></div>
<div class="shortcut"></div>
</div>
</div>
<div id="box4">
<div class="theme"></div>
<dl class="dropdown">
<dt>
<span>Theme</span></dt>
<dd>
<ul>
<li><span><span class="selected-theme">&bull;</span>Solarized Dark<span class="value">solarized-dark</span></span></li>
<li><span><span class="selected-theme">&bull;</span>Tomorrow<span class="value">tomorrow</span></span></li>
<li><span><span class="selected-theme">&bull;</span>Tomorrow Night<span class="value">tomorrow-night</span></span></li>
</ul>
</dd>
</dl>
</div>
</div>
<div id="linenos"></div>
<pre id="box" style="display:none;" tabindex="0"><code></code></pre>
<textarea spellcheck="false" style="display:none;"></textarea>
</body>
</html>