Cleanup: Adjust styling to Jobbörse, remove JS, remove external references #2

Merged
ldr merged 4 commits from :cleanup into master 2024-07-11 02:12:01 +02:00
5 changed files with 108 additions and 83 deletions
Showing only changes of commit abdf1eb09e - Show all commits

Remove client-side javascript

Should always have used php templating instead
JustAnotherJavaProgrammer 2024-07-10 22:16:40 +02:00 committed by Lukas Drescher
Signed by: ldr
SSH key fingerprint: SHA256:dGc7n/Lzl6WaqGPMTj4cYddEEfSG+yTsSUU4ON1m1wQ

View file

@ -1,4 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"><title id="page_title"></title><link rel="stylesheet" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/bootstrap.min.css"><link rel="stylesheet" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/styles.min.css"><script src="https://raw.githubusercontent.com/KilakOriginal/stfl/main/bootstrap.min.js"></head><body style="width: 930px;max-width: 100%;margin-left: auto;margin-right: auto;padding: 0;"><h4 style="text-align: center;margin-top: 0.3%;"><span style="color: rgb(112, 114, 118);">Fachschaft Informatik</span></h4><h1 style="text-align: center;margin-top: 0.3%;" id="title"><strong></strong></h1><p style="text-align: justify;background: #b92929;border-radius: 20px;color: rgb(255,255,255);width: 900px;max-width: 85%;align-self: center;margin-left: auto;margin-right: auto;margin-top: 10px;padding: 15px;" id="about"><b><a href="mailto:technik@fs-infmath.uni-kiel.de" style="color: white;">technik@fs-infmath.uni-kiel.de</a></b>.</p><p style="text-align: center;"><b><a href="https://www.fs-infmath.uni-kiel.de/wiki/Hauptseite" style="color: #454545;" id="go_back"></a></b></p><script src="assets/bootstrap/js/bootstrap.min.js"></script>
<!DOCTYPE html>
<html lang="en">
<?php
$text = json_decode(file_get_contents("languages/" . $_GET["lang"] . ".json"), true);
$title = $text["title"];
@ -6,17 +8,25 @@ $about = $text["error"];
$go_back = $text["go_back"];
$lang = $_GET['lang'];
?>
<script>
window.addEventListener("load", load_page_contents);
function load_page_contents() {
let title = "<?php echo $title; ?>";
let about = '<?php echo $about; ?>';
let go_back = "<?php echo $go_back; ?>";
document.getElementById("page_title").innerHTML = title;
document.getElementById("title").innerHTML = title;
document.getElementById("about").innerHTML = about + document.getElementById("about").innerHTML;
document.getElementById("go_back").innerHTML = go_back;
}
</script>
</body></html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title id="page_title"><?php echo $title; ?></title>
<link rel="stylesheet" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/bootstrap.min.css">
<link rel="stylesheet" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/styles.min.css">
</head>
<body style="width: 930px;max-width: 100%;margin-left: auto;margin-right: auto;padding: 0;">
<h4 style="text-align: center;margin-top: 0.3%;">
<span style="color: rgb(112, 114, 118);">Fachschaft Informatik</span>
</h4>
<h1 style="text-align: center;margin-top: 0.3%;" id="title"><?php echo $title; ?></h1>
<p style="text-align: justify;background: #b92929;border-radius: 20px;color: rgb(255,255,255);width: 900px;max-width: 85%;align-self: center;margin-left: auto;margin-right: auto;margin-top: 10px;padding: 15px;"
id="about"><?php echo $about; ?><a href="mailto:technik@fs-infmath.uni-kiel.de"
style="color: white;">technik@fs-infmath.uni-kiel.de</a></b>.</p>
<p style="text-align: center;"><b><a href="https://www.fs-infmath.uni-kiel.de/wiki/Hauptseite"
style="color: #454545;" id="go_back"><?php echo $go_back; ?></a></b></p>
</body>
</html>

View file

