diff --git a/ui/src/components/albumGallery/AlbumBox.tsx b/ui/src/components/albumGallery/AlbumBox.tsx index f0dd946d..06fe5674 100644 --- a/ui/src/components/albumGallery/AlbumBox.tsx +++ b/ui/src/components/albumGallery/AlbumBox.tsx @@ -25,7 +25,7 @@ const AlbumBoxImage = ({ src, ...props }: AlbumBoxImageProps) => { let placeholder = null if (!loaded) { placeholder = ( -
+
) } @@ -44,7 +44,7 @@ type AlbumBoxProps = { export const AlbumBox = ({ album, customLink, ...props }: AlbumBoxProps) => { const wrapperClasses = - 'inline-block text-center text-gray-900 mx-3 my-2 xs:h-60 xs:w-[220px]' + 'inline-block text-center text-gray-900 dark:text-gray-200 mx-3 my-2 xs:h-60 xs:w-[220px]' if (album) { return ( diff --git a/ui/src/components/header/Header.tsx b/ui/src/components/header/Header.tsx index e0d53623..5c8c11df 100644 --- a/ui/src/components/header/Header.tsx +++ b/ui/src/components/header/Header.tsx @@ -11,7 +11,7 @@ const Header = () => { return (
diff --git a/ui/src/components/layout/MainMenu.tsx b/ui/src/components/layout/MainMenu.tsx index 76681d83..035ffe01 100644 --- a/ui/src/components/layout/MainMenu.tsx +++ b/ui/src/components/layout/MainMenu.tsx @@ -63,7 +63,7 @@ const MenuButton = ({ } const MenuSeparator = () => ( -
+
) export const MainMenu = () => { @@ -81,15 +81,15 @@ export const MainMenu = () => { !!faceDetectionEnabledQuery?.data?.siteInfo?.faceDetectionEnabled return ( -
+
    @@ -101,7 +101,7 @@ export const MainMenu = () => { exact label={t('sidemenu.albums', 'Albums')} background="#ff797b" - activeClasses="ring-[#fff1f2] bg-[#fff1f2]" + activeClasses="ring-[#fff1f2] bg-[#fff1f2] dark:ring-[#1d1516] dark:bg-[#1d1516]" className="outline-none focus:ring-2 focus:ring-red-200 focus:ring-offset-2" icon={ @@ -115,7 +115,7 @@ export const MainMenu = () => { exact label={t('sidemenu.places', 'Places')} background="#92e072" - activeClasses="ring-[#e3fee5] bg-[#e3fee5]" + activeClasses="ring-[#e3fee5] bg-[#e3fee5] dark:ring-[#0c1c0f] dark:bg-[#0c1c0f]" className="outline-none focus:ring-2 focus:ring-green-100 focus:ring-offset-2" icon={ @@ -130,7 +130,7 @@ export const MainMenu = () => { exact label={t('sidemenu.people', 'People')} background="#fbcd78" - activeClasses="ring-[#fff7e4] bg-[#fff7e4]" + activeClasses="ring-[#fff7e4] bg-[#fff7e4] dark:ring-[#1a1b13] dark:bg-[#1a1b13]" className="outline-none focus:ring-2 focus:ring-yellow-100 focus:ring-offset-2" icon={ @@ -145,7 +145,7 @@ export const MainMenu = () => { exact label={t('sidemenu.settings', 'Settings')} background="#aacbd0" - activeClasses="ring-[#e4f0f8] bg-[#e4f0f8]" + activeClasses="ring-[#e4f0f8] bg-[#e4f0f8] dark:ring-[#0f1f23] dark:bg-[#0f1f23]" className="outline-none focus:ring-2 focus:ring-gray-200 focus:ring-offset-2" icon={ diff --git a/ui/src/components/sidebar/Sidebar.tsx b/ui/src/components/sidebar/Sidebar.tsx index 2688ff90..090ce533 100644 --- a/ui/src/components/sidebar/Sidebar.tsx +++ b/ui/src/components/sidebar/Sidebar.tsx @@ -89,7 +89,7 @@ export const Sidebar = () => { return (
    ( ) +document.getElementsByTagName('body')[0].classList.add('dark') + ReactDOM.render(
    , document.getElementById('root')) serviceWorkerRegistration.register() diff --git a/ui/src/primitives/form/Dropdown.tsx b/ui/src/primitives/form/Dropdown.tsx index 81950a19..c68dc969 100644 --- a/ui/src/primitives/form/Dropdown.tsx +++ b/ui/src/primitives/form/Dropdown.tsx @@ -44,6 +44,7 @@ const Dropdown = ({ classNames( 'px-6 py-0.5 rounded border border-gray-200 focus:outline-none focus:border-blue-300 text-[#222] hover:bg-gray-100 whitespace-nowrap', + 'dark:bg-dark-input-bg dark:border-dark-input-border dark:text-dark-input-text dark:focus:border-blue-300', variant == 'negative' && 'text-red-600 hover:bg-red-600 hover:border-red-700 hover:text-white transition-colors focus:border-red-600 focus:hover:border-red-700', variant == 'positive' && diff --git a/ui/tailwind.config.js b/ui/tailwind.config.js index 36c0a1e1..227ee406 100644 --- a/ui/tailwind.config.js +++ b/ui/tailwind.config.js @@ -1,7 +1,7 @@ module.exports = { mode: 'jit', purge: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], - darkMode: false, // or 'media' or 'class' + darkMode: 'class', theme: { extend: { screens: { @@ -23,6 +23,16 @@ module.exports = { 800: '#006624', 900: '#00541d', }, + dark: { + bg: '#24292e', + bg2: '#30363e', + text: '#fafafa', + input: { + bg: '#383e46', + border: '#4a515a', + text: '#ccdbe4', + }, + }, }, }, },