Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Photogram project PHP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Raghav
Photogram project PHP
Commits
47dc23da
Commit
47dc23da
authored
1 month ago
by
Raghav
Browse files
Options
Downloads
Patches
Plain Diff
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
1 month ago
Stage: build
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
_templates/header.php
+11
-0
11 additions, 0 deletions
_templates/header.php
index.php
+8
-11
8 additions, 11 deletions
index.php
libs/load.php
+6
-0
6 additions, 0 deletions
libs/load.php
with
25 additions
and
11 deletions
_templates/header.php
0 → 100644
+
11
−
0
View file @
47dc23da
<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
This diff is collapsed.
Click to expand it.
index.php
+
8
−
11
View file @
47dc23da
<?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>
...
...
This diff is collapsed.
Click to expand it.
libs/load.php
0 → 100644
+
6
−
0
View file @
47dc23da
<?php
function
load_template
(
$name
){
print
(
"including "
.
__DIR__
.
"../_templates/
$name
.php"
);
include
__DIR__
.
"/../_templates/
$name
.php"
;
}
?>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment