Small fixes

This commit is contained in:
Nikola Petrov 2023-06-25 14:50:56 +02:00
parent f945d1524e
commit 6f0632db6b
4 changed files with 5 additions and 3 deletions

View File

@ -81,7 +81,7 @@ const pages = document.querySelectorAll("[data-page]");
for (let i = 0; i < navigationLinks.length; i++) { for (let i = 0; i < navigationLinks.length; i++) {
navigationLinks[i].addEventListener("click", function () { navigationLinks[i].addEventListener("click", function () {
for (let i = 0; i < pages.length; i++) { for (let i = 0; i < navigationLinks.length; i++) {
if (this.innerHTML.toLowerCase() === pages[i].dataset.page) { if (this.innerHTML.toLowerCase() === pages[i].dataset.page) {
pages[i].classList.add("active"); pages[i].classList.add("active");
navigationLinks[i].classList.add("active"); navigationLinks[i].classList.add("active");

View File

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB

View File

@ -3,7 +3,7 @@ var router = express.Router();
/* GET home page. */ /* GET home page. */
router.get('/', function(req, res, next) { router.get('/', function(req, res, next) {
res.render('main/2_0', {title:'Nikola Petrov'}); res.render('main/2_0', {title:'Nikola Petrov', disableBootStrap: true});
}); });
module.exports = router; module.exports = router;

View File

@ -3,10 +3,12 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="/logo.ico" type="image/x-icon">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
{{#unless disableBootStrap}}
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script> <script defer src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
{{/unless}}
<title>{{title}}</title> <title>{{title}}</title>
</head> </head>
<body> <body>