-
Notifications
You must be signed in to change notification settings - Fork 13
fix: filter card style #48
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
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,4 @@ | ||||||||||||||
| import { useI18n, usePageData } from "@rspress/runtime"; | ||||||||||||||
| import { useI18n, usePageData, useSite } from "@rspress/runtime"; | ||||||||||||||
|
|
||||||||||||||
| interface StyledProps { | ||||||||||||||
| className?: string; | ||||||||||||||
|
|
@@ -10,6 +10,8 @@ interface BannerProps extends StyledProps { | |||||||||||||
|
|
||||||||||||||
| export const HomeBanner: React.FC<BannerProps> = ({ className }) => { | ||||||||||||||
| const pageData = usePageData(); | ||||||||||||||
| const siteData = useSite(); | ||||||||||||||
| console.log(pageData, siteData); | ||||||||||||||
| const t = useI18n(); | ||||||||||||||
|
|
||||||||||||||
| // const logo = | ||||||||||||||
|
|
@@ -22,16 +24,16 @@ export const HomeBanner: React.FC<BannerProps> = ({ className }) => { | |||||||||||||
| return ( | ||||||||||||||
| <div className={className}> | ||||||||||||||
| <div className="max-w-3/5"> | ||||||||||||||
| <h1 className="!text-4xl !font-bold !mb-6"> | ||||||||||||||
| <h1 className="!text-xl !font-semibold !mb-6"> | ||||||||||||||
| {/* {pageData.siteData.title} */} | ||||||||||||||
| {t("knowledge_title")} | ||||||||||||||
| </h1> | ||||||||||||||
| <p className="text-xl !font-semibold "> | ||||||||||||||
| <p className=""> | ||||||||||||||
| {/* {pageData.siteData.description} */} | ||||||||||||||
| {t("knowledge_description")} | ||||||||||||||
| </p> | ||||||||||||||
| </div> | ||||||||||||||
| {/* <img width={240} src={logo}></img> */} | ||||||||||||||
| <img width={180} src={`${pageData.siteData.base}180.png`}></img> | ||||||||||||||
|
Contributor
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. 🛠️ Refactor suggestion Harden base path join and add alt text Avoid double/missing slashes and add alt for accessibility. - <img width={180} src={`${pageData.siteData.base}180.png`}></img>
+ <img
+ width={180}
+ alt="Knowledge logo"
+ src={`${pageData.siteData.base.replace(/\\/?$/, "/")}180.png`}
+ />📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| </div> | ||||||||||||||
| ); | ||||||||||||||
| }; | ||||||||||||||
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.
🛠️ Refactor suggestion
Fix invalid Tailwind classes
📝 Committable suggestion
🤖 Prompt for AI Agents