diff --git a/.gitignore b/.gitignore index 370651e..c335c2c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ /target target guests.json -Cargo.lock diff --git a/.woodpecker.yaml b/.woodpecker.yaml index c1c95a5..483aa44 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -1,18 +1,17 @@ when: - branch: ["main"] + branch: ['main'] event: ["push", "manual"] steps: - name: build image: woodpeckerci/plugin-docker-buildx + secrets: [ gitpat ] settings: - repo: git.iwakura.rip/hex/iwakuweb + repo: git.iwakura.rip/hex/iwakura-web platforms: linux/amd64 dockerfile: Dockerfile - tags: - ["${CI_COMMIT_BRANCH}-latest", "${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA}"] + tags: ["${CI_COMMIT_BRANCH}-latest","${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA}"] username: hex - registry: - git.iwakura.rip + registry: git.iwakura.rip #insecure: true password: from_secret: gitpat diff --git a/Cargo.lock b/Cargo.lock index 001bd2d..bca63c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -139,9 +139,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.10.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" dependencies = [ "memchr", "serde", @@ -155,27 +155,21 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.16.3" +version = "1.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" [[package]] name = "bytes" -version = "1.7.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca2be1d5c43812bae364ee3f30b3afcb7877cf59f4aeb94c66f313a41d2fac9" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "cc" -version = "1.1.7" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" +checksum = "eaff6f8ce506b9773fa786672d63fc7a191ffea1be33f72bbd4aeacefca9ffc8" [[package]] name = "cfg-if" @@ -710,9 +704,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.3.0" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", @@ -906,18 +900,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "mio" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" -dependencies = [ - "hermit-abi", - "libc", - "wasi", - "windows-sys 0.52.0", -] - [[package]] name = "multer" version = "3.1.0" @@ -960,7 +942,7 @@ dependencies = [ "kqueue", "libc", "log", - "mio 0.8.11", + "mio", "walkdir", "windows-sys 0.48.0", ] @@ -1002,9 +984,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.2" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f203fa8daa7bb185f760ae12bd8e097f63d17041dcdcaf675ac54cdf863170e" +checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" dependencies = [ "memchr", ] @@ -1039,7 +1021,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.3", + "redox_syscall 0.5.2", "smallvec", "windows-targets 0.52.6", ] @@ -1185,12 +1167,9 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.18" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee4364d9f3b902ef14fab8a1ddffb783a1cb6b4bba3bfc1fa3922732c7de97f" -dependencies = [ - "zerocopy", -] +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro2" @@ -1264,9 +1243,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" dependencies = [ "bitflags 2.6.0", ] @@ -1504,21 +1483,20 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.121" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ab380d7d9f22ef3f21ad3e6c1ebe8e4fc7a2000ccba2e4d71fc96f15b2cb609" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", - "memchr", "ryu", "serde", ] [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -1628,9 +1606,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.72" +version = "2.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" dependencies = [ "proc-macro2", "quote", @@ -1673,18 +1651,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", @@ -1734,26 +1712,27 @@ dependencies = [ [[package]] name = "tokio" -version = "1.39.2" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", "libc", - "mio 1.0.1", + "mio", + "num_cpus", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", @@ -1786,9 +1765,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.19" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" dependencies = [ "serde", "serde_spanned", @@ -1798,18 +1777,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" dependencies = [ "indexmap", "serde", @@ -1992,9 +1971,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "version_check" -version = "0.9.5" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" @@ -2265,9 +2244,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" dependencies = [ "memchr", ] @@ -2280,24 +2259,3 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" dependencies = [ "is-terminal", ] - -[[package]] -name = "zerocopy" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854e949ac82d619ee9a14c66a1b674ac730422372ccb759ce0c39cabcf2bf8e6" -dependencies = [ - "byteorder", - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "125139de3f6b9d625c39e2efdd73d41bdac468ccd556556440e322be0e1bbd91" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] diff --git a/assets/css/global.css b/assets/css/global.css deleted file mode 100644 index 2a792f8..0000000 --- a/assets/css/global.css +++ /dev/null @@ -1,138 +0,0 @@ -/* I know everything looks absolutely trash :3 */ -#top { - margin-top: 2vw; - margin-left: 15vw; - margin-right: 15vw; -} -@font-face { - font-family: "Hack Nerd Font"; - src: url(/assets/ttf/HNF-Reg.ttf); -} -@font-face { - font-family: "Jetbrains Mono"; - src: url(/assets/ttf/JBM.ttf); -} -.user-display { -} -.prefix { - display: inline; - margin-right: 5px; - font-size: 12px; -} -:root { - --text-color: #8941ad; - --term-color: #4af626; -} -body { - color: var(--term-color); - background-color: black; - font-family: "Jetbrains Mono"; -} -#link-container a { - text-decoration: none; - color: black; -} -#link-container { - display: flex; - gap: 4vw; - background-color: var(--term-color); - justify-content: center; -} -hr { - margin-top: 1px; - color: var(--term-color); -} - -#entries { - align-items: center; - gap: 10px; - margin-top: 10px; - display: flex; - flex-direction: column; -} -.guest-entry { - width: 100%; -} -bu { - font-weight: bold; - text-decoration: underline; -} -.entry-header { - display: flex; - justify-content: space-between; -} -.entry-body { - font-size: 14px; - overflow: auto; - word-wrap: break-word; -} -a { - text-decoration: none; - color: var(--term-color); -} -#post-container { - text-align: center; - padding: 5px; - margin: auto; - margin-top: 10px; - flex-direction: row; - flex-wrap: wrap; - justify-content: space-between; - flex: 0 0 auto; -} -input, -textarea { - margin-left: 5vw; -} -.break { - flex-basis: 100%; - height: 0; -} -.link:hover { - background-color: var(--term-color); - color: black; -} -label { - text-align: left; - clear: both; - float: left; -} - -:root { - --sin-padding: 5px; -} -#service-containers { - display: flex; - gap: 10px; - flex-wrap: wrap; - width: 100%; - justify-content: center; -} -.service-link { - color: var(--term-color); - vertical-align: middle; -} -.service-icon { - vertical-align: middle; -} -#content { - margin-top: 5px; -} -.service-title { - align-items: center; - gap: 5px; - display: flex; - margin: 0; - justify-content: center; -} -.service-container { - padding: var(--sin-padding); - padding-top: 0px; - flex-shrink: 0; - border: 1px solid var(--term-color); - flex-basis: 22%; -} -.service-container hr { - margin-left: calc(-1 * var(--sin-padding)); - margin-right: calc(-1 * var(--sin-padding)); -} diff --git a/assets/img/authelia.png b/assets/img/authelia.png deleted file mode 100644 index 52c5aea..0000000 Binary files a/assets/img/authelia.png and /dev/null differ diff --git a/assets/img/dn42.png b/assets/img/dn42.png deleted file mode 100644 index 8f4d63b..0000000 Binary files a/assets/img/dn42.png and /dev/null differ diff --git a/assets/img/jellyfin.png b/assets/img/jellyfin.png deleted file mode 100644 index ae08791..0000000 Binary files a/assets/img/jellyfin.png and /dev/null differ diff --git a/assets/img/jellyseerr.ico b/assets/img/jellyseerr.ico deleted file mode 100644 index dbca29f..0000000 Binary files a/assets/img/jellyseerr.ico and /dev/null differ diff --git a/assets/img/lain.png b/assets/img/lain.png new file mode 100644 index 0000000..5c70f81 Binary files /dev/null and b/assets/img/lain.png differ diff --git a/assets/img/mail.png b/assets/img/mail.png deleted file mode 100644 index 7910223..0000000 Binary files a/assets/img/mail.png and /dev/null differ diff --git a/assets/img/woodpecker.svg b/assets/img/woodpecker.svg deleted file mode 100644 index 1cd49a8..0000000 --- a/assets/img/woodpecker.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - diff --git a/assets/pgp/andre.txt b/assets/pgp/andre.txt deleted file mode 100644 index 801c67e..0000000 --- a/assets/pgp/andre.txt +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mDMEZs80XRYJKwYBBAHaRw8BAQdAFEbr22JHklXkyOgqDp/o/IgngPN6Sck3Mjih -LLDjwTy0GEFuZHJlIDxvcGVucmNAcG9zdGVvLmRlPoiTBBMWCgA7FiEEIe1Ep7aw -ZGGQHzkyFuz+3MRZea4FAmbR+S0CGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcC -F4AACgkQFuz+3MRZea7GewD/cEexNFi6y0eZqiWduihvyrJjnD8mDKQ8W5+Nt23v -60IA/2AdbuULXtJ2wsww/3VpIjN22AJdTTZQq9SEgLbhqfwLuDgEZs80XRIKKwYB -BAGXVQEFAQEHQL53gX/5GbufLJYAcb+nAT59LCaPFXk5FgmoOZTxic49AwEIB4h4 -BBgWCgAgFiEEIe1Ep7awZGGQHzkyFuz+3MRZea4FAmbPNF0CGwwACgkQFuz+3MRZ -ea754AEAkjXsfyVYCBBUHiBKF8m1aEtWx1xFwUlXXQ6AX0gBYHsBAM+okBmzAqQr -1GhAgSqafxHs9a/aNdINQVp9APQiD5QK -=+1X6 ------END PGP PUBLIC KEY BLOCK----- diff --git a/assets/pgp/hex.txt b/assets/pgp/hex.txt deleted file mode 100644 index 6e0e0d3..0000000 --- a/assets/pgp/hex.txt +++ /dev/null @@ -1,53 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQINBGakvQcBEAC2whhYAjfyrGsRjL2P+NMWxCpS7irCjOIU3+dhSIubL47i8rRH -7U+M/9HExkyv0+LBEa+Ic3q1bP2gx9tZf0RUVZPsh8uQfh1x8t66VLp6+Yiagbtg -h0jRsgnc53PZ4hqNMrdJnteCOCrQ2IJsvIxMh/HJphhhMl5C7U6u2qDdJcxrXTnF -wILFx6Kf3pua2EdqTFAIobh56j2XyGAiP5gR3X2ifODAzfsu9O7/2yuXMI/Nvd8L -fC0dEnuSKmTB9J/H0KrQGYDfzY/NFchAgWYFNK7YvZR8Emm1+UK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AoJEKGe/6r4wA/PI5gQAKKEf6pyCkeEWVmqyxHPc6xLxwaC -8mkRKoBlf3t/4QMqw8J8L+DHT24aYaDPvBVmscUEj7g6feFND0DwPO+pDMA6Qxf0 -Lg1gTj3HZodAoL/q08P8wOvjSrCoajkmvnswJwC5z5F9taYWhBlb77P2kBrhEqN+ -kj0iY5I37afHTnH4mt0PHc+ryZ9NI2T7v5gkELd0XfSV28boefLliQZNVXLZ9qIQ -SLLa1yLDi5f4OEB2Q7weav2m7vhWUOxyXinM1fXoxeX/wgVwixqfZgeMuoeFufQo -TJn4zMsuLTrUdIGbM/1up99E5l4p+7yBHdpDk0HjlC4Z1UJn5gtZsm6xOWNEuvXR -qn3ZrdfSqMJysGUVZ/ByrgkVzh1E3gf/DmgtxklwU2PtM3qcsVMmfO1qwCsxiwoG -79tkaTAI+GB3vHhlXTVVONF1DyQ2tOwn+X66Du4SpigpGljUjbBmhlzJcaMqJgpM -rtjLV/abxTpmvmTgIYPLSnJCSQcScCpj1wc/vV4W4rZfA40TnU0KtKK0NvviS8sW -/OxAR+PfwDJd7lmhOSMR9wdNnFVMLxSKu56p3Dny0BLepZCo+NxaQnZTa1rIWFVe -By9zyDcJMzvj6ab5FBXTnDssRqukVGiRFbqaT8AzXtdfGC07l7agspwJdxU2LlXu -5jeQGlf9A7iXF80g -=1mQ+ ------END PGP PUBLIC KEY BLOCK----- diff --git a/assets/ttf/JBM.ttf b/assets/ttf/JBM.ttf deleted file mode 100644 index 3fce55d..0000000 Binary files a/assets/ttf/JBM.ttf and /dev/null differ diff --git a/resources/img/lain.png b/resources/img/lain.png new file mode 100644 index 0000000..5c70f81 Binary files /dev/null and b/resources/img/lain.png differ diff --git a/resources/ttf/HNF-Reg.ttf b/resources/ttf/HNF-Reg.ttf new file mode 100644 index 0000000..124e362 Binary files /dev/null and b/resources/ttf/HNF-Reg.ttf differ diff --git a/src/main.rs b/src/main.rs index 3384941..bc88407 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,26 +3,27 @@ mod logger; extern crate rocket; extern crate rocket_dyn_templates; +use rocket::response::content::RawJson; +use rocket::{get, post, launch, build, routes}; use rocket::fs::FileServer; -use rocket::serde::{json::Json, Deserialize, Serialize}; -use rocket::{build, get, launch, post, routes}; -use rocket_dyn_templates::{context, Template}; +use rocket_dyn_templates::{Template, context}; +use rocket::serde::{Deserialize, Serialize, json::Json}; use chrono::Local; use std::borrow::Cow; -use std::fs::read_to_string; -use std::fs::File; use std::io::Write; use std::path::Path; +use std::fs::File; +use std::fs::read_to_string; -use serde_json::{json, Value}; +use serde_json::{Value, json}; -use crate::logger::iwakulog::{log, LogLevel}; +use crate::logger::iwakulog::{LogLevel, log}; -const ASSETS_DIR: &str = "./assets"; -const GUEST_MESSAGES: &str = "./guests.json"; -const DATE_TIME_FORMAT: &str = "%Y-%m-%d | %H:%M"; +const ASSETS_DIR: &str = "./assets"; +const GUEST_MESSAGES: &str = "./guests.json"; +const DATE_TIME_FORMAT: &str = "%Y-%m%d | %H:%M"; #[derive(Serialize, Deserialize)] #[serde(crate = "rocket::serde")] @@ -31,6 +32,7 @@ struct GuestMessage<'r> { body: Cow<'r, str>, } + fn check_file(path: &str) -> bool { Path::new(path).exists() } @@ -44,34 +46,22 @@ fn read_guest_messages() -> Result> { fn post_guest_message(name: &str, body: &str) { let mut guest_json = match read_guest_messages() { Ok(x) => x, - Err(x) => panic!("Error while reading guest messages: {x:?}"), + Err(x) => panic!("Error while reading guest messages: {x:?}") }; let messages = guest_json["messages"] .as_array_mut() .expect("Object is not an array?"); - let date = Local::now(); + let date = Local::now().format(DATE_TIME_FORMAT); messages.push(json!({ "name": name, "body": body, - "date": date.timestamp(), + "date": date.to_string(), })); let mut file = File::create(GUEST_MESSAGES).expect("Couldn't read msgs"); - file.write_all(guest_json.to_string().as_bytes()) - .expect("wah"); + file.write_all(guest_json.to_string().as_bytes()).expect("wah"); } -#[get("/abuse")] -fn abuse() -> Template { - Template::render("abuse", context! {}) -} -#[get("/post")] -fn post() -> Template { - Template::render("post", context! {}) -} -#[get("/members")] -fn members() -> Template { - Template::render("members", context! {}) -} + #[get("/")] fn index() -> Template { @@ -84,16 +74,11 @@ fn post_msg(input: Json>) { return; } -#[get("/services")] -fn services() -> Template { - Template::render("services", context! {}) -} - #[get("/guestbook")] fn guests() -> Template { let guest_json = match read_guest_messages() { Ok(x) => x, - Err(x) => panic!("Error while reading guest messages: {x:?}"), + Err(x) => panic!("Error while reading guest messages: {x:?}") }; Template::render("guest", &guest_json) } @@ -101,23 +86,13 @@ fn guests() -> Template { #[launch] fn rocket() -> _ { if !check_file(GUEST_MESSAGES) { - log( - LogLevel::Warn, - format!( - "Guest messages file ({}) has not been found. Creating a new one.", - GUEST_MESSAGES - ) - .as_str(), - ); + log(LogLevel::Warn, format!("Guest messages file ({}) has not been found. Creating a new one.", GUEST_MESSAGES).as_str()); let mut file = File::create(GUEST_MESSAGES).expect("Failed to create file."); - file.write_all(b"{\"messages\":[]}") - .expect("Failed to write to file."); + file.write_all(b"{\"messages\":[]}").expect("Failed to write to file."); } build() - .mount( - "/", - routes![index, guests, post_msg, members, post, services, abuse], - ) + .mount("/", routes![index, guests, post_msg]) .mount("/assets", FileServer::from(ASSETS_DIR)) .attach(Template::fairing()) } + diff --git a/templates.old/guest.html.tera b/templates.old/guest.html.tera deleted file mode 100644 index 5b1c20b..0000000 --- a/templates.old/guest.html.tera +++ /dev/null @@ -1,159 +0,0 @@ -Guest Book -
-
-

