mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 05:19:45 +00:00
подчёркивание ссылок в footer
This commit is contained in:
commit
5a72249518
41 files changed
+1338
-340
No files matched your search
@@ -1,17 +1,14 @@
|
||||
.mainContainer {
|
||||
margin: 0 10%;
|
||||
@include mediaMax($mobile-xs-width) {
|
||||
margin: 0 5%;
|
||||
}
|
||||
}
|
||||
@import "@/shared/styles/cardGrid.module.scss";
|
||||
|
||||
.title {
|
||||
font-size: 36px;
|
||||
font-weight: 600;
|
||||
line-height: 44px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 8px;
|
||||
|
||||
@include mediaMax($tablet-max-width) {
|
||||
font-size: 24px;
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
// pages/MainPage/ui/MainPage/Lists.tsx
|
||||
import { CardListTemplate } from "@/widgets/CardList/CardListTemplate";
|
||||
import { WithLoading } from "@/shared/Components/WithLoading/WithLoading";
|
||||
import { GridConfig } from "@/widgets/CardList/types";
|
||||
import { usePosts } from "@/modules/posts/hooks/usePosts";
|
||||
import styles from "./CardList.module.scss";
|
||||
@@ -20,27 +21,24 @@ const NewsList = ({
|
||||
}: ListProps) => {
|
||||
const { data: newsData, isLoading, isError } = useNews();
|
||||
|
||||
if (isLoading)
|
||||
return (
|
||||
<div className="mainContainer">
|
||||
<h2 className={styles.title}>Новости</h2>
|
||||
<span className="loader"></span>
|
||||
</div>
|
||||
);
|
||||
|
||||
if (isError) return <div>Ошибка при загрузке данных</div>;
|
||||
|
||||
return (
|
||||
<div className={styles.mainContainer}>
|
||||
{newsData && (
|
||||
<CardListTemplate
|
||||
items={transformNewsToCardData(newsData)}
|
||||
variant="news"
|
||||
gridConfig={gridConfig}
|
||||
title="Новости"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<WithLoading
|
||||
isLoading={isLoading}
|
||||
isError={isError}
|
||||
count={4}
|
||||
gridConfig={gridConfig}
|
||||
>
|
||||
<div className={styles.mainContainer}>
|
||||
{newsData && (
|
||||
<CardListTemplate
|
||||
items={transformNewsToCardData(newsData)}
|
||||
variant="news"
|
||||
gridConfig={gridConfig}
|
||||
title="Новости"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</WithLoading>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -50,25 +48,21 @@ const LabsList = ({
|
||||
const { data: postsData, isLoading, isError } = usePosts();
|
||||
const labs = postsData?.labs ? Object.values(postsData.labs) : [];
|
||||
|
||||
if (isLoading)
|
||||
return (
|
||||
<div className="mainContainer">
|
||||
<h2 className={styles.title}>Лаборатории</h2>
|
||||
<span className="loader"></span>
|
||||
</div>
|
||||
);
|
||||
|
||||
if (isError) return <div>Ошибка при загрузке данных</div>;
|
||||
|
||||
return (
|
||||
<div className={styles.mainContainer}>
|
||||
<CardListTemplate
|
||||
items={transformPostsToCardData(labs)}
|
||||
variant="lab"
|
||||
gridConfig={gridConfig}
|
||||
title="Наши лаборатории"
|
||||
/>
|
||||
</div>
|
||||
<WithLoading
|
||||
isLoading={isLoading}
|
||||
isError={isError}
|
||||
gridConfig={gridConfig}
|
||||
>
|
||||
<div className={styles.mainContainer}>
|
||||
<CardListTemplate
|
||||
items={transformPostsToCardData(labs)}
|
||||
variant="lab"
|
||||
gridConfig={gridConfig}
|
||||
title="Наши лаборатории"
|
||||
/>
|
||||
</div>
|
||||
</WithLoading>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -79,26 +73,22 @@ const ProjectsList = ({
|
||||
const { data, isError, isLoading } = usePostProjects(tag);
|
||||
const projects = data ?? [];
|
||||
|
||||
if (isLoading)
|
||||
return (
|
||||
<div className="mainContainer">
|
||||
<h2 className={styles.title}>Наши проекты</h2>
|
||||
<span className="loader"></span>
|
||||
</div>
|
||||
);
|
||||
|
||||
if (isError || !projects) return <div>Ошибка при загрузке данных</div>;
|
||||
|
||||
return (
|
||||
<div className={styles.mainContainer}>
|
||||
<CardListTemplate
|
||||
//@ts-ignore
|
||||
items={transformPostsToCardData(projects)}
|
||||
variant="project"
|
||||
gridConfig={gridConfig}
|
||||
title="Наши проекты"
|
||||
/>
|
||||
</div>
|
||||
<WithLoading
|
||||
isLoading={isLoading}
|
||||
isError={isError}
|
||||
gridConfig={gridConfig}
|
||||
>
|
||||
<div className={styles.mainContainer}>
|
||||
<CardListTemplate
|
||||
//@ts-ignore
|
||||
items={transformPostsToCardData(projects)}
|
||||
variant="project"
|
||||
gridConfig={gridConfig}
|
||||
title="Наши проекты"
|
||||
/>
|
||||
</div>
|
||||
</WithLoading>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,36 +1,40 @@
|
||||
@import "@/shared/styles/cardGrid.module.scss";
|
||||
|
||||
.title {
|
||||
font-size: 36px;
|
||||
font-weight: 600;
|
||||
line-height: 44px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 8px;
|
||||
|
||||
@include mediaMax($tablet-max-width) {
|
||||
font-size: 24px;
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
display: grid;
|
||||
gap: 2rem;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
box-sizing: border-box;
|
||||
margin-bottom: 32px;
|
||||
@extend .gridСontainer;
|
||||
|
||||
&__lab {
|
||||
grid-template-columns: repeat(var(--desktop-columns, 3), 1fr);
|
||||
grid-template-columns: repeat(var(--desktop-columns), 1fr);
|
||||
|
||||
@include mediaMax($desktop-small-width) {
|
||||
grid-template-columns: repeat(var(--tablet-columns, 3), 1fr);
|
||||
grid-template-columns: repeat(var(--tablet-columns), 1fr);
|
||||
}
|
||||
|
||||
@include mediaMax($tablet-max-width) {
|
||||
grid-template-columns: repeat(var(--mobile-columns, 3), 1fr);
|
||||
grid-template-columns: repeat(var(--mobile-columns), 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
&__news {
|
||||
grid-template-columns: repeat(var(--desktop-columns, 3), 1fr);
|
||||
|
||||
@include mediaMax($desktop-small-width) {
|
||||
grid-template-columns: repeat(var(--tablet-columns, 3), 1fr);
|
||||
}
|
||||
|
||||
@include mediaMax($tablet-max-width) {
|
||||
grid-template-columns: repeat(var(--mobile-columns, 3), 1fr);
|
||||
}
|
||||
@@ -38,11 +42,13 @@
|
||||
|
||||
&__project {
|
||||
grid-template-columns: repeat(var(--desktop-columns, 3), 1fr);
|
||||
|
||||
@include mediaMax($desktop-small-width) {
|
||||
grid-template-columns: repeat(var(--tablet-columns, 3), 1fr);
|
||||
}
|
||||
|
||||
@include mediaMax($tablet-max-width) {
|
||||
grid-template-columns: repeat(var(--mobile-columns, 3), 1fr);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import { usePosts } from "@/modules/posts/hooks/usePosts";
|
||||
import { WpPost } from "@/widgets/WpPost";
|
||||
import {SkeletonPost} from "@/shared/Components/SkeletonPost/SkeletonPost";
|
||||
|
||||
interface CategoryPageProps {
|
||||
category: string;
|
||||
@@ -15,10 +16,12 @@ export function CategoryPage({ category }: CategoryPageProps) {
|
||||
if (isLoading)
|
||||
return (
|
||||
<div className="mainContainer">
|
||||
<span className="loader"></span>
|
||||
{[...Array(1)].map((_, index) => (
|
||||
<SkeletonPost key={index} />
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
if (isError) return <div>Ошибка при загрузке данных</div>;
|
||||
if (isError) return <center>Ошибка при загрузке данных</center>;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
#footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -80,9 +79,11 @@
|
||||
gap: 32px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.visible {
|
||||
display: block;
|
||||
}
|
||||
@@ -100,6 +101,7 @@
|
||||
.visible {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.copyright {
|
||||
display: block !important; // Показываем текст внизу только в мобильной версии
|
||||
text-align: center;
|
||||
@@ -122,6 +124,7 @@
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 20px;
|
||||
|
||||
.logo {
|
||||
height: auto;
|
||||
width: 100%;
|
||||
@@ -163,37 +166,62 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.footer-links-container {
|
||||
display: flex;
|
||||
flex-direction: column; /* Arrange links vertically */
|
||||
justify-content: space-between; /* Spread out the items */
|
||||
height: 100%; /* Make sure the container takes up full height */
|
||||
flex-direction: column;
|
||||
/* Arrange links vertically */
|
||||
justify-content: space-between;
|
||||
/* Spread out the items */
|
||||
height: 100%;
|
||||
/* Make sure the container takes up full height */
|
||||
}
|
||||
|
||||
|
||||
.footer-links {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 30px; // Между столбиками будет отступ
|
||||
gap: 30px;
|
||||
|
||||
.footer-column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px; // Расстояние между ссылками в одном столбике
|
||||
gap: 20px;
|
||||
|
||||
a {
|
||||
color: white; // Белый цвет текста
|
||||
text-decoration: none; // Убираем подчеркивание
|
||||
font-size: 16px; // Размер текста
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
font-size: 16px;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: fit-content;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: -5px;
|
||||
width: 0;
|
||||
height: 1px;
|
||||
background-color: white;
|
||||
transition: width 0.3s ease, left 0.3s ease;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
&:hover::after {
|
||||
width: 100%;
|
||||
left: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.privacy-policy {
|
||||
align-self: flex-end; /* Align the "Политика конфиденциальности" link to the bottom */
|
||||
margin-top: auto; /* Ensure the link is pushed to the bottom */
|
||||
}
|
||||
|
||||
|
||||
.privacy-policy {
|
||||
align-self: flex-end;
|
||||
/* Align the "Политика конфиденциальности" link to the bottom */
|
||||
margin-top: auto;
|
||||
/* Ensure the link is pushed to the bottom */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#root:has(#mainpageheader) #footer {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#numbers {
|
||||
margin-bottom: 48px;
|
||||
margin-bottom: 24px;
|
||||
|
||||
img {
|
||||
pointer-events: none;
|
||||
|
||||
@@ -10,7 +10,7 @@ $logo-size: 200px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
h1 {
|
||||
font-family: Montserrat;
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-size: 36px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 1.5rem;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
font-weight: 600;
|
||||
line-height: 44px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 8px;
|
||||
margin-bottom: 16px;
|
||||
|
||||
@include mediaMax($tablet-max-width) {
|
||||
font-size: 24px;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useState } from "react";
|
||||
import { useMedia } from "@/modules/media/hooks/useMedia";
|
||||
import { SkeletonGallery } from "@/shared/Components/SkeletonGallery/SkeletonGallery";
|
||||
|
||||
import "./PhotoGallery.style.scss"
|
||||
|
||||
@@ -14,16 +15,19 @@ const PhotoGallery = ({ images }: PhotoGalleryProps) => {
|
||||
|
||||
const filteredMedia = images
|
||||
? images.map((src, id) => ({ id, src }))
|
||||
: mediaData || []; // без фильтра
|
||||
: mediaData || [];
|
||||
|
||||
if (isLoading)
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div className="mainContainer">
|
||||
<span className="loader"></span>
|
||||
<div>
|
||||
<SkeletonGallery />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (isError) return <div>Ошибка при загрузке медиа</div>;
|
||||
if (isError || !filteredMedia || filteredMedia.length === 0) {
|
||||
return <center>Ошибка при загрузке медиа</center>;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="mainContainer">
|
||||
@@ -39,12 +43,10 @@ const PhotoGallery = ({ images }: PhotoGalleryProps) => {
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
<div className="btn">
|
||||
Загрузить ещё
|
||||
</div>
|
||||
<div className="btn">Загрузить ещё</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
export default PhotoGallery;
|
||||
@@ -10,14 +10,16 @@ import "swiper/css/pagination";
|
||||
import "./Slider.styles.scss";
|
||||
import { MediaItem } from "@/modules/media/api/get";
|
||||
|
||||
import { SkeletonSlider } from "@/shared/Components/SkeletonSlider/SkeletonSlider";
|
||||
|
||||
interface SliderProps {
|
||||
autoPlay?: boolean;
|
||||
autoPlayTime?: number;
|
||||
images?: string[];
|
||||
category?: string;
|
||||
customPerSlide: number;
|
||||
}
|
||||
|
||||
// Update the SliderContextType interface to include the missing properties
|
||||
interface SliderContextType {
|
||||
slideNumber: number;
|
||||
mediaList: MediaItem[];
|
||||
@@ -26,13 +28,10 @@ interface SliderContextType {
|
||||
slidesCount: number; // Added for Dots component
|
||||
}
|
||||
|
||||
// Then in your Slider component, update the context value:
|
||||
|
||||
// Create context with default values
|
||||
export const SliderContext = createContext<SliderContextType>({
|
||||
slideNumber: 0,
|
||||
mediaList: [],
|
||||
goToSlide: () => {},
|
||||
goToSlide: () => { },
|
||||
slidesCount: 0,
|
||||
});
|
||||
|
||||
@@ -41,9 +40,11 @@ function Slider({
|
||||
autoPlayTime = 3000,
|
||||
images,
|
||||
category = "gallery",
|
||||
customPerSlide = 0
|
||||
}: SliderProps) {
|
||||
const { data: mediaData, isLoading, isError } = useMedia();
|
||||
const [itemsPerSlide, setItemsPerSlide] = useState<number>(
|
||||
customPerSlide !== 0 ? 4 :
|
||||
window.innerWidth <= 768 ? 1 : 2
|
||||
);
|
||||
const [enableButtons, setEnableButtons] = useState<boolean>(false);
|
||||
@@ -64,7 +65,7 @@ function Slider({
|
||||
|
||||
useEffect(() => {
|
||||
const numberOfSlides = filteredMedia.length;
|
||||
if (numberOfSlides > 2) {
|
||||
if (numberOfSlides > 2 || customPerSlide !== 0) {
|
||||
setEnableButtons(true);
|
||||
} else if (numberOfSlides === 1) {
|
||||
setItemsPerSlide(1);
|
||||
@@ -73,11 +74,13 @@ function Slider({
|
||||
|
||||
if (isLoading)
|
||||
return (
|
||||
<div className="mainContainer">
|
||||
<span className="loader"></span>
|
||||
<div >
|
||||
{[...Array(1)].map((_, index) => (
|
||||
<SkeletonSlider key={index} />
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
if (isError) return <div>Ошибка при загрузке медиа</div>;
|
||||
if (isError) return <center>Ошибка при загрузке медиа</center>;
|
||||
|
||||
// Create context value
|
||||
const contextValue: SliderContextType = {
|
||||
@@ -91,38 +94,40 @@ function Slider({
|
||||
return (
|
||||
<SliderContext.Provider value={contextValue}>
|
||||
<div className="slider">
|
||||
<Swiper
|
||||
modules={[Navigation, Pagination]}
|
||||
spaceBetween={20}
|
||||
slidesPerView={itemsPerSlide}
|
||||
slidesPerGroup={1}
|
||||
loop={enableButtons}
|
||||
navigation={enableButtons}
|
||||
pagination={{ clickable: enableButtons }}
|
||||
autoplay={
|
||||
autoPlay
|
||||
? { delay: autoPlayTime, disableOnInteraction: false }
|
||||
: false
|
||||
}
|
||||
onSlideChange={(swiper) => setSlideNumber(swiper.activeIndex)}
|
||||
>
|
||||
{filteredMedia.map((media) => (
|
||||
<SwiperSlide
|
||||
key={media.id}
|
||||
className={
|
||||
filteredMedia.length === 1
|
||||
? "swiper-slide single"
|
||||
: "swiper-slide"
|
||||
}
|
||||
>
|
||||
<img
|
||||
src={media.src}
|
||||
alt={`slide-${media.id}`}
|
||||
className="slide-image"
|
||||
/>
|
||||
</SwiperSlide>
|
||||
))}
|
||||
</Swiper>
|
||||
<div className="full-width-container">
|
||||
<Swiper
|
||||
modules={[Navigation, Pagination]}
|
||||
spaceBetween={20}
|
||||
slidesPerView={itemsPerSlide}
|
||||
slidesPerGroup={1}
|
||||
loop={enableButtons}
|
||||
navigation={enableButtons}
|
||||
pagination={{ clickable: enableButtons }}
|
||||
autoplay={
|
||||
autoPlay
|
||||
? { delay: autoPlayTime, disableOnInteraction: false }
|
||||
: false
|
||||
}
|
||||
onSlideChange={(swiper) => setSlideNumber(swiper.activeIndex)}
|
||||
>
|
||||
{filteredMedia.map((media) => (
|
||||
<SwiperSlide
|
||||
key={media.id}
|
||||
className={
|
||||
filteredMedia.length === 1
|
||||
? "swiper-slide single"
|
||||
: "swiper-slide"
|
||||
}
|
||||
>
|
||||
<img
|
||||
src={media.src}
|
||||
alt={`slide-${media.id}`}
|
||||
className="slide-image"
|
||||
/>
|
||||
</SwiperSlide>
|
||||
))}
|
||||
</Swiper>
|
||||
</div>
|
||||
</div>
|
||||
</SliderContext.Provider>
|
||||
);
|
||||
|
||||
@@ -64,11 +64,10 @@ $btn-primary-bg: linear-gradient(
|
||||
text-align: left;
|
||||
font-size: 18px;
|
||||
color: #000;
|
||||
font-family: "Montserrat";
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
src: url("../fonts/Montserrat/Montserrat-VariableFont_wght.ttf") format("truetype");
|
||||
}
|
||||
}
|
||||
|
||||
.bold {
|
||||
font-size: 22px;
|
||||
@@ -100,5 +99,5 @@ $btn-primary-bg: linear-gradient(
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
font-family: "Montserrat";
|
||||
font-family: 'Montserrat', sans-serif;
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
$color-highlight: #072AC8;
|
||||
$table-header-color: #EEEEEE;
|
||||
$table-body-bg: #ffffff;
|
||||
$color-usual: #ACACAC;
|
||||
$border-raduis: 16px;
|
||||
$background-tape: #F5F5F7;
|
||||
|
||||
$slider: 476px;
|
||||
$swiper-button-size: 48px;
|
||||
$swiper-button-arrow-size: 20px;
|
||||
|
||||
:root {
|
||||
--wp--preset--spacing--10: 5%;
|
||||
--wp--preset--spacing--20: 10%;
|
||||
--wp--preset--spacing--30: 15%;
|
||||
--wp--preset--spacing--40: 20%;
|
||||
--wp--preset--spacing--50: 25%;
|
||||
--wp--preset--spacing--60: 30%;
|
||||
}
|
||||
|
||||
.project {
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
.wp-block-columns {
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
.is-layout-flex {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 2em;
|
||||
|
||||
figure {
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
object-fit: contain !important; // Wordpress накидывает styles к элементу, приходится перебивать
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.has-text-align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.has-text-align-justify {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.is-style-rounded * {
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
// "Цитаты"
|
||||
.wp-block-pullquote {
|
||||
* {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 16px 0;
|
||||
background: $background-tape;
|
||||
|
||||
p {
|
||||
display: inline-block;
|
||||
max-width: 40%;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Таблица
|
||||
.table-wrapper {
|
||||
border: 1px solid $table-header-color;
|
||||
border-radius: $border-raduis;
|
||||
overflow-x: auto;
|
||||
background: $table-header-color;
|
||||
|
||||
.comparison-table {
|
||||
width: 100%;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
font-size: 18px;
|
||||
word-wrap: normal;
|
||||
|
||||
th,
|
||||
td {
|
||||
max-width: 200px;
|
||||
border: none;
|
||||
padding: 12px 16px;
|
||||
vertical-align: middle;
|
||||
background: $table-body-bg;
|
||||
}
|
||||
|
||||
tr:not(:last-child) th,
|
||||
tr:not(:last-child) td {
|
||||
border-bottom: 1px solid $table-header-color;
|
||||
}
|
||||
|
||||
tr:last-child th,
|
||||
tr:last-child td {
|
||||
border-bottom: 1px solid $table-body-bg;
|
||||
}
|
||||
|
||||
thead th {
|
||||
background-color: $table-header-color;
|
||||
font-weight: 400;
|
||||
padding: 12px 16px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
tbody td:not(:first-child),
|
||||
thead th:not(:first-child) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
thead th.highlight {
|
||||
font-weight: 600;
|
||||
font-size: 24px;
|
||||
border-radius: 10px 10px 0 0;
|
||||
border-bottom: 1px solid $color-highlight;
|
||||
color: #ffffff;
|
||||
background-color: $color-highlight;
|
||||
}
|
||||
|
||||
tbody td.highlight {
|
||||
border: 1px solid $color-highlight;
|
||||
border-top: none;
|
||||
|
||||
.icon {
|
||||
filter: brightness(0) saturate(100%) invert(26%) sepia(94%) saturate(2350%) hue-rotate(225deg) brightness(95%) contrast(93%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: static;
|
||||
height: $slider;
|
||||
|
||||
.full-width-container {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
padding-top: 4em;
|
||||
|
||||
.swiper-wrapper .swiper-slide .slide-image {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.swiper-button-prev,
|
||||
.swiper-button-next {
|
||||
top: calc($swiper-button-size / 2);
|
||||
left: auto;
|
||||
width: $swiper-button-size;
|
||||
height: $swiper-button-size;
|
||||
color: black;
|
||||
|
||||
border: 2px solid black;
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.swiper-button-prev::after,
|
||||
.swiper-button-next::after {
|
||||
font-size: $swiper-button-arrow-size;
|
||||
}
|
||||
|
||||
.swiper-button-prev {
|
||||
right: calc(10% + 24px + $swiper-button-size);
|
||||
}
|
||||
|
||||
.swiper-button-next {
|
||||
right: 10%;
|
||||
}
|
||||
|
||||
.swiper-pagination {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,13 @@
|
||||
import { ReactNode } from "react";
|
||||
|
||||
import MediaBlock from "@/widgets/MediaBlock/MediaBlock";
|
||||
|
||||
import { PageContent, PageHeader } from "@/widgets/WpPost";
|
||||
import { useResizeObserver } from "@/shared/lib/ResizeObserver/ResizeObserver";
|
||||
import { App } from "@/shared/types/app";
|
||||
|
||||
import "./Projects.scss";
|
||||
import Slider from "../Slider/Slider";
|
||||
|
||||
interface WpPostProps {
|
||||
post: App.WpPostPage;
|
||||
children?: ReactNode;
|
||||
@@ -14,8 +17,11 @@ export default function WpPost({
|
||||
post,
|
||||
children,
|
||||
}: WpPostProps) {
|
||||
useResizeObserver({parentSelector: '.wp-block-pullquote'});
|
||||
// useResizeObserver({parentSelector: ".swiper", childSelector: ".swiper-wrapper"});
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={post.categories?.includes('projects') ? "project" : ""}>
|
||||
<PageHeader className="header">
|
||||
<h1>{post.title}</h1>
|
||||
</PageHeader>
|
||||
@@ -24,11 +30,13 @@ export default function WpPost({
|
||||
post.content.map((el, index) => {
|
||||
if (el.type === "mediablock") {
|
||||
return <MediaBlock key={index} images={el.value} />;
|
||||
} else if (el.type === "slider") {
|
||||
return <Slider images={el.value} customPerSlide={4} />
|
||||
}
|
||||
return <div key={index}>{el.element}</div>;
|
||||
})}
|
||||
{children}
|
||||
</PageContent>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user