main page working

This commit is contained in:
2025-12-11 19:59:17 +10:00
parent c495c26320
commit 7a83c54165
6 changed files with 317 additions and 377 deletions

View File

@@ -1,140 +1,54 @@
include ../components/mixins.pug
-
const menuItems = [
{ href: './index.html', title: 'Home', isActive: true },
{ href: './embeded_details.html', title: 'Embedded' },
{ href: './opencv_details.html', title: 'OpenCV' },
{ href: './photography_details.html', title: 'Photography' },
{ href: './table.html', title: 'Table' },
{ href: './images/institute.png', title: 'Institute' }
];
const galleryImages = [
{ src: './images/sqarucos.png', alt: 'Arduino' },
{ src: './images/sqstm32.png', alt: 'STM32' },
{ src: './images/sqesp32.png', alt: 'ESP32' }
];
const contentBlocks = [
{
title: 'Embedded Systems',
image: './images/AQ_monitor.png',
imageAlt: 'ESP32',
columns: [
{ text: 'Had several projects with different MCUs and wrote firmware for them. My main stack consists of Platformio+EspIdf or Arduino, also tried STM32' },
{ text: 'I love embedded development because of autonomy of produced devices, the devices are not dependent on any other hardware and can work autonomously', hasLink: true }
]
},
{
title: 'Embedded Systems',
image: './images/remote.jpeg',
imageAlt: 'Remote',
imageCenter: true,
columns: [
{ text: 'Had several projects with different MCUs and wrote firmware for them. My main stack consists of Platformio+EspIdf or Arduino, also tried STM32' },
{ text: 'I love embedded development because of autonomy of produced devices, the devices are not dependent on any other hardware and can work autonomously or off the grid', hasLink: true }
]
const infoBlockA = {
header: "Embedded Systems",
text: "Had a serval projects with different MCUs and wrote firmware for them. My main stack consists of Platformio+EspIdf or Arduino, also tried STM32 asdadas",
description: "I love embeded development beceuse of autonomity of produced devices, the redices are not dependant on any other hardware and can work autunomously",
img: require('../images/AQ_monitor.png'),
imgAlt: "ESP32"
}
];
const sidebarBlocks = [
{
title: '3D Printer',
text: '3D printers are versatile tools used for creating prototypes, custom parts, and artistic designs. They work by layering materials.',
image: 'images/16x10/3d-printer.jpeg',
alt: '3D Printer'
},
{
title: 'BLHeli ESCs',
text: 'BLHeli ESCs are electronic speed controllers designed for drones, offering smooth and precise motor control.',
image: 'images/16x10/blheli-esc.jpeg',
alt: 'BLHeli ESC'
},
{
title: 'Raspberry Pi Nano',
text: 'Raspberry Pi Nano is a compact computer ideal for learning, prototyping, and IoT projects. It is highly energy-efficient.',
image: 'images/16x10/rpi-nano.jpeg',
alt: 'Raspberry Pi Nano'
},
{
title: 'Smart Thermostats',
text: 'Smart thermostats help regulate home temperatures efficiently, saving energy and enhancing comfort with automation.',
image: 'images/16x10/thermostat.jpeg',
alt: 'Smart Thermostat'
const infoBlockB = {
header: "Embedded Systems",
text: "Had a serval projects with different MCUs and wrote firmware for them. My main stack consists of Platformio+EspIdf or Arduino, also tried STM32",
description: "I love embeded development device because of autonomity of produced devices, the devices are not dependant on any other hardware and can work autunomously or off the grid",
img: require('../images/remote.jpeg'),
imgAlt: "ESP32"
}
];
mixin nav-menu(items)
nav.nav
ul.nav__list
each item in items
li.nav__item
a.nav__link(href=item.href class=item.isActive ? 'nav__link--active' : '')= item.title
mixin gallery(images)
.gallery
each img in images
.gallery__item
img.gallery__image(src=img.src alt=img.alt)
mixin content-block(block, index)
.content-block
.content-block__header
h5.content-block__title= block.title
.content-block__body(class=`content-block__body--layout-${index % 2 === 0 ? 'a' : 'b'}`)
if index % 2 === 0
each col in block.columns
.content-block__column
p.content-block__text= col.text
if col.hasLink
a.content-block__link(href="#") More info»
.content-block__column.content-block__column--image
img.content-block__image(src=block.image alt=block.imageAlt)
else
.content-block__column
p.content-block__text= block.columns[0].text
.content-block__column.content-block__column--image-center
img.content-block__image(src=block.image alt=block.imageAlt)
.content-block__column
p.content-block__text= block.columns[1].text
if block.columns[1].hasLink
a.content-block__link(href="#") More info»
mixin sidebar-card(card)
.sidebar-card
.sidebar-card__content
h6.sidebar-card__title= card.title
p.sidebar-card__text= card.text
a.sidebar-card__link(href="#") More Info»
.sidebar-card__image-wrapper
img.sidebar-card__image(src=card.image alt=card.alt)
doctype html
html(lang="en")
head
meta(charset="UTF-8")
meta(name="viewport" content="width=device-width, initial-scale=1")
link(rel="stylesheet" href="styles/index.css")
title Portfolio
body.page
//- Navigation
+nav-menu(menuItems)
//- Image Gallery
+gallery(galleryImages)
//- Main Content
.main
.main__content
each block, index in contentBlocks
+content-block(block, index)
//- Sidebar
.main__sidebar
each card in sidebarBlocks
+sidebar-card(card)
//- Footer
footer.footer
span.footer__text Kulesh A.
span.footer__text Б9123-09.03.04
head
meta(charset="UTF-8")
title Portfolio
body
+menuItem("Home")
.hero-images
+gallery()
main.main
.main__content
// Информационный блок A
article.info-block
h2.info-block__header #{infoBlockA.header}
.info-block__container.info-block__container_layout_a
p.info-block__text #{infoBlockA.text}
.info-block__details
p.info-block__description #{infoBlockA.description}
a.info-block__link(href="#") More info
img.info-block__image(src=infoBlockA.img alt=infoBlockA.imgAlt)
// Информационный блок B
article.info-block
h2.info-block__header #{infoBlockB.header}
.info-block__container.info-block__container_layout_b
p.info-block__text #{infoBlockB.text}
img.info-block__image(src=infoBlockB.img alt=infoBlockB.imgAlt)
.info-block__details
p.info-block__description #{infoBlockB.description}
a.info-block__link(href="#") More info
// Боковая панель
aside.sidebar
+cards()