iwakura.rip

-

Leave a nice message for others to read :)

-

Dates are in UTC+2/CEST.

-  [ post message ]  -
-
- {% for message in messages %} -
-
- {{ message.name }} - -
-
-

{{ message.body }}

-
-
- {% endfor %} -
-
- name -
-
- message - -
-  [ send ]  -
-
- - diff --git a/templates.old/index.html.tera b/templates.old/index.html.tera deleted file mode 100644 index 2557739..0000000 --- a/templates.old/index.html.tera +++ /dev/null @@ -1,159 +0,0 @@ -
- -
-
-
- About -

iwakura.rip is a collection of servers hosting mostly-private services for hexlocation & friends.

-

The iwakura.rip website is also connected to dn42 (iwakura.dn42). We are planning to connect our services to dn42 too.

-
-
- Explanation -

Most of the gifs/art/names/ui design is inspired by/based on Serial Experiments Lain, an anime series about Lain Iwakura

-
-
- Disclaimer -

Serial Experiments Lain is the property of Triangle Studios. iwakura.rip is not affiliated with Triangle Studios.

-
-
-
- - diff --git a/templates.old/verify.html.tera b/templates.old/verify.html.tera deleted file mode 100644 index 449f689..0000000 --- a/templates.old/verify.html.tera +++ /dev/null @@ -1,35 +0,0 @@ - - - - -
-

