include data.pug
-
  // Данные для меню навигации
  const menuItems = {
    Home: './index.html',
    Embedded: './embeded_details.html',
    OpenCV: './opencv_details.html',
    Photography: './photography_details.html',
    Table: './table.html',
    Institute: './images/institute.png'
  };

  const smallCards = [
  {
      header: 'Заголовок',
      text: '3D printers are versatile tools used for creating prototypes, custom parts, and artistic designs. They work by layering materials.',
      image: require('../images/16x10/3d-printer.jpeg'),
      imageAlt: '3D Printer',
      link: '#',
  },
  {
      header: 'BLHeli ESCs',
      text: 'BLHeli ESCs are electronic speed controllers designed for drones, offering smooth and precise motor control.',
      image: require('../images/16x10/blheli-esc.jpeg'),
      imageAlt: 'BLHeli ESC',
      link: '#',
  },
  {
      header: 'Raspberry Pi Nano',
      text: 'Raspberry Pi Nano is a compact computer ideal for learning, prototyping, and IoT projects. It is highly energy-efficient.',
      image: require('../images/16x10/rpi-nano.jpeg'),
      imageAlt: 'Raspberry Pi Nano',
      link: '#',
  },
  {
      header: 'Smart Thermostats',
      text: 'Smart thermostats help regulate home temperatures efficiently, saving energy and enhancing comfort with automation.',
      image: require('../images/16x10/thermostat.jpeg'),
      imageAlt: 'Smart Thermostat',
      link: '#',
  }
  ];

  const galleryImages= [
        { src: require('../images/sqarucos.png'), alt: 'ESP32'},
        { src: require('../images/sqstm32.png'), alt: 'Arduino'},
        { src: require('../images/sqesp32.png'), alt: 'STM32'}
      ]

mixin menuItem(selectedItem)
    nav.menu
        each menuUrl,menuName in menuItems
            if menuName == selectedItem
                a.menu__link(href=menuUrl)
                    .menu__item.menu__item_selected #{menuName}
            else
                a.menu__link(href=menuUrl)
                    .menu__item #{menuName}

mixin cards()
  each cardData in  smallCards 
    .small-card
        .small-card__content 
          h3.small-card__header #{cardData.header}
          p.small-card__text #{cardData.text}
          a.small-card__link(href=cardData.link) Подробнее»
        .small-card__image
          img(src=cardData.image alt=cardData.imageAlt)

mixin gallery()
  each img in galleryImages
     img.hero-images__item(src=img.src alt=img.alt)