Skip to content

Commit

Permalink
added dynamic script loader
Browse files Browse the repository at this point in the history
  • Loading branch information
hind-sagar-biswas committed Dec 23, 2022
1 parent 1473401 commit 569ad19
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
13 changes: 12 additions & 1 deletion config.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<?php
session_start();

// META DATA
$VERSION = "v1.1";
$AUTHOR = "Hind Sagar Biswas";
$YEAR = "2022";

// DEBUG mode
$DEBUG = True;
$DEEP_DEBUG = False;
Expand Down Expand Up @@ -59,4 +64,10 @@ function redirect_to(string $target, string $query = ''): void
require $CLASS . 'unlaik.class.php';

// INITIATE classes
$unlaik = new Unlaik($DEBUG);
$unlaik = new Unlaik($DEBUG);

// SCRIPTS & STYLESHEETS
$STYLESHEETS = [
"style"
];
$SCRIPTS = [];
4 changes: 0 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<?php
require './config.php';

$STYLESHEETS = [
"style"
];

// HEADER
require $HTML . 'header.php';

Expand Down
3 changes: 3 additions & 0 deletions templates/includes/footer.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
<?php foreach ($STYLESHEETS as $sheet) : ?>
<script src="<?= $CSS . $sheet ?>.js"></script>
<?php endforeach; ?>
</body>
</html>

0 comments on commit 569ad19

Please sign in to comment.