1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-12-08 00:44:30 +01:00

perf: remove unnecessary fonts weight

This commit is contained in:
Divlo 2021-08-23 19:41:39 +02:00
parent b5945150b8
commit fc5ba28b8a
No known key found for this signature in database
GPG Key ID: 6F24DA54DA3967CF
4 changed files with 26 additions and 24 deletions

View File

@ -1,6 +1,7 @@
import { useCallback, useEffect, useState } from 'react' import { useCallback, useEffect, useState } from 'react'
import useTranslation from 'next-translate/useTranslation' import useTranslation from 'next-translate/useTranslation'
import setLanguage from 'next-translate/setLanguage' import setLanguage from 'next-translate/setLanguage'
import classNames from 'classnames'
import { Arrow } from './Arrow' import { Arrow } from './Arrow'
import { LanguageFlag } from './LanguageFlag' import { LanguageFlag } from './LanguageFlag'
@ -41,27 +42,29 @@ export const Language: React.FC = () => {
<LanguageFlag language={currentLanguage} /> <LanguageFlag language={currentLanguage} />
<Arrow /> <Arrow />
</div> </div>
{!hiddenMenu && (
<ul <ul
data-cy='languages-list' data-cy='languages-list'
className='flex flex-col justify-center items-center absolute p-0 top-14 z-10 w-24 mt-3 mr-4 rounded-lg list-none shadow-light dark:shadow-dark bg-white dark:bg-black' className={classNames(
> 'flex flex-col justify-center items-center absolute p-0 top-14 z-10 w-24 mt-3 mr-4 rounded-lg list-none shadow-light dark:shadow-dark bg-white dark:bg-black',
{i18n.locales.map((language, index) => { { hidden: hiddenMenu }
if (language === currentLanguage) { )}
return null >
} {i18n.locales.map((language, index) => {
return ( if (language === currentLanguage) {
<li return null
key={index} }
className='flex items-center justify-center w-full h-12 hover:bg-[#4f545c] hover:bg-opacity-20 pl-2' return (
onClick={async () => await handleLanguage(language)} <li
> key={index}
<LanguageFlag language={language} /> className='flex items-center justify-center w-full h-12 hover:bg-[#4f545c] hover:bg-opacity-20 pl-2'
</li> onClick={async () => await handleLanguage(language)}
) >
})} <LanguageFlag language={language} />
</ul> </li>
)} )
})}
</ul>
</div> </div>
) )
} }

View File

@ -11,7 +11,7 @@ export const InterestParagraph: React.FC<InterestParagraphProps> = (props) => {
return ( return (
<> <>
<p className='text-center my-6 text-gray dark:text-gray-dark'> <p className='text-center my-6 text-gray dark:text-gray-dark'>
<strong className='text-yellow font-medium text-lg dark:text-yellow-dark'> <strong className='text-yellow font-semibold text-lg dark:text-yellow-dark'>
{title} {title}
</strong> </strong>
<br /> <br />

View File

@ -5,7 +5,7 @@ import DivloLogo from 'public/images/divlo_logo.png'
export const ProfileLogo: React.FC = () => { export const ProfileLogo: React.FC = () => {
return ( return (
<div className='px-2 py-6 max-w-[370px] max-h-[370px]'> <div className='px-2 py-6 max-w-[370px] max-h-[370px]'>
<Image src={DivloLogo} alt='Divlo' /> <Image src={DivloLogo} alt='Divlo' priority />
</div> </div>
) )
} }

View File

@ -6,7 +6,6 @@ import UniversalCookie from 'universal-cookie'
import 'tailwindcss/tailwind.css' import 'tailwindcss/tailwind.css'
import '@fontsource/montserrat/400.css' import '@fontsource/montserrat/400.css'
import '@fontsource/montserrat/500.css'
import '@fontsource/montserrat/600.css' import '@fontsource/montserrat/600.css'
const universalCookie = new UniversalCookie() const universalCookie = new UniversalCookie()