Add my template project
This commit is contained in:
0
template/css/style.css
Normal file
0
template/css/style.css
Normal file
8
template/footer.php
Normal file
8
template/footer.php
Normal file
@ -0,0 +1,8 @@
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<hr>
|
||||
<p>© Тестовый сайт 2024</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
19
template/header.php
Normal file
19
template/header.php
Normal file
@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="<?=$config['root']['description']?>">
|
||||
<meta name="keywords" content="<?=implode(', ', $config['root']['keywords'])?>">
|
||||
<link rel="stylesheet" href="<?=__CS__?>style.css?v=1">
|
||||
<script src="<?=__JS__?>index.js?v=1"></script>
|
||||
<title><?=$config['root']['title']?></title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Тестовый REST API сайт</h1>
|
||||
<hr>
|
||||
</header>
|
||||
|
||||
<main>
|
4
template/index.php
Normal file
4
template/index.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
include __TD__.'header.php';
|
||||
include __TD__.'route.php';
|
||||
include __TD__.'footer.php';
|
0
template/js/index.js
Normal file
0
template/js/index.js
Normal file
1
template/main.php
Normal file
1
template/main.php
Normal file
@ -0,0 +1 @@
|
||||
<p>Прочтите <b>README.md</b> файл для получения информации по API.</p>
|
7
template/route.php
Normal file
7
template/route.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
if(__URI__ == '/' || in_array(__URL__[0], ['index', 'route', 'header', 'footer']))
|
||||
header('Location: /main');
|
||||
elseif(file_exists(__TD__.__URL__[0].'.php'))
|
||||
require __TD__.__URL__[0].'.php';
|
||||
else
|
||||
header('Location: /');
|
Reference in New Issue
Block a user