Skip to content

Commit

Permalink
feat: change fg color to EPFL style
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalinDe committed Mar 4, 2024
1 parent fa18734 commit 9c01ec6
Show file tree
Hide file tree
Showing 44 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion web/frontend/src/components/buttons/DownloadButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const DownloadButton: FC<DownloadButtonProps> = ({ exportData, children }) => {
return (
<button
type="button"
className="flex my-2 mx-2 items-center px-4 py-2 border rounded-md text-sm font-medium hover:text-indigo-500"
className="flex my-2 mx-2 items-center px-4 py-2 border rounded-md text-sm font-medium hover:text-[#ff0000]"
onClick={exportData}>
<CloudDownloadIcon className="-ml-1 mr-2 h-5 w-5" aria-hidden="true" />
{children}
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/components/modal/ConfirmModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const ConfirmModal: FC<ConfirmModalProps> = ({
</button>
<button
type="button"
className="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
className="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[#ff0000] sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
onClick={closeModal}
ref={cancelButtonRef}>
{t('no')}
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/components/modal/RedirectToModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const RedirectToModal: FC<RedirectToModalProps> = ({
<div className="mt-4">
<button
type="button"
className="inline-flex justify-center px-4 py-2 text-sm font-medium text-white bg-[#ff0000] border border-transparent rounded-md hover:bg-[#ff0000] focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-indigo-500"
className="inline-flex justify-center px-4 py-2 text-sm font-medium text-white bg-[#ff0000] border border-transparent rounded-md hover:bg-[#ff0000] focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[#ff0000]"
onClick={closeModal}>
{buttonRightText}
</button>
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const Loading: FC = () => {
<div className="text-center pb-2">
<svg
role="status"
className="inline w-16 h-16 mr-2 text-gray-200 animate-spin dark:text-gray-400 fill-indigo-600"
className="inline w-16 h-16 mr-2 text-gray-200 animate-spin dark:text-gray-400 fill-[#ff0000]"
viewBox="0 0 100 101"
fill="none"
xmlns="http://www.w3.org/2000/svg">
Expand Down
6 changes: 3 additions & 3 deletions web/frontend/src/layout/ClientError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function ClientError({
<div className="bg-white min-h-full font-sans px-4 py-16 sm:px-6 sm:py-24 md:grid md:place-items-center lg:px-8">
<div className="max-w-max mx-auto">
<main className="sm:flex">
<p className="text-4xl font-extrabold text-indigo-600 sm:text-5xl">{statusCode}</p>
<p className="text-4xl font-extrabold text-[#ff0000] sm:text-5xl">{statusCode}</p>
<div className="sm:ml-6">
<div className="sm:border-l sm:border-gray-200 sm:pl-6">
<h1 className="text-4xl font-extrabold text-gray-900 tracking-tight sm:text-5xl">
Expand All @@ -35,15 +35,15 @@ export default function ClientError({
{statusCode === 401 && (
<button
id="login-button"
className="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-[#ff0000] hover:bg-[#b51f1f] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
className="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-[#ff0000] hover:bg-[#b51f1f] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[#ff0000]"
onClick={() => handleLogin(fctx)}>
{t('login')}
</button>
)}
{statusCode !== 401 && (
<Link
to={ROUTE_HOME}
className="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-[#ff0000] hover:bg-[#b51f1f] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
className="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-[#ff0000] hover:bg-[#b51f1f] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[#ff0000]">
{t('goHome')}
</Link>
)}
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/layout/Flash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Flash = () => {
<button
type="button"
className={`ml-auto -mx-1.5 -my-1.5 rounded-lg focus:ring-2 p-1.5 inline-flex h-8 w-8
${msg.getLevel() === FlashLevel.Info && 'focus:ring-indigo-400 hover:bg-[#ff0000]'}
${msg.getLevel() === FlashLevel.Info && 'focus:ring-[#ff0000] hover:bg-[#ff0000]'}
${
msg.getLevel() === FlashLevel.Warning &&
'focus:ring-orange-400 hover:bg-orange-600'
Expand Down
12 changes: 6 additions & 6 deletions web/frontend/src/layout/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const ACTION_LIST = 'list';
const MobileMenu = ({ authCtx, handleLogout, fctx, t }) => (
<Popover>
<div className="-mr-2 -my-2 md:hidden">
<Popover.Button className="bg-white rounded-md p-2 inline-flex items-center justify-center text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-500">
<Popover.Button className="bg-white rounded-md p-2 inline-flex items-center justify-center text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-[#ff0000]">
<span className="sr-only">Open menu</span>
<MenuIcon className="h-6 w-6" aria-hidden="true" />
</Popover.Button>
Expand All @@ -56,7 +56,7 @@ const MobileMenu = ({ authCtx, handleLogout, fctx, t }) => (
<div className="pt-5 pb-6 px-5">
<div className="flex items-center justify-between">
<div className="-mr-2">
<Popover.Button className="bg-white rounded-md p-2 inline-flex items-center justify-center text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-500">
<Popover.Button className="bg-white rounded-md p-2 inline-flex items-center justify-center text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-[#ff0000]">
<span className="sr-only">Close menu</span>
<XIcon className="h-6 w-6" aria-hidden="true" />
</Popover.Button>
Expand Down Expand Up @@ -159,7 +159,7 @@ const RightSideNavBar = ({ authCtx, handleLogout, handleChangeId, fctx, t }) =>
<div className="absolute hidden inset-y-0 right-0 flex items-center pr-2 md:static md:inset-auto md:flex md:ml-6 md:pr-0">
{authCtx.isLogged && authCtx.isAllowed(SUBJECT_ELECTION, ACTION_CREATE) && (
<NavLink title={t('navBarCreateForm')} to={ROUTE_FORM_CREATE}>
<div className="whitespace-nowrap inline-flex items-center justify-center px-4 py-2 border-2 border-indigo-500 rounded-md shadow-sm text-base font-medium text-indigo-500 bg-white hover:bg-[#ff0000] hover:text-white">
<div className="whitespace-nowrap inline-flex items-center justify-center px-4 py-2 border-2 border-[#ff0000] rounded-md shadow-sm text-base font-medium text-[#ff0000] bg-white hover:bg-[#ff0000] hover:text-white">
<PlusIcon className="-ml-1 mr-2 h-5 w-5" aria-hidden="true" />
{t('navBarCreateForm')}
</div>
Expand Down Expand Up @@ -196,15 +196,15 @@ const LeftSideNavBar = ({ authCtx, t }) => (
<NavLink
to={ROUTE_FORM_INDEX}
title={t('navBarStatus')}
className={'text-black text-lg hover:text-indigo-700'}>
className={'text-black text-lg hover:text-[#b51f1f]'}>
{t('navBarStatus')}
</NavLink>
{authCtx.isLogged && authCtx.isAllowed(SUBJECT_ROLES, ACTION_LIST) && (
<NavLink to={ROUTE_ADMIN} className={'text-black text-lg hover:text-indigo-700'}>
<NavLink to={ROUTE_ADMIN} className={'text-black text-lg hover:text-[#b51f1f]'}>
Admin
</NavLink>
)}
<NavLink to={ROUTE_ABOUT} className={'text-black text-lg hover:text-indigo-700'}>
<NavLink to={ROUTE_ABOUT} className={'text-black text-lg hover:text-[#b51f1f]'}>
{t('navBarAbout')}
</NavLink>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/layout/components/ChangeIdModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const ChangeIdModal: FC<ChangeIdModalProps> = ({ isShown, setIsShown }) => {
<div className="mt-4 sm:mt-6 sm:grid sm:grid-cols-2 sm:gap-3 sm:grid-flow-row-dense">
<button
type="button"
className="inline-flex justify-center px-4 py-2 text-sm font-medium text-white bg-[#ff0000] border border-transparent rounded-md hover:bg-gray-300 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-indigo-500"
className="inline-flex justify-center px-4 py-2 text-sm font-medium text-white bg-[#ff0000] border border-transparent rounded-md hover:bg-gray-300 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[#ff0000]"
onClick={() => setIsShown(false)}>
{t('cancel')}
</button>
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/layout/components/WarningModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const WarningModal: FC<WarningModalProps> = ({ message, isShown, setIsShown, act
<div className="mt-4 sm:mt-6 sm:grid sm:grid-cols-2 sm:gap-3 sm:grid-flow-row-dense">
<button
type="button"
className="inline-flex justify-center px-4 py-2 text-sm font-medium text-white bg-[#ff0000] border border-transparent rounded-md hover:bg-gray-300 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-indigo-500"
className="inline-flex justify-center px-4 py-2 text-sm font-medium text-white bg-[#ff0000] border border-transparent rounded-md hover:bg-gray-300 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-[#ff0000]"
onClick={() => setIsShown(false)}>
{t('cancel')}
</button>
Expand Down
4 changes: 2 additions & 2 deletions web/frontend/src/pages/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const About: FC = () => {
<div className="py-14 overflow-hidden">
<div className="max-w-7xl mx-auto px-4 space-y-8 sm:px-6 lg:px-8">
<div className="text-base max-w-prose mx-auto lg:max-w-none">
<h2 className="text-base text-indigo-600 font-semibold tracking-wide uppercase">
<h2 className="text-base text-[#ff0000] font-semibold tracking-wide uppercase">
{t('aboutPlatform')}
</h2>
<p className="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl">
Expand All @@ -30,7 +30,7 @@ const About: FC = () => {
<div className="rounded-md shadow ml-4">
<a
href="https://dedis.github.io/d-voting/#/"
className="w-full flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-indigo-600 bg-white hover:bg-gray-50">
className="w-full flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-[#ff0000] bg-white hover:bg-gray-50">
{t('learnMore')}
</a>
</div>
Expand Down
6 changes: 3 additions & 3 deletions web/frontend/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ const Home: FC = () => {
<div className="mt-20">
<div>
<a href="https://github.com/c4dt/d-voting" className="inline-flex space-x-4">
<span className="rounded bg-indigo-50 px-2.5 py-1 text-xs font-semibold text-indigo-600 tracking-wide uppercase">
<span className="rounded bg-indigo-50 px-2.5 py-1 text-xs font-semibold text-[#ff0000] tracking-wide uppercase">
{t('homeWhatsNew')}
</span>
<span className="inline-flex items-center text-sm font-medium text-indigo-600 space-x-1">
<span className="inline-flex items-center text-sm font-medium text-[#ff0000] space-x-1">
<span>{t('homeJustShippedVersion')} 1.0.0</span>
<ChevronRightIcon className="h-5 w-5" aria-hidden="true" />
</span>
Expand All @@ -33,7 +33,7 @@ const Home: FC = () => {
<div className="mt-12 sm:max-w-lg sm:w-full sm:flex">
<div className="mt-4 sm:mt-0 sm:ml-3">
<Link to={ROUTE_FORM_INDEX}>
<button className="block w-full rounded-md border border-transparent px-5 py-3 bg-[#ff0000] text-base font-medium text-white shadow hover:bg-[#b51f1f] focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 sm:px-10">
<button className="block w-full rounded-md border border-transparent px-5 py-3 bg-[#ff0000] text-base font-medium text-white shadow hover:bg-[#b51f1f] focus:outline-none focus:ring-2 focus:ring-[#ff0000] focus:ring-offset-2 sm:px-10">
Get Started
</button>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/pages/Loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Loading: FC = () => {
<div className="text-center pb-2">
<svg
role="status"
className="inline w-16 h-16 mr-2 text-gray-200 animate-spin dark:text-gray-400 fill-indigo-600"
className="inline w-16 h-16 mr-2 text-gray-200 animate-spin dark:text-gray-400 fill-[#ff0000]"
viewBox="0 0 100 101"
fill="none"
xmlns="http://www.w3.org/2000/svg">
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/pages/admin/AdminTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const AdminTable: FC<AdminTableProps> = ({ users, setUsers }) => {
<td className="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{user.role}</td>
<td className="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
<div
className="cursor-pointer text-indigo-600 hover:text-indigo-900"
className="cursor-pointer text-[#ff0000] hover:text-indigo-900"
onClick={() => handleDelete(user.sciper)}>
{t('delete')}
</div>
Expand Down
4 changes: 2 additions & 2 deletions web/frontend/src/pages/admin/ProxyRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const ProxyRow: FC<ProxyRowProps> = ({

<td className="px-2 py-4 text-right">
<div className="block sm:hidden">
<button onClick={handleEdit} className="font-medium text-indigo-600 hover:underline ">
<button onClick={handleEdit} className="font-medium text-[#ff0000] hover:underline ">
{t('edit')}
</button>
</div>
Expand All @@ -46,7 +46,7 @@ const ProxyRow: FC<ProxyRowProps> = ({
{t('delete')}
</button>
<div className="hidden sm:block">
<button onClick={handleEdit} className="font-medium text-indigo-600 hover:underline mr-4">
<button onClick={handleEdit} className="font-medium text-[#ff0000] hover:underline mr-4">
{t('edit')}
</button>
</div>
Expand Down
6 changes: 3 additions & 3 deletions web/frontend/src/pages/admin/components/AddAdminUserModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const AddAdminUserModal: FC<AddAdminUserModalProps> = ({ open, setOpen, handleAd
<div className="mt-2 pb-4">
<Listbox value={selectedRole} onChange={setSelectedRole}>
<div className="relative mt-1">
<Listbox.Button className="relative w-full cursor-default rounded-lg bg-white py-2 pl-3 pr-10 text-left border focus:outline-none focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-orange-300 sm:text-sm">
<Listbox.Button className="relative w-full cursor-default rounded-lg bg-white py-2 pl-3 pr-10 text-left border focus:outline-none focus-visible:border-[#ff0000] focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-orange-300 sm:text-sm">
<span className="block truncate">{selectedRole}</span>
<span className="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2">
<SelectorIcon className="h-5 w-5 text-gray-400" aria-hidden="true" />
Expand Down Expand Up @@ -118,7 +118,7 @@ const AddAdminUserModal: FC<AddAdminUserModalProps> = ({ open, setOpen, handleAd
{role}
</span>
{selected ? (
<span className="absolute inset-y-0 left-0 flex items-center pl-3 text-indigo-600">
<span className="absolute inset-y-0 left-0 flex items-center pl-3 text-[#ff0000]">
<CheckIcon className="h-5 w-5" aria-hidden="true" />
</span>
) : null}
Expand All @@ -137,7 +137,7 @@ const AddAdminUserModal: FC<AddAdminUserModalProps> = ({ open, setOpen, handleAd
const actionButton = (
<button
type="button"
className="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-[#ff0000] text-base font-medium text-white hover:bg-[#b51f1f] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:col-start-2 sm:text-sm"
className="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-[#ff0000] text-base font-medium text-white hover:bg-[#b51f1f] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[#ff0000] sm:col-start-2 sm:text-sm"
onClick={handleAddUser}>
{loading ? (
<SpinnerIcon />
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/pages/admin/components/AddProxyModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const AddProxyModal: FC<AddProxyModalProps> = ({ open, setOpen, handleAddProxy }
<>
<button
type="button"
className="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-[#ff0000] text-base font-medium text-white hover:bg-[#b51f1f] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:col-start-2 sm:text-sm"
className="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-[#ff0000] text-base font-medium text-white hover:bg-[#b51f1f] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[#ff0000] sm:col-start-2 sm:text-sm"
onClick={handleAdd}>
{loading ? <SpinnerIcon /> : <PlusIcon className="-ml-1 mr-2 h-5 w-5" aria-hidden="true" />}
{t('add')}
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/pages/admin/components/AdminModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const AdminModal: FC<AdminModalProps> = ({
{actionButton}
<button
type="button"
className="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:col-start-1 sm:text-sm"
className="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[#ff0000] sm:mt-0 sm:col-start-1 sm:text-sm"
onClick={handleCancel}
ref={cancelButtonRef}>
{t('cancel')}
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/pages/admin/components/EditProxyModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const EditProxyModal: FC<EditProxyModalProps> = ({
const actionButton = (
<button
type="button"
className="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-[#ff0000] text-base font-medium text-white hover:bg-[#b51f1f] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:col-start-2 sm:text-sm"
className="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-[#ff0000] text-base font-medium text-white hover:bg-[#b51f1f] focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[#ff0000] sm:col-start-2 sm:text-sm"
onClick={() => handleSave()}>
{loading ? (
<SpinnerIcon />
Expand Down
Loading

0 comments on commit 9c01ec6

Please sign in to comment.