diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..ec2a75338fb5df29433dc2aaa9c0f3bd5803e46c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/tmp +app/config.php + diff --git a/app/Controller.php b/app/Controller.php new file mode 100644 index 0000000000000000000000000000000000000000..3a9621bf39fe66f99b7be84976f44bd85abeb4cd --- /dev/null +++ b/app/Controller.php @@ -0,0 +1,19 @@ +render('base.html'); + } + +}; + diff --git a/app/Main.php b/app/Main.php new file mode 100644 index 0000000000000000000000000000000000000000..343c565effa508c92fb3df48b9d176b068b73c15 --- /dev/null +++ b/app/Main.php @@ -0,0 +1,12 @@ +set('block_content','home.html'); + } + +}; + diff --git a/app/config.ini b/app/config.ini new file mode 100644 index 0000000000000000000000000000000000000000..d6fbe1cd44719a0413516eb19a0626c15b1681ca --- /dev/null +++ b/app/config.ini @@ -0,0 +1,15 @@ +[globals] +; Folder containing classes +AUTOLOAD=app/ + +; Folder containing templates +UI=templates/ + +; Debug level +DEBUG=3 + +; Default language +LANGUAGE='fr' + +; Global variables of website + diff --git a/app/config.php.sample b/app/config.php.sample new file mode 100644 index 0000000000000000000000000000000000000000..c488a7bf992161269c2b12398aaed18f98a93ed4 --- /dev/null +++ b/app/config.php.sample @@ -0,0 +1,7 @@ + diff --git a/app/routes.ini b/app/routes.ini new file mode 100644 index 0000000000000000000000000000000000000000..cc0a27821326bb07b3ee51460ffe1b1448c75606 --- /dev/null +++ b/app/routes.ini @@ -0,0 +1,4 @@ +[routes] +; Main site +GET @home:/=Main->show + diff --git a/index.php b/index.php new file mode 100644 index 0000000000000000000000000000000000000000..671e38984c86201504f41fc62a3c151046a28df3 --- /dev/null +++ b/index.php @@ -0,0 +1,12 @@ +config('app/config.ini'); + +// Define routes +$f3->config('app/routes.ini'); + +// Execute application +$f3->run(); diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000000000000000000000000000000000000..e965a7b239ffbbf9ec260689a39b8590d13ceccc --- /dev/null +++ b/templates/base.html @@ -0,0 +1,3 @@ + + + diff --git a/templates/footer.html b/templates/footer.html new file mode 100644 index 0000000000000000000000000000000000000000..308b1d01b6ca1e7ab1b1fa896e6a8497bbcd1a37 --- /dev/null +++ b/templates/footer.html @@ -0,0 +1,2 @@ + + diff --git a/templates/header.html b/templates/header.html new file mode 100644 index 0000000000000000000000000000000000000000..9838d7d96a900e132b259c752bdb721a1ff0218e --- /dev/null +++ b/templates/header.html @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/templates/home.html b/templates/home.html new file mode 100644 index 0000000000000000000000000000000000000000..76fbff242a4924708706edde64551e8702e8ce32 --- /dev/null +++ b/templates/home.html @@ -0,0 +1,3 @@ + +Hello world! +