aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--header.inc.php0
-rw-r--r--inc/classic-contents.inc.php (renamed from index.html)44
-rw-r--r--inc/index.php1
-rw-r--r--index.php23
4 files changed, 46 insertions, 22 deletions
diff --git a/header.inc.php b/header.inc.php
deleted file mode 100644
index e69de29..0000000
--- a/header.inc.php
+++ /dev/null
diff --git a/index.html b/inc/classic-contents.inc.php
index 4adf55d..280558a 100644
--- a/index.html
+++ b/inc/classic-contents.inc.php
@@ -1,14 +1,25 @@
+<?php
+function
+jo_head($title) {
+?>
<html>
<head>
- <title>Joe's own website</title>
+ <title>Joe's own website - <?php echo "$title"; ?></title>
<link rel="stylesheet" type="text/css" href="css/site.css">
- <meta charset="UTF-8">
+ <meta charset="UTF-8">
</head>
<body>
<div class="fullpage">
<header>
- <h1>Joe's dev blog</h1>
+ <h1>Joe's dev blog - <?php echo "$title"; ?></h1>
</header>
+<?php
+}
+
+function
+jo_sidebar() {
+?>
+
<div class="sidebar">
<ul>
<li>
@@ -43,22 +54,11 @@
</li>
</ul>
</div>
- <div class="body-contents">
- <h1>About this site</h1>
- <p>
- Welcome to my personnal blog. Here you can find my tips and articles
- on various tech and programming subjects.
- <br><br>
- The site is still in active developpement, stay tuned.
- </p>
- <h1>About me</h1>
- <p>
- I am a student for
- <a href="https://www.42lyon.fr/" target="_blank">42Lyon</a>
- IT school based in Lyon, France.
- I work on various personnal project beside that.
- </p>
- </div>
+<?php
+}
+function
+jo_footer() {
+?>
<footer>
<p>
Copyright Joe 2020 -
@@ -66,6 +66,6 @@
we do not use cookies
</p>
</footer>
- </div>
- </body>
-</html>
+<?php
+}
+?>
diff --git a/inc/index.php b/inc/index.php
new file mode 100644
index 0000000..d29ead0
--- /dev/null
+++ b/inc/index.php
@@ -0,0 +1 @@
+<?php header("Location: ../"); ?>
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..b5e9e62
--- /dev/null
+++ b/index.php
@@ -0,0 +1,23 @@
+<?php include 'inc/classic-contents.inc.php'; ?>
+<?php jo_head("Home"); ?>
+<?php jo_sidebar(); ?>
+ <div class="body-contents">
+ <h1>About this site</h1>
+ <p>
+ Welcome to my personnal blog. Here you can find my tips and articles
+ on various tech and programming subjects.
+ <br><br>
+ The site is still in active developpement, stay tuned.
+ </p>
+ <h1>About me</h1>
+ <p>
+ I am a student for
+ <a href="https://www.42lyon.fr/" target="_blank">42Lyon</a>
+ IT school based in Lyon, France.
+ I work on various personnal project beside that.
+ </p>
+ </div>
+ <?php jo_footer(); ?>
+ </div>
+ </body>
+</html>