Skip to content

Commit 0417224

Browse files
author
Oleksandr Ratushnyi
committed
Add Strum component and update Collage styles
1 parent 5c496c7 commit 0417224

File tree

13 files changed

+1371
-1268
lines changed

13 files changed

+1371
-1268
lines changed

public/Strum.mp4

15 MB
Binary file not shown.

src/app/page.tsx

Lines changed: 1239 additions & 1262 deletions
Large diffs are not rendered by default.

src/assets/Strum_Hero.svg

Lines changed: 36 additions & 0 deletions
Loading

src/components/Collage/Collage.module.css

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,32 @@
8888
grid-column: 3 / 4;
8989
grid-row: 1 / 4;
9090
}
91+
92+
/* variant 2 is mirror of variant 1 */
93+
.variant-2.s-4 {
94+
grid-template-columns: 1fr 2fr 1fr;
95+
grid-template-rows: 1fr 2fr 1fr;
96+
}
97+
.variant-2.s-4 > *:nth-child(1) {
98+
grid-column: 1 / 2;
99+
grid-row: 1 / 4;
100+
}
101+
.variant-2.s-4 > *:nth-child(2) {
102+
grid-column: 2 / 3;
103+
grid-row: 3 / 4;
104+
}
105+
.variant-2.s-4 > *:nth-child(3) {
106+
grid-column: 3 / 4;
107+
grid-row: 3 / 4;
108+
}
109+
.variant-2.s-4 > *:nth-child(4) {
110+
grid-column: 2 / 4;
111+
grid-row: 1 / 3;
112+
}
113+
114+
.row {
115+
display: flex;
116+
flex-direction: row;
117+
justify-content: space-between;
118+
align-items: stretch;
119+
}

src/components/Collage/Collage.tsx

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
1-
import React from 'react';
2-
import clsx from 'clsx';
3-
import styles from './Collage.module.css';
1+
import React from "react";
2+
import clsx from "clsx";
3+
import styles from "./Collage.module.css";
44

55
interface ICollageProps {
66
children: React.ReactNode;
77
className?: string;
8+
mirror?: boolean;
9+
variant?: number;
10+
row?: boolean;
811
}
912

1013
export const Collage = function Collage({
1114
className,
1215
children,
16+
mirror,
17+
variant = 1,
18+
row,
1319
}: ICollageProps) {
1420
const size = React.Children.count(children);
21+
1522
return (
16-
<div className={clsx(styles.collage, styles[`s-${size}`], className)}>
23+
<div
24+
className={clsx(
25+
styles.collage,
26+
styles[`variant-${variant}`],
27+
styles[`s-${size}`],
28+
{ [styles.mirror]: mirror, [styles.row]: row },
29+
className
30+
)}
31+
>
1732
{children}
1833
</div>
1934
);
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.container {
2+
width: 100%;
3+
background-color: #000;
4+
display: flex;
5+
justify-content: center;
6+
align-items: center;
7+
overflow: hidden;
8+
position: relative;
9+
background-image: url(../../assets/Strum_Hero.svg);
10+
background-repeat: repeat;
11+
text-decoration: none;
12+
}
13+
14+
.video {
15+
aspect-ratio: 9 / 16;
16+
max-width: 20rem;
17+
display: block;
18+
background-color: yellow;
19+
object-fit: contain;
20+
margin: 2rem;
21+
}

src/components/Strum/Strum.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import clsx from "clsx";
2+
import styles from "./Strum.module.css";
3+
import heroImage from "../../assets/Strum_Hero.svg";
4+
import Image from "next/image";
5+
6+
interface IStrumProps {
7+
className?: string;
8+
}
9+
10+
export const Strum = function Strum({ className }: IStrumProps) {
11+
return (
12+
<a
13+
href="https://strum.azov.one/en?ref=37aa83d8-d5e6-480a-b7d7-48de0f82ff03"
14+
target="_blank"
15+
className={clsx(styles.container, className)}
16+
>
17+
<video className={styles.video} autoPlay muted loop playsInline>
18+
<source src="/Strum.mp4" type="video/mp4" />
19+
Your browser does not support the video tag.
20+
</video>
21+
</a>
22+
);
23+
};

src/components/Strum/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './Strum';

src/components/Ticker/Ticker.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@
3939
}
4040

4141
.ticker strong {
42-
color: var(--S500);
42+
color: #fb1e44;
4343
}

src/components/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ export * from './Project';
88
export * from './Fullwidth';
99
export * from './Footer';
1010
export * from './Certificate';
11-
export * from './Ticker';
11+
export * from './Ticker';
12+
export * from './Strum';

0 commit comments

Comments
 (0)