refactor: move all HTTP-Website code into www subdirectory
Some checks failed
/ phplint (push) Failing after 4s

This commit is contained in:
David Bailey 2023-10-19 21:54:37 +02:00
parent 502ddd1ad9
commit 5bcba0b689
25 changed files with 33 additions and 67 deletions

13
www/templates/about.html Normal file
View file

@ -0,0 +1,13 @@
{% extends "root.html" %}
{% block second_title %}
<h2> Abouts </h2>
{% endblock %}
{%block main_content%}
<article>
{{ include('about.md')|markdown_to_html }}
</article>
{%endblock%}

View file

@ -0,0 +1,28 @@
{% extends "root.html" %}
{% block extra_head %}
<link rel="stylesheet" href="/static/gallerystyle.css">
{% endblock %}
{% block second_title %}
<h2> Gallery </h2>
{% endblock %}
{%block main_content%}
<figure>
<a href="{{ image_url }}" target="_blank">
<img id="gallery_image" src="{{ image_url }}"> </img>
</a>
<article>
<figcaption id="gallery_title"> {{ image_title }} </figcaption>
<span> {{ image_desc }} </span>
<br>
<a href="{{ artist_src_link }}"> Artist: {{ artist_name }} </a>
<br>
<a href="{{ image_src_link }}"> Source link </a>
</article>
</figure>
{%endblock%}

View file

@ -0,0 +1,18 @@
{% extends "root.html" %}
{% block extra_head %}
<link rel="stylesheet" href="/static/gallerystyle.css">
{% endblock %}
{% block second_title %}
<h2> Gallery </h2>
{% endblock %}
{%block main_content%}
<div id="gallery_root_grid">
{% for key,value in array_path %}
<div class=""
{% endfor %}
</div>
{%endblock%}

31
www/templates/index.html Normal file
View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<title>Lucidragons' Fire</title>
<link rel="stylesheet" href="/dergstyle.css">
</head>
<body>
<h1 id="big_title">The dergsite</h1>
<div id="title_separator"></div>
<ul>
<li><a href="/about"> About </a></li>
<li><a href="/blog"> Blog </a></li>
<li><a href="/projects"> Projects </a></li>
<li><a href="/artwork"> Artworks </a></li>
</ul>
<div id="main_content_wrapper">
{% block content %}<h3>Soon there shall be content!</h3>{% endblock %}
</div>
<div id="sidebar-wrapper">
{%block sidebar %}
<ul>
<li> Test 1 </li>
</ul>
{% endblock %}
</div>
</body>
</html>

View 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>

42
www/templates/root.html Normal file
View file

@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<title>Lucidragons' Fire</title>
<link rel="stylesheet" href="/static/dergstyle.css">
<link rel="icon" type="image/x-icon" href="/static/icon.jpeg">
<meta name="viewport" content="width=device-width,initial-scale=1">
{% block extra_head %}{% endblock %}
<script src="/static/banner.js" defer></script>
</head>
<body>
<header id="main_header">
<img id="main_banner_img"></img>
<a id="main_banner_img_link" href="/gallery"> full picture</a>
<h1 id="big_title">{% block big_title %}The dergsite{%endblock%}</h1>
{% block second_title %}{% endblock %}
<div id="title_separator"></div>
<menu id="nav_bar">
<li><a href="/about"> About </a></li>
<li><a href="/blog"> Blog </a></li>
<li><a href="/projects"> Projects </a></li>
<li><a href="/artwork"> Artworks </a></li>
</menu>
</header>
<main id="main_content_wrapper">
{% block main_content %}<h3>Soon there shall be content!</h3>{% endblock %}
</main>
<footer id="main_footer">
{% block main_footer %}
<span> test? </span>
{% endblock %}
</footer>
</body>
</html>

21
www/templates/rrror.html Normal file
View file

@ -0,0 +1,21 @@
{% extends "root.html" %}
{% block extra_head %}
<link rel="stylesheet" href="/static/rrrorstyle.css">
{% endblock %}
{% block second_title %}
<h2> (Broken) </h2>
{% endblock %}
{% block main_content %}
<article>
<h1 id="rrr_header"> The Dergs are confused:</h2>
<h2 id="rrr_code"> {{ error_code }}</h1>
<div>
{{ error_description|markdown_to_html }}
</div>
</article>
{% endblock %}