mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 04:29:45 +00:00
сверстала страницу LabBoard в соответствии с фигмой
This commit is contained in:
1 parent
a75e5d66fa
commit
431b14aaa9
12 files changed
+677
-2
No files matched your search
@@ -0,0 +1,431 @@
|
||||
#padding {
|
||||
padding: 0 10%;
|
||||
}
|
||||
|
||||
#pageheader {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
min-height: 100vh;
|
||||
padding: 0 10%;
|
||||
margin: 0;
|
||||
margin-bottom: 64px;
|
||||
color: rgba(18, 18, 18, 1);
|
||||
background-image: url("/src/shared/assets/images/LabBoard/fond.png");
|
||||
background-blend-mode: multiply;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
|
||||
img {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.headerContent {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.container {
|
||||
flex: 1;
|
||||
max-width: 50%;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
max-width: 100%;
|
||||
padding: $navbar-padding-tb 5%;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 52px;
|
||||
font-weight: 600;
|
||||
line-height: 63px;
|
||||
margin: 0;
|
||||
margin-bottom: 24px;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
font-size: 32px;
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
line-height: 36px;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
font-size: 24px;
|
||||
line-height: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 0;
|
||||
margin-top: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.microcontrollerImage {
|
||||
flex: 1;
|
||||
max-width: 40%;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#page_container {
|
||||
padding: 0 10%;
|
||||
|
||||
h2 {
|
||||
font-size: 36px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
img {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.numbersContainer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 32px;
|
||||
background-color: #f5f5f7;
|
||||
border-radius: 16px;
|
||||
margin-bottom: 64px;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.numberBlock {
|
||||
flex: 1;
|
||||
padding: 32px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.namber {
|
||||
font-size: 64px;
|
||||
font-weight: 600;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
background: linear-gradient(to right, #0867F4, #072AC8);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-bottom: 16px;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
font-size: 48px;
|
||||
}
|
||||
}
|
||||
|
||||
.numberLabel {
|
||||
font-size: 18px;
|
||||
color: #333;
|
||||
margin: 0;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.imagesContainer {
|
||||
display: flex;
|
||||
gap: 32px;
|
||||
margin-bottom: 64px;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.imageBlock {
|
||||
flex: 1;
|
||||
background-color: #f5f5f7;
|
||||
border-radius: 16px;
|
||||
padding: 32px 48px 48px 48px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.imageTitle {
|
||||
font-weight: 550;
|
||||
margin-bottom: 16px
|
||||
}
|
||||
|
||||
.microcontrollerPhoto {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
max-height: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
.featuresContainer {
|
||||
display: flex;
|
||||
gap: 32px;
|
||||
margin-bottom: 64px;
|
||||
padding-top: 24px;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.featuresList {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 32px;
|
||||
}
|
||||
|
||||
.featureItem {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
|
||||
&.active {
|
||||
color: #072AC8;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.featureContent {
|
||||
flex: 0 0 600px;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.featureDescription {
|
||||
animation: fadeIn 0.3s ease;
|
||||
}
|
||||
|
||||
.mcuContainer {
|
||||
display: flex;
|
||||
gap: 32px;
|
||||
margin-bottom: 0;
|
||||
|
||||
@media (max-width: 768px) {
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
// слайдер
|
||||
.sliderHeaderContainer {
|
||||
padding: 0 10%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 32px;
|
||||
|
||||
h2 {
|
||||
font-size: 36px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.sliderNav {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.sliderButton {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
background: #f5f5f7;
|
||||
border: none;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.sliderWrapper {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
height: 356px;
|
||||
margin-bottom: 64px;
|
||||
}
|
||||
|
||||
.sliderContainer {
|
||||
display: flex;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.slide {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.imageContainer {
|
||||
background: #f5f5f7;
|
||||
border-radius: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.centerSlide {
|
||||
width: 736px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 3;
|
||||
|
||||
.imageContainer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.sliderImage {
|
||||
width: 74%;
|
||||
height: 68%;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.leftSlide {
|
||||
width: 352px;
|
||||
left: calc(50% - 736px/2 - 352px - 32px);
|
||||
z-index: 2;
|
||||
|
||||
.imageContainer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.sliderImage {
|
||||
width: 72.5%;
|
||||
height: 26%;
|
||||
object-fit: contain;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.rightSlide {
|
||||
width: 352px;
|
||||
left: calc(50% + 736px/2 + 32px);
|
||||
z-index: 2;
|
||||
|
||||
.imageContainer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.sliderImage {
|
||||
width: 72.5%;
|
||||
height: 26%;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hiddenSlide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.sliderWrapper {
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.centerSlide {
|
||||
width: 600px;
|
||||
|
||||
.sliderImage {
|
||||
width: 70%;
|
||||
height: 65%;
|
||||
}
|
||||
}
|
||||
|
||||
.leftSlide,
|
||||
.rightSlide {
|
||||
width: 280px;
|
||||
|
||||
.sliderImage {
|
||||
width: 70%;
|
||||
height: 25%;
|
||||
}
|
||||
}
|
||||
|
||||
.leftSlide {
|
||||
left: calc(50% - 600px/2 - 280px - 24px);
|
||||
}
|
||||
|
||||
.rightSlide {
|
||||
left: calc(50% + 600px/2 + 24px);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.sliderHeaderContainer {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.sliderNav {
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.sliderWrapper {
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
.centerSlide {
|
||||
width: 100%;
|
||||
|
||||
.sliderImage {
|
||||
width: 60%;
|
||||
height: 60%;
|
||||
}
|
||||
}
|
||||
|
||||
.leftSlide,
|
||||
.rightSlide {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
import styles from "./LabBoard.module.scss";
|
||||
import { HashLink } from "react-router-hash-link";
|
||||
import { useState } from 'react';
|
||||
import angle_small_down from "@/shared/assets/images/LabBoard/angle-small-down.svg";
|
||||
import angle_small_down_one from "@/shared/assets/images/LabBoard/angle-small-down-one.svg";
|
||||
import microcontroller_left from "@/shared/assets/images/LabBoard/microcontroller_left.svg";
|
||||
import microcontroller_rear from "@/shared/assets/images/LabBoard/microcontroller_rear.svg";
|
||||
import Group_one from "@/shared/assets/images/LabBoard/Group_one.svg";
|
||||
import Group_two from "@/shared/assets/images/LabBoard/Group_two.svg";
|
||||
import Vector from "@/shared/assets/images/LabBoard/Vector.svg";
|
||||
|
||||
import ContactUs from "@/widgets/ContactUs";
|
||||
|
||||
function LabBoard() {
|
||||
const [activeFeature, setActiveFeature] = useState(null);
|
||||
const [currentSlide, setCurrentSlide] = useState(0);
|
||||
const mcuImages = [Group_one, Group_two, Group_one, Group_two];
|
||||
const features = [
|
||||
{
|
||||
title: "OLED дисплей",
|
||||
content: "Pizza ipsum dolor meat lovers buffalo. Buffalo chicken pie mozzarella tomatoes pepperoni bacon buffalo chicken. Deep parmesan Hawaiian anchovies chicken personal stuffed tomato black. Wing wing crust sausage ham Philly."
|
||||
},
|
||||
{
|
||||
title: "Драйверы для двигателей",
|
||||
content: "Описание драйверов для двигателей..."
|
||||
},
|
||||
{
|
||||
title: "Модули беспроводной связи",
|
||||
content: "Описание модулей беспроводной связи..."
|
||||
},
|
||||
{
|
||||
title: "IMU",
|
||||
content: "Описание IMU..."
|
||||
},
|
||||
{
|
||||
title: "EEPROM",
|
||||
content: "Описание EEPROM..."
|
||||
},
|
||||
{
|
||||
title: "Различные сенсоры",
|
||||
content: "Описание сенсоров..."
|
||||
},
|
||||
{
|
||||
title: "Кнопки",
|
||||
content: "Описание кнопок..."
|
||||
}
|
||||
];
|
||||
|
||||
const toggleFeature = (index) => {
|
||||
setActiveFeature(activeFeature === index ? null : index);
|
||||
};
|
||||
|
||||
const nextSlide = () => setCurrentSlide(prev => (prev + 1) % mcuImages.length);
|
||||
const prevSlide = () => setCurrentSlide(prev => (prev - 1 + mcuImages.length) % mcuImages.length);
|
||||
return (
|
||||
<div>
|
||||
<div id={styles.pageheader}>
|
||||
<div className={styles.headerContent}>
|
||||
<section className={styles.container}>
|
||||
<h1>LabBoard 1.1</h1>
|
||||
<h2>
|
||||
Лучшее устройство для изучения<br />
|
||||
принципов работы микроконтроллеров
|
||||
</h2>
|
||||
<HashLink smooth to="#contact-us" className={"btn " + styles.btn}>
|
||||
Связаться с нами
|
||||
</HashLink>
|
||||
</section>
|
||||
<img src={microcontroller_left} className={styles.microcontrollerImage} />
|
||||
</div>
|
||||
</div>
|
||||
<div id={styles.page_container}>
|
||||
<h2 className={styles.title}>LabBoard в цифрах</h2>
|
||||
<div className={styles.numbersContainer}>
|
||||
<div className={styles.numberBlock}>
|
||||
<p className={styles.namber}>10</p>
|
||||
<label className={styles.numberLabel}>различных кнопок</label>
|
||||
</div>
|
||||
<div className={styles.numberBlock}>
|
||||
<p className={styles.namber}>1</p>
|
||||
<label className={styles.numberLabel}>OLED дисплей</label>
|
||||
</div>
|
||||
<div className={styles.numberBlock}>
|
||||
<p className={styles.namber}>25</p>
|
||||
<label className={styles.numberLabel}>микроконтроллеров</label>
|
||||
</div>
|
||||
</div>
|
||||
<h2 className={styles.title}>Об устройстве</h2>
|
||||
<p>
|
||||
Для изучения принципов работы микроконтроллеров, их<br />
|
||||
интерфейсов и подключаемой периферии был разработан<br />
|
||||
лабораторный учебный стенд “LabBoard 1.1”. Он состоит из 25<br />
|
||||
независимых блоков, соединённых с микроконтроллером.
|
||||
</p>
|
||||
<div className={styles.imagesContainer}>
|
||||
<div className={styles.imageBlock}>
|
||||
<p className={styles.imageTitle}>Лицевая сторона</p>
|
||||
<img src={microcontroller_left} />
|
||||
</div>
|
||||
<div className={styles.imageBlock}>
|
||||
<p className={styles.imageTitle}>Тыльная сторона</p>
|
||||
<img src={microcontroller_rear} />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2 className={styles.title}>Характеристики</h2>
|
||||
<div className={styles.featuresContainer}>
|
||||
<div className={styles.featuresList}>
|
||||
{features.map((feature, index) => (
|
||||
<div
|
||||
key={index}
|
||||
className={`${styles.featureItem} ${activeFeature === index ? styles.active : ''}`}
|
||||
onClick={() => toggleFeature(index)}
|
||||
>
|
||||
<span>{feature.title}</span>
|
||||
<img
|
||||
src={activeFeature === index ? angle_small_down : angle_small_down_one}
|
||||
alt={activeFeature === index ? "Свернуть" : "Развернуть"}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className={styles.featureContent}>
|
||||
{activeFeature !== null && (
|
||||
<div className={styles.featureDescription}>
|
||||
{features[activeFeature].content}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className={styles.sliderHeaderContainer}>
|
||||
<h2 className={styles.title}>Подробнее о микроконтроллерах</h2>
|
||||
<div className={styles.sliderNav}>
|
||||
<button onClick={prevSlide} className={styles.sliderButton}><img src={Vector} style={{ transform: 'scaleX(-1)' }} /></button>
|
||||
<button onClick={nextSlide} className={styles.sliderButton}><img src={Vector}/></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={styles.sliderWrapper}>
|
||||
<div className={styles.sliderTrack}>
|
||||
{mcuImages.map((img, index) => {
|
||||
const position = (index - currentSlide + mcuImages.length) % mcuImages.length;
|
||||
const slideClass =
|
||||
position === 0 ? styles.centerSlide :
|
||||
position === 1 ? styles.rightSlide :
|
||||
position === mcuImages.length - 1 ? styles.leftSlide :
|
||||
styles.hiddenSlide;
|
||||
|
||||
return (
|
||||
<div key={index} className={`${styles.slide} ${slideClass}`}>
|
||||
<div className={styles.imageContainer}>
|
||||
<img src={img} alt={`Слайд ${index + 1}`} className={styles.sliderImage} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id={styles.page_container}>
|
||||
<h4>Блок "MCU"</h4>
|
||||
<div className={styles.mcuContainer}>
|
||||
<p>
|
||||
Основным вычислительным устройством лабораторного стенда является микроконтроллер STM32F407IG использующий архитектуру ARMv7-M и работающий с максимальной частотой 168MHz. На борту устройства установлено 192Kb оперативной памяти (RAM) и 1Mb постоянной FLASH (ROM). Тактирование осуществляется с помощью двух кварцевых резонаторов: 8MHz для основной системы тактирования и 32.768KHz для встроенных часов реального времени (RTC). Напряжение питания микроконтроллера и логических выводов 3.3V, но большинство контактов толерантных к 5V логике.
|
||||
</p>
|
||||
<p>
|
||||
Для взаимодействия с микроконтроллером на панели блока "MCU" установлены три тактовых выключателя: RESET - сброс MK, TEST - пользовательская кнопка, BOOT - переход в режим встроенного загрузчика. Выключатель TEST подаёт на контакт PI10 высокий сигнал. Светодиод LD110 управляется контактом PI11 и может использоваться программой пользователя для индикации режима работы. Питания встроенных часов реального времени осуществляется с помощью батареи CR1220.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id={styles.padding}>
|
||||
<ContactUs /></div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default LabBoard;
|
||||
Reference in new issue
Block a user