-
Notifications
You must be signed in to change notification settings - Fork 14
feat: outline position #115
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
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -46,18 +46,23 @@ export const EditOnGithub = () => { | |||||||||||||||||||||||||||||||||||||||||
| const t = useI18n<typeof import("i18n")>(); | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||||
| <div className="mb-2"> | ||||||||||||||||||||||||||||||||||||||||||
| <div className="editLink"> | ||||||||||||||||||||||||||||||||||||||||||
| <a href={editLink} target="_blank" className="flex"> | ||||||||||||||||||||||||||||||||||||||||||
| <EditIcon></EditIcon> | ||||||||||||||||||||||||||||||||||||||||||
| <span className="ml-2">{t("edit_page")}</span> | ||||||||||||||||||||||||||||||||||||||||||
| </a> | ||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||
| <div className="editLink"> | ||||||||||||||||||||||||||||||||||||||||||
| <a href={issueLink} target="_blank" className="flex"> | ||||||||||||||||||||||||||||||||||||||||||
| <GithubIcon></GithubIcon> | ||||||||||||||||||||||||||||||||||||||||||
| <span className="ml-2">{t("create_issue")}</span> | ||||||||||||||||||||||||||||||||||||||||||
| </a> | ||||||||||||||||||||||||||||||||||||||||||
| <div className="edit-on-github sticky top-0 z-10"> | ||||||||||||||||||||||||||||||||||||||||||
| {/* 48px 遮罩层,用于隐藏滚动上来的 outline 内容 */} | ||||||||||||||||||||||||||||||||||||||||||
| <div className="edit-on-github__mask"></div> | ||||||||||||||||||||||||||||||||||||||||||
| {/* 实际内容 */} | ||||||||||||||||||||||||||||||||||||||||||
| <div className="edit-on-github__content"> | ||||||||||||||||||||||||||||||||||||||||||
| <div className="editLink"> | ||||||||||||||||||||||||||||||||||||||||||
| <a href={editLink} target="_blank" className="flex"> | ||||||||||||||||||||||||||||||||||||||||||
| <EditIcon></EditIcon> | ||||||||||||||||||||||||||||||||||||||||||
| <span className="ml-2">{t("edit_page")}</span> | ||||||||||||||||||||||||||||||||||||||||||
| </a> | ||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||
| <div className="editLink"> | ||||||||||||||||||||||||||||||||||||||||||
| <a href={issueLink} target="_blank" className="flex"> | ||||||||||||||||||||||||||||||||||||||||||
| <GithubIcon></GithubIcon> | ||||||||||||||||||||||||||||||||||||||||||
| <span className="ml-2">{t("create_issue")}</span> | ||||||||||||||||||||||||||||||||||||||||||
| </a> | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+55
to
+64
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. Add
🔒 Proposed fix- <a href={editLink} target="_blank" className="flex">
+ <a href={editLink} target="_blank" rel="noopener noreferrer" className="flex">
<EditIcon></EditIcon>
<span className="ml-2">{t("edit_page")}</span>
</a>
...
- <a href={issueLink} target="_blank" className="flex">
+ <a href={issueLink} target="_blank" rel="noopener noreferrer" className="flex">
<GithubIcon></GithubIcon>
<span className="ml-2">{t("create_issue")}</span>
</a>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||
| </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.
🧩 Analysis chain
🏁 Script executed:
Repository: alauda/knowledge
Length of output: 479
🏁 Script executed:
Repository: alauda/knowledge
Length of output: 608
🏁 Script executed:
Repository: alauda/knowledge
Length of output: 1102
🏁 Script executed:
Repository: alauda/knowledge
Length of output: 313
Resolve conflicting
.edit-on-githubmargin-top rules.The
margin-top: 0 !importantat line 223-225 overrides the negative margin defined at line 102 globally. This nullifies the intended offset behavior. Clarify whether the override is needed and either remove it or scope it to the mobile breakpoint where it applies.🤖 Prompt for AI Agents