Make sure to verify our PGP keys when communicating with us.

- hex - andre -

Please encrypt any messages containing important details towards using our PGP keys. Thank you.

-
- - - diff --git a/templates/abuse.html.tera b/templates/abuse.html.tera deleted file mode 100644 index bef5c49..0000000 --- a/templates/abuse.html.tera +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "base" %} -{% block title %}report abuse{% endblock title %} -{% block content %} -We ask that you report any abuse you find to: abuse@iwakura.rip.
-Please make sure your e-mail contains the following: -
    -
  1. Type of abuse
  2. -
  3. Evidence (no screenshots, hard evidence only)
  4. -
  5. Origin of abuse (e-mail address, IP, domain etc)
  6. -
  7. Additional information that might help us.
  8. -
- -Please consider the following when sending an abuse e-mail. -
    -
  1. We are *not* able to provide any personal identifiable information, as we do not store them.
  2. -
  3. We take abuse notifications very serious. Sending us multiple false abuse reports will result in a permanent block from our mailserver.
  4. -
  5. We try to respond within 48 hours. Do not flood our inboxes.
  6. -
  7. Please be respectful at all times.
  8. -
- -{% endblock content %} diff --git a/templates/base.html.tera b/templates/base.html.tera deleted file mode 100644 index 35aa331..0000000 --- a/templates/base.html.tera +++ /dev/null @@ -1,21 +0,0 @@ - - - - {% block title %}{% endblock title %} - iwakura.rip - - - -
-

