diff --git a/_templates/head.php b/_templates/head.php new file mode 100644 index 0000000000000000000000000000000000000000..82c842db06d77b51809382083f7b5836133752ce --- /dev/null +++ b/_templates/head.php @@ -0,0 +1,22 @@ +<head> + <script src="/photogram-project-php/assets/js/color-modes.js"></script> + + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="description" content=""> + <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors"> + <meta name="generator" content="Hugo 0.122.0"> + <title>Album example · Bootstrap v5.3</title> + + <link rel="canonical" href="https://getbootstrap.com/docs/5.3/examples/album/"> + + + + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3"> + + <link href="/photogram-project-php/assets/dist/css/bootstrap.min.css" rel="stylesheet"> + + <!-- Style for login forms --> + <link href="/photogram-project-php/assets/dist/css/login-in.css" rel="stylesheet"> + +</head> \ No newline at end of file diff --git a/_templates/header.php b/_templates/header.php index eb81b9d82080ab1d5fbe1ef7f1c21c24cafcfb4e..84306570d1b9e6d5e7184491ca0d58e8f87d2941 100644 --- a/_templates/header.php +++ b/_templates/header.php @@ -1,3 +1,4 @@ +<header data-bs-theme="dark"> <!-- Header content --> <div class="collapse text-bg-dark" id="navbarHeader"> <div class="container"> @@ -17,6 +18,7 @@ </div> </div> </div> + <!-- Header Bar --> <div class="navbar navbar-dark bg-dark shadow-sm"> <div class="container"> @@ -28,4 +30,5 @@ <span class="navbar-toggler-icon"></span> </button> </div> - </div> \ No newline at end of file + </div> +</header> \ No newline at end of file diff --git a/_templates/login-content.php b/_templates/login-content.php index 408b99c30e054f5ae4ec580b709b6c55e208725b..c2e2de86545695b0fe35094f6886721b55900cc7 100644 --- a/_templates/login-content.php +++ b/_templates/login-content.php @@ -3,6 +3,7 @@ $username = $_POST['email']; $password = $_POST['password']; $validate = validate_credentials($username, $password); + if($validate){?> <!-- If it is true is display true page --> <main class="container"> diff --git a/index.php b/index.php index f4d92b67a8978ee63f8a19f7faefeb2fe41c05a1..1bad3063e078c707e93457ba44ad13725883b2e7 100644 --- a/index.php +++ b/index.php @@ -5,24 +5,11 @@ include 'libs/load.php'; <!doctype html> <html lang="en" data-bs-theme="auto"> - <head><script src="/photogram-project-php/assets/js/color-modes.js"></script> - - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="description" content=""> - <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors"> - <meta name="generator" content="Hugo 0.122.0"> - <title>Album example · Bootstrap v5.3</title> - - <link rel="canonical" href="https://getbootstrap.com/docs/5.3/examples/album/"> - - - - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3"> - -<link href="/photogram-project-php/assets/dist/css/bootstrap.min.css" rel="stylesheet"> - - <style> + <!-- To load head --> + <?load_template('head')?> +<body> + <!-- Style for toggle button --> + <style> .bd-placeholder-img { font-size: 1.125rem; text-anchor: middle; @@ -99,11 +86,7 @@ include 'libs/load.php'; .bd-mode-toggle .dropdown-menu .active .bi { display: block !important; } - </style> - - - </head> - <body> + </style> <!-- To change dark to light mode --> <svg xmlns="http://www.w3.org/2000/svg" class="d-none"> <symbol id="check2" viewBox="0 0 16 16"> @@ -156,12 +139,9 @@ include 'libs/load.php'; </ul> </div> - -<header data-bs-theme="dark"> <!--To load header file from template --> <?load_template('header')?> -</header> <main> diff --git a/login.php b/login.php index 4ef60ed8c62a6fdeda581ae0e80d9bd11c446847..2f5532c4a26864e21fdb1dff7ca7f9dc09e277d7 100644 --- a/login.php +++ b/login.php @@ -5,28 +5,11 @@ include 'libs/load.php'; <!doctype html> <html lang="en" data-bs-theme="auto"> - <head><script src="/photogram-project-php/assets/js/color-modes.js"></script> - - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="description" content=""> - <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors"> - <meta name="generator" content="Hugo 0.122.0"> - <title>Login Page</title> - - <link rel="canonical" href="https://getbootstrap.com/docs/5.3/examples/album/"> - - - - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3"> - -<link href="/photogram-project-php/assets/dist/css/bootstrap.min.css" rel="stylesheet"> - -<!-- Style for login forms --> - <link href="/photogram-project-php/assets/dist/css/login-in.css" rel="stylesheet"> - - - <style> + <!-- To load head --> + <?load_template('head')?> +<body> + <!-- Style for toggle button --> + <style> .bd-placeholder-img { font-size: 1.125rem; text-anchor: middle; @@ -103,11 +86,7 @@ include 'libs/load.php'; .bd-mode-toggle .dropdown-menu .active .bi { display: block !important; } - </style> - - - </head> - <body> + </style> <!-- To change dark to light mode --> <svg xmlns="http://www.w3.org/2000/svg" class="d-none"> <symbol id="check2" viewBox="0 0 16 16"> @@ -161,11 +140,10 @@ include 'libs/load.php'; </div> -<header data-bs-theme="dark"> - + + <!--To load header file from template --> <?load_template('header')?> -</header>