Added adminpanel to this repo

This commit is contained in:
Kasper Rynning-Tønnesen
2018-02-05 19:46:03 +01:00
parent 38bceb1a53
commit 01a42c7d68
40 changed files with 1561 additions and 35 deletions

View File

@@ -0,0 +1,527 @@
var connection_options = {
'sync disconnect on unload':true,
'secure': true,
'force new connection': true
};
var socket = io.connect('https://zoff.me:8080', connection_options);
$(document).ready(function(){
$('ul.tabs').tabs();
});
$(document).on("click", "#refresh_all", function(e){
e.preventDefault();
$("#descriptions_cont").empty();
$("#thumbnails_cont").empty();
if(!$(".channel_things").hasClass("hide")) {
$(".channel_things").addClass("hide")
}
$(".preloader-wrapper").removeClass("hide");
$.ajax({
type: "GET",
url: "/api/lists",
success: function(response){
var output_pinned = '<option value="" disabled>Channels</option>';
var output_delete = '<option value="" disabled>Channels</option>';
for(var x = 0; x < response.length; x++){
if(response[x].count > 5){
output_pinned += "<option class='" + response[x]._id + "' value='" + response[x]._id + "'>" + response[x]._id + "</option>";
}
output_delete += "<option class='" + response[x]._id + "' value='" + response[x]._id + "'>" + response[x]._id + "</option>";
}
$("#frontpage_pinned").html(output_pinned);
$("#remove_thumbnail").html(output_delete);
$("#remove_description").html(output_delete);
$("#delete_list_name").html(output_delete);
$("#delete_userpass_name").html(output_delete);
$("#delete_channel_name").html(output_delete);
$("select").material_select();
$(".channel_things").removeClass("hide");
if(!$(".preloader-wrapper").hasClass("hide")) {
$(".preloader-wrapper").addClass("hide");
}
}
});
$.ajax({
type: "GET",
url: "/api/thumbnails",
success: function(response){
if(response.length > 0){
$(".thumbnails-badge").removeClass("hide");
$(".thumbnails-badge").text(response.length);
}
add_to_tab("thumbnails", response);
}
});
$.ajax({
type: "GET",
url: "/api/descriptions",
success: function(response){
if(response.length > 0){
$(".descriptions-badge").removeClass("hide");
$(".descriptions-badge").text(response.length);
}
add_to_tab("descriptions", response);
}
});
$("#listeners").empty();
socket.emit("get_spread");
});
socket.on("spread_listeners", function(obj){
$("#listeners").append("<p>Private listeners: " + obj.offline + "</p>");
$("#listeners").append("<p>Total listeners: " + obj.total + "</p>");
$("#listeners").append("<hr>");
for(var x in obj.online_users){
if(obj.online_users[x]._id != "total_users" && obj.online_users[x].hasOwnProperty("users") && obj.online_users[x].users.length > 0){
$("#listeners").append("<p>" + obj.online_users[x]._id + ": " + obj.online_users[x].users.length + "</p>");
}
}
});
if(!$(".channel_things").hasClass("hide")) {
$(".channel_things").addClass("hide")
}
$(".preloader-wrapper").removeClass("hide");
$.ajax({
type: "GET",
url: "/api/lists",
success: function(response){
var output_pinned = '<option value="" disabled selected>Channels</option>';
var output_delete = '<option value="" disabled selected>Channels</option>';
for(var x = 0; x < response.length; x++){
if(response[x].count > 5){
output_pinned += "<option class='" + response[x]._id + "' value='" + response[x]._id + "'>" + response[x]._id + "</option>";
}
output_delete += "<option class='" + response[x]._id + "' value='" + response[x]._id + "'>" + response[x]._id + "</option>";
}
$("#frontpage_pinned").html(output_pinned);
$("#remove_thumbnail").html(output_delete);
$("#remove_description").html(output_delete);
$("#delete_list_name").html(output_delete);
$("#delete_userpass_name").html(output_delete);
$("#delete_channel_name").html(output_delete);
$("select").material_select();
if(!$(".preloader-wrapper").hasClass("hide")) {
$(".preloader-wrapper").addClass("hide")
}
$(".channel_things").removeClass("hide");
}
});
$.ajax({
type: "GET",
url: "/api/names",
success: function(response) {
for(var i = 0; i < response.length; i++) {
var icon = "";
if(response[i].icon && response[i].icon != "") {
icon = "<img class='chat-icon' src='" + response[i].icon + "' alt='" + response[i]._id + "'>";
}
$(".names-container").append("<div class='col s12'><div class='name-chat col s3'>" + icon + response[i]._id + "</div><input type='text' class='" + response[i]._id + "_input col s7'><a class='btn green waves-effect col s2 m1 approve_name' href='#' data-name='" + response[i]._id + "'><i class='material-icons'>check</i></a></div>");
}
},
});
$.ajax({
type: "GET",
url: "/api/thumbnails",
success: function(response){
if(response.length > 0){
$(".thumbnails-badge").removeClass("hide");
$(".thumbnails-badge").text(response.length);
}
add_to_tab("thumbnails", response);
}
});
$(document).on("click", ".approve_name", function(e) {
var that = this;
var name = $(that).attr("data-name");
var value = $("." + name + "_input").val();
$.ajax({
type: "POST",
url: "/api/names",
data: {
icon: value,
name: name,
},
success: function(resp) {
if(resp == true) {
Materialize.toast("Approved image!", 2000, "green lighten");
} else {
Materialize.toast("Something went wrong...", 2000, "red lighten");
}
}
});
});
$(document).on("click", ".thumbnail_link", function(e) {
e.preventDefault();
window.open("https:" + this.value,'_blank');
});
$.ajax({
type: "GET",
url: "/api/descriptions",
success: function(response){
if(response.length > 0){
$(".descriptions-badge").removeClass("hide");
$(".descriptions-badge").text(response.length);
}
add_to_tab("descriptions", response);
}
});
function add_to_tab(dest, resp){
for(var x = 0; x < resp.length; x++){
if(dest == "thumbnails"){
$("#" + dest + "_cont").append("<div><div class='col s4 m3'>" + resp[x].channel + "</div><input type='text' readonly class='col s4 m6 thumbnail_link' value='" + resp[x].thumbnail + "'><a class='btn green waves-effect col s2 m1 approve_" + dest + "' href='#' data-channel='" + resp[x].channel + "'><i class='material-icons'>check</i></a><a class='btn red waves-effect col s2 m1 deny_" + dest + "' href='#' data-channel='" + resp[x].channel + "'>X</a></div>");
} else {
$("#" + dest + "_cont").append("<div><div class='col s4 m3'>" + resp[x].channel + "</div><input type='text' readonly class='col s4 m6' value='" + resp[x].description + "'><a class='btn green waves-effect col s2 m1 approve_" + dest + "' href='#' data-channel='" + resp[x].channel + "'><i class='material-icons'>check</i></a><a class='btn red waves-effect col s2 m1 deny_" + dest + "' href='#' data-channel='" + resp[x].channel + "'>X</a></div>");
}
}
}
$(document).on("click", "#get_token", function(e){
e.preventDefault();
$.ajax({
type: "GET",
url: "/api/token",
success: function(response){
if(response != false){
$("#new_token").val(response.token);
$("#get_token").toggleClass("hide");
$("#remove_token").toggleClass("hide");
}
}
})
});
$(document).on("click", ".approve_thumbnails", function(e){
e.preventDefault();
var channel = $(this).attr("data-channel");
if(!channel) {
Materialize.toast("Something went wrong...", 2000, "red lighten");
return;
}
var that = this;
$.ajax({
type: "POST",
url: "/api/approve_thumbnail",
data: {
channel: channel
},
success: function(response){
if(response){
$(that).parent().remove();
var length = parseInt($(".thumbnails-badge").text());
length = length - 1;
$(".thumbnails-badge").text(length);
if(length <= 0 && !$(".thumbnails-badge").hasClass("hide")){
$(".thumbnails-badge").addClass("hide");
}
Materialize.toast("Approved Thumbnail!", 2000, "green lighten");
} else {
Materialize.toast("Something went wrong...", 2000, "red lighten");
}
}
});
});
$(document).on("click", ".deny_thumbnails", function(e){
e.preventDefault();
var channel = $(this).attr("data-channel");
if(!channel) {
Materialize.toast("Something went wrong...", 2000, "red lighten");
return;
}
var that = this;
$.ajax({
type: "POST",
url: "/api/deny_thumbnail",
data: {
channel: channel
},
success: function(response){
if(response){
$(that).parent().remove();
var length = parseInt($(".thumbnails-badge").text());
length = length - 1;
$(".thumbnails-badge").text(length);
if(length <= 0 && !$(".thumbnails-badge").hasClass("hide")){
$(".thumbnails-badge").addClass("hide");
}
Materialize.toast("Denied thumbnail!", 2000, "green lighten");
} else {
Materialize.toast("Something went wrong...", 2000, "red lighten");
}
}
});
});
$(document).on("click", ".approve_descriptions", function(e){
e.preventDefault();
var channel = $(this).attr("data-channel");
if(!channel) {
Materialize.toast("Something went wrong...", 2000, "red lighten");
return;
}
var that = this;
$.ajax({
type: "POST",
url: "/api/approve_description",
data: {
channel: channel
},
success: function(response){
if(response){
$(that).parent().remove();
var length = parseInt($(".descriptions-badge").text());
length = length - 1;
$(".descriptions-badge").text(length);
if(length <= 0 && !$(".descriptions-badge").hasClass("hide")){
$(".descriptions-badge").addClass("hide");
}
Materialize.toast("Approved description!", 2000, "green lighten");
} else {
Materialize.toast("Something went wrong...", 2000, "red lighten");
}
}
});
});
$(document).on("click", ".deny_descriptions", function(e){
e.preventDefault();
var channel = $(this).attr("data-channel");
if(!channel) {
Materialize.toast("Something went wrong...", 2000, "red lighten");
return;
}
var that = this;
$.ajax({
type: "POST",
url: "/api/deny_description",
data: {
channel: channel
},
success: function(response){
if(response){
$(that).parent().remove();
var length = parseInt($(".descriptions-badge").text());
length = length - 1;
$(".descriptions-badge").text(length);
if(length <= 0 && !$(".descriptions-badge").hasClass("hide")){
$(".descriptions-badge").addClass("hide");
}
Materialize.toast("Denied description!", 2000, "green lighten");
} else {
Materialize.toast("Something went wrong...", 2000, "red lighten");
}
}
});
});
$(document).on("click", "#remove_description_button", function(e){
e.preventDefault();
var channel = $("#remove_description").val();
if(!channel) {
Materialize.toast("Something went wrong...", 2000, "red lighten");
return;
}
var that = this;
$.ajax({
type: "POST",
url: "/api/remove_description",
data: {
channel: channel
},
success: function(response){
if(response){
Materialize.toast("Removed description!", 2000, "green lighten");
} else {
Materialize.toast("Something went wrong...", 2000, "red lighten");
}
}
});
});
$(document).on("click", "#remove_thumbnail_button", function(e){
e.preventDefault();
var channel = $("#remove_thumbnail").val();
if(!channel) {
Materialize.toast("Something went wrong...", 2000, "red lighten");
return;
}
var that = this;
$.ajax({
type: "POST",
url: "/api/remove_thumbnail",
data: {
channel: channel
},
success: function(response){
if(response){
Materialize.toast("Removed thumbnail!", 2000, "green lighten");
} else {
Materialize.toast("Something went wrong...", 2000, "red lighten");
}
}
});
});
$(document).on("submit", "#delete_channel", function(e){
e.preventDefault();
var to_delete = $("#delete_channel_name").val();
if(!to_delete) {
Materialize.toast("Something went wrong...", 2000, "red lighten");
return;
}
var r = confirm("Delete list " + to_delete + "?");
if (r == true) {
$.ajax({
type: "POST",
url: "/api/delete",
data: {
_id: to_delete
},
success: function(response){
if(response == true){
$.ajax({
type: "GET",
url: "/api/lists",
success: function(response){
var output_pinned = "";
var output_delete = "";
for(var x = 0; x < response.length; x++){
if(response[x].count > 5){
output_pinned += "<option class='" + response[x]._id + "' value='" + response[x]._id + "'>" + response[x]._id + "</option>";
}
output_delete += "<option class='" + response[x]._id + "' value='" + response[x]._id + "'>" + response[x]._id + "</option>";
}
$("#frontpage_pinned").html(output_pinned);
$("#delete_list_name").html(output_delete);
$("#delete_userpass_name").html(output_delete);
$("#delete_channel_name").html(output_delete);
$("select").material_select();
}
});
Materialize.toast("Deleted channel!", 2000, "green lighten");
} else {
Materialize.toast("Something went wrong...", 2000, "red lighten");
}
}
})
}
});
$(document).on("click", "#delete_channel_button", function(e){
e.preventDefault();
$("#delete_channel").submit();
});
$(document).on("click", "#remove_token", function(e){
e.preventDefault();
$.ajax({
type: "GET",
url: "/api/remove_token",
success: function(response){
if(response != false){
$("#new_token").val("");
$("#get_token").toggleClass("hide");
$("#remove_token").toggleClass("hide");
}
}
})
});
$(document).on("submit", "#change_pinned", function(e){
e.preventDefault();
var to_pin = $("#frontpage_pinned").val();
if(!to_pin) {
Materialize.toast("Something went wrong...", 2000, "red lighten");
return;
}
$.ajax({
type: "POST",
url: "/api/pinned",
data: {
_id: to_pin
},
success: function(response){
if(response == true){
Materialize.toast("Pinned channel!", 2000, "green lighten");
} else {
Materialize.toast("Something went wrong...", 2000, "red lighten");
}
}
})
});
$(document).on("click", "#change_pinned_button", function(){
$("#change_pinned").submit();
});
$(document).on("click", "#delete_admin_button", function(){
$("#delete_list").submit();
});
$(document).on("click", "#delete_userpass_button", function(){
$("#delete_userpass").submit();
});
$(document).on("submit", "#delete_list", function(e){
e.preventDefault();
var to_remove_password = $("#delete_list_name").val();
if(!to_remove_password) {
Materialize.toast("Something went wrong...", 2000, "red lighten");
return;
}
$.ajax({
type: "POST",
url: "/api/admin",
data: {
_id: to_remove_password
},
success: function(response){
if(response == true){
Materialize.toast("Removed admin password!", 2000, "green lighten");
} else {
Materialize.toast("Something went wrong...", 2000, "red lighten");
}
}
})
});
$(document).on("submit", "#delete_userpass", function(e){
e.preventDefault();
var to_remove_password = $("#delete_userpass_name").val();
if(!to_remove_password) {
Materialize.toast("Something went wrong...", 2000, "red lighten");
return;
}
$.ajax({
type: "POST",
url: "/api/userpass",
data: {
_id: to_remove_password
},
success: function(response){
if(response == true){
Materialize.toast("Removed userpass password!", 2000, "green lighten");
} else {
Materialize.toast("Something went wrong...", 2000, "red lighten");
}
}
})
});
socket.emit("get_spread");

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 786 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

