This commit is contained in:
Nathan Woodburn 2020-10-31 20:49:56 +11:00
parent 16e446334f
commit df6b39cecf
3 changed files with 146 additions and 1 deletions

View File

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html style="font-size: 16px;"><head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<meta name="keywords" content=""><meta name="description" content=""><meta name="page_type" content="np-template-header-footer-from-plugin">
<title></title>
<link rel="stylesheet" href="/nicepage.css" media="screen">
<script class="u-script" type="text/javascript" src="np://app.desktop.nicepage.com/jquery.js" defer=""></script>
<script class="u-script" type="text/javascript" src="np://app.desktop.nicepage.com/nicepage.js" defer=""></script>
<meta name="generator" content="Nicepage 2.29.0, nicepage.com"><link rel="icon" href="favicon.png"></head>
<body class="u-body" data-style="blank" data-posts="" data-global-section-properties="{&quot;colorings&quot;:{&quot;light&quot;:[&quot;clean&quot;],&quot;colored&quot;:[&quot;clean&quot;],&quot;dark&quot;:[&quot;dark&quot;]}}" data-source="blank" data-page-sections-style="" data-page-coloring-types="{&quot;light&quot;:[&quot;clean&quot;],&quot;colored&quot;:[&quot;clean&quot;],&quot;dark&quot;:[&quot;dark&quot;]}" data-page-category="&quot;Basic&quot;" data-back-link="html-templates" data-back-link-title="HTML Template">
</body></html>

File diff suppressed because one or more lines are too long

133
admin/index.html Normal file
View File

@ -0,0 +1,133 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<style>
body {
background-image: url('grunge_patterns.jpg');
background-attachment: fixed;
color: #333;
}
.box {
border-radius: 3px;
background: rgba(101, 101, 101, 0.7); margin: auto; padding: 12px;
}
.lightbox {
zoom: 1.5;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(10, 10, 10, 0.8);
text-align: center;
margin: auto;
}
div.horizontal {
display: flex;
justify-content: center;
height: 100%;
}
div.vertical {
display: flex;
flex-direction: column;
justify-content: center;
width: 100%;
}
::-webkit-input-placeholder {
color: #955;
text-align: center;
}
::-moz-placeholder {
color: #955;
text-align: center;
}
:-ms-input-placeholder {
color: #955;
text-align: center;
}
</style>
<body>
<div id="loginbox" class="lightbox" >
<div class="horizontal">
<div class="vertical">
<div class="box">
<input style="margin: 16px; text-align: center;" id="password" type="password" placeholder="password" /> <br />
<button id="loginbutton" type="button">Enter</button>
<p id="wrongPassword" style="display: none">wrong password</p>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script type="text/javascript" src="https://rawcdn.githack.com/chrisveness/crypto/7067ee62f18c76dd4a9d372a00e647205460b62b/sha1.js"></script>
<script type="text/javascript">
"use strict";
function loadPage(pwd) {
var hash= pwd;
hash= Sha1.hash(pwd);
var url= hash + "/index.html";
$.ajax({
url : url,
dataType : "html",
success : function(data) {
window.location= url;
},
error : function(xhr, ajaxOptions, thrownError) {
parent.location.hash= hash;
//$("#wrongPassword").show();
$("#password").attr("placeholder","wrong password");
$("#password").val("");
}
});
}
$("#loginbutton").on("click", function() {
loadPage($("#password").val());
});
$("#password").keypress(function(e) {
if (e.which == 13) {
loadPage($("#password").val());
}
});
$("#password").focus();
</script>
</body>
</html>