-
Notifications
You must be signed in to change notification settings - Fork 24
Upload articles by parsing urls #5
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 | ||||
---|---|---|---|---|---|---|
|
@@ -25,3 +25,73 @@ body { | |||||
text-wrap: balance; | ||||||
} | ||||||
} | ||||||
|
||||||
/* globals.css */ | ||||||
|
||||||
:root { | ||||||
--max-width: 800px; | ||||||
--page-padding: 16px; | ||||||
--heading-font-size: 28px; | ||||||
--heading-font-weight: 700; | ||||||
--heading-margin-bottom: 16px; | ||||||
--card-border: 1px solid #eee; | ||||||
--card-radius: 8px; | ||||||
--card-padding: 16px; | ||||||
--list-gap: 12px; | ||||||
} | ||||||
|
||||||
/* 全局 main 容器 */ | ||||||
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. The comment '全局 main 容器' is in Chinese. Consider using English for consistency, such as '/* Global main container */'.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
.main-container { | ||||||
max-width: var(--max-width); | ||||||
margin: 40px auto; | ||||||
padding: var(--page-padding); | ||||||
} | ||||||
|
||||||
/* 标题 */ | ||||||
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. The comment '标题' is in Chinese. Consider using English for consistency, such as '/* Page title /' or '/ Heading */'.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
.page-title { | ||||||
font-size: var(--heading-font-size); | ||||||
font-weight: var(--heading-font-weight); | ||||||
margin-bottom: var(--heading-margin-bottom); | ||||||
} | ||||||
|
||||||
/* 列表 */ | ||||||
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. The comment '列表' is in Chinese. Consider using English for consistency, such as '/* Document list /' or '/ List styles */'.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
.doc-list { | ||||||
display: grid; | ||||||
gap: var(--list-gap); | ||||||
list-style: none; | ||||||
padding: 0; | ||||||
} | ||||||
|
||||||
/* 卡片 */ | ||||||
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. The comment '卡片' is in Chinese. Consider using English for consistency, such as '/* Card styles /' or '/ Document card */'.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
.doc-card { | ||||||
border: var(--card-border); | ||||||
border-radius: var(--card-radius); | ||||||
padding: var(--card-padding); | ||||||
} | ||||||
|
||||||
/* 链接 */ | ||||||
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. The comment '链接' is in Chinese. Consider using English for consistency, such as '/* Link styles /' or '/ Document links */'.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
.doc-link { | ||||||
font-weight: 600; | ||||||
text-decoration: none; | ||||||
} | ||||||
.doc-link:hover { | ||||||
text-decoration: underline; | ||||||
} | ||||||
|
||||||
input[type="text"] { | ||||||
padding: 8px; | ||||||
border: 1px solid #ccc; | ||||||
border-radius: 6px; | ||||||
} | ||||||
|
||||||
button { | ||||||
padding: 8px 12px; | ||||||
border-radius: 6px; | ||||||
border: 1px solid #ddd; | ||||||
background: #f5f5f5; | ||||||
cursor: pointer; | ||||||
} | ||||||
|
||||||
button:hover { | ||||||
background: #eee; | ||||||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,31 @@ | ||||||
'use client' | ||||||
|
||||||
import { useState } from 'react' | ||||||
|
||||||
export default function UploadPage() { | ||||||
const [value, setValue] = useState('') | ||||||
|
||||||
const handleClick = () => { | ||||||
console.log('输入内容:', value) | ||||||
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. The console.log message contains Chinese characters '输入内容:'. Consider using English for consistency with the codebase, such as 'Input content:' or 'URL input:'.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
} | ||||||
|
||||||
return ( | ||||||
<main className="main-container"> | ||||||
<h1 className="page-title">Upload</h1> | ||||||
|
||||||
<div className="doc-card" style={{ display: 'flex', gap: 8 }}> | ||||||
<input | ||||||
type="text" | ||||||
placeholder="公众号url" | ||||||
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. The placeholder text '公众号url' is in Chinese. Consider using English for consistency, such as 'Enter article URL' or 'WeChat article URL'.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
value={value} | ||||||
onChange={(e) => setValue(e.target.value)} | ||||||
/> | ||||||
<button | ||||||
onClick={handleClick} | ||||||
> | ||||||
上传 | ||||||
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. The button text '上传' is in Chinese. Consider using English for consistency with the codebase, such as 'Upload' or 'Submit'.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
</button> | ||||||
</div> | ||||||
</main> | ||||||
) | ||||||
} |
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] This comment is redundant since it's already clear from the filename. Consider removing it or replacing with a more descriptive comment about the purpose of the following CSS rules.
Copilot uses AI. Check for mistakes.