add an unauthorized page

This commit is contained in:
Mystikfluu
2022-11-30 22:44:31 +01:00
parent 77ae066e46
commit 3a15b47fb1
11 changed files with 80 additions and 18 deletions
+3
View File
@@ -3,6 +3,9 @@
<head>
<meta charset="utf-8">
<title>DMs</title>
<% if(user.username === undefined) { %>
<script> document.location.href = '/no_login?r='+encodeURIComponent(document.location.pathname) </script>
<% } %>
<%- newrelic %>
<style>
<%- globalcss %>
+11 -8
View File
@@ -1,14 +1,17 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login | IPost</title>
<%- newrelic %>
<link rel="stylesheet" href="/css/logon.css">
<script src="/js/warn_message.js" charset="utf-8"></script>
<script src="/js/addnavbar.js" charset="utf-8"></script>
<link rel="stylesheet" href="/css/global.css">
<script> <%- httppostjs %> </script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login | IPost</title>
<%- newrelic %>
<link rel="stylesheet" href="/css/logon.css">
<script src="/js/warn_message.js" charset="utf-8"></script>
<script src="/js/addnavbar.js" charset="utf-8"></script>
<link rel="stylesheet" href="/css/global.css">
<script>
const REDIRECT_URL = "<%-query.r%>"
<%- httppostjs %>
</script>
</head>
<body>
+34
View File
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Chat now by creating an account on IPost">
<title>You have to be logged in to view this!</title>
<link rel="stylesheet" href="/css/global.css">
<style>
body {
background-color: var(--bg-color);
color: var(--text-color);
text-align: center;
margin-top: 10%;
}
div {
font-size: 130%;
}
</style>
</head>
<body>
<h1>Uh oh.. </h1>
<h2>You have to be logged in to view this content</h2>
<div>
<div>
To continue <br>
<a href="/login?r=<%-query.r%>">login</a> or <a href="/register?r=<%-query.r%>">register</a> <br>
</div>
</div>
</body>
</html>
+3
View File
@@ -9,6 +9,9 @@
<%- 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 %>
+4 -1
View File
@@ -8,7 +8,10 @@
<link rel="stylesheet" href="/css/global.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Register | IPost</title>
<script> <%- httppostjs %> </script>
<script>
const REDIRECT_URL = "<%-query.r%>"
<%- httppostjs %>
</script>
</head>
<body>
<header>
+3
View File
@@ -28,6 +28,9 @@
padding-bottom: 2px;
}
</style>
<% if(user.username === undefined) { %>
<script> document.location.href = '/no_login?r='+encodeURIComponent(document.location.pathname) </script>
<% } %>
</head>
<body>
<main>
+3
View File
@@ -5,6 +5,9 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User | IPost</title>
<% if(user.username === undefined) { %>
<script> document.location.href = '/no_login?r='+encodeURIComponent(document.location.pathname) </script>
<% } %>
<%- newrelic %>
<style>
<%- globalcss %>