-
Notifications
You must be signed in to change notification settings - Fork 13
feat: Add Aossie github link on navbar (#16) #17
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 2 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 |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import React, { useState, useEffect } from "react"; | ||
| import { Link } from "react-router-dom"; | ||
| import { Menu, X } from "lucide-react"; | ||
| import { Menu, X, Github } from "lucide-react"; | ||
| import { Button } from "@/components/ui/button"; | ||
| import YourLogo from "@/assets/38881995.png"; // Update this import path to your logo | ||
|
|
||
|
|
@@ -146,6 +146,19 @@ const Navbar: React.FC = () => { | |
| <div className="hidden md:flex items-center space-x-8"> | ||
| <NavLink to="/">Home</NavLink> | ||
|
|
||
| {/* GitHub Repository Link */} | ||
| <a | ||
| href="https://github.com/AOSSIE-Org/PictoPy" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="text-gray-800 dark:text-gray-300 | ||
| hover:text-black dark:hover:text-white | ||
| transition-colors duration-300" | ||
| aria-label="AOSSIE PictoPy GitHub Repository" | ||
| > | ||
| <Github className="h-5 w-5" /> | ||
| </a> | ||
|
|
||
| {/* Dark Mode Toggle Button */} | ||
| <button | ||
| onClick={() => setDarkMode(!darkMode)} | ||
|
|
@@ -194,6 +207,18 @@ const Navbar: React.FC = () => { | |
| <NavLink to="/" onClick={() => setIsOpen(false)}> | ||
| Home | ||
| </NavLink> | ||
| <a | ||
| href="https://github.com/AOSSIE-Org/PictoPy" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="text-gray-700 dark:text-gray-300 text-lg font-medium | ||
| hover:text-black dark:hover:text-white | ||
| transition duration-300 flex items-center space-x-2" | ||
| onClick={() => setIsOpen(false)} | ||
| > | ||
| <Github className="h-5 w-5" /> | ||
| <span>GitHub</span> | ||
| </a> | ||
|
Comment on lines
+210
to
+221
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Externalize the user-visible string for i18n. The "GitHub" text on line 220 is hardcoded. Per coding guidelines, user-visible strings should be externalized to resource files for internationalization. 🤖 Prompt for AI Agents |
||
| <NavLink to="#features" isScrollLink={true} onClick={() => setIsOpen(false)}> | ||
| Feature | ||
| </NavLink> | ||
|
|
||
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.
🧹 Nitpick | 🔵 Trivial
Consider extracting the GitHub URL to a constant.
The GitHub repository URL
https://github.com/AOSSIE-Org/PictoPyis duplicated in both the desktop (line 151) and mobile (line 211) navigation sections. Extracting it to a constant improves maintainability.♻️ Proposed refactor
Add a constant at the top of the component or in a shared constants file:
Then reference it in both links:
Also applies to: 210-221
🤖 Prompt for AI Agents