Skip to content

Commit

Permalink
Add page-title extension
Browse files Browse the repository at this point in the history
  • Loading branch information
faisalnjs committed Nov 3, 2024
1 parent bf26a18 commit 5e6eeba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion frontend/partials/header.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,5 @@
</div>
</div>
</header>
<div class="pcontent">
<div class="pcontent">
<page-title><% if (title != '') { %><%- title %> | <% } %><%= cms.siteDetails[0].title %></page-title>
7 changes: 7 additions & 0 deletions frontend/public/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ html {
scrollbar-width: none;
}

page-title {
width: 0px;
height: 0px;
overflow: hidden;
padding: 0 !important;
}

button,
a,
input[type="submit"] {
Expand Down
3 changes: 1 addition & 2 deletions frontend/public/js/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ load();

document.addEventListener("DOMContentLoaded", function () {
pjax = new Pjax({
selectors: ["title", "header", ".pcontent", "[live-pageviews]"],
selectors: ["header", ".pcontent", "[live-pageviews]"],
switches: {
"title": Pjax.switches.outerHTML,
"header": Pjax.switches.outerHTML,
".pcontent": Pjax.switches.sideBySide,
"[live-pageviews]": Pjax.switches.outerHTML
Expand Down

0 comments on commit 5e6eeba

Please sign in to comment.