push codeee

This commit is contained in:
hexlocation pc 2024-07-12 14:38:10 +02:00
commit ec0f0777c1
7 changed files with 1936 additions and 0 deletions

1712
Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

10
Cargo.toml Normal file
View file

@ -0,0 +1,10 @@
[package]
name = "iwakura-web"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rocket = "0.5.1"
rocket_dyn_templates = "0.2.0"

BIN
resources/img/lain.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

BIN
resources/ttf/HNF-Reg.ttf Normal file

Binary file not shown.

12
src/main.rs Normal file
View file

@ -0,0 +1,12 @@
extern crate rocket;
use rocket::{get,launch, build, routes};
#[get("/")]
fn index() -> &'static str {
"Hewwo wowd :3"
}
#[launch]
fn rocket() -> _ {
build().mount("/", routes![index])
}

69
views/guest.html Normal file
View file

@ -0,0 +1,69 @@
<div id="page-container">
<div id="header-container">
<h1 id="title">iwakura.rip</h1>
</div>
<div id="entries-container">
<div class="guest-entry">
<div class="entry-header">
<bu class="entry-title">hexlocation</bu>
<bu class="entry-date">12 Jun.</bu>
</div>
<div class="entry-body">
<p>Hello nerds!</p>
</div>
</div>
</div>
</div>
<style>
:root {
--term-color: #4AF626;
--title-gap: 0px;
}
@font-face {
font-family: "Hack Nerd Font";
src: url(../resources/ttf/HNF-Reg.ttf);
}
#title {
background: url("../resources/img/lain.png");
background-position: -200px 1125px;
-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);
}
#entries-container {
align-items: center;
gap: 10px;
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>

133
views/index.html Normal file
View file

@ -0,0 +1,133 @@
<div id="main-content">
<div id="middle-box">
<p style="text-align: center;margin-bottom: 5px;">[ iwakura.rip ]</p>
<img id="main-img" style="display:block;margin-left:auto;margin-right:auto;" src="https://media1.tenor.com/m/OlHMWq46CtAAAAAC/serial-experiments-lain-lain.gif" width="332" height="235">
<div class="link-container" id="service-container">
<a id="anim-1" href="https://mail.iwakura.rip">&nbsp;[ mail ]&nbsp;</a>
<a id="anim-2" href="https://git.iwakura.rip">&nbsp;[ git ]&nbsp;</a>
<a id="anim-3" href="https://media.iwakura.rip">&nbsp;[ media ]&nbsp;</a>
<a id="anim-4" href="https://blog.iwakura.rip">&nbsp;[ blog ]&nbsp;</a>
</div>
<div class="link-container" id="main-container">
<a onclick="showAbout()">&nbsp;[ about ]&nbsp;</a>
<a onclick="showContainer(serviceContainer)">&nbsp;[ services ]&nbsp;</a>
</div>
</div>
<br>
<div id="about-box" class="fadeIn">
<bu>About</bu>
<p>iwakura.rip is a collection of servers hosting mostly-private services for hexlocation & friends.</p>
<bu>Explanation</bu>
<p>Most of the gifs/art/names/ui design is inspired by/based on <a href="https://en.wikipedia.org/wiki/Serial_Experiments_Lain"><b>Serial Experiments Lain</b></a>, an anime series about Lain <u>Iwakura</u></p>
<bu>Disclaimer</bu>
<p>Serial Experiments Lain is the property of Triangle Studios. iwakura.rip is not affiliated with Triangle Studios.</p>
</div>
</div>
<style>
@keyframes fadeIn {
to {
opacity: 1;
}
}
@keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
bu {
font-weight: bold;
text-decoration: underline;
}
#about-box{
opacity:0;
display:none;
}
.fadeIn {
animation: fadeIn 0.5s forwards;
}
.fadeOut {
animation: fadeOut 0.5s forwards;
}
:root {
--term-color: #4AF626;
}
@font-face {
font-family: "Hack Nerd Font";
src: url(HNF-Reg.ttf);
}
a:hover {
color: black !important;
background-color: var(--term-color);
}
body {
background-color: black;
}
#main-container {
animation-delay: 0.2s;
}
a {
text-decoration: none;
transition: 0.3s;
cursor: default;
}
.link-container {
display: flex;
margin-top: 5px;
align-items: center;
justify-content: center;
transition: 0.5s;
opacity:0;
}
#service-container {
display: none;
}
#main-content, a {
font-family: "Hack Nerd Font";
color: var(--term-color);
}
#main-content {
/*font-family: "Hack Nerd Font";
color: var(--term-color);*/
position:absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
}
</style>
<script>
let getId = (i) => document.getElementById(i);
let serviceContainer = getId('service-container');
let mainContainer = getId('main-container');
let aboutContainer = getId('about-container');
mainContainer.classList.add("fadeIn");
let containers = [serviceContainer, mainContainer, serviceContainer];
function showContainer(container){
for (let _container of containers) {
//_container.style.display = "none";
if (_container == container) continue
_container.classList.remove("fadeIn");
_container.classList.add("fadeOut");
_container.style.display = "none"
}
container.classList.add("fadeIn");
container.style.display = "flex";
}
let showAbout = () => document.getElementById('about-box').style.display = "block";
/*
var links = document.getElementById("link-container").getElementsByTagName("a");
let delay = 1;
for (var link of links) {
console.log(link)
link.style.animationDelay = `${delay}s`;
delay += 1;
link.style.animation = "fadeIn 0.3s";
}
*/
var container = document.getElementById("link-container");
//container.style.animation = "fadeIn 0.3s";
</script>