From 029971608a8eae978d8f4f96eb6a9cc8865c263d Mon Sep 17 00:00:00 2001 From: William Miceli Date: Tue, 3 Dec 2019 05:23:34 -0500 Subject: [PATCH] Attempting to add a modular navigation bar --- etc/nginx/conf.d/cs4430.conf | 3 ++- var/www/messages.php | 2 ++ var/www/styling.css | 24 ++++++++++++++++++++++++ var/www/topNavBar.html | 6 ++++++ 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 var/www/styling.css create mode 100644 var/www/topNavBar.html diff --git a/etc/nginx/conf.d/cs4430.conf b/etc/nginx/conf.d/cs4430.conf index ce02685..ae24338 100644 --- a/etc/nginx/conf.d/cs4430.conf +++ b/etc/nginx/conf.d/cs4430.conf @@ -3,7 +3,7 @@ server { listen [::]:80; root /var/www/; - index index.html + index index.html; server_name _; access_log /var/log/nginx/access.log; @@ -11,6 +11,7 @@ server { location / { try_files $uri $uri/ /index.html =404; + ssi on; } location ~ \.php$ { diff --git a/var/www/messages.php b/var/www/messages.php index 4380d1a..c63f38f 100644 --- a/var/www/messages.php +++ b/var/www/messages.php @@ -8,6 +8,7 @@ FriendBook Messages + + '; diff --git a/var/www/styling.css b/var/www/styling.css new file mode 100644 index 0000000..809aa02 --- /dev/null +++ b/var/www/styling.css @@ -0,0 +1,24 @@ +/* Add a black background color to the top navigation */ +.topnav { + background-color: #333; + overflow: hidden; +} +/* Style the links inside the navigation bar */ +.topnav a { + float: left; + color: #f2f2f2; + text-align: center; + padding: 14px 16px; + text-decoration: none; + font-size: 17px; +} +/* Change the color of links on hover */ +.topnav a:hover { + background-color: #ddd; + color: black; +} +/* Add a color to the active/current link */ +.topnav a.active { + background-color: #4CAF50; + color: white; +} \ No newline at end of file diff --git a/var/www/topNavBar.html b/var/www/topNavBar.html new file mode 100644 index 0000000..ae85f63 --- /dev/null +++ b/var/www/topNavBar.html @@ -0,0 +1,6 @@ +
+ Home + News + Contact + About +
\ No newline at end of file