Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
feat/fix/chore/i18n: new structure (#81)
Browse files Browse the repository at this point in the history
The change is very big, but it's very worth it
  • Loading branch information
novusnota authored Mar 4, 2024
1 parent 17176cb commit d82a5cb
Show file tree
Hide file tree
Showing 124 changed files with 3,384 additions and 554 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
45 changes: 45 additions & 0 deletions components/features/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { ArrowRightIcon } from '@components/icons'
import cn from 'clsx'
import { motion } from 'framer-motion'
import Link from 'next/link'
import type { ReactNode } from 'react'
import styles from './style.module.css'

export function Feature({
large,
centered,
children,
lightOnly,
className,
href,
index,
...props
}) {
return (
<motion.div
initial={{ opacity: 0 }}
whileInView={{ opacity: 1 }}
viewport={{ once: true, margin: '-20px' }}
transition={{ duration: Math.min(0.25 + index * 0.2, 0.8) }}
className={cn(
styles.feature,
large && styles.large,
centered && styles.centered,
lightOnly && styles['light-only'],
className
)}
{...props}
>
{children}
{href ? (
<Link className={styles.link} href={href} target="_blank">
<ArrowRightIcon width="1.5em" />
</Link>
) : null}
</motion.div>
)
}

export function Features({ children }: { children: ReactNode }) {
return <div className={styles.features}>{children}</div>
}
135 changes: 135 additions & 0 deletions components/features/style.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
.feature {
position: relative;
padding: 1.5rem 1.75rem;
color: #000;
background-color: white;
overflow: hidden;
border-radius: 1.78em;
}
.feature.large {
grid-column: span 2;
}
.feature.centered {
text-align: center;
}
.feature h3 {
position: relative;
font-size: 34px;
font-size: min(34px, max(4vw, 24px));
font-weight: 600;
line-height: 1.25;
letter-spacing: -0.02rem;
z-index: 2;
}
:global(.dark) .feature:not(.light-only) {
color: #fff;
background-color: #202020;
}
.feature {
box-shadow:
0 8px 16px rgb(0 0 0 / 8%),
0 1px 2px rgb(0 0 0 / 4%),
0 0 0 1px rgb(0 0 0 / 3%);
transition: box-shadow 0.3s ease;
}
:global(.dark) .feature {
box-shadow: 0 0 0 1px rgb(82 82 82 / 60%);
}
.feature .link {
position: absolute;
right: 1em;
bottom: 1em;
z-index: 2;
width: 2.5em;
height: 2.5em;
background-color: rgb(0 0 0 / 39%);
backdrop-filter: blur(10px);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
color: rgba(255, 255, 255, 0.9);
box-shadow:
0 0 0 2px rgb(154 154 154 / 56%),
0 0 30px rgb(0 0 0 / 10%);
transition: all 0.2s ease;
-webkit-user-drag: none;
}
@media (hover: hover) {
.feature .link {
opacity: 0;
}
.feature:hover .link {
opacity: 1;
}
.feature .link:hover {
transform: scale(1.05);
color: rgba(255, 255, 255, 1);
background-color: rgba(64, 64, 64, 0.39);
box-shadow:
0 0 0 2px rgba(220, 220, 220, 0.56),
0 0 30px rgb(0 0 0 / 10%);
}
.feature .link:active {
transform: scale(1);
color: rgba(255, 255, 255, 0.8);
background-color: rgba(22, 22, 22, 0.39);
box-shadow:
0 0 0 2px rgba(178, 178, 178, 0.56),
0 0 30px rgb(0 0 0 / 10%);
}
}

.features {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 2em;
font-feature-settings: initial;
}

.feature :global(.show-on-mobile) {
display: none;
}

@media screen and (max-width: 1024px) {
.feature {
max-width: 80vw;
width: 100%;
}
.feature.large {
grid-column: span 1;
}
.features {
grid-template-columns: 1fr;
grid-gap: 3em;
justify-items: center;
}
.feature h3 {
font-size: 28px;
font-size: min(28px, max(4vw, 22px));
text-align: center;
}
}

@media screen and (max-width: 640px) {
.feature {
max-width: 460px;
width: 100%;
}
.feature.large {
grid-column: span 1;
}
.features {
grid-template-columns: 1fr;
grid-gap: 3em;
justify-items: center;
}
.feature h3 {
font-size: 34px;
font-size: min(34px, max(4vw, 22px));
text-align: center;
}
.feature :global(.show-on-mobile) {
display: block;
}
}
120 changes: 120 additions & 0 deletions components/features/themes-animation.tsx

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions components/icons/arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions components/icons/box.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions components/icons/brush.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions components/icons/cards.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions components/icons/chevron-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions components/icons/cloud.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions components/icons/code.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions components/icons/diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions components/icons/dropper.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions components/icons/file.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions components/icons/files.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions components/icons/folder-tree.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions components/icons/formula.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions components/icons/gear.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions components/icons/globe.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions components/icons/id-card.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d82a5cb

Please sign in to comment.