diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-06-27 19:10:09 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-06-27 19:10:09 +0200 |
commit | 85b4e3dc56fcec1c751858f70d17f4d4e483e1bf (patch) | |
tree | dfafd7e20c4e5487d2ed5f369fc199144cc6c75d | |
parent | Added the projects welcome page (diff) | |
download | joe-www-85b4e3dc56fcec1c751858f70d17f4d4e483e1bf.tar.gz joe-www-85b4e3dc56fcec1c751858f70d17f4d4e483e1bf.tar.bz2 joe-www-85b4e3dc56fcec1c751858f70d17f4d4e483e1bf.tar.xz joe-www-85b4e3dc56fcec1c751858f70d17f4d4e483e1bf.tar.zst joe-www-85b4e3dc56fcec1c751858f70d17f4d4e483e1bf.zip |
Project restructure, subdir content inclusion
-rw-r--r-- | c.php | 25 | ||||
-rw-r--r-- | css/site.css | 12 | ||||
-rw-r--r-- | inc/classic-contents.inc.php | 48 | ||||
-rw-r--r-- | index.php | 21 | ||||
-rw-r--r-- | license.php | 21 | ||||
-rw-r--r-- | links.php | 21 | ||||
-rw-r--r-- | projects.php | 20 | ||||
-rw-r--r-- | projects/index.php | 43 | ||||
-rw-r--r-- | projects/lowbat.php | 26 |
9 files changed, 198 insertions, 39 deletions
@@ -0,0 +1,25 @@ +<!-- ----------------------------------------------------------------------- --> +<!-- --> +<!-- File : c.php /_________/ --> +<!-- Authors : Joe | --> +<!-- Date : 06/2020 | --> +<!-- Info : The C welcome page | --> +<!-- / | --> +<!-- \ / --> +<!-- \_____/ --> +<!-- --> +<!-- ----------------------------------------------------------------------- --> + +<?php +$prefix = "./"; +$curr_dir = basename(getcwd()); +if ($curr_dir != "jozan" && $curr_dir != "jozanleclerc.xyz") { + $prefix = "../"; +} +?> +<?php include $prefix."inc/classic-contents.inc.php"; ?> +<?php jo_head("C"); ?> +<?php jo_sidebar(); ?> +<div class="body-contents"> +</div> +<?php jo_footer(); ?> diff --git a/css/site.css b/css/site.css index 2632e1e..95f37fc 100644 --- a/css/site.css +++ b/css/site.css @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* File : classic-contents.inc.php /_________/ */ +/* Authors : Joe | */ +/* Date : 06/2020 | */ +/* Info : Functions for contents on every page | */ +/* / | */ +/* \ / */ +/* \_____/ */ +/* */ +/* ************************************************************************** */ + body { margin: 0 auto; width: 100%; diff --git a/inc/classic-contents.inc.php b/inc/classic-contents.inc.php index b8c1187..7fb4bca 100644 --- a/inc/classic-contents.inc.php +++ b/inc/classic-contents.inc.php @@ -1,56 +1,71 @@ +<!-- ----------------------------------------------------------------------- --> +<!-- --> +<!-- File : classic-contents.inc.php /_________/ --> +<!-- Authors : Joe | --> +<!-- Date : 06/2020 | --> +<!-- Info : Functions for contents on every page | --> +<!-- / | --> +<!-- \ / --> +<!-- \_____/ --> +<!-- --> +<!-- ----------------------------------------------------------------------- --> + <?php function jo_head($title) { + global $prefix; ?> <html> <head> <title>Joe's own website - <?php echo "$title"; ?></title> - <link rel="stylesheet" type="text/css" href="css/site.css"> + <link rel="stylesheet" type="text/css" href="<?php echo $prefix; ?>css/site.css"> <meta charset="UTF-8"> </head> <body> <div class="fullpage"> <header> - <h1><a href="index.php">Joe's dev blog - <?php echo "$title"; ?></a></h1> + <h1><a href="<?php echo $prefix; ?>index.php">Joe's dev blog - <?php echo "$title"; ?></a></h1> </header> <?php } function jo_bloat_head($title) { + global $prefix; ?> <html> <head> <title>Joe's own website - <?php echo "$title"; ?></title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> - <link rel="stylesheet" type="text/css" href="css/site.css"> + <link rel="stylesheet" type="text/css" href="<?php echo $prefix; ?>css/site.css"> <meta charset="UTF-8"> </head> <body> <div class="fullpage"> <header> - <h1><a href="index.php">Joe's dev blog - <?php echo "$title"; ?></a></h1> + <h1><a href="<?php echo $prefix; ?>index.php">Joe's dev blog - <?php echo "$title"; ?></a></h1> </header> <?php } function jo_sidebar() { + global $prefix; ?> <div class="sidebar"> <ul> - <li><a href="index.php">Home</a></li> - <li><a href="">C</a></li> - <li><a href="">C++</a></li> - <li><a href="">Lisp</a></li> - <li><a href="">Assembly</a></li> - <li><a href="">UNIX</a></li> - <li><a href="">GNU Emacs</a></li> - <li><a href="">My school projects</a></li> - <li><a href="projects.php">My projects</a></li> - <li><a href="">My C/C++ style</a></li> - <li><a href="links.php">Links</a></li> + <li><a href="<?php echo $prefix; ?>index.php">Home</a></li> + <li><a href="<?php echo $prefix; ?>"c.php">C</a></li> + <li><a href="<?php echo $prefix; ?>">C++</a></li> + <li><a href="<?php echo $prefix; ?>">Lisp</a></li> + <li><a href="<?php echo $prefix; ?>">Assembly</a></li> + <li><a href="<?php echo $prefix; ?>">UNIX</a></li> + <li><a href="<?php echo $prefix; ?>">GNU Emacs</a></li> + <li><a href="<?php echo $prefix; ?>">My school projects</a></li> + <li><a href="<?php echo $prefix; ?>projects/">My projects</a></li> + <li><a href="<?php echo $prefix; ?>">My C/C++ style</a></li> + <li><a href="<?php echo $prefix; ?>links.php">Links</a></li> </ul> </div> <?php @@ -58,11 +73,12 @@ jo_sidebar() { function jo_footer() { + global $prefix; ?> <footer> <p> Copyright © 2020, Joe - - see <a href="license.php">LICENSE</a> - + see <a href="<?php echo $prefix; ?>license.php">LICENSE</a> - we do not use cookies </p> </footer> @@ -1,4 +1,23 @@ -<?php include 'inc/classic-contents.inc.php'; ?> +<!-- ----------------------------------------------------------------------- --> +<!-- --> +<!-- File : index.php /_________/ --> +<!-- Authors : Joe | --> +<!-- Date : 06/2020 | --> +<!-- Info : The home page | --> +<!-- / | --> +<!-- \ / --> +<!-- \_____/ --> +<!-- --> +<!-- ----------------------------------------------------------------------- --> + +<?php +$prefix = "./"; +$curr_dir = basename(getcwd()); +if ($curr_dir != "jozan" && $curr_dir != "jozanleclerc.xyz") { + $prefix = "../"; +} +?> +<?php include $prefix."inc/classic-contents.inc.php"; ?> <?php jo_head("Home"); ?> <?php jo_sidebar(); ?> <div class="body-contents"> diff --git a/license.php b/license.php index 20b32a7..01297ba 100644 --- a/license.php +++ b/license.php @@ -1,4 +1,23 @@ -<?php include 'inc/classic-contents.inc.php'; ?> +<!-- ----------------------------------------------------------------------- --> +<!-- --> +<!-- File : license.php /_________/ --> +<!-- Authors : Joe | --> +<!-- Date : 06/2020 | --> +<!-- Info : The LICENSE display page | --> +<!-- / | --> +<!-- \ / --> +<!-- \_____/ --> +<!-- --> +<!-- ----------------------------------------------------------------------- --> + +<?php +$prefix = "./"; +$curr_dir = basename(getcwd()); +if ($curr_dir != "jozan" && $curr_dir != "jozanleclerc.xyz") { + $prefix = "../"; +} +?> +<?php include $prefix."inc/classic-contents.inc.php"; ?> <?php jo_head("LICENSE"); ?> <?php jo_sidebar(); ?> <div class="body-contents"> @@ -1,4 +1,23 @@ -<?php include 'inc/classic-contents.inc.php'; ?> +<!-- ----------------------------------------------------------------------- --> +<!-- --> +<!-- File : links.php /_________/ --> +<!-- Authors : Joe | --> +<!-- Date : 06/2020 | --> +<!-- Info : The links page | --> +<!-- / | --> +<!-- \ / --> +<!-- \_____/ --> +<!-- --> +<!-- ----------------------------------------------------------------------- --> + +<?php +$prefix = "./"; +$curr_dir = basename(getcwd()); +if ($curr_dir != "jozan" && $curr_dir != "jozanleclerc.xyz") { + $prefix = "../"; +} +?> +<?php include $prefix."inc/classic-contents.inc.php"; ?> <?php jo_bloat_head("Links"); ?> <?php jo_sidebar(); ?> <div class="body-contents"> diff --git a/projects.php b/projects.php deleted file mode 100644 index 74dddcf..0000000 --- a/projects.php +++ /dev/null @@ -1,20 +0,0 @@ -<?php include 'inc/classic-contents.inc.php'; ?> -<?php jo_head("Projects"); ?> -<?php jo_sidebar(); ?> -<div class="body-contents"> - <h1>My personnal projects</h1> - <p> - These are the personnal projects I have worked on or that are still being developped: - </p> - <ul> - <li> - <a href="">lowbat</a> - - a lightweight low battery notifier for Linux and BSD - </li> - <li> - <a href="">Dergods' Realm II</a> - - a raycasting RPG game - </li> - </ul> -</div> -<?php jo_footer(); ?> diff --git a/projects/index.php b/projects/index.php new file mode 100644 index 0000000..e897442 --- /dev/null +++ b/projects/index.php @@ -0,0 +1,43 @@ +<!-- ----------------------------------------------------------------------- --> +<!-- --> +<!-- File : index.php /_________/ --> +<!-- Authors : Joe | --> +<!-- Date : 06/2020 | --> +<!-- Info : The personnal projects welcome page | --> +<!-- / | --> +<!-- \ / --> +<!-- \_____/ --> +<!-- --> +<!-- ----------------------------------------------------------------------- --> + +<?php +$prefix = "./"; +$curr_dir = basename(getcwd()); +if ($curr_dir != "jozan" && $curr_dir != "jozanleclerc.xyz") { + $prefix = "../"; +} +?> +<?php include $prefix."inc/classic-contents.inc.php"; ?> +<?php jo_head("Projects"); ?> +<?php jo_sidebar(); ?> +<div class="body-contents"> + <h1>My personnal projects</h1> + <p> + These are the personnal projects I have worked on or that are still being developped: + </p> + <ul> + <li> + <a href="<?php echo $prefix; ?>projects/lowbat.php">lowbat</a> - + a lightweight low battery notifier for Linux and BSD + </li> + <li> + <a href="">Dergods' Realm II</a> - + a raycasting RPG game + </li> + <li> + <a href="">arch-installer</a> - + very basic intallation script for Arch Linux + </li> + </ul> +</div> +<?php jo_footer(); ?> diff --git a/projects/lowbat.php b/projects/lowbat.php new file mode 100644 index 0000000..7145918 --- /dev/null +++ b/projects/lowbat.php @@ -0,0 +1,26 @@ +<!-- ----------------------------------------------------------------------- --> +<!-- --> +<!-- File : lowbat.php /_________/ --> +<!-- Authors : Joe | --> +<!-- Date : 06/2020 | --> +<!-- Info : lowbat page | --> +<!-- / | --> +<!-- \ / --> +<!-- \_____/ --> +<!-- --> +<!-- ----------------------------------------------------------------------- --> + +<?php +$prefix = "./"; +$curr_dir = basename(getcwd()); +if ($curr_dir != "jozan" && $curr_dir != "jozanleclerc.xyz") { + $prefix = "../"; +} +?> +<?php include $prefix."inc/classic-contents.inc.php"; ?> +<?php jo_head("lowbat"); ?> +<?php jo_sidebar(); ?> +<div class="body-contents"> + <h1>lowbat - lightweight low battery notifier</h1> +</div> +<?php jo_footer(); ?> |