update main page to use hbs for portfolio

This commit is contained in:
Nikola Petrov 2024-01-26 20:46:29 +01:00
parent 4c6290a599
commit 07cd4bff3a
3 changed files with 47 additions and 176 deletions

1
.gitignore vendored
View File

@ -65,3 +65,4 @@ archive/
public/assets/build/ public/assets/build/
.vscode/ .vscode/
package-lock.json package-lock.json
bun.lockb

View File

@ -3,7 +3,34 @@ 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', disableBootStrap: true });
const categorys = ["web development", "applications", "web design"];
const entry = [
{
category: categorys[0],
img: "/images/logo.png",
title: "Title 0",
des: "desc",
link: "#"
},
{
category: categorys[1],
img: "/images/logo.png",
title: "Title 1",
des: "desc",
link: "#"
},
{
category: categorys[2],
img: "/images/logo.png",
title: "Title 2",
des: "desc",
link: "#"
}
];
res.render('main/2_0', { title: 'Nikola Petrov', disableBootStrap: true, categorys, entry });
}); });
router.get('/old', function (req, res, next) { router.get('/old', function (req, res, next) {

View File

@ -147,9 +147,9 @@
</li> </li>
{{!-- <li class="navbar-item"> <li class="navbar-item">
<button class="navbar-link" data-nav-link>Portfolio</button> <button class="navbar-link" data-nav-link>Portfolio</button>
</li> --}} </li>
</ul> </ul>
</nav> </nav>
@ -371,17 +371,11 @@
<button class="active" data-filter-btn>All</button> <button class="active" data-filter-btn>All</button>
</li> </li>
{{#each categorys}}
<li class="filter-item"> <li class="filter-item">
<button data-filter-btn>Web design</button> <button data-filter-btn>{{this}}</button>
</li>
<li class="filter-item">
<button data-filter-btn>Applications</button>
</li>
<li class="filter-item">
<button data-filter-btn>Web development</button>
</li> </li>
{{/each}}
</ul> </ul>
@ -402,187 +396,36 @@
<li class="select-item"> <li class="select-item">
<button data-select-item>All</button> <button data-select-item>All</button>
</li> </li>
{{#each categorys}}
<li class="select-item"> <li class="select-item">
<button data-select-item>Web design</button> <button data-select-item>{{this}}</button>
</li> </li>
{{/each}}
<li class="select-item">
<button data-select-item>Applications</button>
</li>
<li class="select-item">
<button data-select-item>Web development</button>
</li>
</ul> </ul>
</div> </div>
<ul class="project-list"> <ul class="project-list">
<li class="project-item active" data-filter-item data-category="web development"> {{#each entry}}
<a href="#"> <li class="project-item active" data-filter-item data-category="{{category}}">
<a href="{{link}}">
<figure class="project-img"> <figure class="project-img">
<div class="project-item-icon-box"> <div class="project-item-icon-box">
<ion-icon name="eye-outline"></ion-icon> <ion-icon name="eye-outline"></ion-icon>
</div> </div>
<img src="/images/logo.png" alt="finance" loading="lazy"> <img src="{{img}}" loading="lazy">
</figure> </figure>
<h3 class="project-title">Finance</h3> <h3 class="project-title">{{title}}</h3>
<p class="project-category">Web development</p> <p class="project-category">{{des}}</p>
</a> </a>
</li> </li>
{{/each}}
<li class="project-item active" data-filter-item data-category="web development">
<a href="#">
<figure class="project-img">
<div class="project-item-icon-box">
<ion-icon name="eye-outline"></ion-icon>
</div>
<img src="/images/logo.png" alt="orion" loading="lazy">
</figure>
<h3 class="project-title">Orion</h3>
<p class="project-category">Web development</p>
</a>
</li>
<li class="project-item active" data-filter-item data-category="web design">
<a href="#">
<figure class="project-img">
<div class="project-item-icon-box">
<ion-icon name="eye-outline"></ion-icon>
</div>
<img src="/images/logo.png" alt="fundo" loading="lazy">
</figure>
<h3 class="project-title">Fundo</h3>
<p class="project-category">Web design</p>
</a>
</li>
<li class="project-item active" data-filter-item data-category="applications">
<a href="#">
<figure class="project-img">
<div class="project-item-icon-box">
<ion-icon name="eye-outline"></ion-icon>
</div>
<img src="/images/logo.png" alt="brawlhalla" loading="lazy">
</figure>
<h3 class="project-title">Brawlhalla</h3>
<p class="project-category">Applications</p>
</a>
</li>
<li class="project-item active" data-filter-item data-category="web design">
<a href="#">
<figure class="project-img">
<div class="project-item-icon-box">
<ion-icon name="eye-outline"></ion-icon>
</div>
<img src="/images/logo.png" alt="dsm." loading="lazy">
</figure>
<h3 class="project-title">DSM.</h3>
<p class="project-category">Web design</p>
</a>
</li>
<li class="project-item active" data-filter-item data-category="web design">
<a href="#">
<figure class="project-img">
<div class="project-item-icon-box">
<ion-icon name="eye-outline"></ion-icon>
</div>
<img src="/images/logo.png" alt="MetaSpark" loading="lazy">
</figure>
<h3 class="project-title">MetaSpark</h3>
<p class="project-category">Web design</p>
</a>
</li>
<li class="project-item active" data-filter-item data-category="web development">
<a href="#">
<figure class="project-img">
<div class="project-item-icon-box">
<ion-icon name="eye-outline"></ion-icon>
</div>
<img src="/images/logo.png" alt="summary" loading="lazy">
</figure>
<h3 class="project-title">Summary</h3>
<p class="project-category">Web development</p>
</a>
</li>
<li class="project-item active" data-filter-item data-category="applications">
<a href="#">
<figure class="project-img">
<div class="project-item-icon-box">
<ion-icon name="eye-outline"></ion-icon>
</div>
<img src="/images/logo.png" alt="task manager" loading="lazy">
</figure>
<h3 class="project-title">Task Manager</h3>
<p class="project-category">Applications</p>
</a>
</li>
<li class="project-item active" data-filter-item data-category="web development">
<a href="#">
<figure class="project-img">
<div class="project-item-icon-box">
<ion-icon name="eye-outline"></ion-icon>
</div>
<img src="/images/logo.png" alt="arrival" loading="lazy">
</figure>
<h3 class="project-title">Arrival</h3>
<p class="project-category">Web development</p>
</a>
</li>
</ul> </ul>
</section> </section>