iwakura.rip


- - -
{% block content %}{% endblock content %}
-
- - diff --git a/templates/guest.html.tera b/templates/guest.html.tera index 2014939..c650655 100644 --- a/templates/guest.html.tera +++ b/templates/guest.html.tera @@ -1,20 +1,155 @@ -{% extends "base" %} -{% block title %}guestbook{% endblock title %} -{% block content %} -

post a message?

-
-
+
+ +
{% for message in messages %}
{{ message.name }} - +

{{ message.body }}

-
{% endfor %} +
+
+ name +
+
+ message + +
+  [ send ]  +
-{% endblock content %} + + diff --git a/templates/index.html.tera b/templates/index.html.tera index e07635b..d3b773d 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -1,6 +1,157 @@ -{% extends "base" %} -{% block title %}homepage{% endblock title %} -{% block content %} -Welcome to iwakura.rip. We are a small group of technology nerds and geeks fascinated by computers and technology.
-We host a bunch of services on this domain for usage by friends & co. -{% endblock content %} +
+ +
+
+
+ About +

iwakura.rip is a collection of servers hosting mostly-private services for hexlocation & friends.

+
+
+ Explanation +

Most of the gifs/art/names/ui design is inspired by/based on Serial Experiments Lain, an anime series about Lain Iwakura

