Improve banner animation

This commit is contained in:
Sumire Isshiki 2024-03-11 21:42:17 +09:00
parent 65dd7bf23c
commit 3a1f024a90
4 changed files with 44 additions and 32 deletions

View File

@ -23,6 +23,7 @@
"postcss": "^8.4.33", "postcss": "^8.4.33",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-fast-marquee": "^1.6.4",
"react-katex": "^3.0.1", "react-katex": "^3.0.1",
"react-markdown": "^9.0.1", "react-markdown": "^9.0.1",
"react-scroll-percentage": "^4.3.2", "react-scroll-percentage": "^4.3.2",

File diff suppressed because it is too large Load Diff

View File

@ -32,19 +32,19 @@ type Props = {
}; };
export const ThemeSwitcher = () => { export const ThemeSwitcher = () => {
const {theme, toggleTheme} = useTheme(); const { theme, toggleTheme } = useTheme();
return ( return (
<button <button
type="button" type="button"
className="btn btn-secondary" className="btn btn-secondary drop-shadow-md"
onClick={toggleTheme} onClick={toggleTheme}
aria-label="テーマの切り替え" aria-label="テーマの切り替え"
> >
{theme === "light" ? ( {theme === "light" ? (
<FontAwesomeIcon icon={faMoon} /> <FontAwesomeIcon icon={faMoon} />
) : ( ) : (
<FontAwesomeIcon icon={faSun} /> <FontAwesomeIcon icon={faSun} />
)} )}
</button> </button>
) )

View File

@ -6,17 +6,7 @@ export default {
"./src/**/*.{js,ts,jsx,tsx}", "./src/**/*.{js,ts,jsx,tsx}",
], ],
theme: { theme: {
extend: { extend: {},
animation: {
marquee: 'marquee 30s linear infinite'
},
keyframes: {
marquee: {
'0%': { transform: 'translateX(100%)' },
'100%': { transform: 'translateX(-160%)' }
}
}
},
}, },
plugins: [ plugins: [
require('@tailwindcss/typography'), require('@tailwindcss/typography'),