From 2b7a9a6dd44e4e618cc98fa0f359c5934b94c94a Mon Sep 17 00:00:00 2001 From: Clortox Date: Mon, 4 Jan 2021 20:34:14 -0500 Subject: [PATCH] Add Link Tree --- index.php | 32 ++++++++++++++++++++++++++++++++ var/config.php | 42 +++++++++++++++++++++++++++++++++--------- www/header.php | 14 +++++++------- 3 files changed, 72 insertions(+), 16 deletions(-) diff --git a/index.php b/index.php index f65683e..9e30c8c 100644 --- a/index.php +++ b/index.php @@ -63,6 +63,38 @@ + +
+ cardHead; + echo '

' . $treeName . '

'; + echo <<< tableandcard +
+
+ + + + + + + + + tableandcard; + foreach($tree_names as $i=>$currentLink){ + echo ''; + echo ''; + echo ''; + echo ''; + } + echo ''; + echo '
LinkUrl
' + . $currentLink . '' . $tree_links[$i] . '
'; + echo '
'; + echo ''; + } + ?> diff --git a/var/config.php b/var/config.php index f25ca35..2b46397 100644 --- a/var/config.php +++ b/var/config.php @@ -14,10 +14,6 @@ * These can start with "#" to direct to a tag on the page, could be an internal * link by using "/listing.php?folder=SomeFolder", or could be an external site * - * $nav_rname and $nav_rlink are for a link on the right side of the nav bar. - * This link is by default an ad for this repo, however you can disable it by - * setting $isrNav to false, or change it to advertise anything you choose! - * * The navbar can be disabled by changing isNav to false * * These associate in order ie the Tag $nav_names[3] will direct the user to @@ -26,7 +22,6 @@ */ $isNav = true; - $isrNav = true; $nav_names = array( 'Home', @@ -38,10 +33,6 @@ 'https://github.com/Clortox', ); - //$nav_rname = 'Git this site!'; - //$nav_rlink = 'https://github.com/Clortox/SimpleFileRepository'; - - /* Directory Variables * * Each variable in $dir_dirs will be a listing @@ -74,6 +65,39 @@ 'dir/books', ); + /* Link Tree + * + * My use case for this program is to be a NAS/Portal Page for my network, + * and due to the ammount or raspberry pis and other devices running web + * interfaces, I figured a link tree would be very useful + * + * You can disable this if you so choose, however for those who tend + * to run their own personal servers I find this to be very useful + * + * Each varaible in $tree_names will be a listing under the OtherSites header + * Each varaible in $tree_links will be a link that can be chosen + * $treeName will be the header all of the linktree card on the main page + * + * The entire tree can be disables by setting $isTree to false + * + * These associate in order ie the entry $tree_names[3] will have the link + * $tree_links[3] + */ + + $isTree = true; + + $treeName = "Local Network"; + + $tree_names = array( + 'Ender 3', + 'CNC', + ); + + $tree_links = array( + 'http://192.168.1.111', + 'http://192.168.1.100:8000', + ); + /* Convo * * These are little tag lines that will appear on the header. diff --git a/www/header.php b/www/header.php index a92ad80..4d8fc5f 100644 --- a/www/header.php +++ b/www/header.php @@ -1,7 +1,6 @@
@@ -16,14 +15,15 @@ if($isNav){ echo ''; } ?> - -