-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from Runroom/feature/styles-initial-page
Enter initial design
- Loading branch information
Showing
12 changed files
with
174 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
.language-switcher { | ||
align-items: center; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
width: 100%; | ||
} | ||
|
||
.language-switcher ul { | ||
display: flex; | ||
} | ||
|
||
.language-switcher li { | ||
list-style: none; | ||
margin: 0 0.5rem; | ||
} | ||
|
||
.language-switcher li button { | ||
color: var(--colors-surface-primary); | ||
text-decoration: none; | ||
font-size: 1rem; | ||
font-weight: 500; | ||
text-transform: uppercase; | ||
transition: | ||
color 0.5s ease-in-out, | ||
background-color 0.2s ease-in-out; | ||
border: 2px solid var(--colors-surface-primary); | ||
border-radius: 0.5rem; | ||
padding: 0.5rem 0.8rem; | ||
background: transparent; | ||
|
||
&.active { | ||
font-weight: 700; | ||
color: coral; | ||
border-color: coral; | ||
} | ||
} | ||
|
||
.language-switcher li button:hover:not(.active) { | ||
cursor: pointer; | ||
background-color: coral; | ||
color: var(--colors-surface-primary); | ||
border-color: var(--colors-surface-primary); | ||
} | ||
|
||
.language__title { | ||
font-size: 1rem; | ||
margin-bottom: 1.5rem; | ||
color: var(--colors-surface-primary); | ||
padding-bottom: 0.25rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'use client'; | ||
import styles from '@/styles/Welcome.module.css'; | ||
|
||
import { useTranslation } from 'react-i18next'; | ||
|
||
export const Welcome = (): JSX.Element => { | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<div className={styles.welcome}> | ||
<h1 className={styles.welcome__title}> | ||
<span className={styles.welcome__gradient}>Runroom Starter</span> | ||
<span className={`${styles.welcome__gradient} ${styles.welcome__below}`}> | ||
{t(`welcome`)} | ||
</span> | ||
</h1> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './Welcome'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
'use client'; | ||
import { LanguageSwitcher } from '@/Shared/ui/components/LanguageSwitcher'; | ||
|
||
import { useTranslation } from 'react-i18next'; | ||
import { LanguageSwitcher } from '@/Shared/ui/components/LanguageSwitcher'; | ||
import { Welcome } from '@/Shared/ui/components/Welcome'; | ||
|
||
export default function Home() { | ||
const { t } = useTranslation('common'); | ||
return ( | ||
<main> | ||
<h1>Runroom - NextJS Starter</h1> | ||
<p>{t('language')}</p> | ||
<> | ||
<Welcome /> | ||
<LanguageSwitcher /> | ||
</main> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"locale": "ca", | ||
"language": "Català" | ||
"language": "Català", | ||
"welcome": "Starter amb Next JS" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"locale": "en", | ||
"language": "English" | ||
"language": "English", | ||
"welcome": "with Next JS" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"locale": "es", | ||
"language": "Español" | ||
"language": "Español", | ||
"welcome": "Starter con Next JS" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
.welcome { | ||
--main-size: 3.125rem; | ||
} | ||
|
||
.welcome__title { | ||
color: var(--colors-surface-primary); | ||
display: flex; | ||
flex-direction: column; | ||
font-size: var(--main-size); | ||
font-weight: 700; | ||
line-height: 1; | ||
margin-bottom: 1em; | ||
text-align: center; | ||
} | ||
|
||
@property --i { | ||
syntax: "<color>"; | ||
inherits: false; | ||
initial-value: white; | ||
} | ||
|
||
.welcome__gradient { | ||
--i: white; | ||
|
||
background: linear-gradient(to bottom, var(--i) 20%, var(--colors-surface-secondary)); | ||
background-clip: text; | ||
color: transparent; | ||
transition: background 0.5s; | ||
} | ||
|
||
.welcome__title:hover .welcome__gradient { | ||
--i: coral; | ||
|
||
cursor: crosshair; | ||
} | ||
|
||
.welcome__below { | ||
font-size: calc(var(--main-size) - 1.5rem); | ||
margin-top: -0.25rem; | ||
} | ||
|
||
@media (width >= 768px) { | ||
.welcome { | ||
--main-size: 6rem; | ||
} | ||
|
||
.welcome__title { | ||
max-width: 14ch; | ||
} | ||
|
||
.welcome__below { | ||
margin-top: -1.25rem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters