feat: ✨ add basic first website nibbles
This commit is contained in:
parent
24167ed96c
commit
ef96bd935b
6 changed files with 67 additions and 0 deletions
6
.htaccess
Normal file
6
.htaccess
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
RedirectMatch 404 /\.git
|
||||
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_FILENAME} -f
|
||||
RewriteRule (.*) /src/$0 [END]
|
11
index.php
Normal file
11
index.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
require_once 'vendor/autoload.php';
|
||||
|
||||
$loader = new \Twig\Loader\FilesystemLoader('templates');
|
||||
$twig = new \Twig\Environment($loader);
|
||||
|
||||
echo $twig->render('index.html',[
|
||||
"a_variable" => "is very spicy. In a good way."
|
||||
]);
|
||||
?>
|
14
src/dergstyle.css
Normal file
14
src/dergstyle.css
Normal file
|
@ -0,0 +1,14 @@
|
|||
|
||||
body {
|
||||
color: #ddd;
|
||||
background: #151515;
|
||||
}
|
||||
|
||||
#big_title {
|
||||
text-align: center;
|
||||
margin-bottom: 0.3em;
|
||||
}
|
||||
#title_separator {
|
||||
height: 2px;
|
||||
background-color: #ddd;
|
||||
}
|
3
templates/about.html
Normal file
3
templates/about.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
|
||||
|
||||
{{ }}
|
15
templates/index.html
Normal file
15
templates/index.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Lucidragons' Fire</title>
|
||||
<link rel="stylesheet" href="src/dergstyle.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="big_title">The dergsite</h1>
|
||||
<div id="title_separator"></div>
|
||||
|
||||
<ul>
|
||||
<li><a href="/about"> about </a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
18
templates/root.dergplate
Normal file
18
templates/root.dergplate
Normal file
|
@ -0,0 +1,18 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>PHP Test</title>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
|
||||
echo '<p>Hello World</p>';
|
||||
|
||||
require 'src/templater.php';
|
||||
|
||||
$test = new TemplateFillout('test.dergplate');
|
||||
|
||||
$test->render();
|
||||
|
||||
?>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue