init
commit
018d0ce555
|
@ -0,0 +1 @@
|
||||||
|
.hta_config/conf.php
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?php
|
||||||
|
$mariaServer = "172.17.0.1";
|
||||||
|
$mariaUser = "root";
|
||||||
|
$mariaPass = "pass";
|
||||||
|
$mariaDb = "db_name";
|
||||||
|
$mongo ="";
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?php
|
||||||
|
$appName = "PHP Boilarplate";
|
||||||
|
$domain = "domain.ext";
|
||||||
|
require_once('conf.php');
|
|
@ -0,0 +1 @@
|
||||||
|
404
|
|
@ -0,0 +1,3 @@
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Document</title>
|
||||||
|
<script src="/assets/js/htmx-2.0.4.js"></script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
|
@ -0,0 +1 @@
|
||||||
|
Home
|
|
@ -0,0 +1,8 @@
|
||||||
|
RewriteEngine On
|
||||||
|
#RewriteCond %{HTTPS} !=on
|
||||||
|
#RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
|
||||||
|
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
|
||||||
|
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule ^(.*) index.php
|
|
@ -0,0 +1,2 @@
|
||||||
|
<?php
|
||||||
|
require_once('../.hta_config/var.php');
|
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
require_once('.hta_config/var.php');
|
||||||
|
|
||||||
|
$url = explode('/', $_SERVER['REQUEST_URI']);
|
||||||
|
if (strpos($url[1], "?") !== false) {
|
||||||
|
$url2 = explode('?', $url[1]);
|
||||||
|
$slug=$url2[0];
|
||||||
|
} else $slug=$url[1];
|
||||||
|
|
||||||
|
require_once('.hta_slug/_header.php');
|
||||||
|
|
||||||
|
if($slug=="") require_once('.hta_slug/_home.php');
|
||||||
|
elseif(file_exists(".hta_slug/".$slug.".php")) include ".hta_slug/".$slug.".php";
|
||||||
|
else require_once('.hta_slug/_404.php');
|
||||||
|
|
||||||
|
require_once('.hta_slug/_footer.php');
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
require_once('../.hta_config/var.php');
|
||||||
|
$url = explode('/', $_SERVER['REQUEST_URI']);
|
||||||
|
if (strpos($url[2], "?") !== false) {
|
||||||
|
$url2 = explode('?', $url[2]);
|
||||||
|
$slug=$url2[1];
|
||||||
|
} else $slug=$url[2];
|
||||||
|
require_once('../.hta_slug/_header.php');
|
||||||
|
|
||||||
|
|
||||||
|
if($slug=="") require_once('../.hta_slug/_home.php');
|
||||||
|
elseif(file_exists("../.hta_slug/".$slug.".php")) include ".hta_slug/".$slug.".php";
|
||||||
|
else require_once('../.hta_slug/_404.php');
|
||||||
|
require_once('../.hta_slug/_footer.php');
|
|
@ -0,0 +1,46 @@
|
||||||
|
sample route home
|
||||||
|
<button
|
||||||
|
id="showButton"
|
||||||
|
hx-get="/uikit-modal.html"
|
||||||
|
hx-target="#modals-here"
|
||||||
|
class="uk-button uk-button-primary"
|
||||||
|
_="on htmx:afterOnLoad wait 10ms then add .uk-open to #modal">Open Modal</button>
|
||||||
|
|
||||||
|
<div id="modals-here"></div>
|
||||||
|
|
||||||
|
<div id="modal" class="uk-modal" style="display:block;">
|
||||||
|
<div class="uk-modal-dialog uk-modal-body">
|
||||||
|
<h2 class="uk-modal-title">Modal Dialog</h2>
|
||||||
|
<p>This modal dialog was loaded dynamically by HTMX.</p>
|
||||||
|
|
||||||
|
<form _="on submit take .uk-open from #modal">
|
||||||
|
<div class="uk-margin">
|
||||||
|
<input class="uk-input" placeholder="What is Your Name?">
|
||||||
|
</div>
|
||||||
|
<button type="button" class="uk-button uk-button-primary">Save Changes</button>
|
||||||
|
<button
|
||||||
|
id="cancelButton"
|
||||||
|
type="button"
|
||||||
|
class="uk-button uk-button-default"
|
||||||
|
_="on click take .uk-open from #modal wait 200ms then remove #modal">Close</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
// This triggers the fade-in animation when a modal dialog is loaded and displayed
|
||||||
|
window.document.getElementById("showButton").addEventListener("htmx:afterOnLoad", function() {
|
||||||
|
setTimeout(function(){
|
||||||
|
window.document.getElementById("modal").classList.add("uk-open")
|
||||||
|
}, 10)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// This triggers the fade-out animation when the modal is closed.
|
||||||
|
window.document.getElementById("cancelButton").addEventListener("click", function() {
|
||||||
|
window.document.getElementById("modal").classList.remove("uk-open")
|
||||||
|
setTimeout(function(){
|
||||||
|
window.document.getElementById("modals-here").innerHTML = ""
|
||||||
|
,200
|
||||||
|
})
|
||||||
|
})
|
||||||
|
</script>
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
require_once('../.hta_config/var.php');
|
||||||
|
|
||||||
|
$url = explode('/', $_SERVER['REQUEST_URI']);
|
||||||
|
if (strpos($url[2], "?") !== false) {
|
||||||
|
$url2 = explode('?', $url[2]);
|
||||||
|
$slug=$url2[1];
|
||||||
|
} else $slug=$url[2];
|
||||||
|
|
||||||
|
require_once('../.hta_slug/_header.php');
|
||||||
|
|
||||||
|
if($slug=="") require_once('.hta_slug/_home.php');
|
||||||
|
elseif(file_exists(".hta_slug/".$slug.".php")) include ".hta_slug/".$slug.".php";
|
||||||
|
else require_once('.hta_slug/_404.php');
|
||||||
|
|
||||||
|
require_once('../.hta_slug/_footer.php');
|
Loading…
Reference in New Issue