mirror of
https://github.com/theoludwig/theoludwig.git
synced 2024-12-08 00:44:30 +01:00
fix: add text that I'm a student at University
This commit is contained in:
parent
bd2dc9c9af
commit
fd0740d12a
@ -1,4 +1,4 @@
|
|||||||
import React, { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { useTheme } from 'next-themes'
|
import { useTheme } from 'next-themes'
|
||||||
|
|
||||||
export const SwitchTheme: React.FC = () => {
|
export const SwitchTheme: React.FC = () => {
|
||||||
@ -20,25 +20,35 @@ export const SwitchTheme: React.FC = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
className='toggle-button'
|
className='flex items-center'
|
||||||
data-cy='switch-theme-click'
|
data-cy='switch-theme-click'
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
>
|
>
|
||||||
<div className='toggle-theme-button'>
|
<div className='toggle-theme-button relative cursor-pointer bg-transparent inline-block'>
|
||||||
<div className='toggle-track'>
|
<div className='toggle-track'>
|
||||||
<div data-cy='switch-theme-dark' className='toggle-track-check'>
|
<div
|
||||||
<span className='toggle_Dark'>🌜</span>
|
data-cy='switch-theme-dark'
|
||||||
|
className='toggle-track-check absolute'
|
||||||
|
>
|
||||||
|
<span className='toggle_Dark flex justify-center items-center relative'>
|
||||||
|
🌜
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div data-cy='switch-theme-light' className='toggle-track-x'>
|
<div
|
||||||
<span className='toggle_Light'>🌞</span>
|
data-cy='switch-theme-light'
|
||||||
|
className='toggle-track-x absolute'
|
||||||
|
>
|
||||||
|
<span className='toggle_Light flex justify-center items-center relative'>
|
||||||
|
🌞
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='toggle-thumb' />
|
<div className='toggle-thumb absolute' />
|
||||||
<input
|
<input
|
||||||
data-cy='switch-theme-input'
|
data-cy='switch-theme-input'
|
||||||
type='checkbox'
|
type='checkbox'
|
||||||
aria-label='Dark mode toggle'
|
aria-label='Dark mode toggle'
|
||||||
className='toggle-screenreader-only'
|
className='toggle-screenreader-only absolute overflow-hidden'
|
||||||
defaultChecked
|
defaultChecked
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -46,16 +56,8 @@ export const SwitchTheme: React.FC = () => {
|
|||||||
|
|
||||||
<style jsx>
|
<style jsx>
|
||||||
{`
|
{`
|
||||||
.toggle-button {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.toggle-theme-button {
|
.toggle-theme-button {
|
||||||
touch-action: pan-x;
|
touch-action: pan-x;
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
cursor: pointer;
|
|
||||||
background-color: transparent;
|
|
||||||
border: 0;
|
border: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
@ -70,7 +72,6 @@ export const SwitchTheme: React.FC = () => {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
.toggle-track-check {
|
.toggle-track-check {
|
||||||
position: absolute;
|
|
||||||
width: 14px;
|
width: 14px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
top: 0;
|
top: 0;
|
||||||
@ -83,7 +84,6 @@ export const SwitchTheme: React.FC = () => {
|
|||||||
transition: opacity 0.25s ease;
|
transition: opacity 0.25s ease;
|
||||||
}
|
}
|
||||||
.toggle-track-x {
|
.toggle-track-x {
|
||||||
position: absolute;
|
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
top: 0;
|
top: 0;
|
||||||
@ -96,15 +96,10 @@ export const SwitchTheme: React.FC = () => {
|
|||||||
}
|
}
|
||||||
.toggle_Dark,
|
.toggle_Dark,
|
||||||
.toggle_Light {
|
.toggle_Light {
|
||||||
align-items: center;
|
|
||||||
display: flex;
|
|
||||||
height: 10px;
|
height: 10px;
|
||||||
justify-content: center;
|
|
||||||
position: relative;
|
|
||||||
width: 10px;
|
width: 10px;
|
||||||
}
|
}
|
||||||
.toggle-thumb {
|
.toggle-thumb {
|
||||||
position: absolute;
|
|
||||||
left: ${theme === 'dark' ? '27px' : '0px'};
|
left: ${theme === 'dark' ? '27px' : '0px'};
|
||||||
width: 22px;
|
width: 22px;
|
||||||
height: 22px;
|
height: 22px;
|
||||||
@ -121,9 +116,7 @@ export const SwitchTheme: React.FC = () => {
|
|||||||
clip: rect(0 0 0 0);
|
clip: rect(0 0 0 0);
|
||||||
height: 1px;
|
height: 1px;
|
||||||
margin: -1px;
|
margin: -1px;
|
||||||
overflow: hidden;
|
|
||||||
padding: 0;
|
padding: 0;
|
||||||
position: absolute;
|
|
||||||
width: 1px;
|
width: 1px;
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"description": "Developer Full Stack Junior • Passionate about High-Tech",
|
"description": "Developer Full Stack Junior • Passionate about High-Tech",
|
||||||
"birthDate": "Birth date",
|
"birthDate": "Birth date",
|
||||||
"nationality": "Nationality",
|
"nationality": "Nationality",
|
||||||
"descriptionBottom": "I am self-taught in Computer Science by following online trainings. <0/> <0/> I put into practice everything I learn and make many projects."
|
"descriptionBottom": "I am self-taught in Computer Science by following online trainings and I am also a student at the university following the French training \"BUT Informatique\" (first year). <0/> <0/> I put into practice everything I learn and make many projects."
|
||||||
},
|
},
|
||||||
"interests": {
|
"interests": {
|
||||||
"title": "Interests",
|
"title": "Interests",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"description": "Développeur Full Stack Junior • Passionné de High-Tech",
|
"description": "Développeur Full Stack Junior • Passionné de High-Tech",
|
||||||
"birthDate": "Date de naissance",
|
"birthDate": "Date de naissance",
|
||||||
"nationality": "Nationalité",
|
"nationality": "Nationalité",
|
||||||
"descriptionBottom": "Je me forme en autodidacte dans l'informatique en suivant des formations en ligne. <0/> <0/> Je mets en pratique tout ce que j'apprends et réalise de nombreux projets."
|
"descriptionBottom": "Je me forme en autodidacte dans l'informatique en suivant des formations en ligne et je suis aussi un étudiant à l'université suivant la formation \"BUT Informatique\" (première année). <0/> <0/> Je mets en pratique tout ce que j'apprends et réalise de nombreux projets."
|
||||||
},
|
},
|
||||||
"interests": {
|
"interests": {
|
||||||
"title": "Intérêts",
|
"title": "Intérêts",
|
||||||
|
6175
package-lock.json
generated
6175
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,7 @@ const universalCookie = new UniversalCookie()
|
|||||||
/** how long in seconds, until the cookie expires (10 years) */
|
/** how long in seconds, until the cookie expires (10 years) */
|
||||||
const COOKIE_MAX_AGE = 10 * 365.25 * 24 * 60 * 60
|
const COOKIE_MAX_AGE = 10 * 365.25 * 24 * 60 * 60
|
||||||
|
|
||||||
const MyApp = ({ Component, pageProps }: AppProps): JSX.Element => {
|
const Application = ({ Component, pageProps }: AppProps): JSX.Element => {
|
||||||
const { lang } = useTranslation()
|
const { lang } = useTranslation()
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -30,4 +30,4 @@ const MyApp = ({ Component, pageProps }: AppProps): JSX.Element => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MyApp
|
export default Application
|
||||||
|
@ -1,21 +1,6 @@
|
|||||||
import Document, {
|
import { Html, Head, Main, NextScript } from 'next/document'
|
||||||
Html,
|
|
||||||
Head,
|
|
||||||
Main,
|
|
||||||
NextScript,
|
|
||||||
DocumentContext,
|
|
||||||
DocumentInitialProps
|
|
||||||
} from 'next/document'
|
|
||||||
|
|
||||||
class MyDocument extends Document {
|
const Document: React.FC = () => {
|
||||||
static async getInitialProps(
|
|
||||||
context: DocumentContext
|
|
||||||
): Promise<DocumentInitialProps> {
|
|
||||||
const initialProps = await Document.getInitialProps(context)
|
|
||||||
return initialProps
|
|
||||||
}
|
|
||||||
|
|
||||||
render(): JSX.Element {
|
|
||||||
return (
|
return (
|
||||||
<Html>
|
<Html>
|
||||||
<Head />
|
<Head />
|
||||||
@ -26,6 +11,5 @@ class MyDocument extends Document {
|
|||||||
</Html>
|
</Html>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
export default MyDocument
|
export default Document
|
||||||
|
Loading…
Reference in New Issue
Block a user