Răsfoiți Sursa

Merge branch 'master' into update-website

# Conflicts:
#	discord.html
Sv443 4 ani în urmă
părinte
comite
be8131e54a
9 a modificat fișierele cu 92 adăugiri și 36 ștergeri
  1. 6 6
      css/global.css
  2. 15 11
      css/index.css
  3. 9 9
      discord.html
  4. 11 8
      index.html
  5. 4 2
      js/index.js
  6. 10 0
      ping.html
  7. BIN
      resources/images/townly.png
  8. 37 0
      townly/discord.html
  9. BIN
      townly/img/Townly_icon.png

+ 6 - 6
css/global.css

@@ -98,27 +98,27 @@ body[data-theme="dark"] #cookie-consent {
     background-color: #101010;
 }
 
-body[data-theme="light"] #consent-button {
+body[data-theme="light"] .cookieButton {
     background-color: #D8D8D8;
 }
 
-body[data-theme="dark"] #consent-button {
+body[data-theme="dark"] .cookieButton {
     background-color: #202020;    
 }
 
-body[data-theme="light"] #consent-button span {
+body[data-theme="light"] .cookieButton span {
     color: black;
 }
 
-body[data-theme="light"] #consent-button:hover span {
+body[data-theme="light"] .cookieButton:hover span {
     color: #5aa469;
 }
 
-body[data-theme="dark"] #consent-button span {
+body[data-theme="dark"] .cookieButton span {
     color: white;
 }
 
-body[data-theme="dark"] #consent-button:hover span {
+body[data-theme="dark"] .cookieButton:hover span {
     color: #5aa469;
 }
 

+ 15 - 11
css/index.css

@@ -143,7 +143,7 @@ main {
     background-image: url(../resources/images/Sv443NetworkIcon.png);
     background-size: cover;
     margin-left: auto;
-    /* margin-right: 0; */
+    margin-right: 0;
 }
 
 #projects {
@@ -239,13 +239,6 @@ footer a:hover {
     color: #6f85fc;
 }
 
-#cloudflare {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    margin: 0 20px;
-}
-
 #legal {
     display: flex;
     flex-direction: column;
@@ -309,12 +302,16 @@ footer a:hover {
     justify-content: space-around;
     align-items: center;
     background-color: #edeef4;
-    padding: 5px 20px;
+    padding: 5px 300px;
     flex-basis: 100%;
     font-size: 14px;
 }
 
-#consent-button {
+#cookie-consent > div.big {
+    flex-grow: 2;
+}
+
+.cookieButton {
     display: flex;
     align-items: center;
     justify-content: center;
@@ -322,9 +319,10 @@ footer a:hover {
     background-color: #D8D8D8;
     border-radius: 30px;
     padding: 10px 15px;
+    margin: 10px 5px;
 }
 
-#consent-button:hover span {
+.cookieButton:hover span {
     color: #5aa469;
 }
 
@@ -354,6 +352,12 @@ footer a:hover {
     }
 }
 
