Skip to content
Snippets Groups Projects
Commit 47dc23da authored by Raghav's avatar Raghav
Browse files

Header file separated and load file created

parent f6162752
No related branches found
No related tags found
No related merge requests found
Pipeline #6828 canceled
<div class="navbar navbar-dark bg-dark shadow-sm">
<div class="container">
<a href="#" class="navbar-brand d-flex align-items-center">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" aria-hidden="true" class="me-2" viewBox="0 0 24 24"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>
<strong>Album</strong>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarHeader" aria-controls="navbarHeader" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
\ No newline at end of file
<?php
//To include load.php from libs folder
include 'libs/load.php';
?>
<!doctype html> <!doctype html>
<html lang="en" data-bs-theme="auto"> <html lang="en" data-bs-theme="auto">
<head><script src="/photogram-project-php/assets/js/color-modes.js"></script> <head><script src="/photogram-project-php/assets/js/color-modes.js"></script>
...@@ -170,17 +175,9 @@ ...@@ -170,17 +175,9 @@
</div> </div>
</div> </div>
</div> </div>
<div class="navbar navbar-dark bg-dark shadow-sm">
<div class="container"> <!--To load header file from template -->
<a href="#" class="navbar-brand d-flex align-items-center"> <?load_template('header')?>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" aria-hidden="true" class="me-2" viewBox="0 0 24 24"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"/><circle cx="12" cy="13" r="4"/></svg>
<strong>Album</strong>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarHeader" aria-controls="navbarHeader" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
</header> </header>
<main> <main>
......
<?php
function load_template($name){
print("including ". __DIR__."../_templates/$name.php");
include __DIR__. "/../_templates/$name.php";
}
?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment