admin stuff
This commit is contained in:
40
views/main/footer_admin.html
Normal file
40
views/main/footer_admin.html
Normal file
@ -0,0 +1,40 @@
|
||||
<script>
|
||||
var userMenuDiv = document.getElementById("userMenu");
|
||||
var userMenu = document.getElementById("userButton");
|
||||
var navMenuDiv = document.getElementById("nav-content");
|
||||
var navMenu = document.getElementById("nav-toggle");
|
||||
document.onclick = check;
|
||||
function check(e) {
|
||||
var target = (e && e.target) || (event && event.srcElement);
|
||||
if(!checkParent(target, userMenuDiv)) {
|
||||
if(checkParent(target, userMenu)) {
|
||||
if(userMenuDiv.classList.contains("invisible"))
|
||||
userMenuDiv.classList.remove("invisible");
|
||||
else
|
||||
userMenuDiv.classList.add("invisible");
|
||||
}
|
||||
else
|
||||
userMenuDiv.classList.add("invisible");
|
||||
}
|
||||
if(!checkParent(target, navMenuDiv)) {
|
||||
if(checkParent(target, navMenu)) {
|
||||
if(navMenuDiv.classList.contains("hidden"))
|
||||
navMenuDiv.classList.remove("hidden");
|
||||
else
|
||||
navMenuDiv.classList.add("hidden");
|
||||
}
|
||||
else
|
||||
navMenuDiv.classList.add("hidden");
|
||||
}
|
||||
}
|
||||
function checkParent(t, elm) {
|
||||
while(t.parentNode) {
|
||||
if(t == elm)
|
||||
return true;
|
||||
t = t.parentNode;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
18
views/main/header_admin.html
Normal file
18
views/main/header_admin.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!cocktype big f0ck>
|
||||
<html lang="en" theme="{{if typeof theme !== "undefined" }}{{=theme}}{{/if}}">
|
||||
<head>
|
||||
<title>{{if data.title}}{{=data.title}}{{else}}f0ck!{{/if}}</title>
|
||||
<link rel="icon" type="image/gif" href="/s/img/favicon.gif" />
|
||||
<link rel="stylesheet" href="/s/css/f0ck.css">
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="description" content="f0ck.me is the place where internet purists gather to celebrate content of all kinds">
|
||||
{{if data.item}}
|
||||
<meta property="og:site_name" content="f0ck.me" />
|
||||
<meta property="og:description"/>
|
||||
<meta name="Description"/>
|
||||
<meta property="og:image" content="{{=item.thumbnail}}" />
|
||||
{{/if}}
|
||||
</head>
|
||||
<body>
|
||||
{{include snippets/navbar_admin}}
|
Reference in New Issue
Block a user