+@media (max-width: 1000px) {
+    #cookie-consent {
+        padding: 5px 30px;
+    }
+}
+
 @media (max-width: 800px) {
     main {
         margin: 1rem;

+ 9 - 9
discord.html

@@ -1,14 +1,14 @@
 <!DOCTYPE html>
 <html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta name="pagename" content="Sv443 Network Discord Server">
-    <meta name="application-name" content="Sv443 Network Discord Server">
-    <meta property="og:title" content="Sv443 Network Discord Server">
-    <meta name="description" content="Visit this website to join the official Sv443 Network Discord server.">
-    <meta name="twitter:card" content="Visit this website to join the official Sv443 Network Discord server.">
-    <meta property="og:description" content="Visit this website to join the official Sv443 Network Discord server.">
+    <head>
+        <meta charset="UTF-8">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <meta name="pagename" content="Sv443 Network Discord Server">
+        <meta name="application-name" content="Sv443 Network Discord Server">
+        <meta property="og:title" content="Sv443 Network Discord Server">
+        <meta name="description" content="Use this link to join the official Sv443 Network Discord server.">
+        <meta name="twitter:card" content="Use this link to join the official Sv443 Network Discord server.">
+        <meta property="og:description" content="Use this link to join the official Sv443 Network Discord server.">
 
     <meta name="HandheldFriendly" content="true">
     <meta name="copyright" content="Sv443 Network">

+ 11 - 8
index.html

@@ -43,6 +43,8 @@
     <meta name="theme-color" content="#101747">
 </head>
 <body onload="indexonload();">
+    <!-- TODO: replace all webp images with png -->
+    <!-- TODO: make footer non-sticky -->
     <header>
         <div id="options">
             <div id="themebtn" onclick="theme.change()" title="Switch to dark theme">
@@ -101,6 +103,10 @@
                     <h1 id="gamestitle">Games</h1>
                 </div>
                 <div class="list">
+                    <a href="https://github.com/Sv443/Townly#readme" id="townly" rel="noopener" class="img-link" title="Play Townly" target="_blank"><div class="list-item-container">
+                        <img src="./resources/images/townly.png" alt="Townly icon" class="rounded square"></img>
+                        <h4>Townly</h4>
+                    </div></a>
                     <a href="https://sv443.net/games/flappy_switch/index.html" id="flappyswitch" rel="noopener" class="img-link" title="Play Flappy Switch" target="_blank"><div class="list-item-container">
                         <img src="./resources/images/flappy_switch.png" alt="Flappy Switch icon" class="rounded square"></img>
                         <h4>Flappy Switch</h4>
@@ -154,20 +160,17 @@
     </main>
     <footer>
         <div id="cookie-consent">
-            <div>
+            <div class="big">
                 <h3>This website uses cookies</h3>
                 <p>
                     We use cookies to store site settings such as the theme.<br>
-                    Please accept the usage of cookies to enable these features.
+                    Please accept the usage of functional cookies to enable these features.
                 </p>
             </div>
-            <div id="consent-button" class="img-link" onclick="consentGranted();"><span>Accept Cookies</span></div>
-        </div>
-        <div id="cloudflare">
-            <a href="https://www.cloudflare.com" rel="noopener" class="img-link" target="_blank">
-            <img src="./resources/images/cloudflare-light.svg" alt="Cloudflare icon" width="150px"></img>
-            </a>
+            <div id="consent-button" class="img-link cookieButton" onclick="consentGranted();"><span>Accept</span></div>
+            <div id="deny-button" class="img-link cookieButton" onclick="consentDenied();"><span>Deny</span></div>
         </div>
+        <div></div>
         <div id="legal">
             <h4><a id="privacypolicy" href="./privacypolicy/en" target="_blank">Privacy Policy</a> &bull; <a id="imprint" href="./imprint/en" target="_blank">Legal Information</a> &bull; <a id="license" href="./LICENSE" target="_blank">License</a></h4>
         </div>

+ 4 - 2
js/index.js

@@ -202,13 +202,11 @@ const theme = {
             if (document.getElementsByClassName("ph-moon")[0]) {
                 document.getElementsByClassName("ph-moon")[0].classList.add("ph-sun");
                 document.getElementsByClassName("ph-moon")[0].classList.remove("ph-moon");
-                document.getElementById("cloudflare").querySelector("img").src = "resources/images/cloudflare-dark.svg";
             }
         } else {
             if (document.getElementsByClassName("ph-sun")[0]) {
                 document.getElementsByClassName("ph-sun")[0].classList.add("ph-moon");
                 document.getElementsByClassName("ph-sun")[0].classList.remove("ph-sun");
-                document.getElementById("cloudflare").querySelector("img").src = "resources/images/cloudflare-light.svg";
             }
         }
         document.body.dataset.theme = newtheme;
@@ -300,3 +298,7 @@ function consentGranted() {
     setCookie("cookie-consent", "true", 365);
     setCookie("theme_pref", document.body.dataset.theme, 31);
 }
+
+function consentDenied() {
+    document.getElementById("cookie-consent").style.display = "none";
+}

+ 10 - 0
ping.html

@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="UTF-8">
+        <title>Pong.</title>
+    </head>
+    <body>
+        <p>Pong.</p>
+    </body>
+</html>

BIN
resources/images/townly.png


+ 37 - 0
townly/discord.html

@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html lang="en">
+    <head>
+        <meta charset="UTF-8">
+        <meta name="viewport" content="width=device-width, initial-scale=1.0">
+        <meta name="pagename" content="Townly Discord Server">
+        <meta name="application-name" content="Townly Discord Server">
+        <meta property="og:title" content="Townly Discord Server">
+        <meta name="description" content="Use this link to join the official Townly Discord server.">
+        <meta name="twitter:card" content="Use this link to join the official Townly Discord server.">
+        <meta property="og:description" content="Use this link to join the official Townly Discord server.">
+
+        <meta name="HandheldFriendly" content="true">
+        <meta name="copyright" content="Sv443 Network ([email protected] - https://github.com/Sv443-Network)">
+        <meta name="author" content="Sv443">
+        <meta property="og:url" content="https://sv443.net/">
+        <meta property="og:type" content="profile">
+
+        <meta property="og:image" content="img/Townly_icon.png">
+        <link rel="icon" href="img/Townly_icon.png">
+
+        <meta http-equiv="refresh" content="2; URL=https://discord.gg/yH2VWjpAEW">
+
+        <title>Sv443 - Discord</title>
+        <link rel="stylesheet" href="../css/global.css">
+        <link rel="stylesheet" href="../css/discord.css">
+        <script src="https://cdn.jsdelivr.net/npm/js-cookie@rc/dist/js.cookie.min.js"></script>
+        <script type="text/javascript" src="../js/redirect.js"></script>
+        <script type="text/javascript" src="../js/index.js"></script>
+    </head>
+    <body onload="otheronload(); redirect('https://discord.gg/yH2VWjpAEW');">
+        <main>
+            <h2>You are being redirected to Discord...</h2>
+            <h3>If not, please <a href="https://discord.gg/yH2VWjpAEW" target="_self">click here</a></h3>
+        </main>
+    </body>
+</html>

BIN
townly/img/Townly_icon.png