You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
149 lines
5.1 KiB
149 lines
5.1 KiB
|
|
<!DOCTYPE html> |
|
<html lang="en"> |
|
<head> |
|
<meta charset="utf-8"> |
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
<title>MkSec Web</title> |
|
<link rel="stylesheet" href="css/awsm.min.css"> |
|
<script type="text/javascript"> |
|
var version = '3.0.6'; |
|
var themes = JSON.parse('[{"title":"white","prismTheme":""},{"title":"gondola","prismTheme":"tomorrow"},{"title":"mischka","prismTheme":"okaidia"},{"title":"big-stone","prismTheme":"tomorrow"},{"title":"black","prismTheme":""},{"title":"tasman","prismTheme":""},{"title":"pastel-pink","prismTheme":""},{"title":"pearl-lusta","prismTheme":"solarizedlight"}]'); |
|
var storedVersion = localStorage.getItem('awsm-version'); |
|
|
|
if (version !== storedVersion) { |
|
localStorage.removeItem('awsm-current-theme'); |
|
localStorage.removeItem('awsm-themes'); |
|
localStorage.setItem('awsm-version', version); |
|
} |
|
|
|
function getCSSFileName(theme) { |
|
return 'css/awsm_theme_' + theme + '.min.css'; |
|
} |
|
|
|
function appendStyles(str) { |
|
var style = document.createElement('style'); |
|
style.innerHTML = str; |
|
document.querySelector('head').appendChild(style); |
|
} |
|
|
|
function loadTheme() { |
|
var theme = localStorage.getItem('awsm-current-theme'); |
|
|
|
if (!theme || theme === 'white') return; |
|
|
|
reloadTheme(theme); |
|
} |
|
|
|
function reloadTheme(theme) { |
|
var storedThemesStr = localStorage.getItem('awsm-themes'); |
|
|
|
if (!storedThemesStr) return; |
|
|
|
var storedThemes = JSON.parse(storedThemesStr); |
|
|
|
appendStyles(storedThemes[theme]); |
|
} |
|
|
|
loadTheme(); |
|
</script> |
|
<script type="text/javascript">block_aplayer = true;</script> |
|
<script src="https://cdn.yimian.xyz/ushio-js/ushio-head.min.js"></script> |
|
</head> |
|
<body> |
|
<header> |
|
<h1>MkSec Web</h1> |
|
<p>Learn English by sentences~ |
|
</p> |
|
<nav> |
|
<ul> |
|
|
|
|
|
<li><a href="https://github.com/iotcat/sentence-generator" target="_blank">GitHub</a></li> |
|
<li><a href="https://iotcat.me/" target="_blank">Author</a></li> |
|
<li><a href="./logout.html">Logout</a></li> |
|
<li> |
|
<select id="theme-changer" onchange="updateTheme(this.value)"> |
|
<option value="white" selected>white</option> |
|
<option value="gondola">gondola</option> |
|
<option value="mischka">mischka</option> |
|
<option value="big-stone">big-stone</option> |
|
<option value="black">black</option> |
|
<option value="tasman">tasman</option> |
|
<option value="pastel-pink">pastel-pink</option> |
|
<option value="pearl-lusta">pearl-lusta</option> |
|
</select> |
|
</li> |
|
</ul> |
|
</nav> |
|
</header> |
|
<main> |
|
<article> |
|
<section> |
|
<h2><a id="forms" href="#forms" aria-hidden="true"></a>Login |
|
</h2> |
|
<script> |
|
function showOutput() { |
|
document.getElementById('output').style.display = 'block'; |
|
document.getElementById('reset').disabled = false; |
|
} |
|
|
|
function hideOutput() { |
|
document.getElementById('output').style.display = 'none'; |
|
document.getElementById('reset').disabled = true; |
|
} |
|
|
|
</script> |
|
<form onsubmit="login(); return false;"> |
|
<fieldset> |
|
<legend>Box</legend> |
|
<label for="email">email</label> |
|
<input id="email" type="text" value=""> |
|
<input type="submit" value="Submit"> |
|
</fieldset> |
|
</form> |
|
</section> |
|
</article> |
|
</main> |
|
<footer> |
|
<p style="text-align: center;"> Powered By Ushio | Made with love by <a href="https://iotcat.me">iotcat</a> </p> |
|
<br> |
|
</footer> |
|
<script> |
|
function loadCSS(path, cb) { |
|
var xhr = new XMLHttpRequest(); |
|
xhr.open('GET', path); |
|
xhr.onreadystatechange = function() { |
|
if (this.readyState === 4 && this.status === 200) { |
|
cb(this.responseText); |
|
} |
|
}; |
|
xhr.send(); |
|
} |
|
function updateTheme(theme) { |
|
localStorage.setItem('awsm-current-theme', theme); |
|
loadCSS(getCSSFileName(theme), function(text) { |
|
var storedThemesStr = localStorage.getItem('awsm-themes'); |
|
var storedThemes = JSON.parse(storedThemesStr) || {}; |
|
storedThemes[theme] = text; |
|
|
|
localStorage.setItem('awsm-themes', JSON.stringify(storedThemes)); |
|
reloadTheme(theme); |
|
}); |
|
} |
|
|
|
var theme = localStorage.getItem('awsm-current-theme'); |
|
|
|
if (theme && theme !== 'white') { |
|
document.getElementById('theme-changer').value = theme; |
|
} |
|
</script> |
|
<script src="https://cdn.yimian.xyz/ushio-js/ushio-footer.min.js"></script> |
|
<script type="text/javascript"> |
|
var login = function(){ |
|
cookie.set('email', $('#email').val()); |
|
window.location.href = './index.html'; |
|
} |
|
</script> |
|
</body> |
|
</html> |