Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,73 @@ body {
text-wrap: balance;
}
}

/* globals.css */
Copy link
Preview

Copilot AI Sep 12, 2025

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.

Suggested change
/* globals.css */
/* Custom properties for layout and design */

Copilot uses AI. Check for mistakes.


: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 容器 */
Copy link
Preview

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

The 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
/* 全局 main 容器 */
/* Global main container */

Copilot uses AI. Check for mistakes.

.main-container {
max-width: var(--max-width);
margin: 40px auto;
padding: var(--page-padding);
}

/* 标题 */
Copy link
Preview

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

The 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
/* 标题 */
/* Page title */

Copilot uses AI. Check for mistakes.

.page-title {
font-size: var(--heading-font-size);
font-weight: var(--heading-font-weight);
margin-bottom: var(--heading-margin-bottom);
}

/* 列表 */
Copy link
Preview

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

The 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
/* 列表 */
/* Document list */

Copilot uses AI. Check for mistakes.

.doc-list {
display: grid;
gap: var(--list-gap);
list-style: none;
padding: 0;
}

/* 卡片 */
Copy link
Preview

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

The 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
/* 卡片 */
/* Card styles */

Copilot uses AI. Check for mistakes.

.doc-card {
border: var(--card-border);
border-radius: var(--card-radius);
padding: var(--card-padding);
}

/* 链接 */
Copy link
Preview

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

The 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
/* 链接 */
/* Link styles */

Copilot uses AI. Check for mistakes.

.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;
}
12 changes: 6 additions & 6 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export default function DocsIndex() {
)

return (
<main style={{ maxWidth: 800, margin: '40px auto', padding: 16 }}>
<h1 style={{ fontSize: 28, fontWeight: 700, marginBottom: 16 }}>Docs</h1>
<ul style={{ display: 'grid', gap: 12 }}>
<main className="main-container">
<h1 className="page-title">Docs</h1>
<ul className="doc-list">
{docs.map((d) => (
<li key={d._id} style={{ border: '1px solid #eee', borderRadius: 8, padding: 16 }}>
<Link href={`/docs/${d.slug}`} style={{ fontWeight: 600 }}>
<li key={d._id} className="doc-card">
<Link href={`/docs/${d.slug}`} className="doc-link">
{d.title}
</Link>
{d.description && <p style={{ opacity: 0.8 }}>{d.description}</p>}
Expand All @@ -21,4 +21,4 @@ export default function DocsIndex() {
</ul>
</main>
)
}
}
31 changes: 31 additions & 0 deletions app/upload/page.tsx
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)
Copy link
Preview

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

The 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
console.log('输入内容:', value)
console.log('Input content:', value)

Copilot uses AI. Check for mistakes.

}

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"
Copy link
Preview

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

The 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
placeholder="公众号url"
placeholder="Enter article URL"

Copilot uses AI. Check for mistakes.

value={value}
onChange={(e) => setValue(e.target.value)}
/>
<button
onClick={handleClick}
>
上传
Copy link
Preview

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

The 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
上传
Upload

Copilot uses AI. Check for mistakes.

</button>
</div>
</main>
)
}