Cleanup + fix nginx
This commit is contained in:
Generated
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/pfostendynamics.com.iml" filepath="$PROJECT_DIR$/.idea/pfostendynamics.com.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
Generated
+10
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/public" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
Generated
+19
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="MessDetectorOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCSFixerOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PHPCodeSnifferOptionsConfiguration">
|
||||
<option name="highlightLevel" value="WARNING" />
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PhpStanOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
<component name="PsalmOptionsConfiguration">
|
||||
<option name="transferred" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+3
-1
@@ -1,4 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings" defaultProject="true" />
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
+8
-11
@@ -54,7 +54,7 @@ server {
|
||||
server_tokens off;
|
||||
|
||||
root /app/public;
|
||||
index index.php;
|
||||
index index.html index.htm index.php;
|
||||
|
||||
# make .well-known directory accessible
|
||||
location ~ /.well-known {
|
||||
@@ -66,21 +66,18 @@ server {
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri.php $uri/ /index.php$is_args$args;
|
||||
if (!-e $request_filename){
|
||||
rewrite ^(.*)$ /$1.php;
|
||||
}
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi_params;
|
||||
try_files $uri =404;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
}
|
||||
|
||||
location ~ \.html$ {
|
||||
try_files $uri $uri.html $uri/ /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri $uri.php $uri/ /index.php$is_args$args;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
error_page 404 /404;
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.min.js" integrity="sha384-w1Q4orYjBQndcko6MimVbzY0tgp4pWB4lZ7lr30WKz0vr/aWKhXdBNmNb5D92v7s" crossorigin="anonymous"></script>
|
||||
-->
|
||||
<script src="./js/main.js"></script>
|
||||
<script src="./js/local.js"></script>
|
||||
<script src="/js/main.js"></script>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
@@ -19,7 +18,7 @@
|
||||
</script>
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", load());
|
||||
document.addEventListener("DOMContentLoaded", () => load());
|
||||
</script>
|
||||
<!-- Place this tag in your head or just before your close body tag. -->
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<meta name="description" content='Welcome to Pfostendynamics! Here you can find all our wonderful projects, from bobbycars to helicopters! "Change you idea of what idiots can do'>
|
||||
<link rel="stylesheet" href="./css/darkmode.css" />
|
||||
<link rel="stylesheet" href="./css/style.css" />
|
||||
<link rel="stylesheet" href="/css/darkmode.css" />
|
||||
<link rel="stylesheet" href="/css/style.css" />
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous" />
|
||||
<title><?php echo htmlentities(PAGE_TITLE); ?> | Pfosten Dynamics</title>
|
||||
<link rel="icon" href="./img/favicon.png" />
|
||||
<link rel="icon" href="/img/favicon.png" />
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/cookieconsent@3/build/cookieconsent.min.css" />
|
||||
</head>
|
||||
|
||||
|
||||
+18
-18
@@ -5,11 +5,11 @@
|
||||
echo "bg-light navbar-light";
|
||||
} ?>" id="navbar">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="./" draggable="false" ondragstart="return false;">
|
||||
<a class="navbar-brand" href="/" draggable="false" ondragstart="return false;">
|
||||
<img src="<?php if ($_COOKIE["darkmode"] == "true") {
|
||||
echo "./img/PfostenDynamicsDark.png";
|
||||
echo "/img/PfostenDynamicsDark.png";
|
||||
} else {
|
||||
echo "./img/PfostenDynamics.png";
|
||||
echo "/img/PfostenDynamics.png";
|
||||
} ?>" style="max-height: 60px" class="d-inline-block align-top" alt="" loading="lazy" id="pfostendynamics" />
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -27,30 +27,30 @@
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php makeMenuItem("Home", "./", ACTIVE_MENUITEM == "home"); ?>
|
||||
<?php makeMenuItem("Home", "/", ACTIVE_MENUITEM == "home"); ?>
|
||||
<li class="nav-item dropdown vehicles bobbycar bobbyquad bobbybob bobbyklo bobbyboot bobbyhubschrauber raupenfahrzeug canactive">
|
||||
<a class="nav-link dropdown-toggle" href="javascript:void(0)" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" draggable="false" ondragstart="return false;">Vehicles</a>
|
||||
<div class="dropdown-menu couldDark <?php if($_COOKIE["darkmode"] == "true") echo "darkMode"; ?>" aria-labelledby="navbarDropdownMenuLink">
|
||||
<a class="dropdown-item givePHP couldDark <?php if($_COOKIE["darkmode"] == "true") echo "darkMode"; ?>" href="./bobbycar" draggable="false" ondragstart="return false;">Bobbycar</a>
|
||||
<a class="dropdown-item givePHP couldDark <?php if($_COOKIE["darkmode"] == "true") echo "darkMode"; ?>" href="./bobbyquad" draggable="false" ondragstart="return false;">Bobbyquad</a>
|
||||
<a class="dropdown-item givePHP couldDark <?php if($_COOKIE["darkmode"] == "true") echo "darkMode"; ?>" href="./bobbybob" draggable="false" ondragstart="return false;">Bobbybob</a>
|
||||
<a class="dropdown-item givePHP couldDark <?php if($_COOKIE["darkmode"] == "true") echo "darkMode"; ?>" href="./bobbyklo" draggable="false" ondragstart="return false;">Bobbyklo</a>
|
||||
<a class="dropdown-item givePHP couldDark <?php if($_COOKIE["darkmode"] == "true") echo "darkMode"; ?>" href="./bobbyboot" draggable="false" ondragstart="return false;">Bobbyboot</a>
|
||||
<a class="dropdown-item givePHP couldDark <?php if($_COOKIE["darkmode"] == "true") echo "darkMode"; ?>" href="./bobbyhubschrauber" draggable="false" ondragstart="return false;">Bobbyhubschrauber</a>
|
||||
<a class="dropdown-item givePHP couldDark <?php if($_COOKIE["darkmode"] == "true") echo "darkMode"; ?>" href="./raupenfahrzeug" draggable="false" ondragstart="return false;">Raupenfahrzeug</a>
|
||||
<a class="dropdown-item givePHP couldDark <?php if($_COOKIE["darkmode"] == "true") echo "darkMode"; ?>" href="/bobbycar" draggable="false" ondragstart="return false;">Bobbycar</a>
|
||||
<a class="dropdown-item givePHP couldDark <?php if($_COOKIE["darkmode"] == "true") echo "darkMode"; ?>" href="/bobbyquad" draggable="false" ondragstart="return false;">Bobbyquad</a>
|
||||
<a class="dropdown-item givePHP couldDark <?php if($_COOKIE["darkmode"] == "true") echo "darkMode"; ?>" href="/bobbybob" draggable="false" ondragstart="return false;">Bobbybob</a>
|
||||
<a class="dropdown-item givePHP couldDark <?php if($_COOKIE["darkmode"] == "true") echo "darkMode"; ?>" href="/bobbyklo" draggable="false" ondragstart="return false;">Bobbyklo</a>
|
||||
<a class="dropdown-item givePHP couldDark <?php if($_COOKIE["darkmode"] == "true") echo "darkMode"; ?>" href="/bobbyboot" draggable="false" ondragstart="return false;">Bobbyboot</a>
|
||||
<a class="dropdown-item givePHP couldDark <?php if($_COOKIE["darkmode"] == "true") echo "darkMode"; ?>" href="/bobbyhubschrauber" draggable="false" ondragstart="return false;">Bobbyhubschrauber</a>
|
||||
<a class="dropdown-item givePHP couldDark <?php if($_COOKIE["darkmode"] == "true") echo "darkMode"; ?>" href="/raupenfahrzeug" draggable="false" ondragstart="return false;">Raupenfahrzeug</a>
|
||||
</div>
|
||||
</li>
|
||||
<?php makeMenuItem("Careers", "./careers", ACTIVE_MENUITEM == "careers"); ?>
|
||||
<?php makeMenuItem("News", "./news", ACTIVE_MENUITEM == "news"); ?>
|
||||
<?php makeMenuItem("About", "./about", ACTIVE_MENUITEM == "about"); ?>
|
||||
<?php makeMenuItem("Shop", "./shop", ACTIVE_MENUITEM == "shop"); ?>
|
||||
<?php makeMenuItem("Impressum", "./impressum", ACTIVE_MENUITEM == "impressum"); ?>
|
||||
<?php makeMenuItem("Careers", "/careers", ACTIVE_MENUITEM == "careers"); ?>
|
||||
<?php makeMenuItem("News", "/news", ACTIVE_MENUITEM == "news"); ?>
|
||||
<?php makeMenuItem("About", "/about", ACTIVE_MENUITEM == "about"); ?>
|
||||
<?php makeMenuItem("Shop", "/shop", ACTIVE_MENUITEM == "shop"); ?>
|
||||
<?php makeMenuItem("Impressum", "/impressum", ACTIVE_MENUITEM == "impressum"); ?>
|
||||
</ul>
|
||||
<a class="nav-link toggleDarkmode" href="javascript:void(0)" onclick="darkMode()" draggable="false" ondragstart="return false;">
|
||||
<img src="<?php if ($_COOKIE["darkmode"] == "true") {
|
||||
echo "./img/darkmode.png";
|
||||
echo "/img/darkmode.png";
|
||||
} else {
|
||||
echo "./img/lightmode.png";
|
||||
echo "/img/lightmode.png";
|
||||
} ?>" id="darkModeImg" class="img-fluid" data-toggle="tooltip" data-placement="top" title="Toggle darkmode" draggable="false" ondragstart="return false;" /></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
function givePHP() {
|
||||
var elements = document.getElementsByClassName("givePHP");
|
||||
len = elements !== null ? elements.length : 0;
|
||||
i = 0;
|
||||
for (i; i < len; i++) {
|
||||
if(elements[i].id != "nophp")
|
||||
elements[i].href += ".php";
|
||||
}
|
||||
}
|
||||
|
||||
function load() {
|
||||
givePHP();
|
||||
}
|
||||
+18
-19
@@ -3,24 +3,24 @@ var state = false;
|
||||
var debug = "false";
|
||||
if (getCookie("darkmode") == null) {
|
||||
applyDarkmode = false;
|
||||
if (debug == "true") console.log('Cookie "darkmode" empty');
|
||||
if (debug === "true") console.log('Cookie "darkmode" empty');
|
||||
} else {
|
||||
applyDarkmode = getCookie("darkmode");
|
||||
if (debug == "true") console.log("Cookie darkmode:" + applyDarkmode);
|
||||
if (debug === "true") console.log("Cookie darkmode:" + applyDarkmode);
|
||||
}
|
||||
var isDark = false;
|
||||
|
||||
function setdarkMode(state) {
|
||||
if (debug == "true")
|
||||
if (debug === "true")
|
||||
console.log(
|
||||
'function "setdarkMode" was initiated with value "state" as ' + state
|
||||
);
|
||||
var elements = document.getElementsByClassName("couldDark");
|
||||
len = elements !== null ? elements.length : 0;
|
||||
i = 0;
|
||||
if (state == true) {
|
||||
if (state === true) {
|
||||
for (i; i < len; i++) {
|
||||
if (elements[i].classList.contains("darkMode") == false) {
|
||||
if (elements[i].classList.contains("darkMode") === false) {
|
||||
elements[i].classList.add("darkMode");
|
||||
}
|
||||
}
|
||||
@@ -28,9 +28,9 @@ function setdarkMode(state) {
|
||||
"https://pfostendynamics.com/img/darkmode.png";
|
||||
document.getElementById("pfostendynamics").src =
|
||||
"https://pfostendynamics.com/img/PfostenDynamicsDark.png";
|
||||
} else if (state == false) {
|
||||
} else if (state === false) {
|
||||
for (i; i < len; i++) {
|
||||
if (elements[i].classList.contains("darkMode") == true) {
|
||||
if (elements[i].classList.contains("darkMode") === true) {
|
||||
elements[i].classList.remove("darkMode");
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ function setdarkMode(state) {
|
||||
}
|
||||
|
||||
function setNavbar(state) {
|
||||
if (debug == "true")
|
||||
if (debug === "true")
|
||||
console.log(
|
||||
'function "setNavbar" was initiated with value "state" as ' + state
|
||||
);
|
||||
@@ -65,21 +65,20 @@ function setNavbar(state) {
|
||||
|
||||
function darkMode() {
|
||||
applyDarkmode = !applyDarkmode;
|
||||
if (debug == "true") console.log("applyDarkmode:" + applyDarkmode);
|
||||
if (debug === "true") console.log("applyDarkmode:" + applyDarkmode);
|
||||
setdarkMode(applyDarkmode);
|
||||
setNavbar(applyDarkmode);
|
||||
return;
|
||||
}
|
||||
|
||||
function checkDarkmode() {
|
||||
var tmp = getCookie("darkmode");
|
||||
if (tmp == "false") {
|
||||
const tmp = getCookie("darkmode");
|
||||
if (tmp === "false") {
|
||||
isDark = false;
|
||||
document.getElementById("darkModeImg").src =
|
||||
"https://pfostendynamics.com/img/lightmode.png";
|
||||
document.getElementById("pfostendynamics").src =
|
||||
"https://pfostendynamics.com/img/PfostenDynamics.png";
|
||||
} else if (tmp == "true") {
|
||||
} else if (tmp === "true") {
|
||||
document.getElementById("darkModeImg").src =
|
||||
"https://pfostendynamics.com/img/darkmode.png";
|
||||
document.getElementById("pfostendynamics").src =
|
||||
@@ -92,17 +91,17 @@ function checkDarkmode() {
|
||||
var elements = document.getElementsByClassName("couldDark");
|
||||
len = elements !== null ? elements.length : 0;
|
||||
i = 0;
|
||||
if (state == true) {
|
||||
if (state === true) {
|
||||
for (i; i < len; i++) {
|
||||
if (elements[i].classList.contains("darkMode") == false) {
|
||||
if (elements[i].classList.contains("darkMode") === false) {
|
||||
elements[i].className += " darkMode";
|
||||
}
|
||||
}
|
||||
document.getElementById("darkModeImg").src =
|
||||
"https://pfostendynamics.com/img/darkmode.png";
|
||||
} else if (state == false) {
|
||||
} else if (state === false) {
|
||||
for (i; i < len; i++) {
|
||||
if (elements[i].classList.contains("darkMode") == true) {
|
||||
if (elements[i].classList.contains("darkMode") === true) {
|
||||
elements[i].classList.remove("darkMode");
|
||||
}
|
||||
}
|
||||
@@ -115,11 +114,11 @@ function checkDarkmode() {
|
||||
|
||||
function load() {
|
||||
debug = getCookie("debug");
|
||||
if (getCookie("darkmode") == "") {
|
||||
if (getCookie("darkmode") === "") {
|
||||
setCookie("darkmode", false, 999);
|
||||
}
|
||||
checkDarkmode();
|
||||
if (location.hostname == "localhost") givePHP();
|
||||
if (location.hostname === "localhost") givePHP();
|
||||
}
|
||||
|
||||
/*Cookie scripts*/
|
||||
|
||||
+18
-10
@@ -1,14 +1,22 @@
|
||||
function setactivePage() {
|
||||
var path = window.location.pathname;
|
||||
var tmp = path.split("/").pop();
|
||||
var page = tmp.replace(".html", "");
|
||||
if (page == "") page = "home";
|
||||
if(debug == "true") console.log("page:" + page);
|
||||
var site = document.getElementsByClassName("canactive");
|
||||
len = site !== null ? site.length : 0;
|
||||
i = 0;
|
||||
for (i; i < len; i++) {
|
||||
var siteClass = document.getElementsByClassName(page);
|
||||
const path = window.location.pathname;
|
||||
const tmp = path.split("/").pop();
|
||||
let page = tmp.replace(".html", "");
|
||||
if (page === "") {
|
||||
page = "home";
|
||||
}
|
||||
|
||||
if (debug === "true") {
|
||||
console.log("page:" + page);
|
||||
}
|
||||
|
||||
const site = document.getElementsByClassName("canactive");
|
||||
|
||||
let len = site !== null ? site.length : 0;
|
||||
let len2;
|
||||
let j;
|
||||
for (let i = 0; i < len; i++) {
|
||||
const siteClass = document.getElementsByClassName(page);
|
||||
len2 = siteClass !== null ? siteClass.length : 0;
|
||||
j = 0;
|
||||
for (j; j < len2; j++) {
|
||||
|
||||
Reference in New Issue
Block a user