This commit is contained in:
Guillaume Dorce 2022-11-03 14:49:59 +01:00
parent ae743c074d
commit d69f31addc
5 changed files with 9 additions and 4 deletions

View File

@ -25,7 +25,7 @@ const AppHeader = () => {
<header className="sticky top-0 z-100 w-full shadow-sm shadow-slate-900"> <header className="sticky top-0 z-100 w-full shadow-sm shadow-slate-900">
<div className="min-h-80 flex items-center justify-between bg-grey-dark p-2"> <div className="min-h-80 flex items-center justify-between bg-grey-dark p-2">
<div className="app-header__logo flex items-center gap-3"> <div className="app-header__logo flex items-center gap-3">
<img src={logo} alt="logo" className="h-14" /> <img src={logo} alt="Logo du site" className="h-14" />
<span className="w-0 transition-all duration-500 sm:w-full flex-shrink overflow-hidden text-red font-bold text-4xl">Groupomania</span> <span className="w-0 transition-all duration-500 sm:w-full flex-shrink overflow-hidden text-red font-bold text-4xl">Groupomania</span>
</div> </div>
<div className="right"> <div className="right">

View File

@ -39,7 +39,7 @@ const Image = ({ src, alt, className, onError }: { src: string; alt?: string; cl
)} )}
<img <img
src={(error && onError === undefined) ? 'https://via.placeholder.com/150' : src} src={(error && onError === undefined) ? 'https://via.placeholder.com/150' : src}
alt={alt} alt={(error && onError === undefined) ? 'Image absente' : alt}
onError={handleError} onError={handleError}
className={className} className={className}
onClick={onClick} onClick={onClick}

View File

@ -24,9 +24,10 @@ const Like = ({ messageId, isLiked }: { messageId: string; isLiked: boolean }) =
<button <button
className="absolute -bottom-10 right-0 mb-2 rounded-full bg-grey-dark shadow-lg shadow-slate-900 cursor-pointer" className="absolute -bottom-10 right-0 mb-2 rounded-full bg-grey-dark shadow-lg shadow-slate-900 cursor-pointer"
onClick={like} onClick={like}
value="like" name="like"
> >
<FaThumbsUp className={'fill-red-light text-xl w-10 h-10 p-2.5' + (isLiked ? ' fill-red' : '')} /> <FaThumbsUp className={'fill-red-light text-xl w-10 h-10 p-2.5' + (isLiked ? ' fill-red' : '')} />
<span className="sr-only">Aimer</span>
</button> </button>
); );
}; };

View File

@ -61,6 +61,9 @@ const NewMessage = () => {
id="content" id="content"
name="content" name="content"
/> />
<label htmlFor="content" className="sr-only">
Message
</label>
<button <button
type="submit" type="submit"
className="rounded-md border border-red bg-red py-2 px-4 text-sm font-medium text-white hover:bg-white hover:text-red focus:outline-none focus:ring-2 focus:ring-red focus:ring-offset-2" className="rounded-md border border-red bg-red py-2 px-4 text-sm font-medium text-white hover:bg-white hover:text-red focus:outline-none focus:ring-2 focus:ring-red focus:ring-offset-2"

View File

@ -38,11 +38,12 @@ const ScrollToBottom = ({ children, className = '' }: { children: ReactNode; cla
<button <button
onClick={() => node?.scrollIntoView({ behavior: 'smooth' })} onClick={() => node?.scrollIntoView({ behavior: 'smooth' })}
className={'absolute right-3 ' + (show ? 'animate-show bottom-3 block' : 'animate-hide hidden bottom-0 -mb-10')} className={'absolute right-3 ' + (show ? 'animate-show bottom-3 block' : 'animate-hide hidden bottom-0 -mb-10')}
value="Scroll to bottom" name="bottom"
> >
<span className="popup-btn block cursor-pointer rounded-full shadow-lg shadow-slate-900 bg-grey-dark hover:bg-grey-light transition-all"> <span className="popup-btn block cursor-pointer rounded-full shadow-lg shadow-slate-900 bg-grey-dark hover:bg-grey-light transition-all">
<FaChevronDown className="fill-grey-light hover:fill-grey-dark transition-all text-xl w-10 h-10 p-2.5" /> <FaChevronDown className="fill-grey-light hover:fill-grey-dark transition-all text-xl w-10 h-10 p-2.5" />
</span> </span>
<span className='sr-only'>Descendre en bas de la page</span>
</button> </button>
</> </>
); );