IPost/views/posts.html
2022-12-01 13:55:48 +01:00

60 lines
2.4 KiB
HTML

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<% if(user.username === undefined) { %>
<meta name="description" content="<%-unauthorized_description%>">
<% } else { %>
<meta name="description" content="Chat on IPost now">
<% } %>
<title>Posts | IPost</title>
<%- newrelic %>
<style>
<%- globalcss %>
<%- loadfile("./css/posts.css") %>
</style>
<% if(user.username === undefined) { %>
<script> document.location.href = '/no_login?r='+encodeURIComponent(document.location.pathname) </script>
<% } %>
<script type="text/javascript" async>
<%- httppostjs %>
<%- htmlescapejs %>
<%- markdownjs %>
<%- warnmessagejs %>
let channels = <%- JSON.stringify(await getChannels()) %>,user = <%- JSON.stringify(user) %>,posting_id = "<%- getPID() %>"
</script>
<%- cookiebanner %>
</head>
<body>
<%- navbar %>
<div id="loading" class="status">
<h1>Loading...</h1>
Please allow us up to 5 seconds to load in your requested content. <br>
If this takes longer than usual, please refresh the page or contact support. <br>
</div>
<div id="noaccount" style="display:none;" class="status">
<h1>Error</h1>
<h2>You have to be logged in to view this content</h2>
To log in, please visit <a href="/login">The login page</a> <br>
If you are new to here, please visit <a href="/register">The register page</a> <br>
</div>
<div id="scriptonly" style="display:none;" ondrop="dropHandler(event)">
<div class="self">
Username: <span class="Username" id="username-self"></span> <br>
<span id="reply" style="display:none;" class="noselect">Replying to: <b id="reply_username"></b>&nbsp;&nbsp;&nbsp;<small id="reply_text"></small> <button onclick="unreply()" style="color:red">X</button></span> <br>
<textarea name="name" id="post-text" rows="8" cols="80"></textarea>
<br>
<button type="button" name="button" id="post-btn" onclick="postMsg()">Post</button>
<div class="files" id="filesDiv"></div>
</div>
<div class="channelTab" id="channelTab"></div>
<div class="posts" id="posts"></div>
</div>
<script async>
<%- loadfile("./js/posts.js") %>
<%- loadfile("./js/modal.js") %>
</script>
</body>
</html>