@ -1,15 +1,8 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"><title id="page_title"></title><link rel="shortcut icon" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/favicon.ico"/><link rel="stylesheet" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/bootstrap.min.css"><link rel="stylesheet" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/styles.min.css"><script src="https://raw.githubusercontent.com/KilakOriginal/stfl/main/bootstrap.min.js"></script></head><body style="width: 930px; max-width: 100%; margin-left: auto;margin-right: auto;padding: 0;"><h4 style="text-align: center;margin-top: 10px;"><span style="color: rgb(112, 114, 118);">Fachschaft Informatik</span></h4><h1 style="text-align: center;margin-top: 10px;" id="title"><strong></strong></h1><p style="text-align: justify;background: #0d6efd;border-radius: 20px;color: rgb(255,255,255);width: 900px; max-width: 85%;align-self: center;margin-left: auto;margin-right: auto;margin-top: 15px;padding: 15px;" id="about"></p>
<form action="<?php echo $_SERVER["PHP_SELF"] . '?'.http_build_query($_GET); ?>" method="post" style="margin-left: auto;margin-right: auto;width:900px;max-width: 85%;">
<input type="text" style="display: block;width: 900px;max-width: 100%;height: 60px;margin-left: auto;margin-right: auto;margin-bottom: 20px;border-radius: 1.5rem; padding: 15px;" id="subject" name="subject"></input>
<textarea style="display: block;width: 900px;max-width: 100%;height: 400px;margin-left: auto;margin-right: auto;margin-bottom: 20px;border-radius: 1.5rem; padding: 15px;" id="message" name="message"></textarea>
<button class="btn btn-primary" type="submit" style="display: block;width: auto;float: right;margin-bottom:10px;" id="submit" name="submit"></button><p><b><a href="https://www.fs-infmath.uni-kiel.de/wiki/Hauptseite" style="color: #454545;" id="go_back"></a></b></p></form><script src="assets/bootstrap/js/bootstrap.min.js"></script>
<!DOCTYPE html>
<html lang="en">
<?php
if((isset($_GET["lang"]))) {
$lang = $_GET['lang'];
}
else {
$lang = "de";
}
$lang = $_GET['lang'] ?? $lang = "de";
$text = json_decode(file_get_contents("languages/$lang.json"), true);
$title = $text["title"];
$about = $text["about"];
@ -20,36 +13,48 @@ $go_back = $text["go_back"];
$recipient = $text["recipient"];
if(isset($_POST["submit"]))
{
if (isset($_POST["submit"])) {
$subject = "[Kummerkasten] " . $_POST["subject"];
$message = $_POST["message"];
if(mail($recipient, $subject, $message)) {
if (mail($recipient, $subject, $message)) {
header("Location: success.php?lang=$lang");
}
else {
} else {
header("Location: failed.php?lang=$lang");
}
die();
}
?>
<script>
window.addEventListener("load", load_page_contents);
function load_page_contents() {
let title = "<?php echo $title; ?>";
let about = '<?php echo $about; ?>';
let subject_placeholder = "<?php echo $subject_placeholder; ?>";
let message_placeholder = "<?php echo $message_placeholder; ?>";
let send_button = "<?php echo $send_button; ?>";
let go_back = "<?php echo $go_back; ?>";
document.getElementById("page_title").innerHTML = title;
document.getElementById("title").innerHTML = title;
document.getElementById("about").innerHTML = about;
document.getElementById("subject").placeholder = subject_placeholder;
document.getElementById("message").placeholder = message_placeholder;
document.getElementById("submit").innerHTML = send_button;
document.getElementById("go_back").innerHTML = go_back;
}
</script>
</body></html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title id="page_title"><?php echo $title; ?></title>
<link rel="shortcut icon" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/favicon.ico" />
<link rel="stylesheet" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/bootstrap.min.css">
<link rel="stylesheet" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/styles.min.css">
</head>
<body style="width: 930px; max-width: 100%; margin-left: auto;margin-right: auto;padding: 0;">
<h4 style="text-align: center;margin-top: 10px;"><span style="color: rgb(112, 114, 118);">Fachschaft
Informatik</span></h4>
<h1 style="text-align: center;margin-top: 10px;" id="title"><?php echo $title; ?></h1>
<p style="text-align: justify;background: #0d6efd;border-radius: 20px;color: rgb(255,255,255);width: 900px; max-width: 85%;align-self: center;margin-left: auto;margin-right: auto;margin-top: 15px;padding: 15px;"
id="about"><?php echo $about; ?></p>
<form action="<?php echo $_SERVER["PHP_SELF"] . '?' . http_build_query($_GET); ?>" method="post"
style="margin-left: auto;margin-right: auto;width:900px;max-width: 85%;">
<input type="text"
style="display: block;width: 900px;max-width: 100%;height: 60px;margin-left: auto;margin-right: auto;margin-bottom: 20px;border-radius: 1.5rem; padding: 15px;"
id="subject" name="subject" placeholder="<?php echo $subject_placeholder; ?>"></input>
<textarea
style="display: block;width: 900px;max-width: 100%;height: 400px;margin-left: auto;margin-right: auto;margin-bottom: 20px;border-radius: 1.5rem; padding: 15px;"
id="message" name="message" placeholder="<?php echo $message_placeholder; ?>"></textarea>
<button class="btn btn-primary" type="submit"
style="display: block;width: auto;float: right;margin-bottom:10px;" id="submit"
name="submit"><?php echo $send_button; ?></button>
<p><b><a href="https://www.fs-infmath.uni-kiel.de/wiki/Hauptseite" style="color: #454545;"
id="go_back"><?php echo $go_back; ?></a></b>
</p>
</form>
</body>
</html>

View file

@ -1,11 +1,11 @@
{
"title":"Kummerkasten",
"about":"Solltest du der Fachschaft Sorgen, Beschwerden oder Anregungen bezüglich universitärer Einrichtungen, Studierender oder Mitarbeitern im Rahmen deines Studiums (egal ob Haupt- oder Nebenfach) mitteilen wollen, kannst du uns diese über das folgende Formular anonym übermitteln. Den Betreff und dein Anliegen trägst du dafür bitte in die nachfolgenden Textfelder ein und klickst den \"Senden\"-Knopf. Denke bitte daran, deine E-Mail-Adresse anzugeben, solltest du wünschen, Antwort zu erhalten.",
"subject_placeholder":"Betreff (optional)",
"message_placeholder":"Geben Sie hier Ihr Anliegen ein...",
"send_button":"Senden",
"go_back":"Zurück zur Fachschaft",
"success":"Ihre Nachricht wurde erfolgreich gesendet!",
"error":"Ihre Anfrage konnte nicht übermittelt werden! Stellen Sie sicher, dass Sie mit dem Internet verbunden sind und versuchen Sie es erneut. Sollte das Problem weiterhin bestehen, wenden Sie sich bitte an ",
"recipient":"kummerkasten@fs-infmath.uni-kiel.de"
}
"title": "Kummerkasten",
"about": "Solltest du der Fachschaft Sorgen, Beschwerden oder Anregungen bezüglich universitärer Einrichtungen, Studierender oder Mitarbeitern im Rahmen deines Studiums (egal ob Haupt- oder Nebenfach) mitteilen wollen, kannst du uns diese über das folgende Formular anonym übermitteln. Den Betreff und dein Anliegen trägst du dafür bitte in die nachfolgenden Textfelder ein und klickst den \"Senden\"-Knopf. Denke bitte daran, deine E-Mail-Adresse anzugeben, solltest du wünschen, Antwort zu erhalten.",
"subject_placeholder": "Betreff (optional)",
"message_placeholder": "Geben Sie hier Ihr Anliegen ein...",
"send_button": "Senden",
"go_back": "Zurück zur Fachschaft",
"success": "Ihre Nachricht wurde erfolgreich gesendet!",
"error": "Ihre Anfrage konnte nicht übermittelt werden! Stellen Sie sicher, dass Sie mit dem Internet verbunden sind und versuchen Sie es erneut. Sollte das Problem weiterhin bestehen, wenden Sie sich bitte an ",
"recipient": "ldr@fs-wiinf.uni-kiel.de"
}

View file

@ -1,11 +1,11 @@
{
"title":"Suggestion Box",
"about":"If you would like to inform the student council of any concerns, complaints or suggestions regarding university facilities, students or staff within the scope of your studies (regardless of whether you are majoring or minoring), you can submit them to us anonymously through the following form. Please enter the subject and your concern in the text fields below and click the \"Send\" button. Remember to also include your e-mail address, should you wish to receive a reply.",
"subject_placeholder":"Subject (optional)",
"message_placeholder":"Please enter your message...",
"send_button":"Send",
"go_back":"Homepage fachschaft",
"success":"Your message was sent successfully!",
"error":"Error sending message; Make sure you have an active internet connection. If the problem persists, please contact ",
"recipient":"kummerkasten@fs-infmath.uni-kiel.de"
}
"title": "Suggestion Box",
"about": "If you would like to inform the student council of any concerns, complaints or suggestions regarding university facilities, students or staff within the scope of your studies (regardless of whether you are majoring or minoring), you can submit them to us anonymously through the following form. Please enter the subject and your concern in the text fields below and click the \"Send\" button. Remember to also include your e-mail address, should you wish to receive a reply.",
"subject_placeholder": "Subject (optional)",
"message_placeholder": "Please enter your message...",
"send_button": "Send",
"go_back": "Homepage fachschaft",
"success": "Your message was sent successfully!",
"error": "Error sending message; Make sure you have an active internet connection. If the problem persists, please contact ",
"recipient": "ldr@fs-wiinf.uni-kiel.de"
}

