mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 04:29:45 +00:00
Рефакторинг: pages, вынос routes, создание индексных файлов, readme
This commit is contained in:
1 parent
233d047484
commit
e4dd391568
36 files changed
+190
-210
No files matched your search
Executable
+14
@@ -0,0 +1,14 @@
|
||||
function AboutUs() {
|
||||
return (
|
||||
<>
|
||||
<header className="header">
|
||||
<h1>About us</h1>
|
||||
</header>
|
||||
<div className="content">
|
||||
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default AboutUs;
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
function Contact() {
|
||||
return (
|
||||
<>
|
||||
<header className='header'>
|
||||
<h1>Студенческое конструкторское бюро<br />
|
||||
"Компьютерное инновационное творчество"</h1>
|
||||
</header>
|
||||
<div className="content">
|
||||
<div className="contact">
|
||||
<p>Контактное лицо: Кутковой Владимир Сергеевич</p>
|
||||
</div>
|
||||
<form className="form">
|
||||
<label htmlFor="topic-input">Тема</label>
|
||||
<input type="text" name="topic" id="topic-input" />
|
||||
<label htmlFor="email">Почта</label>
|
||||
<input type="text" name="email-input" id="email-input" />
|
||||
<label htmlFor="message">Сообщение</label>
|
||||
<input type="text" name="message-input" id="message-input" />
|
||||
</form>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default Contact;
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
import { useRouteError } from 'react-router-dom'
|
||||
|
||||
export default function ErrorPage() {
|
||||
const error = useRouteError()
|
||||
console.error(error)
|
||||
|
||||
return (
|
||||
<div
|
||||
className="align-items-center bg-white d-flex flex-column flex-grow-1 justify-content-center"
|
||||
id="error-page"
|
||||
>
|
||||
<h1 className="mt-0">Oops!</h1>
|
||||
<p>Sorry, an unexpected error has occurred.</p>
|
||||
<p>
|
||||
<i>{error.statusText || error.message}</i>
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
import Page from "./Page";
|
||||
|
||||
function Labs() {
|
||||
return (
|
||||
// <>
|
||||
// <header className="header">
|
||||
// <h1>Laboratories</h1>
|
||||
// </header>
|
||||
// <div className="content">
|
||||
|
||||
// </div>
|
||||
// </>
|
||||
<Page title="Laboratories">
|
||||
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
export default Labs;
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
import { News, Projects, Labs } from './components';
|
||||
|
||||
function Main() {
|
||||
return (
|
||||
<>
|
||||
<header className="header">
|
||||
<h1>Думай иначе, будь креативным!</h1>
|
||||
<h2>Студенческое конструкторское бюро<br/>
|
||||
"Компьютерное инновационное творчество"</h2>
|
||||
<a className="btn" href="">Связаться с нами</a>
|
||||
</header>
|
||||
<div className="content">
|
||||
<News />
|
||||
<Projects />
|
||||
<Labs />
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default Main;
|
||||
@@ -0,0 +1,59 @@
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import './Labs.styles.scss';
|
||||
|
||||
function Labs() {
|
||||
return (
|
||||
<div className="block labs">
|
||||
<div className="heading">
|
||||
<h1>Наши лаборатории</h1>
|
||||
</div>
|
||||
<div className="row">
|
||||
<Link className="card">
|
||||
<div className="text">
|
||||
<h2>Лаборатория кибернетики</h2>
|
||||
<p>Управление робототехническими системами, создание аппаратных и программных продуктов, а также проектирование программных систем.</p>
|
||||
</div>
|
||||
<div className="link-label">Перейти→</div>
|
||||
</Link>
|
||||
<Link to={`/labs`} className="card">
|
||||
<div className="text">
|
||||
<h2>Лаборатория компьютерного зрения</h2>
|
||||
<p>Работа с методами и технологиями сегментации изображений, ИИ и нейронными сетями.</p>
|
||||
</div>
|
||||
<div className="link-label">Перейти→</div>
|
||||
</Link>
|
||||
<Link to={`/labs`} className="card">
|
||||
<div className="text">
|
||||
<h2>Лаборатория SmartTech</h2>
|
||||
<p>Проектирование систем в концепции “Интернета вещей” и технологии “Умного дома”.</p>
|
||||
</div>
|
||||
<div className="link-label">Перейти→</div>
|
||||
</Link>
|
||||
<Link to={`/labs`} className="card">
|
||||
<div className="text">
|
||||
<h2>Лаборатория VR и AR</h2>
|
||||
<p>Разработка приложений для виртуальной и дополненной реальности, 3D-моделирование.</p>
|
||||
</div>
|
||||
<div className="link-label">Перейти→</div>
|
||||
</Link>
|
||||
<Link to={`/labs`} className="card">
|
||||
<div className="text">
|
||||
<h2>Лаборатория мобильной разработки</h2>
|
||||
<p>Разработка приложений для портативных устройств, создание дизайна и проектов мобильных приложений.</p>
|
||||
</div>
|
||||
<div className="link-label">Перейти→</div>
|
||||
</Link>
|
||||
<Link to={`/labs`} className="card">
|
||||
<div className="text">
|
||||
<h2>Лаборатория 3D-печати и прототипирования</h2>
|
||||
<p>Проектирование 3D-модели, работа с 3D-принтером и создание качественных трёхмерных макетов.</p>
|
||||
</div>
|
||||
<div className="link-label">Перейти→</div>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Labs;
|
||||
@@ -0,0 +1,48 @@
|
||||
.labs {
|
||||
.row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
row-gap: 32px;
|
||||
|
||||
.card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
width: calc(100%/3 - 5em);
|
||||
min-height: max-content;
|
||||
padding: 16px 24px;
|
||||
|
||||
border-radius: 8px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #D9D9D9;
|
||||
|
||||
color: black;
|
||||
|
||||
.text {
|
||||
h2 {
|
||||
margin-top: 0;
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
line-height: 29px;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
line-height: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.link-label {
|
||||
text-align: right;
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
line-height: 24px;
|
||||
color: #767676;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
import './News.styles.scss';
|
||||
|
||||
function News() {
|
||||
return (
|
||||
<div className="block news">
|
||||
<div className="heading">
|
||||
<h1>Новости</h1>
|
||||
<a href=''>Все новости</a>
|
||||
</div>
|
||||
<div className="row">
|
||||
<div className="card">
|
||||
<div className="pic"></div>
|
||||
Еще одна новость
|
||||
</div>
|
||||
<div className="card">
|
||||
<div className="pic"></div>
|
||||
Новость поменьше
|
||||
</div>
|
||||
<div className="card">
|
||||
<div className="pic"></div>
|
||||
Новость маленькая совсем жесть а текст какой длинный ого
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default News;
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
.news {
|
||||
.row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 32px;
|
||||
|
||||
.card {
|
||||
width: 350px;
|
||||
margin-bottom: 1em;
|
||||
|
||||
.pic {
|
||||
width: 100%;
|
||||
aspect-ratio: 1;
|
||||
border-radius: 8px;
|
||||
margin-bottom: .5em;
|
||||
background-color: #D9D9D9;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
import './Projects.styles.scss';
|
||||
|
||||
function Projects() {
|
||||
return (
|
||||
<div className="block projects">
|
||||
<div className="heading">
|
||||
<h1>Наши проекты</h1>
|
||||
<Link to={`/projects`}>Все проекты</Link>
|
||||
</div>
|
||||
<div className="row">
|
||||
<a className="big card btn" href="">
|
||||
<div className="link-label">Перейти→</div>
|
||||
</a>
|
||||
<a className="card btn" href="">
|
||||
<div className="link-label">Перейти→</div>
|
||||
</a>
|
||||
<a className="card btn" href="">
|
||||
<div className="link-label">Перейти→</div>
|
||||
</a>
|
||||
<a className="card btn" href="">
|
||||
<div className="link-label">Перейти→</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Projects;
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
.projects {
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
row-gap: 32px;
|
||||
|
||||
.card:first-of-type {
|
||||
width: 100%;
|
||||
aspect-ratio: 3;
|
||||
}
|
||||
|
||||
.card {
|
||||
position: relative;
|
||||
width: calc(100%/3 - 64px);
|
||||
aspect-ratio: 3/2;
|
||||
background-color: #D9D9D9;
|
||||
|
||||
.link-label {
|
||||
position: absolute;
|
||||
right: 24px;
|
||||
bottom: 16px;
|
||||
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
line-height: 24px;
|
||||
color: #767676;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export { default as News } from './News';
|
||||
export { default as Projects } from './Projects';
|
||||
export { default as Labs } from './Labs';
|
||||
@@ -0,0 +1 @@
|
||||
export { default } from './Main';
|
||||
@@ -0,0 +1,14 @@
|
||||
function Page({ title, children }) {
|
||||
return (
|
||||
<>
|
||||
<header className="header">
|
||||
<h1>{title}</h1>
|
||||
</header>
|
||||
<div className="content">
|
||||
{children}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default Page;
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
function Projects() {
|
||||
return (
|
||||
<>
|
||||
<header className="header">
|
||||
<h1>Projects</h1>
|
||||
</header>
|
||||
<div className="content">
|
||||
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default Projects;
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
import { Outlet, Link, useLoaderData } from "react-router-dom";
|
||||
|
||||
import { getContacts } from "../../api";
|
||||
import Navbar from '../../components/Navbar';
|
||||
import './Root.styles.scss';
|
||||
|
||||
async function loader() {
|
||||
const contacts = await getContacts();
|
||||
return { contacts };
|
||||
}
|
||||
|
||||
function Root() {
|
||||
const { contacts } = useLoaderData();
|
||||
return (
|
||||
<>
|
||||
<Navbar />
|
||||
<div id="page">
|
||||
<Outlet />
|
||||
</div>
|
||||
|
||||
<div id="test">
|
||||
{contacts.length ? (
|
||||
<ul className="nav nav-pills nav-fill flex-column">
|
||||
{contacts.map(contact => (
|
||||
<li key={contact.id} className="nav-item text-start">
|
||||
<Link className="nav-link" to={`contacts/${contact.id}`}>
|
||||
{contact.name ? <>{contact.name}</> : <i>No Name</i>}{' '}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
) : (
|
||||
<p>
|
||||
<i>No contacts</i>
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export { loader };
|
||||
export default Root;
|
||||
Executable
+83
@@ -0,0 +1,83 @@
|
||||
$primary-bg: #343434;
|
||||
$secondary-bg: white;
|
||||
$primary-text: white;
|
||||
$btn-dark: #585858;
|
||||
|
||||
#page {
|
||||
margin-top: calc(60px + 2em);
|
||||
|
||||
.header {
|
||||
height: calc(100vh - (60px + 2em));
|
||||
padding: 0 10%;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
color: $primary-text;
|
||||
background-image: url(/images/car.jpeg);
|
||||
background-color: rgba(0, 0, 0, .75);
|
||||
background-blend-mode: multiply;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
|
||||
h1 {
|
||||
font-size: 60px;
|
||||
font-weight: 600;
|
||||
line-height: 63px;
|
||||
|
||||
margin-top: 40vh;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
line-height: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
background: $secondary-bg;
|
||||
|
||||
.block {
|
||||
margin-bottom: 32px;
|
||||
|
||||
.heading {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
h1 {
|
||||
font-family: Montserrat;
|
||||
font-size: 36px;
|
||||
font-weight: 600;
|
||||
line-height: 44px;
|
||||
}
|
||||
|
||||
a {
|
||||
font-size: 24px;
|
||||
font-weight: 400;
|
||||
line-height: 29px;
|
||||
text-align: right;
|
||||
color: black;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: block;
|
||||
width: fit-content;
|
||||
padding: 16px 24px;
|
||||
border-radius: 8px;
|
||||
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
line-height: 24px;
|
||||
|
||||
color: white;
|
||||
background-color: $btn-dark;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export { default as Root, loader } from './Root';
|
||||
@@ -0,0 +1,7 @@
|
||||
export { Root, loader } from './Root';
|
||||
export { default as ErrorPage} from './ErrorPage';
|
||||
export { default as Main } from './Main';
|
||||
export { default as AboutUs } from './AboutUs';
|
||||
export { default as Labs } from './Labs';
|
||||
export { default as Projects } from './Projects';
|
||||
export { default as Contact } from './Contact';
|
||||
Reference in new issue
Block a user