@@ -0,0 +1,18 @@
$(document).on("click", "#login_button", function(e){
e.preventDefault();
$("#login_form").submit();
})
$(document).ready(function(){
if(window.location.pathname == "/signup/" || window.location.pathname == "/signup"){
$("#login_form").prepend("<input type='text' name='token' placeholder='Token' required autocomplete='off' />");
$("#login_form").attr("action", "/signup");
}
});
$(document).on("submit", "#login_form", function(e){
if(this.password.value == "" || this.username.value == ""){
e.preventDefault();
}
})

View File

@@ -0,0 +1,172 @@
<header>
<nav id="fp-nav">
<div class="nav-wrapper">
<a href="#" class="brand-logo noselect">
<img class="zicon" src="/assets/images/squareicon_small.png" alt="Zoff" title="Zoff" />
</a>
<ul class="right">
<li><a class="header-buttons waves-effect waves-cyan" id="logout" title="Logout" href="/logout">Logout</a></li>
</ul>
</div>
</nav>
</header>
<main class="container center-align admin_panel">
<div class="row">
<h2 class="col s11">Admin</h2>
<a href="#" id="refresh_all" class="col s1"><h2><i class="material-icons">refresh</i></h2></a>
</div>
<div class="row">
<div class="col s12 m10">
<ul class="tabs tabs_admin">
<li class="tab col s3"><a class="active" href="#general">General</a></li>
<li class="tab col s3"><a href="#thumbnails">Thumbnails<span class="new thumbnails-badge badge admin-panel hide"></span></a></li>
<li class="tab col s3"><a href="#descriptions">Descriptions<span class="new descriptions-badge badge admin-panel hide"></span></a></li>
<li class="tab col s3"><a href="#names">Names</a></li>
</ul>
<div id="general" class="col s12">
<div class="preloader-wrapper big active">
<div class="spinner-layer spinner-zoff-only">
<div class="circle-clipper left">
<div class="circle"></div>
</div><div class="gap-patch">
<div class="circle"></div>
</div><div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
</div>
<div class="channel_things hide">
<form id="change_pinned">
<div class="row">
<div class="input-field col s8 m10">
<select id="frontpage_pinned">
<option value="" disabled>Channels</option>
</select>
<label>Change Pinned</label>
</div>
<div class="col s2">
<a href="#" id="change_pinned_button" class="btn green waves-effect">UPDATE</a>
</div>
</div>
</form>
<form id="delete_list">
<div class="row">
<div class="input-field col s8 m10">
<select id="delete_list_name">
<option value="" disabled>Channels</option>
</select>
<label>Delete Admin</label>
</div>
<div class="col s2">
<a href="#" id="delete_admin_button" class="btn orange waves-effect">UPDATE</a>
</div>
</div>
</form>
<form id="delete_userpass">
<div class="row">
<div class="input-field col s8 m10">
<select id="delete_userpass_name">
<option value="" disabled>Channels</option>
</select>
<label>Delete Userpass</label>
</div>
<div class="col s2">
<a href="#" id="delete_userpass_button" class="btn blue waves-effect">UPDATE</a>
</div>
</div>
</form>
<form id="delete_channel">
<div class="row">
<div class="input-field col s8 m10">
<select id="delete_channel_name">
<option value="" disabled>Channels</option>
</select>
<label>Delete Channel</label>
</div>
<div class="col s2">
<a href="#" id="delete_channel_button" class="btn red waves-effect">DELETE</a>
</div>
</div>
</form>
<div class="row">
<div class="input-field col s8 m10">
<input type="text" readonly id="new_token" />
</div>
<div class="col s2">
<a href="#" id="get_token" class="btn waves-effect">TOKEN</a>
<a href="#" id="remove_token" class="btn red waves-effect hide">REMOVE</a>
</div>
</div>
</div>
</div>
<div id="thumbnails" class="col s12">
<div class="row">
<div class="input-field col s8 m10">
<select id="remove_thumbnail">
<option value="" disabled>Channels</option>
</select>
<label>Remove Thumbnail</label>
</div>
<div class="col s2">
<a href="#" id="remove_thumbnail_button" class="btn red waves-effect">REMOVE</a>
</div>
<div id="thumbnails_cont" class="col s12">
</div>
</div>
</div>
<div id="descriptions" class="col s12">
<div class="row">
<div class="input-field col s8 m10">
<select id="remove_description">
<option value="" disabled>Channels</option>
</select>
<label>Remove Description</label>
</div>
<div class="col s2">
<a href="#" id="remove_description_button" class="btn red waves-effect">REMOVE</a>
</div>
</div>
<div id="descriptions_cont" class="col s12">
</div>
</div>
<div id="names" class="col s12">
<div class="row names-container">
</div>
</div>
</div>
<div class="col s10 m2 left-align" id="listeners">
<div class="row">
</div>
</div>
</div>
</main>
<footer class="page-footer cursor-default">
<div class="container">
<div class="row">
<div class="col l6 s12">
<h5 class="white-text">Zoff</h5>
<p class="grey-text text-lighten-4">The shared YouTube radio</p>
<p class="grey-text text-lighten-4">
Being built around the YouTube search and video API
it enables the creation of collaborative and shared live playlists,
with billions of videos and songs to choose from, all for free and without registration.
<br />
Enjoy!
</p>
</div>
<div class="col l4 offset-l2 s12 valign-wrapper">
</div>
</div>
</div>
<div class="footer-copyright">
<div class="container">
&copy; {{year}}
<a href="http://nixo.no">Nixo</a> &amp;
<a href="http://kasperrt.no">KasperRT</a>
<br>
All Rights Reserved.
</div>
</div>
</footer>

View File

@@ -0,0 +1,70 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>
Zoff Admin
</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#2D2D2D">
<meta property="og:image" content="https://zoff.me/assets/images/favicon.png">
<meta property="og:url" content="https://admin.zoff.me">
<meta property="og:title" content="Zoff Admin">
<meta property="og:description" content="Zoff admin panel">
<meta property="og:type" content="website">
<link rel="icon" id="favicon" type="image/png" href="https://zoff.me/assets/images/favicon.png">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<script
src="https://code.jquery.com/jquery-2.2.4.min.js"
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css">
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://zoff.me/assets/css/style.css" title="Default" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.3/socket.io.js"></script>
<script type="text/javascript" src="/assets/admin/{{{where_get}}}/js/main.js"></script>
<style>
.preloader-wrapper {
margin-top:15%;
}
.spinner-zoff-only {
border-color: #2d2d2d !important;
}
.tab a{
color: black !important;
}
.name-chat {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.chat-icon {
width: 16px;
height: auto;
margin-right: 2px;
}
.tabs_admin{
margin-bottom:20px;
}
.tabs_admin .indicator{
width: initial !important;
background: black !important;
}
</style>
</head>
<body>
{{{body}}}
</body>
</html>

View File

@@ -0,0 +1,11 @@
<main class="container valign-wrapper row">
<div class="center-align col m6 offset-m3">
<img src="https://zoff.me/assets/images/favicon.png" width="100" height="100" alt="image" />
<form action="/login" id="login_form" method="POST">
<input type="text" name="username" placeholder="Username" required autofocus="on" autocomplete="off" />
<input type="password" name="password" placeholder="Password" required />
<input type="submit" class="hide">
<a href="#" class="btn grey darken-3 waves-effect" id="login_button">LOGIN</a>
</form>
</div>
</main>