-
Notifications
You must be signed in to change notification settings - Fork 13
fix: improve button hover contrast to meet WCAG 2.1 AA standards #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -93,38 +93,51 @@ interface FAQItemProps { | |||||||||
|
|
||||||||||
| function FAQItem({ question, answer, isOpen, onClick, index, icon }: FAQItemProps) { | ||||||||||
| const contentRef = useRef<HTMLDivElement>(null); | ||||||||||
| const [hovered, setHovered] = useState(false); | ||||||||||
|
|
||||||||||
| return ( | ||||||||||
| <motion.div | ||||||||||
| className={`rounded-xl overflow-hidden transition-all duration-300 | ||||||||||
| bg-white dark:bg-black | ||||||||||
| border | ||||||||||
| ${isOpen | ||||||||||
| ? 'border- 6 border-pink-500 dark:border-grey-500' | ||||||||||
| : 'border- 6 - dark:border-grey-500'} | ||||||||||
| `} | ||||||||||
| bg-white dark:bg-black border | ||||||||||
| ${isOpen | ||||||||||
| ? 'border-pink-500 dark:border-grey-500' | ||||||||||
| : 'dark:border-grey-500'} | ||||||||||
|
Comment on lines
+103
to
+104
|
||||||||||
| ? 'border-pink-500 dark:border-grey-500' | |
| : 'dark:border-grey-500'} | |
| ? 'border-pink-500 dark:border-gray-500' | |
| : 'border-gray-200 dark:border-gray-500'} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,218 @@ | ||
| import type React from "react" | ||
| import { FaDiscord } from 'react-icons/fa' // Import Discord icon from React Icons | ||
| import type React from "react"; | ||
| import { motion } from "framer-motion"; | ||
| import { FaDiscord, FaGithub, FaTwitter } from "react-icons/fa"; | ||
| import { ExternalLink } from "lucide-react"; | ||
|
|
||
| const fadeUp = { | ||
| hidden: { opacity: 0, y: 20 }, | ||
| visible: (i: number) => ({ | ||
| opacity: 1, | ||
| y: 0, | ||
| transition: { duration: 0.5, delay: i * 0.1 }, | ||
| }), | ||
| }; | ||
|
|
||
| const Footer: React.FC = () => { | ||
| const year = new Date().getFullYear(); | ||
|
|
||
| return ( | ||
| <footer className="relative bg-white dark:bg-black text-black dark:text-white py-8 overflow-hidden border-t border-black dark:border-white transition-colors duration-300"> | ||
| <div className="relative container mx-auto px-6"> | ||
| <div className="flex justify-between items-center"> | ||
| {/* Left-aligned PictoPy text */} | ||
| <div className="flex items-center space-x-2"> | ||
| <p className="text-xl font-medium text-transparent bg-clip-text bg-gradient-to-r from-yellow-400 to-green-400 hover:scale-105 transition-all duration-300 ease-in-out"> | ||
| <footer className="bg-white dark:bg-black text-gray-700 dark:text-gray-300 border-t border-gray-200 dark:border-gray-800 transition-colors duration-300"> | ||
| {/* Main grid */} | ||
| <div className="container mx-auto px-6 py-16"> | ||
| <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12"> | ||
|
Comment on lines
+19
to
+22
|
||
| {/* Column 1 — PictoPy brand */} | ||
| <motion.div | ||
| custom={0} | ||
| initial="hidden" | ||
| whileInView="visible" | ||
| viewport={{ once: true }} | ||
| variants={fadeUp} | ||
| > | ||
| <h3 className="text-2xl font-bold text-transparent bg-clip-text bg-gradient-to-r from-yellow-500 to-green-500 mb-3"> | ||
| PictoPy | ||
| </h3> | ||
| <p className="text-sm leading-relaxed mb-4"> | ||
| A privacy-first, AI-powered desktop gallery application built with | ||
| Tauri, React, and Rust — keeping your data entirely on your | ||
| device. | ||
| </p> | ||
| </div> | ||
|
|
||
| {/* Right-aligned Discord Icon and "Made with love" text */} | ||
| <div className="flex items-center space-x-2"> | ||
| <a | ||
| href="https://discord.com/channels/1022871757289422898/1311271974630330388" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="text-sm font-medium text-transparent bg-clip-text bg-gradient-to-r from-yellow-400 to-green-400 hover:bg-gradient-to-r hover:from-yellow-500 hover:to-green-500 transition duration-300 ease-in-out" | ||
| <a | ||
| href="https://github.com/AOSSIE-Org/PictoPy" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="inline-flex items-center gap-1.5 text-sm font-medium text-yellow-500 hover:text-green-500 transition-colors duration-200" | ||
| > | ||
| <FaDiscord className="inline-block mr-2 text-yellow-400 hover:text-green-400 transition duration-300 ease-in-out transform scale-150" /> {/* Scale it to 1.5x */} | ||
| <span>Made with love by AOSSIE team</span> | ||
| <FaGithub className="text-base" /> | ||
| View on GitHub | ||
| <ExternalLink className="w-3 h-3" /> | ||
| </a> | ||
| </div> | ||
| </motion.div> | ||
|
|
||
| {/* Column 2 — About AOSSIE */} | ||
| <motion.div | ||
| custom={1} | ||
| initial="hidden" | ||
| whileInView="visible" | ||
| viewport={{ once: true }} | ||
| variants={fadeUp} | ||
| className="lg:col-span-1" | ||
| > | ||
| <h4 className="text-sm font-semibold uppercase tracking-wider text-gray-900 dark:text-white mb-3"> | ||
| About AOSSIE | ||
| </h4> | ||
| <p className="text-sm leading-relaxed mb-3"> | ||
| <span className="font-semibold text-gray-900 dark:text-white"> | ||
| Australian Open Source Software Innovation and Education | ||
| (AOSSIE) | ||
| </span>{" "} | ||
| is an Australian not-for-profit umbrella organisation for | ||
| open-source projects. AOSSIE mentors students and contributors | ||
| through programs like Google Summer of Code and Outreachy, | ||
| fostering innovation in open-source software across the globe. | ||
| </p> | ||
| <a | ||
| href="https://aossie.org" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="inline-flex items-center gap-1.5 text-sm font-medium text-yellow-500 hover:text-green-500 transition-colors duration-200" | ||
| > | ||
| aossie.org | ||
| <ExternalLink className="w-3 h-3" /> | ||
| </a> | ||
| </motion.div> | ||
|
|
||
| {/* Column 3 — Quick Links */} | ||
| <motion.div | ||
| custom={2} | ||
| initial="hidden" | ||
| whileInView="visible" | ||
| viewport={{ once: true }} | ||
| variants={fadeUp} | ||
| > | ||
| <h4 className="text-sm font-semibold uppercase tracking-wider text-gray-900 dark:text-white mb-3"> | ||
| Quick Links | ||
| </h4> | ||
| <ul className="space-y-2 text-sm"> | ||
| {[ | ||
| { | ||
| label: "Documentation", | ||
| href: "https://aossie-org.github.io/PictoPy/", | ||
| }, | ||
| { | ||
| label: "Releases", | ||
| href: "https://github.com/AOSSIE-Org/PictoPy/releases", | ||
| }, | ||
| { | ||
| label: "Issue Tracker", | ||
| href: "https://github.com/AOSSIE-Org/PictoPy/issues", | ||
| }, | ||
| { | ||
| label: "Contributing Guide", | ||
| href: "https://github.com/AOSSIE-Org/PictoPy/blob/main/CONTRIBUTING.md", | ||
| }, | ||
| { | ||
| label: "AOSSIE Projects", | ||
| href: "https://aossie.org/#projects", | ||
| }, | ||
| { | ||
| label: "Google Summer of Code", | ||
| href: "https://summerofcode.withgoogle.com/", | ||
| }, | ||
| ].map(({ label, href }) => ( | ||
| <li key={label}> | ||
| <a | ||
| href={href} | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="hover:text-yellow-500 dark:hover:text-green-400 transition-colors duration-200" | ||
| > | ||
| {label} | ||
| </a> | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| </motion.div> | ||
|
|
||
| {/* Column 4 — Community */} | ||
| <motion.div | ||
| custom={3} | ||
| initial="hidden" | ||
| whileInView="visible" | ||
| viewport={{ once: true }} | ||
| variants={fadeUp} | ||
| > | ||
| <h4 className="text-sm font-semibold uppercase tracking-wider text-gray-900 dark:text-white mb-3"> | ||
| Community | ||
| </h4> | ||
| <p className="text-sm leading-relaxed mb-4"> | ||
| Join our community to report bugs, request features, chat with | ||
| contributors, and follow AOSSIE's open-source journey. | ||
| </p> | ||
| <div className="flex flex-col gap-3"> | ||
| <a | ||
| href="https://discord.com/channels/1022871757289422898/1311271974630330388" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="inline-flex items-center gap-2 text-sm font-medium hover:text-yellow-500 dark:hover:text-green-400 transition-colors duration-200" | ||
| > | ||
| <FaDiscord className="text-lg text-indigo-500" /> | ||
| Discord Server | ||
| </a> | ||
| <a | ||
| href="https://github.com/AOSSIE-Org" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="inline-flex items-center gap-2 text-sm font-medium hover:text-yellow-500 dark:hover:text-green-400 transition-colors duration-200" | ||
| > | ||
| <FaGithub className="text-lg" /> | ||
| AOSSIE on GitHub | ||
| </a> | ||
| <a | ||
| href="https://twitter.com/aossie_org" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="inline-flex items-center gap-2 text-sm font-medium hover:text-yellow-500 dark:hover:text-green-400 transition-colors duration-200" | ||
| > | ||
| <FaTwitter className="text-lg text-sky-500" /> | ||
| @aossie_org | ||
| </a> | ||
| </div> | ||
| </motion.div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div className="mt-4 text-center border-t border-white pt-2"> | ||
| {/* You can add any content here if needed */} | ||
| {/* Bottom bar */} | ||
| <div className="border-t border-gray-200 dark:border-gray-800"> | ||
| <div className="container mx-auto px-6 py-5 flex flex-col sm:flex-row items-center justify-between gap-3 text-xs text-gray-500 dark:text-gray-500"> | ||
| <p> | ||
| {`© ${year} `} | ||
| <a | ||
| href="https://aossie.org" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="hover:text-yellow-500 transition-colors duration-200" | ||
| > | ||
| {"AOSSIE"} | ||
| </a> | ||
| { | ||
| ". PictoPy is open-source software released under the MIT License." | ||
| } | ||
| </p> | ||
| <p className="flex items-center gap-1"> | ||
| {"Made with ♥ by the "} | ||
| <a | ||
| href="https://aossie.org" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="ml-1 font-medium text-transparent bg-clip-text bg-gradient-to-r from-yellow-500 to-green-500 hover:opacity-80 transition-opacity duration-200" | ||
| > | ||
| {"AOSSIE Team"} | ||
| </a> | ||
| </p> | ||
| </div> | ||
| </div> | ||
| </footer> | ||
| ) | ||
| } | ||
| ); | ||
| }; | ||
|
|
||
| export default Footer | ||
| export default Footer; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new
hoveredReact state is only used to drive hover styling. This can be expressed with Tailwindhover:/group-hover:classes (and conditional classes based onisOpen) without triggering re-renders on mouse enter/leave. Consider removinghoveredstate + mouse handlers and implementing the hover styles purely via CSS classes.