Enhanced the UI of the Navbar and Fixed the Logo Issue - #1740
Enhanced the UI of the Navbar and Fixed the Logo Issue#1740Shayan-Bhowmik wants to merge 1 commit into
Conversation
|
@Shayan-Bhowmik is attempting to deploy a commit to the recode Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. The estimated time for response is 5–8 hrs. In the meantime, please provide all necessary screenshots and make sure you run - npm build run , command and provide a screenshot, a video recording, or an image of the update you made below, which helps speed up the review and assignment. If you have questions, reach out to LinkedIn. Your contributions are highly appreciated!😊 Note: I maintain the repo issue every day twice at 8:00 AM IST and 9:00 PM IST. If your PR goes stale for more than one day, you can tag and comment on this same issue by tagging @sanjay-kv. We are here to help you on this journey of open source. Consistent 20 contributions are eligible for sponsorship 💰 🎁 check our list of amazing people we sponsored so far: GitHub Sponsorship. ✨ 📚Your perks for contribution to this community 👇🏻
If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊 |
|
✅ Synchronized metadata from Issue #1715:
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR customizes the Docusaurus navbar branding and visual styling, including a custom brand component, dark-mode logo treatment, and updated navbar item symbols.
Changes:
- Replaced the default
@theme/Navbar/Logowith a customNavbarBrandcomponent. - Added dark-mode-only CSS styling for the navbar logo and introduced a
.nav-symbolhelper class. - Updated
docusaurus.config.tsnavbar item markup to use symbol-based prefixes and adjusted the configured logosrc.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/theme/Navbar/Content/index.tsx | Adds a custom navbar brand component and swaps it in for the theme logo component. |
| src/css/custom.css | Adds dark-mode styling around the logo and a .nav-symbol class for navbar item prefixes. |
| docusaurus.config.ts | Updates navbar item HTML/labels to use symbol prefixes and changes logo src path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const logoAlt = logoConfig?.alt ?? siteConfig.title; | ||
|
|
||
| return ( | ||
| <Link className="navbar__brand" to={useBaseUrl("/")} aria-label={siteConfig.title}> |
| const { siteConfig } = useDocusaurusContext(); | ||
| const logoConfig = siteConfig.themeConfig.navbar.logo; | ||
| const logoSrc = useBaseUrl(logoConfig?.src ?? "img/logo.png"); | ||
| const logoAlt = logoConfig?.alt ?? siteConfig.title; |
| return ( | ||
| <Link className="navbar__brand" to={useBaseUrl("/")} aria-label={siteConfig.title}> | ||
| <img className="navbar__logo" src={logoSrc} alt={logoAlt} /> | ||
| <strong className="navbar__title">{siteConfig.title}</strong> |
| title: "recode hive", | ||
| logo: { | ||
| alt: "recode hive Logo", | ||
| src: "img/logo.png", | ||
| src: "/img/logo.png", | ||
| }, |
| items: [ | ||
| { | ||
| label: "💻GitHub Profiles", | ||
| label: "◆ GitHub Profiles", |
| }, | ||
| { | ||
| label: "🎖️ GitHub Badges", | ||
| label: "▣ GitHub Badges", |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| const { siteConfig } = useDocusaurusContext(); | ||
| const logoConfig = siteConfig.themeConfig.navbar.logo; | ||
| const logoSrc = useBaseUrl(logoConfig?.src ?? "img/logo.png"); | ||
| const logoAlt = logoConfig?.alt ?? siteConfig.title; |
| label: "🤝 Community", | ||
| label: "◌ Community", | ||
| to: "/community", | ||
| }, |
There was a problem hiding this comment.
these icon changes didnt mention in the issue, + the spacing is reduced comparing to the current production.
So i will be rejecting this.
I appreciate the effort, you can make a small readme change and do a PR, i will assign level 2 for it and merge tag this issue as well.
cc @Adez017
|
As discussed above closing the PR @sanjay-kv |
Description
Fixes #1715
This PR ensures the site logo displays correctly in dark mode and replaces navbar emoji labels with monochrome glyphs for a more professional, theme-consistent header. It also fixes a stray parse error in
docusaurus.config.tsthat prevented the dev server from starting.Type of Change
Changes Made
/img/logo.png) so it resolves on all routes.NavbarLogowith an explicit brand render insrc/theme/Navbar/Content/index.tsxto ensure consistent mounting across pages.src/css/custom.cssto improve logo contrast without altering light mode appearance.htmlnavbar labels indocusaurus.config.ts) and added.nav-symbolCSS for spacing and alignment.docusaurus.config.tsthat causeddocusaurus startto fail.src/theme/Navbar/Logo/index.tsxfile to avoid duplicate/conflicting logo components.Modified files:
docusaurus.config.tssrc/theme/Navbar/Content/index.tsxsrc/css/custom.cssDeleted:
src/theme/Navbar/Logo/index.tsx(cleanup)Dependencies
Checklist
npm run buildand attached screenshot(s) in this PR.