mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-16 01:01:38 +00:00
* add dark mode switch button * modify footer * fix nav menu opening issue * add paging number * remove post card a link focus shadow * add _document * remove archive card border on last child * add post image zoom margin on desktop * add post index image * remove TOC scroll bar on firefox
36 lines
837 B
TypeScript
36 lines
837 B
TypeScript
import { useColorModeValue } from '@chakra-ui/react';
|
|
|
|
interface UseGetColors {
|
|
boxBg: string;
|
|
textColor: string;
|
|
bioColor: string;
|
|
headingColor: string;
|
|
giscusColor: 'light' | 'dark';
|
|
borderColor: string;
|
|
}
|
|
|
|
const useGetColors = (): UseGetColors => {
|
|
const boxBg = useColorModeValue('white', 'gray.700');
|
|
const textColor = useColorModeValue('gray.600', 'whiteAlpha.900');
|
|
const bioColor = useColorModeValue('gray.400', 'whiteAlpha.600');
|
|
const headingColor = useColorModeValue(
|
|
'rgba(0, 0, 0, 0.85)',
|
|
'whiteAlpha.800'
|
|
);
|
|
const borderColor = useColorModeValue('gray.500', 'whiteAlpha.300');
|
|
|
|
// comment
|
|
const giscusColor = useColorModeValue('light', 'dark');
|
|
|
|
return {
|
|
boxBg,
|
|
textColor,
|
|
bioColor,
|
|
headingColor,
|
|
giscusColor,
|
|
borderColor,
|
|
};
|
|
};
|
|
|
|
export default useGetColors;
|