Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

improved dark theme

Blue Mousefd2ddfff50f1
diff --git a/src/components/Header/index.jsx b/src/components/Header/index.jsx
index f29e669d7..338091a3f 100644
--- a/src/components/Header/index.jsx
+++ b/src/components/Header/index.jsx
@@ -76,7 +76,7 @@ const Header = ({ authenticated, theme }) => {
)}
<Dropdown
items={whitelist}
- buttonClassName='flex items-center w-full rounded-md border border-gray-300 shadow-sm px-3 md: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-offset-gray-100 focus:ring-indigo-500 dark:text-gray-50 dark:border-gray-800 dark:bg-gray-700'
+ buttonClassName='flex items-center w-full rounded-md border border-gray-300 shadow-sm px-3 md: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-offset-gray-100 focus:ring-indigo-500 dark:text-gray-50 dark:border-gray-800 dark:bg-gray-700 dark:hover:bg-gray-600'
selectItemClassName='text-gray-700 block px-4 py-2 text-base cursor-pointer hover:bg-gray-200 dark:text-gray-50 dark:border-gray-800 dark:bg-gray-700 dark:hover:bg-gray-600'
title={(
<>
@@ -99,7 +99,7 @@ const Header = ({ authenticated, theme }) => {
{t('common.you')}
</NavLink>
)}
- <Link to={routes.dashboard} className='inline-block select-none bg-white py-2 px-4 border border-transparent rounded-md text-base font-medium text-indigo-600 hover:bg-indigo-50'>
+ <Link to={routes.dashboard} className='inline-block select-none bg-white py-2 px-4 border border-transparent rounded-md text-base font-medium text-indigo-600 hover:bg-indigo-50 dark:text-gray-50 dark:border-gray-800 dark:bg-gray-700 dark:hover:bg-gray-600'>
{t('common.dashboard')}
</Link>
<Link to='#' className='text-base font-medium select-none text-white hover:text-indigo-50 py-2 px-3 dark:hover:bg-gray-700 hover:bg-indigo-500 rounded-md' onClick={logoutHandler}>
@@ -125,7 +125,7 @@ const Header = ({ authenticated, theme }) => {
) : (
<MoonIcon onClick={switchTheme} className='h-10 w-10 text-indigo-100 hover:text-indigo-200 cursor-pointer' />
)}
- <Popover.Button className='bg-white rounded-md p-2 ml-3 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 dark:bg-gray-700 dark:hover:bg-gray-600 dark:text-gray-200 rounded-md p-2 ml-3 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'>
<span className='sr-only'>
{t('common.openMenu')}
</span>
@@ -168,7 +168,7 @@ const Header = ({ authenticated, theme }) => {
leaveTo='opacity-0 scale-95'
>
<Popover.Panel focus className='absolute top-0 z-10 inset-x-0 p-2 transition transform origin-top-right md:hidden'>
- <div className='rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 bg-white dark:bg-gray-750 divide-y-2 divide-gray-50'>
+ <div className='rounded-lg shadow-lg ring-1 ring-black ring-opacity-5 bg-white dark:bg-gray-750 divide-y-2 divide-gray-50 dark:divide-gray-800'>
<div className='pt-5 pb-6 px-5'>
<div className='flex items-center justify-between'>
<Link to={routes.main}>
@@ -179,7 +179,7 @@ const Header = ({ authenticated, theme }) => {
<img className='h-10' src='/assets/logo_blue.svg' alt='' />
)}
</Link>
- <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 dark:bg-gray-700 dark:hover:bg-gray-600 dark:text-gray-200 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'>
<span className='sr-only'>
{t('common.closeMenu')}
</span>
@@ -191,8 +191,8 @@ const Header = ({ authenticated, theme }) => {
<div className='grid grid-cols-1 gap-y-4'>
<Dropdown
items={whitelist}
- buttonClassName='flex items-center w-full rounded-md border border-gray-300 shadow-sm px-3 md: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-offset-gray-100 focus:ring-indigo-500'
- selectItemClassName='text-gray-700 block px-4 py-2 text-base cursor-pointer hover:bg-gray-200'
+ buttonClassName='flex items-center w-full rounded-md border border-gray-300 shadow-sm px-3 md: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-offset-gray-100 focus:ring-indigo-500 dark:text-gray-50 dark:border-gray-800 dark:bg-gray-700 dark:hover:bg-gray-600'
+ selectItemClassName='text-gray-700 block px-4 py-2 text-base cursor-pointer hover:bg-gray-200 dark:text-gray-50 dark:border-gray-800 dark:bg-gray-700 dark:hover:bg-gray-600'
title={(
<>
<Flag className='rounded-sm mr-1.5' country={languageFlag[language]} size={21} alt='' />
@@ -220,7 +220,7 @@ const Header = ({ authenticated, theme }) => {
</Link>
</Popover.Button>
<Popover.Button>
- <Link to='#' className='w-full flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-base font-medium text-indigo-600 bg-gray-50 hover:bg-indigo-50' onClick={logoutHandler}>
+ <Link to='#' className='w-full flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-base font-medium text-indigo-600 bg-gray-50 hover:bg-indigo-50 dark:text-gray-50 dark:border-gray-800 dark:bg-gray-700 dark:hover:bg-gray-600' onClick={logoutHandler}>
{t('common.logout')}
</Link>
</Popover.Button>
diff --git a/src/pages/Project/View/ViewProject.jsx b/src/pages/Project/View/ViewProject.jsx
index 15c280a55..b94ce25be 100644
--- a/src/pages/Project/View/ViewProject.jsx
+++ b/src/pages/Project/View/ViewProject.jsx
@@ -370,7 +370,7 @@ const ViewProject = ({
/>
{!isProjectPublic && (
<div className='h-full ml-3'>
- <Button onClick={openSettingsHandler} className='py-2.5 px-3 md:px-4 text-sm dark:text-gray-50 dark:border-gray-800 dark:bg-gray-700' secondary>
+ <Button onClick={openSettingsHandler} className='py-2.5 px-3 md:px-4 text-sm dark:text-gray-50 dark:border-gray-800 dark:bg-gray-700 dark:hover:bg-gray-600' secondary>
{t('common.settings')}
</Button>
</div>
@@ -387,7 +387,7 @@ const ViewProject = ({
<div className={cx('flex flex-row items-center justify-center md:justify-end h-10 mt-16 md:mt-5 mb-4', { hidden: isPanelsDataEmpty })}>
<Checkbox label={t('project.showAll')} id='views' checked={showTotal} onChange={(e) => setShowTotal(e.target.checked)} />
<div className='h-full ml-3'>
- <Button onClick={exportAsImageHandler} className='py-2.5 px-3 md:px-4 text-sm dark:text-gray-50 dark:border-gray-800 dark:bg-gray-700' secondary>
+ <Button onClick={exportAsImageHandler} className='py-2.5 px-3 md:px-4 text-sm dark:text-gray-50 dark:border-gray-800 dark:bg-gray-700 dark:hover:bg-gray-600' secondary>
{t('project.exportImg')}
</Button>
</div>
diff --git a/src/ui/Dropdown.jsx b/src/ui/Dropdown.jsx
index 82d152c2d..63e7f1e0f 100644
--- a/src/ui/Dropdown.jsx
+++ b/src/ui/Dropdown.jsx
@@ -16,7 +16,7 @@ const Dropdown = ({
<p className='mb-2 text-sm text-gray-900'>{desc}</p>
)}
<div>
- <Menu.Button className={cx(buttonClassName ? buttonClassName : 'inline-flex w-full rounded-md border border-gray-300 shadow-sm px-3 md:px-4 py-2 bg-white text-sm font-medium text-gray-700 dark:text-gray-50 dark:border-gray-800 dark:bg-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-indigo-500', {
+ <Menu.Button className={cx(buttonClassName ? buttonClassName : 'inline-flex w-full rounded-md border border-gray-300 shadow-sm px-3 md:px-4 py-2 bg-white text-sm font-medium text-gray-700 dark:text-gray-50 dark:border-gray-800 dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-indigo-500', {
'justify-between': aside,
'justify-center': !aside,
})}>