Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
Website
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
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Jonas Leder
Website
Commits
9b54ebf3
Commit
9b54ebf3
authored
3 years ago
by
Jonas Leder
Browse files
Options
Downloads
Patches
Plain Diff
set page title from mainMenu custom element
parent
cbd2eac1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
js/customElements/mainMenu.js
+9
-0
9 additions, 0 deletions
js/customElements/mainMenu.js
public/internal/header.php
+0
-1
0 additions, 1 deletion
public/internal/header.php
with
9 additions
and
1 deletion
js/customElements/mainMenu.js
+
9
−
0
View file @
9b54ebf3
...
...
@@ -16,6 +16,11 @@ class MainMenu extends HTMLElement {
a
.
innerText
=
element
[
"
name
"
];
menuContainer
.
appendChild
(
a
);
if
(
window
.
location
[
'
pathname
'
]
===
element
[
"
url
"
]){
document
.
title
=
element
[
"
name
"
]
+
"
- Jonas Leder
"
;
}
}
else
if
(
element
[
"
type
"
]
===
"
dropdown
"
){
let
dropdown
=
document
.
createElement
(
"
div
"
);
dropdown
.
className
=
"
dropdown
"
;
...
...
@@ -37,6 +42,10 @@ class MainMenu extends HTMLElement {
let
br
=
document
.
createElement
(
"
br
"
);
dropdownContent
.
appendChild
(
br
);
if
(
window
.
location
[
'
pathname
'
]
===
childElement
[
"
url
"
]){
document
.
title
=
childElement
[
"
name
"
]
+
"
- Jonas Leder
"
;
}
});
dropdown
.
appendChild
(
dropdownContent
);
...
...
This diff is collapsed.
Click to expand it.
public/internal/header.php
+
0
−
1
View file @
9b54ebf3
...
...
@@ -10,7 +10,6 @@ function getHeader($pagetitle)
<head >
<meta charset = "UTF-8" >
<meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
<title > $pagetitle - Jonas Leder </title >
<link href = "/css/style.css" rel = "stylesheet" >
</head >
...
...
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