some fixes
This commit is contained in:
@ -9,9 +9,11 @@
|
||||
}
|
||||
#top_panel_right{
|
||||
float: right;
|
||||
display: flex;
|
||||
}
|
||||
#top_panel_left{
|
||||
float: left;
|
||||
display: flex;
|
||||
}
|
||||
/* button{
|
||||
/* margin-inline: 5px; */
|
||||
@ -24,7 +26,8 @@
|
||||
let right = document.getElementById("top_panel_right");
|
||||
let left = document.getElementById("top_panel_left");
|
||||
|
||||
left.innerHTML += res["login"];
|
||||
if(document.title != "main") left.innerHTML += `<button onclick="goto('/');">main page</button>`;
|
||||
left.innerHTML += `<div id="user_name">${res["login"]}</div>`;
|
||||
|
||||
if (res["admin"] == true){
|
||||
right.innerHTML += "<button>admin panel</button>";
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
<script>
|
||||
// console.log($.cookie("uuid"));
|
||||
log_by_sid();
|
||||
// log_by_sid();
|
||||
|
||||
var input = document.getElementById("pass");
|
||||
input.addEventListener("keypress", function(event) {
|
||||
|
@ -42,16 +42,21 @@
|
||||
|
||||
<%- include('./static/start.ejs',{name:'main',async: true}) %>
|
||||
<%- include('./header.ejs') %>
|
||||
<script src="/lib/interact.min.js"></script>
|
||||
<!-- <script src="/lib/interact.min.js"></script> -->
|
||||
|
||||
<div id="drags"></div>
|
||||
<div id="projs_div"></div>
|
||||
|
||||
<div class="dropzone"></div>
|
||||
<div class="trash"></div>
|
||||
<button >new project</button>
|
||||
|
||||
<button onclick="add('cube')">add</button>
|
||||
<button onclick="save()">save</button>
|
||||
<script>
|
||||
load_projs((projs)=>{
|
||||
projs.forEach(proj => {
|
||||
// console.log(proj);
|
||||
let div = document.getElementById("projs_div");
|
||||
div.innerHTML += `<button id='proj_${proj["name"]}' class='proj' onclick="goto('/proj/${proj["name"]}')">${proj["name"]}</button>`;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script src="/lib/inter.js"></script>
|
||||
<!-- <script src="/lib/inter.js"></script> -->
|
||||
<%- include('./static/end.ejs') %>
|
64
views/project.ejs
Normal file
64
views/project.ejs
Normal file
@ -0,0 +1,64 @@
|
||||
<style>
|
||||
.drag{
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dropzone {
|
||||
background-color: #bfe4ff;
|
||||
border: dashed 4px transparent;
|
||||
border-radius: 4px;
|
||||
height: 140px;
|
||||
margin: 10px auto 30px;
|
||||
padding: 10px;
|
||||
width: 80%;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
.trash {
|
||||
background-color: #bfe4ff;
|
||||
border: dashed 4px transparent;
|
||||
border-radius: 4px;
|
||||
margin: 10px auto 30px;
|
||||
padding: 10px;
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
transition: background-color 0.3s;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.drop-active {
|
||||
border-color: #aaa;
|
||||
}
|
||||
|
||||
.drop-target {
|
||||
background-color: #29e;
|
||||
border-color: #fff;
|
||||
border-style: solid;
|
||||
}
|
||||
</style>
|
||||
|
||||
<%- include('./static/start.ejs',{name:proj_name,async: true}) %>
|
||||
<%- include('./header.ejs') %>
|
||||
<script src="/lib/interact.min.js"></script>
|
||||
|
||||
<input id="proj_name"></input>
|
||||
<div id="drags"></div>
|
||||
|
||||
<div class="dropzone"></div>
|
||||
<div class="trash"></div>
|
||||
|
||||
<button onclick="add('cube')">add</button>
|
||||
<button onclick="save()">save</button>
|
||||
|
||||
|
||||
<script src="/lib/inter.js"></script>
|
||||
<script>
|
||||
let proj_name = "<%= proj_name %>";
|
||||
load_proj();
|
||||
// console.log(proj_name);
|
||||
document.getElementById("proj_name").value = proj_name;
|
||||
</script>
|
||||
<%- include('./static/end.ejs') %>
|
@ -10,8 +10,15 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title> <%= name %> </title>
|
||||
<script>
|
||||
if(document.title == "login"){
|
||||
console.log(document.title);
|
||||
log_by_sid();
|
||||
}else if(document.title != "login"){
|
||||
check_sid(true);
|
||||
console.log("check");
|
||||
}
|
||||
</script>
|
||||
<!-- <script> document.querySelector("title").innerHTML += $.cookie("uuid"); </script> -->
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>if("<%= name %>" != "login") check_sid();</script>
|
||||
|
Reference in New Issue
Block a user