+
+
+ Disclaimer +

Serial Experiments Lain is the property of Triangle Studios. iwakura.rip is not affiliated with Triangle Studios.

+
+
+
+ + diff --git a/templates/macros.html.tera b/templates/macros.html.tera deleted file mode 100644 index 6655393..0000000 --- a/templates/macros.html.tera +++ /dev/null @@ -1,20 +0,0 @@ -{% macro service(title, description, href, img, h="16") %} -
-

- - {{title}} -

-
-

{{description}}

-
-{% endmacro service %} -{% macro user_display(username, role=0) %} - {% if role == 0 %} - {% set_global prefix = "

member

" %} - {% elif role == 1 %} - {% set_global prefix = "

friend

" %} - {% elif role == 2 %} - {% set_global prefix = "

admin

" %} - {% endif %} -
  • {{prefix | safe}}{{username}}
  • -{% endmacro user_display %} diff --git a/templates/members.html.tera b/templates/members.html.tera deleted file mode 100644 index 9d0e056..0000000 --- a/templates/members.html.tera +++ /dev/null @@ -1,12 +0,0 @@ -{% import "macros" as macros %} -{% extends "base" %} -{% block title %}members{% endblock title %} -{% block content %} -These are currently members of iwakura.rip, participating in some form. -
      - {{macros::user_display(username="hex", role=2)}} - {{macros::user_display(username="andre", role=1)}} - {{macros::user_display(username="grng", role=1)}} -
    -If communicating with any of our members, please encrypt your message against their pgp key, if they have one. -{% endblock content %} diff --git a/templates/post.html.tera b/templates/post.html.tera deleted file mode 100644 index 4d3a743..0000000 --- a/templates/post.html.tera +++ /dev/null @@ -1,26 +0,0 @@ -{% extends "base" %} -{% block title %}post a message{% endblock title %} -{% block content %} -
    - name -
    -
    - message - -
    - send! -
    - -{% endblock content %} diff --git a/templates/services.html.tera b/templates/services.html.tera deleted file mode 100644 index 0a5f476..0000000 --- a/templates/services.html.tera +++ /dev/null @@ -1,18 +0,0 @@ -{% import "macros" as macros %} -{% extends "base" %} -{% block title %}services{% endblock title %} -{% block content %} -
    - {{macros::service(title="Forgejo", description="A place for everyone to host their source code!", href="https://git.iwakura.rip", img="https://www.marefa.org/w/images/thumb/0/05/Forgejo_logo.svg/640px-Forgejo_logo.svg.png")}} - {{macros::service(title="Jellyfin", description="For all your media consumption needs.", href="https://media.iwakura.rip", img="/assets/img/jellyfin.png")}} - {{macros::service(title="Woodpecker CI", description="Powerful CI/CD to use together with Forgejo.", href="https://ci.iwakura.rip", img="/assets/img/woodpecker.svg")}} - {{macros::service(title="Jellyseerr", description="Get information about your favorite movies and TV shows, all together in one place.", href="https://request.iwakura.rip", img="/assets/img/jellyseerr.ico")}} - {{macros::service(title="DN42", description="We are currently in the process of connecting all of our services to DN42 - an overlay network using internet technologies.", href="https://iwakura.dn42", img="/assets/img/dn42.png")}} - {{macros::service(title="Authelia", description="Open-source authentication & authorization platform.", href="https://a.iwakura.rip", img="/assets/img/authelia.png")}} - {{macros::service(title="E-mail", description="We are hosting our own e-mail servers on an off-shore hosting provider. Note: all emails are currently being stored in plain text. We recommend using PGP encryption.", href="https://mail.iwakura.rip", img="/assets/img/mail.png")}} - {{macros::service(title="Blog", description="Our blog where we post some stuff, sometimes :)", href="https://blog.iwakura.rip", img="")}} - {{macros::service(title="Enclosed", description="Enclosed is a minimalistic web application designed for sending private and secure notes.", href="https://bin.iwakura.rip", img="https://github.com/CorentinTh/enclosed/raw/main/.github/icon-light.png")}} -

    -Other services can be added on request. We also try to provide space for members wanting to host their own services, though iwakura.rip is a hobby project made by a single guy in his basement, so stability is something to think about when asking for this. -

    We do not own the copyright for any of the projects mentioned above. All copyright goes to their respective owners. We only host instances of them.

    -{% endblock content %} diff --git a/views/guest.html b/views/guest.html new file mode 100644 index 0000000..443ea34 --- /dev/null +++ b/views/guest.html @@ -0,0 +1,69 @@ +
    +
    +

    iwakura.rip

    +
    +
    +
    +
    + hexlocation + +
    +
    +

    Hello nerds!

    +
    +
    +
    +
    +