View file

@ -1,4 +1,6 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"><title id="page_title"></title><link rel="shortcut icon" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/favicon.ico"/><link rel="stylesheet" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/bootstrap.min.css"><link rel="stylesheet" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/styles.min.css"><script src="https://raw.githubusercontent.com/KilakOriginal/stfl/main/bootstrap.min.js"></script></head><body style="width: 930px;max-width: 100%;margin-left: auto;margin-right: auto;padding: 0;"><h4 style="text-align: center;margin-top: 0.3%;"><span style="color: rgb(112, 114, 118);">Fachschaft Informatik</span></h4><h1 style="text-align: center;margin-top: 0.3%;" id="title"><strong></strong></h1><p style="text-align: justify;background: #0d6efd;border-radius: 20px;color: rgb(255,255,255);width: 900px;max-width: 85%;align-self: center;margin-left: auto;margin-right: auto;margin-top: 10px;padding: 15px;" id="about"></p><p style="text-align: center;"><b><a href="https://www.fs-infmath.uni-kiel.de/wiki/Hauptseite" style="color: #454545;" id="go_back"></a></b></p><script src="assets/bootstrap/js/bootstrap.min.js"></script>
<!DOCTYPE html>
<html lang="en">
<?php
$text = json_decode(file_get_contents("languages/" . $_GET["lang"] . ".json"), true);
$title = $text["title"];
@ -6,17 +8,25 @@ $about = $text["success"];
$go_back = $text["go_back"];
$lang = $_GET['lang'];
?>
<script>
window.addEventListener("load", load_page_contents);
function load_page_contents() {
let title = "<?php echo $title; ?>";
let about = '<?php echo $about; ?>';
let go_back = "<?php echo $go_back; ?>";
document.getElementById("page_title").innerHTML = title;
document.getElementById("title").innerHTML = title;
document.getElementById("about").innerHTML = about;
document.getElementById("go_back").innerHTML = go_back;
}
</script>
</body></html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title id="page_title"><?php echo $title; ?></title>
<link rel="shortcut icon" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/favicon.ico" />
<link rel="stylesheet" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/bootstrap.min.css">
<link rel="stylesheet" href="https://raw.githubusercontent.com/KilakOriginal/stfl/main/styles.min.css">
</head>
<body style="width: 930px;max-width: 100%;margin-left: auto;margin-right: auto;padding: 0;">
<h4 style="text-align: center;margin-top: 0.3%;"><span style="color: rgb(112, 114, 118);">Fachschaft
Informatik</span></h4>
<h1 style="text-align: center;margin-top: 0.3%;" id="title"><?php echo $title; ?></h1>
<p style="text-align: justify;background: #0d6efd;border-radius: 20px;color: rgb(255,255,255);width: 900px;max-width: 85%;align-self: center;margin-left: auto;margin-right: auto;margin-top: 10px;padding: 15px;"
id="about"><?php echo $about; ?></p>
<p style="text-align: center;"><b><a href="https://www.fs-infmath.uni-kiel.de/wiki/Hauptseite"
style="color: #454545;" id="go_back"><?php echo $go_back; ?></a></b></p>
</body>
</html>