2024-07-12 18:47:46 +02:00
|
|
|
<div id="page-container">
|
|
|
|
<div id="header-container">
|
2024-07-13 10:44:53 +02:00
|
|
|
<h1 id="title"><a href="/">iwakura.rip</a></h1>
|
|
|
|
<a class="link" id="msg-post" onclick="show_message_poster()" style="margin-bottom: 10px;"> [ post message ] </a>
|
2024-07-12 18:47:46 +02:00
|
|
|
</div>
|
2024-07-12 21:36:35 +02:00
|
|
|
<div id="entries-container">
|
2024-07-12 18:47:46 +02:00
|
|
|
{% for message in messages %}
|
2024-07-12 21:36:35 +02:00
|
|
|
<div class="guest-entry">
|
|
|
|
<div class="entry-header">
|
|
|
|
<bu class="entry-title">{{ message.name }}</bu>
|
|
|
|
<bu class="entry-date">{{ message.date }}</bu>
|
|
|
|
</div>
|
|
|
|
<div class="entry-body">
|
|
|
|
<p>{{ message.body }}</p>
|
2024-07-12 18:47:46 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2024-07-12 21:36:35 +02:00
|
|
|
</div>
|
|
|
|
<div id="post-container">
|
|
|
|
<bu id="name-label">name</bu>
|
|
|
|
<input type="text" id="name-box" name="name-box"><br>
|
|
|
|
<div class="break"></div>
|
|
|
|
<bu id="msg-label">message</bu>
|
|
|
|
<textarea id="msg-box"></textarea>
|
|
|
|
<div class="break"></div>
|
|
|
|
<a class="link" onclick="send_msg()"> [ send ] </a>
|
|
|
|
</div>
|
2024-07-12 18:47:46 +02:00
|
|
|
</div>
|
2024-07-12 21:36:35 +02:00
|
|
|
<script>
|
2024-07-13 10:44:53 +02:00
|
|
|
let show_post_message = false;
|
2024-07-12 21:36:35 +02:00
|
|
|
let show_message_poster = () => {
|
2024-07-13 10:44:53 +02:00
|
|
|
if (!show_post_message) {
|
|
|
|
show_post_message = !show_post_message
|
|
|
|
document.getElementById("entries-container").style.display = "none";
|
|
|
|
document.getElementById("post-container").style.display = "flex";
|
|
|
|
document.getElementById("msg-post").innerText = " [ back ] ";
|
|
|
|
return
|
|
|
|
}
|
|
|
|
document.getElementById("msg-post").innerText = " [ post message ] "
|
|
|
|
show_post_message = !show_post_message
|
|
|
|
document.getElementById("entries-container").style.display = "flex";
|
|
|
|
document.getElementById("post-container").style.display = "none";
|
2024-07-12 21:36:35 +02:00
|
|
|
}
|
|
|
|
let send_msg = async () => {
|
|
|
|
fetch("/post_message", {
|
|
|
|
"method": "POST",
|
|
|
|
"body": JSON.stringify({
|
|
|
|
body: document.getElementById("msg-box").value,
|
|
|
|
name: document.getElementById("name-box").value
|
|
|
|
}),
|
2024-07-13 10:44:53 +02:00
|
|
|
}).then(x => {
|
|
|
|
window.location.reload()
|
2024-07-12 21:36:35 +02:00
|
|
|
})
|
|
|
|
}
|
|
|
|
</script>
|
2024-07-12 18:47:46 +02:00
|
|
|
<style>
|
2024-07-13 10:44:53 +02:00
|
|
|
a {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
a:active {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
2024-07-12 18:47:46 +02:00
|
|
|
:root {
|
|
|
|
--term-color: #4AF626;
|
|
|
|
--title-gap: 0px;
|
|
|
|
}
|
|
|
|
@font-face {
|
|
|
|
font-family: "Hack Nerd Font";
|
2024-07-12 21:36:35 +02:00
|
|
|
src: url(/assets/ttf/HNF-Reg.ttf);
|
2024-07-12 18:47:46 +02:00
|
|
|
}
|
|
|
|
#title {
|
2024-07-12 21:36:35 +02:00
|
|
|
background: url("/assets/img/lain.png");
|
|
|
|
background-position: -100px 1125px;
|
2024-07-12 18:47:46 +02:00
|
|
|
-webkit-background-clip: text;
|
|
|
|
-webkit-text-fill-color: transparent;
|
|
|
|
font-size: 35px;
|
|
|
|
font-weight: bold;
|
|
|
|
text-align: center;
|
|
|
|
margin-bottom: calc(var(--title-gap) + 10px);
|
|
|
|
margin-top: var(--title-gap);
|
|
|
|
font-family: var(--title-font);
|
|
|
|
}
|
2024-07-12 21:36:35 +02:00
|
|
|
#post-container {
|
|
|
|
width: 50%;
|
|
|
|
padding: 5px;
|
|
|
|
border: 1px solid var(--term-color);
|
|
|
|
display: none;
|
|
|
|
margin: auto;
|
|
|
|
margin-top: 10px;
|
|
|
|
flex-direction: row;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
justify-content: space-between;
|
|
|
|
flex: 0 0 auto;
|
|
|
|
}
|
|
|
|
input {
|
|
|
|
margin-left: auto;
|
|
|
|
float: right;
|
|
|
|
}
|
|
|
|
.break {
|
|
|
|
flex-basis: 100%;
|
|
|
|
height: 0;
|
|
|
|
}
|
|
|
|
.link:hover {
|
|
|
|
background-color: var(--term-color);
|
|
|
|
color: black;
|
|
|
|
}
|
|
|
|
label {
|
|
|
|
text-align: left;
|
|
|
|
clear: both;
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
.link {
|
2024-07-13 10:44:53 +02:00
|
|
|
cursor: default;
|
2024-07-12 21:36:35 +02:00
|
|
|
align-items: center;
|
|
|
|
margin-left: auto;
|
|
|
|
margin-right: auto;
|
|
|
|
text-align: center;
|
|
|
|
transition: 0.3s;
|
|
|
|
}
|
|
|
|
#header-container {
|
|
|
|
text-align: center;
|
|
|
|
}
|
2024-07-12 18:47:46 +02:00
|
|
|
#entries-container {
|
|
|
|
align-items: center;
|
|
|
|
gap: 10px;
|
2024-07-12 21:36:35 +02:00
|
|
|
margin-top: 10px;
|
2024-07-12 18:47:46 +02:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
#page-container {
|
|
|
|
font-family: "Hack Nerd Font";
|
|
|
|
color: var(--term-color);
|
|
|
|
}
|
|
|
|
.guest-entry {
|
|
|
|
width: 50%;
|
|
|
|
padding: 5px;
|
|
|
|
border: 1px var(--term-color) solid;
|
|
|
|
}
|
|
|
|
.entry-header {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
.entry-body {
|
|
|
|
font-size: 14px;
|
|
|
|
overflow: auto;
|
|
|
|
word-wrap: break-word;
|
|
|
|
}
|
|
|
|
bu {
|
|
|
|
font-weight: bold;
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
body {
|
|
|
|
background-color: black;
|
|
|
|
}
|
|
|
|
</style>
|