Where people come together to learn, code, and play. Custom-built HTTP server, site generator, and website from scratch using no external libraries. Goal is to be as minimalistic and fun as possible. http://projectdivar.com
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.
 
 
 
SigPlace/out/uploadform.html

57 lines
1.9 KiB

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/reset.css">
<link rel="stylesheet" type="text/css" href="/sig.css">
<meta charset="UTF-8">
<script type="text/javascript">
function loadCodeBackground() {
fetch("/codeBackground").then((data)=>data.text())
.then((data)=>{
document.getElementById("codeForeground").innerText=data
document.getElementById("codeBackground").innerText=data
})
}
loadCodeBackground();
</script>
</head>
<body>
<div class="contentBody">
SigPlace
<form method="post" action="./SUBMITFILE" enctype="multipart/form-data">
<input type="file" name="file1"/>
<input type="submit"/>
</form>
</div> <!--End Content Body-->
<div class="codeForeground" id="codeForeground"></div>
<div class="codeBackground" id="codeBackground"></div>
</body>
<footer>
</footer>
</html>
<hr/>
<div id="commentContainer" style="visibility:hidden;">
<h2>Comments</h2><div class="commentCounter" id="commentCounter">0</div>
<div class="comments" id="comments"></div>
</div>
<script type="text/javascript">
function fetchComments() {
fetch("/COMMENTS?article=uploadform.html.comment").then((data)=>data.text())
.then((data)=>{
data=data.split("\n");
for (var i=0;i<data.length;i++) {
if (i==0) {
document.getElementById("commentCounter").innerText=data[i]
} else {
if (i%2==1) {
document.getElementById("comments").innerHTML+="<div class=\"comment\"><div class=\"commentData\">"+data[i]+"</div><br>"
} else {
document.getElementById("comments").innerHTML+="<div class=\"commentInfo\">"+data[i]+"</div></div><br>"
}
}
}
document.getElementById("commentContainer").style.visibility="visible"
})
}
fetchComments()
</script>