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!

added support for dark theme

Blue Mouse93d2130ebb6c
diff --git a/package.json b/package.json
index 7d8699515..8ee4e5f38 100644
--- a/package.json
+++ b/package.json
@@ -21,18 +21,18 @@
"dom-to-image": "^2.6.0",
"file-saver": "^2.0.5",
"i18n-iso-countries": "^6.8.0",
- "i18next": "^21.6.0",
+ "i18next": "^21.6.4",
"i18next-browser-languagedetector": "^6.1.2",
"lodash": "^4.17.21",
"nanoid": "^3.1.30",
"prismjs": "^1.25.0",
- "prop-types": "^15.7.2",
+ "prop-types": "^15.8.0",
"react": "^17.0.2",
"react-alert": "^7.0.3",
"react-dom": "^17.0.2",
"react-flagkit": "^2.0.4",
"react-helmet": "^6.1.0",
- "react-i18next": "^11.15.0",
+ "react-i18next": "^11.15.2",
"react-redux": "^7.2.6",
"react-router-dom": "^5.3.0",
"react-router-hash-link": "^2.4.3",
diff --git a/src/App.js b/src/App.js
index 549d45008..59b25c5ff 100644
--- a/src/App.js
+++ b/src/App.js
@@ -63,6 +63,7 @@ const App = () => {
const location = useLocation()
const alert = useAlert()
const { loading, authenticated } = useSelector(state => state.auth)
+ const { theme } = useSelector(state => state.ui.theme)
const { error } = useSelector(state => state.errors)
const { message, type } = useSelector(state => state.alerts)
const accessToken = getAccessToken()
@@ -108,7 +109,7 @@ const App = () => {
return (
(!accessToken || !loading) && (
<>
- <Header authenticated={authenticated} />
+ <Header authenticated={authenticated} theme={theme} />
<ScrollToTop>
<Selfhosted>
<Suspense fallback={<Fallback isMinimalFooter={isMinimalFooter} />}>
diff --git a/src/components/Footer/index.jsx b/src/components/Footer/index.jsx
index 38faa9d3c..c01306f66 100644
--- a/src/components/Footer/index.jsx
+++ b/src/components/Footer/index.jsx
@@ -48,7 +48,7 @@ const Footer = ({ minimal, authenticated }) => {
if (minimal) {
return (
- <footer className='bg-gray-800'>
+ <footer className='bg-gray-800 dark:bg-gray-900'>
<div className='max-w-7xl mx-auto py-8 px-4 overflow-hidden sm:px-6 lg:px-8'>
<nav className='-mx-5 -my-2 flex flex-wrap justify-center' aria-label='Footer'>
<div className='px-5 py-2'>
@@ -85,7 +85,7 @@ const Footer = ({ minimal, authenticated }) => {
}
return (
- <footer className='bg-gray-800' aria-labelledby='footer-heading'>
+ <footer className='bg-gray-800 dark:bg-gray-900' aria-labelledby='footer-heading'>
<h2 id='footer-heading' className='sr-only'>
Footer
</h2>
diff --git a/src/components/Header/index.jsx b/src/components/Header/index.jsx
index 940225079..1f2fdaff4 100644
--- a/src/components/Header/index.jsx
+++ b/src/components/Header/index.jsx
@@ -7,15 +7,17 @@ import Flag from 'react-flagkit'
import i18next from 'i18next'
import { Popover, Transition } from '@headlessui/react'
import { MenuIcon, XIcon } from '@heroicons/react/outline'
+import { MoonIcon, SunIcon } from '@heroicons/react/solid'
import routes from 'routes'
import { authActions } from 'redux/actions/auth'
+import UIActions from 'redux/actions/ui'
import {
whitelist, languages, languageFlag, isSelfhosted,
} from 'redux/constants'
import Dropdown from 'ui/Dropdown'
-const Header = ({ authenticated }) => {
+const Header = ({ authenticated, theme }) => {
const { t, i18n: { language } } = useTranslation('common')
const dispatch = useDispatch()
@@ -23,46 +25,55 @@ const Header = ({ authenticated }) => {
dispatch(authActions.logout())
}
+ const switchTheme = () => {
+ dispatch(UIActions.setTheme(theme === 'dark' ? 'light' : 'dark'))
+ }
+
const onLanguageChange = (id) => {
i18next.changeLanguage(id)
}
return (
- <Popover className="relative bg-white">
- <header className='bg-indigo-600'>
+ <Popover className='relative bg-white'>
+ <header className='bg-indigo-600 dark:bg-gray-750'>
<nav className='mx-auto px-4 sm:px-6 lg:px-8' aria-label='Top'>
- <div className='w-full py-4 flex items-center justify-between border-b border-indigo-500 lg:border-none'>
+ <div className='w-full py-4 flex items-center justify-between border-b border-indigo-500 dark:border-gray-300 lg:border-none'>
<div className='flex items-center'>
<Link to={routes.main}>
<span className='sr-only'>Swetrix</span>
<img className='h-10' src='/assets/logo_white.svg' alt='' />
</Link>
<div className='hidden ml-10 space-x-1 lg:block'>
- <NavLink to={routes.features} className='text-base select-none font-medium text-white hover:text-indigo-50 py-2 px-3 hover:bg-indigo-500 rounded-md' activeClassName='bg-indigo-700 hover:bg-indigo-700' key='Features'>
+ <NavLink to={routes.features} className='text-base select-none font-medium text-white hover:text-indigo-50 py-2 px-3 dark:hover:bg-gray-700 hover:bg-indigo-500 rounded-md' activeClassName='bg-indigo-700 hover:bg-indigo-700 dark:bg-gray-700' key='Features'>
{t('common.features')}
</NavLink>
{!isSelfhosted && (
authenticated ? (
- <NavLink to={routes.billing} className='text-base select-none font-medium text-white hover:text-indigo-50 py-2 px-3 hover:bg-indigo-500 rounded-md' activeClassName='bg-indigo-700 hover:bg-indigo-700' key='Billing'>
+ <NavLink to={routes.billing} className='text-base select-none font-medium text-white hover:text-indigo-50 py-2 px-3 dark:hover:bg-gray-700 hover:bg-indigo-500 rounded-md' activeClassName='bg-indigo-700 hover:bg-indigo-700 dark:bg-gray-700' key='Billing'>
{t('common.billing')}
</NavLink>
) : (
<>
- <HashLink to={`${routes.main}#pricing`} className='text-base select-none font-medium text-white hover:text-indigo-50 py-2 px-3 hover:bg-indigo-500 rounded-md' key='Pricing'>
+ <HashLink to={`${routes.main}#pricing`} className='text-base select-none font-medium text-white hover:text-indigo-50 py-2 px-3 dark:hover:bg-gray-700 hover:bg-indigo-500 rounded-md' key='Pricing'>
{t('common.pricing')}
</HashLink>
- <HashLink to={`${routes.main}#faqs`} className='text-base select-none font-medium text-white hover:text-indigo-50 py-2 px-3 hover:bg-indigo-500 rounded-md' key='FAQs'>
+ <HashLink to={`${routes.main}#faqs`} className='text-base select-none font-medium text-white hover:text-indigo-50 py-2 px-3 dark:hover:bg-gray-700 hover:bg-indigo-500 rounded-md' key='FAQs'>
{t('common.faqs')}
</HashLink>
</>
)
)}
- <NavLink to={routes.docs} className='text-base select-none font-medium text-white hover:text-indigo-50 py-2 px-3 hover:bg-indigo-500 rounded-md' activeClassName='bg-indigo-700 hover:bg-indigo-700' key='Docs'>
+ <NavLink to={routes.docs} className='text-base select-none font-medium text-white hover:text-indigo-50 py-2 px-3 dark:hover:bg-gray-700 hover:bg-indigo-500 rounded-md' activeClassName='bg-indigo-700 hover:bg-indigo-700 dark:bg-gray-700' key='Docs'>
{t('common.docs')}
</NavLink>
</div>
</div>
<div className='hidden md:flex justify-center flex-wrap ml-1 md:ml-10 space-y-1 sm:space-y-0 space-x-2 md:space-x-4'>
+ {theme === 'dark' ? (
+ <SunIcon onClick={switchTheme} className='h-10 w-10 text-yellow-400 cursor-pointer' />
+ ) : (
+ <MoonIcon onClick={switchTheme} className='h-10 w-10 text-indigo-100 hover:text-indigo-200 cursor-pointer' />
+ )}
<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'
@@ -84,14 +95,14 @@ const Header = ({ authenticated }) => {
{authenticated ? (
<>
{!isSelfhosted && (
- <NavLink to={routes.user_settings} className='text-base select-none font-medium text-white hover:text-indigo-50 py-2 px-3 hover:bg-indigo-500 rounded-md' activeClassName='bg-indigo-700 hover:bg-indigo-700'>
+ <NavLink to={routes.user_settings} className='text-base select-none font-medium text-white hover:text-indigo-50 py-2 px-3 dark:hover:bg-gray-700 hover:bg-indigo-500 rounded-md' activeClassName='bg-indigo-700 hover:bg-indigo-700 dark:bg-gray-700'>
{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'>
{t('common.dashboard')}
</Link>
- <Link to='#' className='text-base font-medium select-none text-white hover:text-indigo-50 py-2 px-3 hover:bg-indigo-500 rounded-md' onClick={logoutHandler}>
+ <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}>
{t('common.logout')}
</Link>
</>
@@ -108,34 +119,34 @@ const Header = ({ authenticated }) => {
</>
)}
</div>
- <div className="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">
- <span className="sr-only">
+ <div className='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'>
+ <span className='sr-only'>
{t('common.openMenu')}
</span>
- <MenuIcon className="h-6 w-6" aria-hidden="true" />
+ <MenuIcon className='h-6 w-6' aria-hidden='true' />
</Popover.Button>
</div>
</div>
<div className='py-4 flex flex-wrap justify-center space-x-2 lg:hidden'>
- <NavLink to={routes.features} className='text-base select-none font-medium text-white hover:text-indigo-50 py-1 px-3 hover:bg-indigo-500 rounded-md' activeClassName='bg-indigo-700 hover:bg-indigo-700' key='Features'>
+ <NavLink to={routes.features} className='text-base select-none font-medium text-white hover:text-indigo-50 py-1 px-3 dark:hover:bg-gray-700 hover:bg-indigo-500 rounded-md' activeClassName='bg-indigo-700 hover:bg-indigo-700 dark:bg-gray-700' key='Features'>
{t('common.features')}
</NavLink>
{authenticated ? (
- <NavLink to={routes.billing} className='text-base select-none font-medium text-white hover:text-indigo-50 py-1 px-3 hover:bg-indigo-500 rounded-md' activeClassName='bg-indigo-700 hover:bg-indigo-700' key='Billing'>
+ <NavLink to={routes.billing} className='text-base select-none font-medium text-white hover:text-indigo-50 py-1 px-3 dark:hover:bg-gray-700 hover:bg-indigo-500 rounded-md' activeClassName='bg-indigo-700 hover:bg-indigo-700 dark:bg-gray-700' key='Billing'>
{t('common.billing')}
</NavLink>
) : (
<>
- <HashLink to={`${routes.main}#pricing`} className='text-base select-none font-medium text-white hover:text-indigo-50 py-1 px-3 hover:bg-indigo-500 rounded-md' key='Pricing'>
+ <HashLink to={`${routes.main}#pricing`} className='text-base select-none font-medium text-white hover:text-indigo-50 py-1 px-3 dark:hover:bg-gray-700 hover:bg-indigo-500 rounded-md' key='Pricing'>
{t('common.pricing')}
</HashLink>
- <HashLink to={`${routes.main}#faqs`} className='text-base select-none font-medium text-white hover:text-indigo-50 py-1 px-3 hover:bg-indigo-500 rounded-md' key='FAQs'>
+ <HashLink to={`${routes.main}#faqs`} className='text-base select-none font-medium text-white hover:text-indigo-50 py-1 px-3 dark:hover:bg-gray-700 hover:bg-indigo-500 rounded-md' key='FAQs'>
{t('common.faqs')}
</HashLink>
</>
)}
- <NavLink to={routes.docs} className='text-base select-none font-medium text-white hover:text-indigo-50 py-1 px-3 hover:bg-indigo-500 rounded-md' activeClassName='bg-indigo-700 hover:bg-indigo-700' key='Docs'>
+ <NavLink to={routes.docs} className='text-base select-none font-medium text-white hover:text-indigo-50 py-1 px-3 dark:hover:bg-gray-700 hover:bg-indigo-500 rounded-md' activeClassName='bg-indigo-700 hover:bg-indigo-700 dark:bg-gray-700' key='Docs'>
{t('common.docs')}
</NavLink>
</div>
@@ -144,31 +155,35 @@ const Header = ({ authenticated }) => {
<Transition
as={Fragment}
- enter="duration-200 ease-out"
- enterFrom="opacity-0 scale-95"
- enterTo="opacity-100 scale-100"
- leave="duration-100 ease-in"
- leaveFrom="opacity-100 scale-100"
- leaveTo="opacity-0 scale-95"
+ enter='duration-200 ease-out'
+ enterFrom='opacity-0 scale-95'
+ enterTo='opacity-100 scale-100'
+ leave='duration-100 ease-in'
+ leaveFrom='opacity-100 scale-100'
+ 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 divide-y-2 divide-gray-50">
- <div className="pt-5 pb-6 px-5">
- <div className="flex items-center justify-between">
+ <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='pt-5 pb-6 px-5'>
+ <div className='flex items-center justify-between'>
<Link to={routes.main}>
<span className='sr-only'>Swetrix</span>
- <img className='h-10' src='/assets/logo_blue.svg' alt='' />
+ {theme === 'dark' ? (
+ <img className='h-10' src='/assets/logo_white.svg' alt='' />
+ ) : (
+ <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">
- <span className="sr-only">
+ <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'>
+ <span className='sr-only'>
{t('common.closeMenu')}
</span>
- <XIcon className="h-6 w-6" aria-hidden="true" />
+ <XIcon className='h-6 w-6' aria-hidden='true' />
</Popover.Button>
</div>
</div>
- <div className="py-6 px-5 space-y-6">
- <div className="grid grid-cols-1 gap-y-4">
+ <div className='py-6 px-5 space-y-6'>
+ <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'
diff --git a/src/index.js b/src/index.js
index 6b09f49f3..6737abed4 100644
--- a/src/index.js
+++ b/src/index.js
@@ -24,7 +24,7 @@ console.log('%cWelcome, hacker, glad you opened your console, you seem serious a
if (!isSelfhosted) {
Swetrix.init(SWETRIX_PID)
Swetrix.trackViews({
- ignore: [/^\/projects/i, /^\/verify/i],
+ ignore: [/^\/projects/i, /^\/verify/i, /^\/password-reset/i],
heartbeatOnBackground: true,
})
}
diff --git a/src/pages/Auth/CreateNewPassword/CreateNewPassword.jsx b/src/pages/Auth/CreateNewPassword/CreateNewPassword.jsx
index 20336c83a..8a8f8d44d 100644
--- a/src/pages/Auth/CreateNewPassword/CreateNewPassword.jsx
+++ b/src/pages/Auth/CreateNewPassword/CreateNewPassword.jsx
@@ -85,9 +85,9 @@ const CreateNewPassword = ({
return (
<Title title={t('titles.recovery')}>
- <div className='min-h-page bg-gray-50 flex flex-col py-6 px-4 sm:px-6 lg:px-8'>
+ <div className='min-h-page bg-gray-50 dark:bg-gray-800 flex flex-col py-6 px-4 sm:px-6 lg:px-8'>
<form className='max-w-7xl w-full mx-auto' onSubmit={handleSubmit}>
- <h2 className='mt-2 text-3xl font-extrabold text-gray-900'>
+ <h2 className='mt-2 text-3xl font-extrabold text-gray-900 dark:text-gray-50'>
{t('auth.recovery.title')}
</h2>
<Input
@@ -114,7 +114,7 @@ const CreateNewPassword = ({
error={beenSubmitted && errors.repeat}
/>
<div className='flex justify-between mt-3'>
- <Link to={routes.signin} className='underline text-blue-600 hover:text-indigo-800'>
+ <Link to={routes.signin} className='underline text-blue-600 hover:text-indigo-800 dark:text-blue-400 dark:hover:text-blue-500'>
{t('auth.common.signinInstead')}
</Link>
<Button type='submit' loading={isLoading} primary large>
diff --git a/src/pages/Auth/ForgotPassword/ForgotPassword.jsx b/src/pages/Auth/ForgotPassword/ForgotPassword.jsx
index 2b03b9218..cf850948d 100644
--- a/src/pages/Auth/ForgotPassword/ForgotPassword.jsx
+++ b/src/pages/Auth/ForgotPassword/ForgotPassword.jsx
@@ -79,9 +79,9 @@ const ForgotPassword = ({
return (
<Title title={t('titles.recovery')}>
- <div className='min-h-page bg-gray-50 flex flex-col py-6 px-4 sm:px-6 lg:px-8'>
+ <div className='min-h-page bg-gray-50 dark:bg-gray-800 flex flex-col py-6 px-4 sm:px-6 lg:px-8'>
<form className='max-w-7xl w-full mx-auto' onSubmit={handleSubmit}>
- <h2 className='mt-2 text-3xl font-extrabold text-gray-900'>
+ <h2 className='mt-2 text-3xl font-extrabold text-gray-900 dark:text-gray-50'>
{t('titles.recovery')}
</h2>
<Input
@@ -96,7 +96,7 @@ const ForgotPassword = ({
error={beenSubmitted && errors.email}
/>
<div className='flex justify-between mt-3'>
- <Link to={routes.signin} className='mt-1 underline text-blue-600 hover:text-indigo-800'>
+ <Link to={routes.signin} className='mt-1 underline text-blue-600 hover:text-indigo-800 dark:text-blue-400 dark:hover:text-blue-500'>
{t('auth.common.signin')}
</Link>
<Button type='submit' loading={isLoading} primary large>
diff --git a/src/pages/Auth/Signin/Signin.jsx b/src/pages/Auth/Signin/Signin.jsx
index 73198ab10..ad1bd7131 100644
--- a/src/pages/Auth/Signin/Signin.jsx
+++ b/src/pages/Auth/Signin/Signin.jsx
@@ -78,9 +78,9 @@ const Signin = ({ login }) => {
return (
<Title title={t('titles.signin')}>
- <div className='min-h-page bg-gray-50 flex flex-col py-6 px-4 sm:px-6 lg:px-8'>
+ <div className='min-h-page bg-gray-50 dark:bg-gray-800 flex flex-col py-6 px-4 sm:px-6 lg:px-8'>
<form className='max-w-7xl w-full mx-auto' onSubmit={handleSubmit}>
- <h2 className='mt-2 text-3xl font-extrabold text-gray-900'>
+ <h2 className='mt-2 text-3xl font-extrabold text-gray-900 dark:text-gray-50'>
{t('auth.signin.title')}
</h2>
<Input
@@ -118,11 +118,11 @@ const Signin = ({ login }) => {
<div className='pt-1'>
{!isSelfhosted && (
<>
- <Link to={routes.reset_password} className='underline text-blue-600 hover:text-indigo-800'>
+ <Link to={routes.reset_password} className='underline text-blue-600 hover:text-indigo-800 dark:text-blue-400 dark:hover:text-blue-500'>
{t('auth.signin.forgot')}
</Link>
<span>&nbsp;|&nbsp;</span>
- <Link to={routes.signup} className='underline text-blue-600 hover:text-indigo-800'>
+ <Link to={routes.signup} className='underline text-blue-600 hover:text-indigo-800 dark:text-blue-400 dark:hover:text-blue-500'>
{t('auth.common.signupInstead')}
</Link>
</>
diff --git a/src/pages/Auth/Signup/Signup.jsx b/src/pages/Auth/Signup/Signup.jsx
index d831765f8..b71b75a61 100644
--- a/src/pages/Auth/Signup/Signup.jsx
+++ b/src/pages/Auth/Signup/Signup.jsx
@@ -87,9 +87,9 @@ const Signup = ({ signup }) => {
return (
<Title title={t('titles.signup')}>
- <div className='min-h-page bg-gray-50 flex flex-col py-6 px-4 sm:px-6 lg:px-8'>
+ <div className='min-h-page bg-gray-50 dark:bg-gray-800 flex flex-col py-6 px-4 sm:px-6 lg:px-8'>
<form className='max-w-7xl w-full mx-auto' onSubmit={handleSubmit}>
- <h2 className='mt-2 text-3xl font-extrabold text-gray-900'>
+ <h2 className='mt-2 text-3xl font-extrabold text-gray-900 dark:text-gray-50'>
{t('titles.signup')}
</h2>
<Input
@@ -138,8 +138,8 @@ const Signup = ({ signup }) => {
t={t}
i18nKey='auth.signup.tos'
components={{
- tos: <Link to={routes.terms} className='font-medium text-gray-900 hover:underline' />,
- pp: <Link to={routes.privacy} className='font-medium text-gray-900 hover:underline' />,
+ tos: <Link to={routes.terms} className='font-medium text-gray-900 dark:text-gray-300 hover:underline' />,
+ pp: <Link to={routes.privacy} className='font-medium text-gray-900 dark:text-gray-300 hover:underline' />,
}}
/>
</span>
@@ -155,7 +155,7 @@ const Signup = ({ signup }) => {
label={t('auth.common.noRemember')}
/>
<div className='pt-1 flex justify-between mt-3'>
- <Link to={routes.signin} className='underline text-blue-600 hover:text-indigo-800'>
+ <Link to={routes.signin} className='underline text-blue-600 hover:text-indigo-800 dark:text-blue-400 dark:hover:text-blue-500'>
{t('auth.common.signinInstead')}
</Link>
<Button type='submit' loading={isLoading} primary large>
diff --git a/src/pages/Auth/VerifyEmail/index.jsx b/src/pages/Auth/VerifyEmail/index.jsx
index a295022b0..82eb966c5 100644
--- a/src/pages/Auth/VerifyEmail/index.jsx
+++ b/src/pages/Auth/VerifyEmail/index.jsx
@@ -40,7 +40,7 @@ const VerifyEmail = () => {
if (error) {
return (
<Title title={t('titles.verification')}>
- <div className='min-h-page'>
+ <div className='min-h-page bg-gray-50 dark:bg-gray-800'>
<div className='flex justify-center pt-10'>
<div className='rounded-md p-4 w-11/12 bg-red-50 lg:w-4/6'>
<div className='flex'>
@@ -48,7 +48,7 @@ const VerifyEmail = () => {
<XCircleIcon className='h-5 w-5 text-red-400' aria-hidden='true' />
</div>
<div className='ml-3'>
- <h3 className='text-sm font-medium text-red-800'>{error}</h3>
+ <h3 className='text-sm font-medium text-red-800 dark:text-red-500'>{error}</h3>
</div>
</div>
</div>
@@ -60,7 +60,7 @@ const VerifyEmail = () => {
return (
<Title title='Email verification'>
- <div className='min-h-page'>
+ <div className='min-h-page bg-gray-50 dark:bg-gray-800'>
<div className='flex justify-center pt-10'>
<div className='rounded-md p-4 w-11/12 bg-green-50 lg:w-4/6'>
<div className='flex'>
@@ -68,7 +68,7 @@ const VerifyEmail = () => {
<CheckCircleIcon className='h-5 w-5 text-green-400' aria-hidden='true' />
</div>
<div className='ml-3'>
- <h3 className='text-sm font-medium text-green-800'>
+ <h3 className='text-sm font-medium text-green-800 dark:text-green-500'>
{t('auth.verification.success')}
</h3>
</div>
diff --git a/src/pages/Billing/index.jsx b/src/pages/Billing/index.jsx
index 4905fae18..3f1a1959b 100644
--- a/src/pages/Billing/index.jsx
+++ b/src/pages/Billing/index.jsx
@@ -12,16 +12,16 @@ const Features = () => {
return (
<Title title={t('titles.billing')}>
- <div className='bg-gray-50'>
+ <div className='bg-gray-50 dark:bg-gray-800'>
<div className='w-11/12 md:w-4/5 mx-auto pb-16 pt-12 px-4 sm:px-6 lg:px-8 whitespace-pre-line'>
- <h1 className='text-4xl mb-4 font-extrabold text-gray-900 tracking-tight'>
+ <h1 className='text-4xl mb-4 font-extrabold text-gray-900 dark:text-gray-50 tracking-tight'>
{t('billing.title')}
</h1>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
{t('billing.desc')}
</p>
<Pricing t={t} />
- <p className='text-lg text-gray-900 tracking-tight mt-10'>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight mt-10'>
<Trans
t={t}
i18nKey='billing.contact'
diff --git a/src/pages/Contact/index.jsx b/src/pages/Contact/index.jsx
index 9aec8ada3..562d330be 100644
--- a/src/pages/Contact/index.jsx
+++ b/src/pages/Contact/index.jsx
@@ -9,18 +9,18 @@ const Contact = () => {
return (
<Title title={t('titles.contact')}>
- <div className='bg-gray-50 min-h-min-footer'>
+ <div className='bg-gray-50 dark:bg-gray-800 min-h-min-footer'>
<div className='w-11/12 md:w-4/5 mx-auto pb-16 pt-12 px-4 sm:px-6 lg:px-8 whitespace-pre-line'>
- <h1 className='text-4xl font-extrabold text-gray-900 tracking-tight'>
+ <h1 className='text-4xl font-extrabold text-gray-900 dark:text-gray-50 tracking-tight'>
{t('titles.contact')}
</h1>
- <p className='mt-2 text-lg text-gray-900 tracking-tight'>
+ <p className='mt-2 text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
<Trans
t={t}
i18nKey='contact.desc'
values={{ email: '[email protected]'}}
components={{
- mail: <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500' />,
+ mail: <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-500' />,
}}
/>
</p>
diff --git a/src/pages/Dashboard/Dashboard.jsx b/src/pages/Dashboard/Dashboard.jsx
index bdc7e6724..63879e0f2 100644
--- a/src/pages/Dashboard/Dashboard.jsx
+++ b/src/pages/Dashboard/Dashboard.jsx
@@ -30,10 +30,10 @@ const ProjectCart = ({
return (
<li>
- <Link to={url} className='block hover:bg-gray-50'>
+ <Link to={url} className='block hover:bg-gray-50 dark:bg-gray-700 dark:hover:bg-gray-800 dark:border-gray-700'>
<div className='px-4 py-4 sm:px-6'>
<div className='flex items-center justify-between'>
- <p className='text-lg font-medium text-indigo-600 truncate'>
+ <p className='text-lg font-medium text-indigo-600 dark:text-gray-50 truncate'>
{name}
</p>
<div className='ml-2 flex-shrink-0 flex'>
@@ -49,8 +49,8 @@ const ProjectCart = ({
</div>
<div className='mt-2 sm:flex sm:justify-between'>
<div className='sm:flex flex-col'>
- <div className='flex items-center mt-2 text-sm text-gray-500'>
- <EyeIcon className='flex-shrink-0 mr-1.5 h-5 w-5 text-gray-400' />
+ <div className='flex items-center mt-2 text-sm text-gray-500 dark:text-gray-300'>
+ <EyeIcon className='flex-shrink-0 mr-1.5 h-5 w-5 text-gray-400 dark:text-gray-300' />
{t('dashboard.pageviews')}
:
&nbsp;
@@ -81,15 +81,15 @@ const ProjectCart = ({
</p>
</dd>
</div>
- <div className='mt-2 flex items-center text-sm text-gray-500 sm:mt-0'>
+ <div className='mt-2 flex items-center text-sm text-gray-500 dark:text-gray-300 sm:mt-0'>
<PulsatingCircle className='flex-shrink-0 mr-3 ml-1' />
{t('dashboard.liveVisitors')}
:&nbsp;
{live}
</div>
</div>
- <div className='mt-2 flex items-center text-sm text-gray-500'>
- <CalendarIcon className='flex-shrink-0 mr-1.5 h-5 w-5 text-gray-400' />
+ <div className='mt-2 flex items-center text-sm text-gray-500 dark:text-gray-300'>
+ <CalendarIcon className='flex-shrink-0 mr-1.5 h-5 w-5 text-gray-400 dark:text-gray-300' />
<p>
{t('dashboard.createdAt')}
&nbsp;
@@ -153,10 +153,10 @@ const Dashboard = ({ projects, isLoading, error, user }) => {
if (!isLoading) {
return (
<Title title={t('titles.dashboard')}>
- <div className='min-h-min-footer bg-gray-50 flex flex-col py-6 px-4 sm:px-6 lg:px-8'>
+ <div className='min-h-min-footer bg-gray-50 dark:bg-gray-800 flex flex-col py-6 px-4 sm:px-6 lg:px-8'>
<div className='max-w-7xl w-full mx-auto'>
<div className='flex justify-between'>
- <h2 className='mt-2 text-3xl font-extrabold text-gray-900'>
+ <h2 className='mt-2 text-3xl font-extrabold text-gray-900 dark:text-gray-50'>
{t('titles.dashboard')}
</h2>
<span onClick={onNewProject} className='inline-flex cursor-pointer items-center border border-transparent leading-4 font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 px-4 py-2 text-sm'>
diff --git a/src/pages/Docs/Docs.jsx b/src/pages/Docs/Docs.jsx
index 1a249c363..8847f3bc8 100644
--- a/src/pages/Docs/Docs.jsx
+++ b/src/pages/Docs/Docs.jsx
@@ -50,7 +50,7 @@ const Contents = ({ t }) => {
return (
<div className='lg:flex flex-1 items-start justify-center lg:order-2'>
- <h2 className='block lg:hidden text-3xl font-bold text-gray-900 tracking-tight'>
+ <h2 className='block lg:hidden text-3xl font-bold text-gray-900 dark:text-gray-50 tracking-tight'>
{t('docs.contents')}
:
</h2>
@@ -58,12 +58,12 @@ const Contents = ({ t }) => {
{_map(tContents, ({ name, id, content }) => (
<Fragment key={id}>
<li className='mt-3'>
- <a className='hover:underline text-2xl text-blue-600 font-bold' href={`#${id}`}>{name}</a>
+ <a className='hover:underline text-2xl text-blue-600 dark:text-gray-50 font-bold' href={`#${id}`}>{name}</a>
</li>
<ol>
{_map(content, ({ name: cname, id: cid }) => (
<li key={cid}>
- <a className='hover:underline text-lg text-blue-500 px-4' href={`#${cid}`}>{cname}</a>
+ <a className='hover:underline text-lg text-blue-500 dark:text-gray-200 px-4' href={`#${cid}`}>{cname}</a>
</li>
))}
</ol>
@@ -79,12 +79,12 @@ const CHeader = ({ id, name, addHr = true }) => (
{addHr && (
<hr className='mt-10' />
)}
- <h2 id={id} className='text-3xl font-bold text-gray-900 tracking-tight mt-2 -mb-5'>{name}</h2>
+ <h2 id={id} className='text-3xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-2 -mb-5'>{name}</h2>
</>
)
const CSection = ({ id, name }) => (
- <h3 id={id} className='text-2xl font-normal text-gray-900 tracking-tight mt-8'>{name}</h3>
+ <h3 id={id} className='text-2xl font-normal text-gray-900 dark:text-gray-50 tracking-tight mt-8'>{name}</h3>
)
const Docs = () => {
@@ -96,11 +96,11 @@ const Docs = () => {
return (
<Title title={t('titles.docs')}>
- <div className='bg-gray-50'>
+ <div className='bg-gray-50 dark:bg-gray-800'>
<div className='w-11/12 mx-auto pb-16 pt-12 px-4 sm:px-6 lg:w-11/12 lg:px-8 lg:flex'>
<Contents t={t} />
<div className='flex-1 lg:order-1 whitespace-pre-line'>
- <h1 className='text-4xl font-extrabold text-gray-900 tracking-tight'>
+ <h1 className='text-4xl font-extrabold text-gray-900 dark:text-gray-50 tracking-tight'>
{t('titles.docs')}
</h1>
@@ -109,24 +109,24 @@ const Docs = () => {
<Code text={umdBuildExample} language='html' />
<CSection id='docs-npm' name={t('docs.titles.npm')} />
- <p className='text-lg text-gray-900 tracking-tight'>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
{t('docs.install')}
:
</p>
<Code text={npmInstall} language='bash' />
- <p className='text-lg text-gray-900 tracking-tight'>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
{t('docs.import')}
:
</p>
<Code text={npmImport} language='javascript' />
- <p className='text-lg text-gray-900 tracking-tight'>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
{t('docs.track')}
</p>
<Code text={esExample} language='javascript' />
<CHeader id='docs-ht' name={t('docs.titles.how')} />
<CSection id='docs-pv' name={t('docs.titles.pv')} />
- <p className='text-lg text-gray-900 tracking-tight'>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
<Trans
t={t}
i18nKey='docs.pv'
@@ -138,7 +138,7 @@ const Docs = () => {
<Code text={trackPageView} language='javascript' />
<CSection id='docs-ce' name={t('docs.titles.ce')} />
- <p className='text-lg text-gray-900 tracking-tight'>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
{t('docs.ce')}
</p>
<Code text={trackExample} language='javascript' />
@@ -146,19 +146,19 @@ const Docs = () => {
<CHeader id='docs-api' name={t('docs.titles.api')} />
<CSection id='docs-init' name='init' />
- <p className='text-lg text-gray-900 tracking-tight'>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
{t('docs.init')}
</p>
<Code text={init} language='javascript' />
<CSection id='docs-tr' name='track' />
- <p className='text-lg text-gray-900 tracking-tight'>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
{t('docs.tr')}
</p>
<Code text={track} language='javascript' />
<CSection id='docs-tv' name='trackViews' />
- <p className='text-lg text-gray-900 tracking-tight'>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
{t('docs.tv.call')}
<div className='mb-5'>
<ul className='ml-10'>
@@ -183,11 +183,11 @@ const Docs = () => {
<Code text={trackPVAPI} language='javascript' />
<hr className='mt-10 mb-4' />
- <p className='text-lg text-gray-900 tracking-tight'>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
<i>Last updated: December 11, 2021. (v1.3.0)</i><br />
<div>
- - Added ability to specify the &nbsp;
- <a className='hover:underline text-gray-700' href='#docs-init'>custom API URL</a>
+ - Added ability to specify the&nbsp;
+ <a className='hover:underline text-gray-700 dark:text-gray-300' href='#docs-init'>custom API URL</a>
&nbsp;parameter.
</div>
</p>
diff --git a/src/pages/Features/index.jsx b/src/pages/Features/index.jsx
index 29c8e7d06..061038fad 100644
--- a/src/pages/Features/index.jsx
+++ b/src/pages/Features/index.jsx
@@ -13,41 +13,41 @@ const Features = () => {
return (
<Title title={t('titles.features')}>
- <div className='bg-gray-50'>
+ <div className='bg-gray-50 dark:bg-gray-800'>
<div className='w-11/12 md:w-4/5 mx-auto pb-16 pt-12 px-4 sm:px-6 lg:px-8 whitespace-pre-line'>
- <h1 className='text-4xl font-extrabold text-gray-900 tracking-tight'>
+ <h1 className='text-4xl font-extrabold text-gray-900 dark:text-gray-50 tracking-tight'>
{t('titles.features')}
</h1>
- <h3 className='text-2xl font-normal text-gray-900 tracking-tight mt-4'>
+ <h3 className='text-2xl font-normal text-gray-900 dark:text-gray-50 tracking-tight mt-4'>
{t('features.feature1Name')}
</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
<Trans
t={t}
i18nKey='features.feature1Content'
components={{
- docs: <HashLink className='text-indigo-600 hover:text-indigo-500' to={`${routes.docs}#docs-tv`} />,
- gh: <a className='text-indigo-600 hover:text-indigo-500' href='https://github.com/Swetrix' target='_blank' rel='noopener noreferrer' />,
+ docs: <HashLink className='text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-500' to={`${routes.docs}#docs-tv`} />,
+ gh: <a className='text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-500' href='https://github.com/Swetrix' target='_blank' rel='noopener noreferrer' />,
}}
/>
</p>
{_map(t('features.list', { returnObjects: true }), (feature) => (
<Fragment key={feature.name}>
- <h3 className='text-2xl font-normal text-gray-900 tracking-tight mt-4'>
+ <h3 className='text-2xl font-normal text-gray-900 dark:text-gray-50 tracking-tight mt-4'>
{feature.name}
</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
{feature.content}
</p>
</Fragment>
))}
</div>
</div>
- <div className='bg-indigo-600'>
+ <div className='bg-indigo-600 dark:bg-gray-750'>
<div className='w-4/5 mx-auto pb-16 pt-12 px-4 sm:px-6 lg:px-8 lg:flex lg:items-center lg:justify-between'>
- <h2 className='text-3xl sm:text-4xl font-extrabold tracking-tight text-gray-900'>
+ <h2 className='text-3xl sm:text-4xl font-extrabold tracking-tight text-gray-900 dark:text-gray-50'>
<span className='block text-white'>
{t('features.ready')}
</span>
diff --git a/src/pages/MainPage/Pricing.jsx b/src/pages/MainPage/Pricing.jsx
index 34f8486a9..373938e4c 100644
--- a/src/pages/MainPage/Pricing.jsx
+++ b/src/pages/MainPage/Pricing.jsx
@@ -103,15 +103,15 @@ const Pricing = ({ t }) => {
const userPlancodeID = _findIndex(tiers, (el) => el.planCode === user.planCode)
return (
- <div id='pricing' className={cx({ 'bg-white': !authenticated })}>
+ <div id='pricing' className={cx({ 'bg-white dark:bg-gray-750': !authenticated })}>
<div className={cx('w-11/12 max-w-7xl mx-auto whitespace-pre-line', { 'px-4 sm:px-6 lg:px-8 py-24': !authenticated })}>
<div className='sm:flex sm:flex-col sm:align-center'>
{!authenticated && (
<>
- <h1 className='text-3xl font-extrabold text-gray-900 sm:text-center'>
+ <h1 className='text-3xl font-extrabold text-gray-900 dark:text-gray-50 sm:text-center'>
{t('pricing.title')}
</h1>
- <p className='mt-5 text-xl text-gray-500 sm:text-center'>
+ <p className='mt-5 text-xl text-gray-500 dark:text-gray-200 sm:text-center'>
{t('pricing.adv')}
</p>
</>
@@ -150,19 +150,19 @@ const Pricing = ({ t }) => {
</div>
)}
<div className='p-6'>
- <h2 className='text-lg leading-6 font-medium text-gray-900'>{tier.name}</h2>
+ <h2 className='text-lg leading-6 font-medium text-gray-900 dark:text-gray-50'>{tier.name}</h2>
<p className='mt-4'>
{_isNil(tier.priceMonthly) ? (
- <span className='text-4xl font-extrabold text-gray-900'>
+ <span className='text-4xl font-extrabold text-gray-900 dark:text-gray-50'>
{t('pricing.free')}
</span>
) : (
<>
- <span className='text-4xl font-extrabold text-gray-900'>
+ <span className='text-4xl font-extrabold text-gray-900 dark:text-gray-50'>
${tier.priceMonthly}
</span>
&nbsp;
- <span className='text-base font-medium text-gray-500'>
+ <span className='text-base font-medium text-gray-500 dark:text-gray-400'>
/
{t('pricing.perMonth')}
</span>
@@ -214,14 +214,14 @@ const Pricing = ({ t }) => {
)}
</div>
<div className='pt-6 pb-8 px-6'>
- <h3 className='text-xs font-medium text-gray-900 tracking-wide uppercase'>
+ <h3 className='text-xs font-medium text-gray-900 dark:text-gray-50 tracking-wide uppercase'>
{t('pricing.whatIncl')}
</h3>
<ul className='mt-6 space-y-4'>
{_map(tier.includedFeatures, (feature) => (
<li key={feature} className='flex space-x-3'>
<CheckIcon className='flex-shrink-0 h-5 w-5 text-green-500' aria-hidden='true' />
- <span className='text-sm text-gray-500'>{feature}</span>
+ <span className='text-sm text-gray-500 dark:text-gray-200'>{feature}</span>
</li>
))}
</ul>
diff --git a/src/pages/MainPage/index.jsx b/src/pages/MainPage/index.jsx
index 5d03004ab..3e30932ad 100644
--- a/src/pages/MainPage/index.jsx
+++ b/src/pages/MainPage/index.jsx
@@ -39,19 +39,19 @@ const SquareDots = ({ className }) => (
)
const FAQs = ({ t }) => (
- <div id='faqs' className='bg-gray-50'>
+ <div id='faqs' className='bg-gray-50 dark:bg-gray-800'>
<div className='w-11/12 mx-auto py-16 px-4 sm:px-6 lg:py-20 lg:px-8'>
<div className='lg:grid lg:grid-cols-3 lg:gap-8'>
<div>
- <h2 className='text-3xl font-extrabold text-gray-900'>
+ <h2 className='text-3xl font-extrabold text-gray-900 dark:text-gray-50'>
{t('main.faq.title')}
</h2>
- <p className='mt-4 text-lg text-gray-500'>
+ <p className='mt-4 text-lg text-gray-500 dark:text-gray-200'>
<Trans
t={t}
i18nKey='main.custSupport'
components={{
- mail: <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500' />,
+ mail: <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400' />,
}}
/>
</p>
@@ -60,8 +60,8 @@ const FAQs = ({ t }) => (
<dl className='space-y-12'>
{_map(t('main.faq.list', { returnObjects: true }), (faq) => (
<div key={faq.question}>
- <dt className='text-lg leading-6 font-medium text-gray-900'>{faq.question}</dt>
- <dd className='mt-2 text-base text-gray-500 whitespace-pre-line'>{faq.answer}</dd>
+ <dt className='text-lg leading-6 font-medium text-gray-900 dark:text-gray-50'>{faq.question}</dt>
+ <dd className='mt-2 text-base text-gray-500 dark:text-gray-300 whitespace-pre-line'>{faq.answer}</dd>
</div>
))}
</dl>
@@ -72,17 +72,17 @@ const FAQs = ({ t }) => (
)
const Features = ({ t }) => (
- <div className='bg-white'>
+ <div className='bg-white dark:bg-gray-800'>
<div className='w-11/12 mx-auto py-16 px-4 sm:py-24 sm:px-6 lg:px-8'>
- <h2 className='text-3xl font-extrabold text-gray-900 text-center'>
+ <h2 className='text-3xl font-extrabold text-gray-900 dark:text-gray-50 text-center'>
{t('main.whyUs')}
</h2>
<div className='mt-12'>
<dl className='space-y-10 md:space-y-0 md:grid md:grid-cols-2 md:grid-rows-2 md:gap-x-8 md:gap-y-12 lg:grid-cols-3'>
{_map(t('main.features', { returnObjects: true }), (feature) => (
<div key={feature.name}>
- <dt className='text-lg leading-6 font-semibold text-gray-900'>{feature.name}</dt>
- <dd className='mt-2 text-base text-gray-500'>{feature.description}</dd>
+ <dt className='text-lg leading-6 font-semibold text-gray-900 dark:text-gray-50'>{feature.name}</dt>
+ <dd className='mt-2 text-base text-gray-500 dark:text-gray-300'>{feature.description}</dd>
</div>
))}
</dl>
@@ -122,23 +122,23 @@ const Main = () => {
</div>
</div>
<div className='mt-16 sm:mt-24 lg:mt-0 lg:col-span-6'>
- <div className='bg-white sm:max-w-md sm:w-full sm:mx-auto sm:rounded-lg sm:overflow-hidden'>
+ <div className='bg-white dark:bg-gray-700 sm:max-w-md sm:w-full sm:mx-auto sm:rounded-lg sm:overflow-hidden'>
<div className='px-4 py-8 sm:px-10'>
- <p className='text-lg text-gray-900 text-center'>
+ <p className='text-lg text-gray-900 dark:text-white text-center'>
{t('main.signup')}
</p>
<div className='mt-6'>
<SignUp />
</div>
</div>
- <div className='px-4 py-6 bg-gray-50 border-t-2 border-gray-200 sm:px-10'>
- <p className='text-xs leading-5 text-gray-500'>
+ <div className='px-4 py-6 bg-gray-50 dark:bg-gray-700 border-t-2 border-gray-200 sm:px-10'>
+ <p className='text-xs leading-5 text-gray-500 dark:text-gray-100'>
<Trans
t={t}
i18nKey='main.signupTerms'
components={{
- tos: <Link to={routes.terms} className='font-medium text-gray-900 hover:underline' />,
- pp: <Link to={routes.privacy} className='font-medium text-gray-900 hover:underline' />,
+ tos: <Link to={routes.terms} className='font-medium text-gray-900 dark:text-gray-300 hover:underline' />,
+ pp: <Link to={routes.privacy} className='font-medium text-gray-900 dark:text-gray-300 hover:underline' />,
}}
/>
</p>
@@ -153,7 +153,7 @@ const Main = () => {
<div className='relative'>
<div className='absolute inset-0 flex flex-col' aria-hidden='true'>
<div className='flex-1' />
- <div className='flex-1 w-full bg-white' />
+ <div className='flex-1 w-full bg-white dark:bg-gray-800' />
</div>
<div className='w-11/12 mx-auto'>
<img className='relative rounded-md md:rounded-lg shadow-lg' src='/assets/screenshot.png' alt='' />
@@ -161,26 +161,26 @@ const Main = () => {
</div>
<Features t={t} />
- <div className='bg-indigo-600'>
+ <div className='bg-indigo-600 dark:bg-indigo-800'>
<div className='w-11/12 mx-auto pb-16 pt-12 px-4 sm:px-6 lg:px-8 lg:flex lg:items-center lg:justify-between'>
- <h2 className='text-3xl sm:text-4xl font-extrabold tracking-tight text-gray-900'>
+ <h2 className='text-3xl sm:text-4xl font-extrabold tracking-tight'>
<span className='block text-white'>
{t('main.description')}
</span>
- <span className='block text-gray-300'>
+ <span className='block text-gray-300 dark:text-gray-200'>
{t('main.lookAtDocs')}
</span>
</h2>
<div className='mt-6 space-y-4 sm:space-y-0 sm:flex sm:space-x-5'>
<Link
to={LIVE_DEMO_URL}
- className='flex items-center justify-center px-3 py-2 border border-transparent text-lg font-medium rounded-md shadow-sm text-indigo-800 bg-indigo-50 hover:bg-indigo-100'
+ className='flex items-center justify-center px-3 py-2 border border-transparent text-lg font-medium rounded-md shadow-sm text-indigo-800 bg-indigo-50 hover:bg-indigo-100 dark:bg-indigo-100 dark:hover:bg-indigo-200'
>
{t('common.liveDemo')}
</Link>
<Link
to={routes.docs}
- className='flex items-center justify-center px-3 py-2 border border-transparent text-lg font-medium rounded-md shadow-sm text-indigo-800 bg-indigo-50 hover:bg-indigo-100'
+ className='flex items-center justify-center px-3 py-2 border border-transparent text-lg font-medium rounded-md shadow-sm text-indigo-800 bg-indigo-50 hover:bg-indigo-100 dark:bg-indigo-100 dark:hover:bg-indigo-200'
>
{t('common.docs')}
</Link>
@@ -190,13 +190,13 @@ const Main = () => {
<Pricing t={t} />
<FAQs t={t} />
- <div className='bg-white'>
+ <div className='bg-white dark:bg-gray-750'>
<div className='w-11/12 mx-auto pb-16 pt-12 px-4 sm:px-6 lg:w-11/12 lg:px-8 lg:flex lg:items-center lg:justify-between'>
- <h2 className='text-3xl sm:text-4xl font-extrabold tracking-tight text-gray-900'>
+ <h2 className='text-3xl sm:text-4xl font-extrabold tracking-tight text-gray-900 dark:text-gray-50'>
<span className='block'>
{t('main.readyToStart')}
</span>
- <span className='block bg-gradient-to-r from-purple-600 to-indigo-600 bg-clip-text text-transparent'>
+ <span className='block bg-gradient-to-r from-purple-600 to-indigo-600 dark:from-indigo-300 dark:to-indigo-500 bg-clip-text text-transparent'>
{t('main.exploreService')}
</span>
</h2>
diff --git a/src/pages/Privacy/index.jsx b/src/pages/Privacy/index.jsx
index a8884f239..18e1f7af8 100644
--- a/src/pages/Privacy/index.jsx
+++ b/src/pages/Privacy/index.jsx
@@ -7,16 +7,16 @@ import routes from 'routes'
const Features = () => {
return (
<Title title='Privacy Policy'>
- <div className='bg-gray-50'>
+ <div className='bg-gray-50 dark:bg-gray-800'>
<div className='w-11/12 md:w-4/5 mx-auto pb-16 pt-12 px-4 sm:px-6 lg:px-8'>
- <h1 className='text-4xl font-extrabold text-gray-900 tracking-tight'>Privacy Policy</h1>
- <p className='mt-4 text-lg text-gray-900 tracking-tight'>
+ <h1 className='text-4xl font-extrabold text-gray-900 dark:text-gray-50 tracking-tight'>Privacy Policy</h1>
+ <p className='mt-4 text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
This Swetrix Privacy Policy (“Policy”, "Privacy Policy") outlines the personal information that we gather, how we use that personal information, and the options you have to access, correct, or delete such personal information.<br />
By visiting swetrix.com and using the Services provided here, you agree to the terms outlined in this Privacy Policy. Unless otherwise defined in this document, the terms used in this Privacy Policy have the same meanings as in our Terms and Conditions.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>1. Policy application</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>1. Policy application</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
This Privacy Policy applies to the following data subjects:<br />
- <b>Customers:</b> Those who register for an account on Swetrix and to whom Swetrix provides its Services. For purposes of this Policy, “Services” refers to all of the solutions offered, marketed, or sold by us.<br />
@@ -28,8 +28,8 @@ const Features = () => {
Swetrix’s Websites and Services are not intended for, nor designed to attract, individuals under the age of eighteen. Swetrix does not knowingly collect personal information from any person under the age of eighteen. You represent that you are at least 18 or that you are the parent or guardian of such a minor and consent to such minor dependent’s use of the Websites and Services.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>2. Information we collect</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>2. Information we collect</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
We may collect the following types of data in order to provide and improve our Services:<br />
- <b>Personal Data:</b> While using our Services, we may ask you to provide us with certain personally identifiable information that can be used to contact or identify you. Personally identifiable information may include, but is not limited to your name, email address and billing addresses necessary to process payment and delivery of Services.<br />
- <b>Payment Information:</b> We do not require our Customers to have payment information on file with us unless they have a paid subscription to our Services.<br />
@@ -41,11 +41,11 @@ const Features = () => {
You can instruct your browser to refuse all cookies or to indicate when a cookie is being sent.<br />
At this time, our Websites do not respond to Do Not Track beacons sent by browser plugins.<br />
- <b>Log Data:</b> We process End Users information on behalf of our Customers. This information is processed when End Users access or use our Customers domains, websites, APIs, applications, devices, endpoints, and networks that use our Services.<br />
- The information processed may include but is not limited to IP addresses, device or system information, and other information about the traffic on our Customers websites, devices, applications, and/or networks (collectively, “Log Data”). You can find more information on the data collected and how we process it <HashLink className='text-indigo-600 hover:text-indigo-500' to={`${routes.docs}#docs-tv`}>here</HashLink>.
+ The information processed may include but is not limited to IP addresses, device or system information, and other information about the traffic on our Customers websites, devices, applications, and/or networks (collectively, “Log Data”). You can find more information on the data collected and how we process it <HashLink className='text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-500' to={`${routes.docs}#docs-tv`}>here</HashLink>.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>3. How we use information we collect</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>3. How we use information we collect</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
We only processes personal information in a way that is relevant for the purpose for which it was collected or authorized:<br />
- To enable you to access and use the Websites and Services.<br />
- To operate and improve the Websites and Services.<br />
@@ -59,39 +59,39 @@ const Features = () => {
We use and process the Log Data from End Users to fulfill our obligations under our Customer agreements and as may be required by law. We act as a data processor and service provider pursuant to data processing instructions by our Customers.<br />
We may use the Usage and Log Data to assemble non-personally identifiable web traffic reports and statistics. These reports and statistics may be shared with third parties.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>4. UK and EU residents</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>4. UK and EU residents</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
Please note that the “personal information” referenced in this Privacy Policy means “personal data” as that term is defined under the European Union (“EU”) General Data Protection Regulations (“GDPR”) and its United Kingdom (“UK”) GDPR counterpart. Swetrix is the data controller for the Personal Data of Customers and Website Visitors, but not for the Personal Data of End Users. We process the Personal Data of End Users on behalf of our Customers.<br />
If you are an individual from the European Economic Area (the “EEA”), the UK or Switzerland, please note that our legal basis for collecting and using your personal information will depend on the personal information collected and the specific context in which we collect it.<br />
However, we will normally collect personal data from you only (i) where the processing is in our legitimate interests and not overridden by your rights; (ii) where we need the personal data to perform a contract with you or (iii) where we have your consent to do so. In some cases, we may also have a legal obligation to collect personal data from you.<br />
Please note that in most cases, if you do not provide the requested information, we will not be able to provide the requested service to you. In some cases, we may also have a legal obligation to collect personal information from you, or may need the personal information to protect your vital interests or those of another person.<br />
Where we rely on your consent to process your personal data, you have the right to withdraw or decline consent at any time. Where we rely on our legitimate interests to process your personal data, you have the right to object.<br />
If you have any questions about or need further information concerning the legal basis on which we collect and use your personal information, please contact us at&nbsp;
- <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500'>
+ <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-500'>
</a>
.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>5. California Residents</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>5. California Residents</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
We do not sell, rent, or share personal information with third parties as defined under the California Consumer Privacy Act of 2018 (California Civil Code Sec. 1798.100 et seq.), nor do we sell, rent, or share personal information with third parties for their direct marketing purposes as defined under California Civil Code Sec. 1798.83.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>6. Retention of data</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>6. Retention of data</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
We may retain your information for as long as your account is active or as needed to provide you services, comply with our legal obligations, resolve disputes and enforce our agreements. In certain circumstances we may be required by law to retain your personal information, or may need to retain your personal information in order to continue providing a service.<br />
Even if you delete your account, keep in mind that the deletion by our third party providers may not be immediate and that the deleted information may persist in backup copies for a reasonable period of time.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>7. Transfer of data</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>7. Transfer of data</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
Your information, including Personal Data, may be transferred to — and maintained on — computers located outside of your state, province, country or other governmental jurisdiction where the data protection laws may differ from those in your jurisdiction. If you are located outside Germany and choose to provide information to us, please note that we transfer the data, including Personal Data, to Germany and process it there.<br />
Your consent to this Privacy Policy followed by your submission of such information represents your agreement to that transfer. We will take all steps reasonably necessary to ensure that your data is treated securely and in accordance with this Privacy Policy and no transfer of your Personal Data will take place to an organization or a country unless there are adequate controls in place including the security of your data and other personal information.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>8. Information sharing</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>8. Information sharing</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
We do not rent or sell personal information.<br />
We may disclose personal information to third parties who help us run the Services and our business (“Service Providers”). These Service Providers may only process personal information pursuant to our instructions and in compliance both with this Privacy Policy and other applicable security measures and regulations.<br />
The following third parties may be considered our "sub-processors" under GDPR. We only share what's required for their purpose.<br />
@@ -107,8 +107,8 @@ const Features = () => {
- Other purposes for which we obtain your consent.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>9. Data subject rights</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>9. Data subject rights</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
We would like to make sure you are fully aware of all of your data protection rights. In certain circumstances, you have the following data protection rights:<br />
- <b>The right to access:</b> You have the right to request our Company for copies of your personal data.<br />
- <b>The right to rectification:</b> You have the right to request that our Company corrects any information you believe is inaccurate. You also have the right to request our Company to complete the information you believe is incomplete.<br />
@@ -117,52 +117,52 @@ const Features = () => {
- <b>The right to object to processing:</b> You have the right to object to our Company's processing of your personal data, under certain conditions.<br />
- <b>The right to data portability:</b> You have the right to request that our Company transfers the data that we have collected to another organization, or directly to you, under certain conditions.<br />
If you make a request, we have one month to respond to you. If you would like to exercise any of these rights, please contact us via email at&nbsp;
- <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500'>
+ <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-500'>
</a>
. Please note that we may ask you to verify your identity before responding to such requests.<br />
We have no direct relationship with the End Users. Our Customers are solely responsible for ensuring compliance with all applicable laws and regulations with respect to their website users.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>10. Communication preferences</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>10. Communication preferences</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
Swetrix will send you commercial communications based on the communication preferences in your account settings. Swetrix also will send you service-related communications. You may manage your receipt of commercial communications by clicking on the “unsubscribe” link located on the bottom of such emails, through your account settings if you have a Swetrix account, or you may send a request to&nbsp;
- <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500'>
+ <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-500'>
</a>
.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>11. Data security</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>11. Data security</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
We take all reasonable steps to protect information we receive from you from loss, misuse or unauthorized access, disclosure, alteration and/or destruction. We have put in place appropriate physical, technical and administrative measures to safeguard and secure your information, and we make use of privacy-enhancing technologies such as encryption. If you have any questions about the security of your personal information, you can contact us at&nbsp;
- <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500'>
+ <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-500'>
</a>
.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>12. Notification of changes</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>12. Notification of changes</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
If we make changes to this Policy that we believe materially impact the privacy of your personal information, we will promptly provide notice of any such changes (and, where necessary, obtain consent), as well as post the updated Policy on this website noting the date of any changes via the "Last updated" date at the bottom of this Privacy Policy. We encourage you to periodically review this page for the latest information on our privacy practices.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>13. Business transactions</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>13. Business transactions</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
We may assign or transfer this Policy, as well as information covered by this Policy, in the event of a merger, sale, change in control, or reorganization of all or part of our business.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>14. Contact</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>14. Contact</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
If you have any questions about this Privacy Policy, you can contact us by email at&nbsp;
- <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500'>
+ <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-500'>
</a>
.
</p>
<hr className='mt-10 mb-4' />
- <p className='text-lg text-gray-900 tracking-tight'>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
<i>Last updated: August 16, 2021.</i>
</p>
</div>
diff --git a/src/pages/Project/Settings/ProjectSettings.jsx b/src/pages/Project/Settings/ProjectSettings.jsx
index bac77ff29..cf97d04bf 100644
--- a/src/pages/Project/Settings/ProjectSettings.jsx
+++ b/src/pages/Project/Settings/ProjectSettings.jsx
@@ -167,9 +167,9 @@ const ProjectSettings = ({
return (
<Title title={title}>
- <div className='min-h-min-footer bg-gray-50 flex flex-col py-6 px-4 sm:px-6 lg:px-8'>
+ <div className='min-h-min-footer bg-gray-50 dark:bg-gray-800 flex flex-col py-6 px-4 sm:px-6 lg:px-8'>
<form className='max-w-7xl w-full mx-auto' onSubmit={handleSubmit}>
- <h2 className='mt-2 text-3xl font-extrabold text-gray-900'>
+ <h2 className='mt-2 text-3xl font-extrabold text-gray-900 dark:text-gray-50'>
{title}
</h2>
<Input
diff --git a/src/pages/Project/View/Panels.jsx b/src/pages/Project/View/Panels.jsx
index 4c2068fbf..dbc5a20d4 100644
--- a/src/pages/Project/View/Panels.jsx
+++ b/src/pages/Project/View/Panels.jsx
@@ -22,8 +22,8 @@ const ENTRIES_PER_PANEL = 5
const PanelContainer = ({
name, children,
}) => (
- <div className='relative bg-white pt-5 px-4 pb-12 min-h-72 sm:pt-6 sm:px-6 shadow rounded-lg overflow-hidden'>
- <h3 className='text-lg leading-6 font-semibold mb-2 text-gray-900'>{name}</h3>
+ <div className='relative bg-white dark:bg-gray-750 pt-5 px-4 pb-12 min-h-72 sm:pt-6 sm:px-6 shadow rounded-lg overflow-hidden'>
+ <h3 className='text-lg leading-6 font-semibold mb-2 text-gray-900 dark:text-gray-50'>{name}</h3>
<div className='flex flex-col h-full scroll-auto'>
{children}
</div>
@@ -46,54 +46,54 @@ const Overview = ({
return (
<PanelContainer name={t('project.overview')}>
<div className='flex text-lg justify-between'>
- <div className='flex items-center'>
+ <div className='flex items-center dark:text-gray-50'>
<PulsatingCircle className='mr-1.5' type='big' />
{t('dashboard.liveVisitors')}
:
</div>
- <p className='h-5 mr-2 text-gray-900 text-xl'>
+ <p className='h-5 mr-2 text-gray-900 dark:text-gray-50 text-xl'>
{live}
</p>
</div>
{!_isEmpty(chartData) && (
<>
- <p className='text-lg font-semibold'>
+ <p className='text-lg font-semibold dark:text-gray-50'>
{t('project.statsFor')}
<span className='lowercase'> {activePeriod.label}</span>
</p>
<div className='flex justify-between'>
- <p className='text-lg'>
+ <p className='text-lg dark:text-gray-50'>
{t('dashboard.pageviews')}
:
</p>
- <p className='h-5 mr-2 text-gray-900 text-xl'>
+ <p className='h-5 mr-2 text-gray-900 dark:text-gray-50 text-xl'>
{pageviews}
</p>
</div>
<div className='flex justify-between'>
- <p className='text-lg'>
+ <p className='text-lg dark:text-gray-50'>
{t('dashboard.unique')}
:
</p>
- <p className='h-5 mr-2 text-gray-900 text-xl'>
+ <p className='h-5 mr-2 text-gray-900 dark:text-gray-50 text-xl'>
{uniques}
</p>
</div>
<hr className='my-2' />
</>
)}
- <p className='text-lg font-semibold'>
+ <p className='text-lg font-semibold dark:text-gray-50'>
{t('project.weeklyStats')}
</p>
<div className='flex justify-between'>
- <p className='text-lg'>
+ <p className='text-lg dark:text-gray-50'>
{t('dashboard.pageviews')}
:
</p>
<dd className='flex items-baseline'>
- <p className='h-5 mr-2 text-gray-900 text-lg'>
+ <p className='h-5 mr-2 text-gray-900 dark:text-gray-50 text-lg'>
{overall.thisWeek}
</p>
<p className={cx('flex text-sm -ml-1 items-baseline', {
@@ -120,12 +120,12 @@ const Overview = ({
</dd>
</div>
<div className='flex justify-between'>
- <p className='text-lg'>
+ <p className='text-lg dark:text-gray-50'>
{t('dashboard.unique')}
:
</p>
<dd className='flex items-baseline'>
- <p className='h-5 mr-2 text-gray-900 text-lg'>
+ <p className='h-5 mr-2 text-gray-900 dark:text-gray-50 text-lg'>
{overall.thisWeekUnique}
</p>
<p className={cx('flex text-sm -ml-1 items-baseline', {
@@ -166,9 +166,9 @@ const CustomEvents = ({
<table className='table-fixed'>
<thead>
<tr>
- <th className='w-4/6 text-left text-gray-900'>{t('project.event')}</th>
- <th className='w-1/6 text-right text-gray-900'>{t('project.quantity')}&nbsp;&nbsp;</th>
- <th className='w-1/6 text-right text-gray-900'>{t('project.conversion')}</th>
+ <th className='w-4/6 text-left text-gray-900 dark:text-gray-50'>{t('project.event')}</th>
+ <th className='w-1/6 text-right text-gray-900 dark:text-gray-50'>{t('project.quantity')}&nbsp;&nbsp;</th>
+ <th className='w-1/6 text-right text-gray-900 dark:text-gray-50'>{t('project.conversion')}</th>
</tr>
</thead>
<tbody>
@@ -216,7 +216,7 @@ const Panel = ({
return (
<PanelContainer name={name}>
{_isEmpty(data) ? (
- <p className='mt-1 text-base text-gray-700'>
+ <p className='mt-1 text-base text-gray-700 dark:text-gray-300'>
{t('project.noParamData')}
</p>
) : _map(keysToDisplay, key => {
@@ -225,9 +225,9 @@ const Panel = ({
return (
<Fragment key={key}>
- <div className='flex justify-between mt-1'>
+ <div className='flex justify-between mt-1 dark:text-gray-50'>
{linkContent ? (
- <a className={cx('flex label hover:underline text-blue-600', { capitalize })} href={rowData} target='_blank' rel='noopener noreferrer'>
+ <a className={cx('flex label hover:underline text-blue-600 dark:text-blue-500', { capitalize })} href={rowData} target='_blank' rel='noopener noreferrer'>
{rowData}
</a>
) : (
@@ -235,10 +235,10 @@ const Panel = ({
{rowData}
</span>
)}
- <span className='ml-3'>
+ <span className='ml-3 dark:text-gray-50'>
{data[key]}
&nbsp;
- <span className='text-gray-500 font-light'>({perc}%)</span>
+ <span className='text-gray-500 dark:text-gray-200 font-light'>({perc}%)</span>
</span>
</div>
<Progress now={perc} />
@@ -249,7 +249,7 @@ const Panel = ({
<div className='absolute bottom-0 w-card-toggle'>
<div className='flex justify-between select-none mb-2'>
<span
- className={cx('text-gray-500 font-light', {
+ className={cx('text-gray-500 dark:text-gray-200 font-light', {
hoverable: canGoPrev(),
disabled: !canGoPrev(),
})}
@@ -259,9 +259,9 @@ const Panel = ({
&lt;
&nbsp;
{t('project.prev')}
- </span>
+ </span>
<span
- className={cx('text-gray-500 font-light', {
+ className={cx('text-gray-500 dark:text-gray-200 font-light', {
hoverable: canGoNext(),
disabled: !canGoNext(),
})}
@@ -271,7 +271,7 @@ const Panel = ({
{t('project.next')}
&nbsp;
&gt;
- </span>
+ </span>
</div>
</div>
)}
diff --git a/src/pages/Project/View/ViewProject.jsx b/src/pages/Project/View/ViewProject.jsx
index 3e28003eb..2c6ff4dbf 100644
--- a/src/pages/Project/View/ViewProject.jsx
+++ b/src/pages/Project/View/ViewProject.jsx
@@ -34,6 +34,7 @@ import routes from 'routes'
import {
getProjectData, getProject, getOverallStats, getLiveVisitors,
} from 'api'
+import './styles.css'
countries.registerLocale(countriesEn)
@@ -317,12 +318,12 @@ const ViewProject = ({
if (!isLoading) {
return (
<Title title={name}>
- <div className={cx('bg-gray-50 py-6 px-4 sm:px-6 lg:px-8', {
+ <div className={cx('bg-gray-50 dark:bg-gray-800 py-6 px-4 sm:px-6 lg:px-8', {
'min-h-min-footer': authenticated,
'min-h-min-footer-ad': !authenticated,
})} ref={dashboardRef}>
<div className='flex flex-col md:flex-row items-center md:items-start justify-between h-10'>
- <h2 className='text-3xl font-extrabold text-gray-900 break-words'>{name}</h2>
+ <h2 className='text-3xl font-extrabold text-gray-900 dark:text-gray-50 break-words'>{name}</h2>
<div className='flex mt-3 md:mt-0'>
<div className='md:border-r border-gray-200 md:pr-3 mr-3'>
<span className='relative z-0 inline-flex shadow-sm rounded-md'>
@@ -467,7 +468,7 @@ const ViewProject = ({
return (
<Title title={name}>
- <div className='min-h-min-footer'>
+ <div className='min-h-min-footer dark:bg-gray-800'>
<Loader />
</div>
</Title>
diff --git a/src/pages/Project/View/styles.css b/src/pages/Project/View/styles.css
new file mode 100644
index 000000000..f8a7a141b
--- /dev/null
+++ b/src/pages/Project/View/styles.css
@@ -0,0 +1,7 @@
+html.dark .bb-legend-item text {
+ fill: #f9fafb;
+}
+
+html.dark .bb-axis {
+ fill: #f9fafb;
+}
diff --git a/src/pages/Terms/index.jsx b/src/pages/Terms/index.jsx
index 9193205fb..ec5669305 100644
--- a/src/pages/Terms/index.jsx
+++ b/src/pages/Terms/index.jsx
@@ -5,94 +5,94 @@ import Title from 'components/Title'
const Features = () => {
return (
<Title title='Terms and Conditions'>
- <div className='bg-gray-50'>
+ <div className='bg-gray-50 dark:bg-gray-800'>
<div className='w-11/12 md:w-4/5 mx-auto pb-16 pt-12 px-4 sm:px-6 lg:px-8'>
- <h1 className='text-4xl font-extrabold text-gray-900 tracking-tight'>Swetrix Terms and Conditions</h1>
- <p className='mt-4 text-lg text-gray-900 tracking-tight'>
+ <h1 className='text-4xl font-extrabold text-gray-900 dark:text-gray-50 tracking-tight'>Swetrix Terms and Conditions</h1>
+ <p className='mt-4 text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
These Swetrix Terms and Conditions ("Terms", "Terms and Conditions") govern your relationship with swetrix.com ("Service") operated by Andrii Romasiun ("Swetrix", "Swetrix Analytics", "Company", "us", "we", or "our").<br />
Please read these Terms and Conditions carefully before using the Service.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Acknowledgment</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Acknowledgment</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
These are the Terms and Conditions governing the use of this Service and the agreement that operates between you and us. These Terms and Conditions set out the rights and obligations of all users regarding the use of the Service.<br />
Your access to and use of the Service is conditioned on your acceptance of and compliance with these Terms and Conditions. These Terms and Conditions apply to all visitors, users and others who access or use the Service.<br />
By accessing or using the Service you agree to be bound by these Terms and Conditions. If you disagree with any part of these Terms and Conditions then you may not access the Service.<br />
Your access to and use of the Service is also conditioned on your acceptance of and compliance with our Privacy Policy. Our Privacy Policy describes our policies and procedures on the collection, use and disclosure of your personal information when you access our websites or use our Service and tells you about your privacy rights and how the law protects you. Please read Our Privacy Policy carefully before using our Service.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Eligibility</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Eligibility</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
By agreeing to these Terms, you represent and warrant to us: (i) that you are at least eighteen (18) years of age; (ii) that you have not previously been suspended or removed from our Service and (iii) that your use of our Service is in compliance with any and all applicable laws and regulations.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Indemnity</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Indemnity</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
You agree that you will be responsible for your use of the Service, and you agree to defend, indemnify, and us hold harmless and our officers, directors, employees, consultants, affiliates, subsidiaries and agents (collectively, the "Company Entities") from and against any and all claims, liabilities, damages, losses, and expenses, including reasonable attorneys' fees and costs, arising out of or in any way connected with (i) your access to, use of, or alleged use of the Service; (ii) your violation of these Terms or any representation, warranty, or agreements referenced herein, or any applicable law or regulation; (iii) your violation of any third-party right, including without limitation any intellectual property right, publicity, confidentiality, property or privacy right; or (iv) any disputes or issues between you and any third party. We reserve the right, at our own expense, to assume the exclusive defense and control of any matter otherwise subject to indemnification by you (and without limiting your indemnification obligations with respect to such matter), and in such case, you agree to cooperate with our defense of such claim.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Termination</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Termination</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
We may at our sole discretion suspend or terminate your access to our Service at any time, with or without notice for any reason or no reason at all. We also reserve the right to modify or discontinue the Service at any time (including, without limitation, by limiting or discontinuing certain features of the Service) without notice to you. We will have no liability whatsoever on account of any change to the Service or any suspension or termination of your access to or use of the Service.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Fair use</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Fair use</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
We will use commercially reasonable efforts to provide all plan levels with sufficient capacity for the analytics data, number of websites, and other plan features that we determine are typical of accounts at that plan level. We may notify you if your usage is unreasonable, and we may at our sole discretion and at any time shut down and terminate our Service if your usage is creating an unreasonable burden on our infrastructure and/or business operations.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Third-party websites</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Third-party websites</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
The Service may contain links to third-party websites or services that are not owned or controlled by us.<br />
We have no control over, and assume no responsibility for, the content, privacy policies, or practices of any third party websites or services. You further acknowledge and agree that the Company shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with the use of or reliance on any such content, goods or services available on or through any such websites or services.<br />
We strongly advise you to read the terms and conditions and privacy policies of any third-party websites or services that you visit.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>License grant to us</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>License grant to us</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
By submitting, posting, or publishing your content, suggestions, enhancement requests, recommendations, feedback, information, data, or comments (“Content”) to our Service, you are granting us a perpetual, irrevocable, worldwide, non-exclusive, royalty-free right and license (with the right to sublicense) to use, incorporate, exploit, display, perform, reproduce, distribute, and prepare derivative works of your Content. You will retain ownership of your Content, however, any use of your Content by us may be without any compensation paid to you. By submitting, posting, and publishing your Content, you represent and warrant that your Content, does not: (i) infringe, violate, or misappropriate any third-party right, including any copyright, trademark, patent, trade secret, moral right, privacy right, right of publicity, or any other intellectual property or proprietary right; or (ii) slander, defame, or libel any third-party.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Prohibited uses</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Prohibited uses</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
As a condition of your use of the Service, you will not use the Service for any purpose that is unlawful or prohibited by these Terms. You may not use the Service in any manner that could damage, disable, overburden, disrupt or impair any of our servers or APIs, or any networks connected to any of our server or APIs, or that could interfere with any other party's use and enjoyment of any Service. You may not transmit any viruses, worms, defects, Trojan horses, or any items of a destructive nature through your use of Service. You may not exceed or circumvent, or try to exceed or circumvent, limitations on the Service, including on any API calls, or otherwise use the Service in a manner that violates any Swetrix documentation or user manuals. You may not attempt to gain unauthorized access to any Service, other accounts, computer systems, or networks connected to any Swetrix server or to any of the Service through hacking, password mining, or any other means. You may not obtain or attempt to obtain any materials or information through any means not intentionally made available through the Service. You may not use the Service in any way that violates any applicable federal, state, local, or international law or regulation (including, without limitation, any laws regarding the export of data or software to and from the US or other countries).
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Limitation of liability</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Limitation of liability</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
IN NO EVENT WILL THE COMPANY ENTITIES BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES ARISING OUT OF OR RELATING TO YOUR ACCESS TO OR USE OF, OR YOUR INABILITY TO ACCESS OR USE, THE SERVICE OR ANY MATERIALS OR CONTENT ON THE SERVICE, WHETHER BASED ON WARRANTY, CONTRACT, TORT (INCLUDING NEGLIGENCE), STATUTE, OR ANY OTHER LEGAL THEORY, WHETHER OR NOT THE COMPANY ENTITIES HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGE.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Disclaimers; no warranties</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Disclaimers; no warranties</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
THE SERVICE ARE MADE AVAILABLE TO YOU ON AN "AS IS" AND "AS AVAILABLE" BASIS, WITH THE EXPRESS UNDERSTANDING THAT THE COMPANY ENTITIES HAVE NO OBLIGATION TO MONITOR, CONTROL, OR VET THE CONTENT OR DATA APPEARING ON THE SERVICE. AS SUCH, YOUR USE OF THE SERVICE IS AT YOUR OWN DISCRETION AND RISK. THE COMPANY ENTITIES MAKE NO CLAIMS OR PROMISES ABOUT THE QUALITY, ACCURACY, OR RELIABILITY OF THE SERVICE AND EXPRESSLY DISCLAIM ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Accounts</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Accounts</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
When you create an account with us, you must provide us information that is accurate, complete, and current at all times. Failure to do so constitutes a breach of the Terms, which may result in immediate termination of your account on our Service.<br />
You are responsible for safeguarding the password that you use to access the Service and for any activities or actions under your password, whether your password is with our Service or a third-party service.<br />
You agree not to disclose your password to any third party. You must notify us immediately upon becoming aware of any breach of security or unauthorized use of your account.<br />
You may not use as a username the name of another person or entity or that is not lawfully available for use, a name or trademark that is subject to any rights of another person or entity other than you without appropriate authorization, or a name that is otherwise offensive, vulgar or obscene.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Subscriptions</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Subscriptions</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
Some parts of the Service are billed on a subscription basis ("Subscription(s)"). You will be billed in advance on a recurring and periodic basis ("Billing Cycle"). Billing cycles are set either on a monthly or annual basis, depending on the type of subscription plan you select when purchasing a Subscription.<br />
At the end of each Billing Cycle, your Subscription will automatically renew under the exact same conditions unless you cancel it or we cancel it. You may cancel your Subscription renewal either through your online account management page or by contacting our customer support team.<br />
A valid payment method, including credit card, is required to process the payment for your Subscription. You shall provide us with accurate and complete billing information including full name, address, state, zip code, telephone number, and a valid payment method information. By submitting such payment information, you automatically authorize us to charge all Subscription fees incurred through your account to any such payment instruments.<br />
Should automatic billing fail to occur for any reason, we may issue an electronic invoice indicating that you must proceed manually, within a certain deadline date, with the full payment corresponding to the billing period as indicated on the invoice.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Fee changes</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Fee changes</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
We may, at our sole discretion and at any time, modify the Subscription fees for the Subscriptions. Any Subscription fee change will become effective at the end of the then-current Billing Cycle.<br />
We will provide you with a reasonable prior notice of any change in Subscription fees to give you an opportunity to terminate your Subscription before such change becomes effective.<br />
Your continued use of the Service after the Subscription fee change comes into effect constitutes your agreement to pay the modified Subscription fee amount.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Refunds</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Refunds</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
To avoid being charged for your Subscription, you must cancel the Subscription before your renewal date. Otherwise, you’ll be charged and will retain access to the Service through the end of the Billing Cycle.<br />
Except when required by law, paid Subscription fees are non-refundable. However, you may contact our support team and at our sole discretion we may issue a refund on a case-by-case basis.
</p>
@@ -114,60 +114,60 @@ const Features = () => {
- Downtime caused by reasonable scheduled maintenance that is announced in advance.
</p> */}
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Governing Law</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Governing Law</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
These Terms shall be governed and construed in accordance with the laws of Ukraine, without regard to its conflict of law provisions.<br />
Our failure to enforce any right or provision of these Terms will not be considered a waiver of those rights. If any provision of these Terms is held to be invalid or unenforceable by a court, the remaining provisions of these Terms will remain in effect. These Terms constitute the entire agreement between us regarding our Service, and supersede and replace any prior agreements we might have between us regarding the Service.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Disputes resolution</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Disputes resolution</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
If you have any concern or dispute about the Service, you agree to first try to resolve the dispute informally by contacting the Company.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>For European Union (EU) users</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>For European Union (EU) users</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
If You are a European Union consumer, you will benefit from any mandatory provisions of the law of the country in which you are resident in.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>United States Legal Compliance</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>United States Legal Compliance</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
You represent and warrant that (i) you are not located in a country that is subject to the United States government embargo, or that has been designated by the United States government as a "terrorist supporting" country, and (ii) You are not listed on any United States government list of prohibited or restricted parties.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Severability</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Severability</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
If any provision of these Terms is held to be unenforceable or invalid, such provision will be changed and interpreted to accomplish the objectives of such provision to the greatest extent possible under applicable law and the remaining provisions will continue in full force and effect.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Waiver</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Waiver</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
Except as provided herein, the failure to exercise a right or to require performance of an obligation under this Agreement shall not affect a party’s ability to exercise such right or require such performance at any time thereafter, nor shall the waiver of a breach constitute the waiver of any subsequent breach.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Translation interpretation</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Translation interpretation</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
These Terms and Conditions may have been translated if we have made them available to you on our Service. You agree that the original English text shall prevail in the case of a dispute.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Changes to these Terms and Conditions</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Changes to these Terms and Conditions</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
We reserve the right, at our sole discretion, to modify or replace these Terms and Conditions at any time. If a revision is material we will make reasonable efforts to provide at least 30 days' notice prior to any new terms taking effect. What constitutes a material change will be determined at our sole discretion.<br />
By continuing to access or use our Service after those revisions become effective, you agree to be bound by the revised terms. If you do not agree to the new terms, in whole or in part, please stop using the website and the Service.
</p>
- <h3 className='text-2xl font-bold text-gray-900 tracking-tight mt-4'>Contact us</h3>
- <p className='text-lg text-gray-900 tracking-tight'>
+ <h3 className='text-2xl font-bold text-gray-900 dark:text-gray-50 tracking-tight mt-4'>Contact us</h3>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
If you have any questions you can contact us by sending us an email at&nbsp;
- <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500'>
+ <a href='mailto:[email protected]' className='font-medium text-indigo-600 hover:text-indigo-500 dark:text-indigo-400 dark:hover:text-indigo-500'>
</a>
.
</p>
<hr className='mt-10 mb-4' />
- <p className='text-lg text-gray-900 tracking-tight'>
+ <p className='text-lg text-gray-900 dark:text-gray-50 tracking-tight'>
<i>Last updated: August 16, 2021.</i>
</p>
</div>
diff --git a/src/pages/UserSettings/UserSettings.jsx b/src/pages/UserSettings/UserSettings.jsx
index c8b7e4141..453093479 100644
--- a/src/pages/UserSettings/UserSettings.jsx
+++ b/src/pages/UserSettings/UserSettings.jsx
@@ -95,12 +95,12 @@ const UserSettings = ({
return (
<Title title={t('titles.profileSettings')}>
- <div className='min-h-min-footer bg-gray-50 flex flex-col py-6 px-4 sm:px-6 lg:px-8'>
+ <div className='min-h-min-footer bg-gray-50 dark:bg-gray-800 flex flex-col py-6 px-4 sm:px-6 lg:px-8'>
<form className='max-w-7xl w-full mx-auto' onSubmit={handleSubmit}>
- <h2 className='mt-2 text-3xl font-extrabold text-gray-900'>
+ <h2 className='mt-2 text-3xl font-extrabold text-gray-900 dark:text-gray-50'>
{t('titles.profileSettings')}
</h2>
- <h3 className='mt-2 text-lg font-bold text-gray-900'>
+ <h3 className='mt-2 text-lg font-bold text-gray-900 dark:text-gray-50'>
{t('profileSettings.general')}
</h3>
<Input
@@ -143,7 +143,7 @@ const UserSettings = ({
{t('profileSettings.update')}
</Button>
<hr className='mt-5' />
- <h3 className='mt-2 text-lg font-bold text-gray-900'>
+ <h3 className='mt-2 text-lg font-bold text-gray-900 dark:text-gray-50'>
{t('profileSettings.email')}
</h3>
<div className='grid grid-cols-1 gap-y-6 gap-x-4 lg:grid-cols-2 mt-4'>
diff --git a/src/redux/actions/ui/index.js b/src/redux/actions/ui/index.js
index 9ffaf04f4..2185ec62d 100644
--- a/src/redux/actions/ui/index.js
+++ b/src/redux/actions/ui/index.js
@@ -74,6 +74,13 @@ const setProjectViewPrefs = (pid, period, timeBucket) => ({
},
})
+const setTheme = (theme) => ({
+ type: types.SET_THEME,
+ payload: {
+ theme,
+ }
+})
+
const UIActions = {
loadProjects,
setProjects,
@@ -86,6 +93,7 @@ const UIActions = {
setPublicProject,
setLiveStatsForProject,
setLiveStats,
+ setTheme,
}
export default UIActions
diff --git a/src/redux/actions/ui/types.js b/src/redux/actions/ui/types.js
index ff6b0fe6c..af8fec137 100644
--- a/src/redux/actions/ui/types.js
+++ b/src/redux/actions/ui/types.js
@@ -10,4 +10,5 @@ export const types = {
SET_LIVE_STATS: 'UI_SET_LIVE_STATS',
SET_LIVE_STATS_PROJECT: 'UI_SET_LIVE_STATS_PROJECT',
SET_PUBLIC_PROJECT: 'UI_SET_PUBLIC_PROJECT',
+ SET_THEME: 'UI_SET_THEME',
}
diff --git a/src/redux/constants/index.js b/src/redux/constants/index.js
index 38e30e9da..b9834e0eb 100644
--- a/src/redux/constants/index.js
+++ b/src/redux/constants/index.js
@@ -45,6 +45,8 @@ export const TOKEN = 'access_token'
export const TITLE_SUFFIX = '| Swetrix'
+export const LS_THEME_SETTING = 'colour-theme'
+
export const isSelfhosted = Boolean(process.env.REACT_APP_SELFHOSTED)
export const LIVE_VISITORS_UPDATE_INTERVAL = 40000
diff --git a/src/redux/reducers/ui/index.js b/src/redux/reducers/ui/index.js
index 7f9bbedd1..73aeeb5dd 100644
--- a/src/redux/reducers/ui/index.js
+++ b/src/redux/reducers/ui/index.js
@@ -1,5 +1,6 @@
import { combineReducers } from 'redux'
import projects from './projects'
import cache from './cache'
+import theme from './theme'
-export default combineReducers({ projects, cache })
+export default combineReducers({ projects, cache, theme })
diff --git a/src/redux/reducers/ui/theme.js b/src/redux/reducers/ui/theme.js
new file mode 100644
index 000000000..db30f7ec5
--- /dev/null
+++ b/src/redux/reducers/ui/theme.js
@@ -0,0 +1,54 @@
+import { types } from 'redux/actions/ui/types'
+import { LS_THEME_SETTING } from 'redux/constants'
+
+const getInitialTheme = () => {
+ if (typeof window !== 'undefined' && window.localStorage) {
+ const storedPrefs = window.localStorage.getItem(LS_THEME_SETTING)
+ if (typeof storedPrefs === 'string') {
+ return storedPrefs
+ }
+
+ const userMedia = window.matchMedia('(prefers-color-scheme: dark)')
+ if (userMedia.matches) {
+ return 'dark'
+ }
+ }
+
+ return 'light' // light theme as the default
+}
+
+const setTheme = (rawTheme) => {
+ const root = window.document.documentElement
+ const isDark = rawTheme === 'dark'
+
+ root.classList.remove(isDark ? 'light' : 'dark')
+ root.classList.add(rawTheme)
+
+ localStorage.setItem(LS_THEME_SETTING, rawTheme)
+ return rawTheme
+}
+
+const getInitialState = () => {
+ return {
+ theme: setTheme(getInitialTheme()),
+ }
+}
+
+const themeReducer = (state = getInitialState(), { type, payload }) => {
+ switch (type) {
+ case types.SET_THEME: {
+ const { theme } = payload
+
+ setTheme(theme)
+ return {
+ ...state,
+ theme,
+ }
+ }
+
+ default:
+ return state
+ }
+}
+
+export default themeReducer
diff --git a/src/ui/Checkbox.jsx b/src/ui/Checkbox.jsx
index e36977df5..b666959fc 100644
--- a/src/ui/Checkbox.jsx
+++ b/src/ui/Checkbox.jsx
@@ -21,9 +21,9 @@ const Checkbox = ({
/>
</div>
<div className='ml-3 text-sm'>
- <label htmlFor={identifier} className='font-medium text-gray-700 cursor-pointer'>{label}</label>
+ <label htmlFor={identifier} className='font-medium text-gray-700 dark:text-gray-200 cursor-pointer'>{label}</label>
{hint && (
- <p id={`${identifier}-description`} className='text-gray-500'>{hint}</p>
+ <p id={`${identifier}-description`} className='text-gray-500 dark:text-gray-300'>{hint}</p>
)}
</div>
</div>
diff --git a/src/ui/Code.jsx b/src/ui/Code.jsx
index b16d11191..5541447ea 100644
--- a/src/ui/Code.jsx
+++ b/src/ui/Code.jsx
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
import cx from 'classnames'
const Code = ({ text, className, language }) => (
- <pre className={cx('w-full rounded-md bg-gray-800', className)}>
+ <pre className={cx('w-full rounded-md bg-gray-800 dark:bg-gray-750', className)}>
<code className={`whitespace-pre-wrap language-${language}`}>{text}</code>
</pre>
)
diff --git a/src/ui/Input.jsx b/src/ui/Input.jsx
index a8d4f8171..2f03b376d 100644
--- a/src/ui/Input.jsx
+++ b/src/ui/Input.jsx
@@ -15,7 +15,7 @@ const Input = ({
<div className={cx({
'flex justify-between': label && hint,
})}>
- <label htmlFor={identifier} className='block text-sm font-medium text-gray-700'>{label}</label>
+ <label htmlFor={identifier} className='block text-sm font-medium text-gray-700 dark:text-gray-200'>{label}</label>
</div>
<div className='mt-1 relative'>
<input
@@ -37,9 +37,9 @@ const Input = ({
</div>
)}
</div>
- <p className='mt-2 text-sm text-gray-500 whitespace-pre-line' id={`${identifier}-optional`}>{hint}</p>
+ <p className='mt-2 text-sm text-gray-500 dark:text-gray-300 whitespace-pre-line' id={`${identifier}-optional`}>{hint}</p>
{isError && (
- <p className='mt-2 text-sm text-red-600' id='email-error'>{error}</p>
+ <p className='mt-2 text-sm text-red-600 dark:text-red-500' id='email-error'>{error}</p>
)}
</div>
)
diff --git a/src/ui/Pin.jsx b/src/ui/Pin.jsx
index d41e706be..131ee9469 100644
--- a/src/ui/Pin.jsx
+++ b/src/ui/Pin.jsx
@@ -13,19 +13,19 @@ const defaultProps = {
}
const ActivePin = ({ label, className }) => (
- <p className={cx('px-2 inline-flex text-sm leading-5 font-normal rounded-full bg-green-100 text-green-800', className)}>
+ <p className={cx('px-2 inline-flex text-sm leading-5 font-normal rounded-full bg-green-100 text-green-800 dark:bg-green-300 dark:text-green-900', className)}>
{label}
</p>
)
const InactivePin = ({ label, className }) => (
- <p className={cx('px-2 inline-flex text-sm leading-5 font-normal rounded-full bg-red-100 text-red-800', className)}>
+ <p className={cx('px-2 inline-flex text-sm leading-5 font-normal rounded-full bg-red-100 text-red-800 dark:bg-red-300 dark:text-red-900', className)}>
{label}
</p>
)
const WarningPin = ({ label, className }) => (
- <p className={cx('px-2 inline-flex text-sm leading-5 font-normal rounded-full bg-yellow-100 text-yellow-600', className)}>
+ <p className={cx('px-2 inline-flex text-sm leading-5 font-normal rounded-full bg-yellow-100 text-yellow-600 dark:bg-yellow-300 dark:text-yellow-900', className)}>
{label}
</p>
)
diff --git a/src/ui/Progress.jsx b/src/ui/Progress.jsx
index 394aecac8..e350da932 100644
--- a/src/ui/Progress.jsx
+++ b/src/ui/Progress.jsx
@@ -3,7 +3,7 @@ import React, { memo } from 'react'
const Progress = ({ now }) => (
<div className='relative'>
<div className='overflow-hidden h-2 text-xs flex rounded bg-blue-200'>
- <div style={{ width: `${now}%` }} className='shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-blue-500' />
+ <div style={{ width: `${now}%` }} className='shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-blue-500 dark:bg-blue-700' />
</div>
</div>
)
diff --git a/src/ui/Select.jsx b/src/ui/Select.jsx
index cc7260b68..788e7adfc 100644
--- a/src/ui/Select.jsx
+++ b/src/ui/Select.jsx
@@ -12,7 +12,7 @@ const Select = ({
<Listbox className={className} value={title} onChange={onSelect}>
{({ open }) => (
<>
- <Listbox.Label className='block text-sm font-medium text-gray-700'>{label}</Listbox.Label>
+ <Listbox.Label className='block text-sm font-medium text-gray-700 dark:text-gray-100'>{label}</Listbox.Label>
<div className='mt-1 relative'>
<Listbox.Button className='relative w-full bg-white border border-gray-300 rounded-md shadow-sm pl-3 pr-10 py-2 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm'>
<span className='block truncate capitalize'>{title}</span>
diff --git a/tailwind.config.js b/tailwind.config.js
index edd6af1b9..8f466f3d9 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,10 +1,15 @@
module.exports = {
- mode: 'jit',
+ // mode: 'jit',
important: true,
purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],
- darkMode: false, // or 'media' or 'class'
+ darkMode: 'class', // or 'media' or 'class'
theme: {
extend: {
+ colors: {
+ gray: {
+ 750: '#141d2e',
+ }
+ },
width: {
'card-toggle': 'calc(100% - 3rem)',
},