首页跳转到编辑页
This commit is contained in:
parent
ea0b0c8fd5
commit
36f917b70c
@ -14,7 +14,7 @@ export function CodeThemeSelector({ value, onChange }: CodeThemeSelectorProps) {
|
||||
<div className="flex items-center gap-4">
|
||||
<Label>代码主题</Label>
|
||||
<Select value={value} onValueChange={onChange}>
|
||||
<SelectTrigger className="w-[180px]">
|
||||
<SelectTrigger className="w-[140px]">
|
||||
<SelectValue placeholder="选择代码主题" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
|
@ -1,7 +1,7 @@
|
||||
'use client'
|
||||
|
||||
import { useState } from 'react'
|
||||
import { Copy, Plus, Save, Smartphone, Settings } from 'lucide-react'
|
||||
import { Copy, Plus, Save, Smartphone, Settings, Github } from 'lucide-react'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { WechatStylePicker } from '../../template/WechatStylePicker'
|
||||
import { TemplateManager } from '../../template/TemplateManager'
|
||||
@ -173,21 +173,31 @@ export function EditorToolbar({
|
||||
<Save className="h-4 w-4" />
|
||||
<span>保存</span>
|
||||
</button>
|
||||
<button
|
||||
onClick={handleCopy}
|
||||
className="inline-flex items-center justify-center gap-1.5 px-3 py-1.5 rounded-md hover:bg-muted text-sm transition-colors"
|
||||
>
|
||||
<Copy className="h-4 w-4" />
|
||||
<span>复制源码</span>
|
||||
</button>
|
||||
|
||||
<button
|
||||
onClick={handleCopyPreview}
|
||||
className="inline-flex items-center justify-center gap-1.5 px-3 py-1.5 rounded-md bg-primary text-primary-foreground hover:bg-primary/90 text-sm transition-colors"
|
||||
>
|
||||
<Copy className="h-4 w-4" />
|
||||
<span>复制预览</span>
|
||||
<span>复制</span>
|
||||
</button>
|
||||
<div className="flex items-center gap-1">
|
||||
<ThemeToggle />
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
asChild
|
||||
>
|
||||
<Link
|
||||
href="https://github.com/tianyaxiang/neurapress"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Github className="h-5 w-5" />
|
||||
<span className="sr-only">GitHub</span>
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -5,6 +5,8 @@ import { usePathname } from 'next/navigation'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { ThemeToggle } from '@/components/theme-toggle'
|
||||
import { Logo } from '@/components/icons/Logo'
|
||||
import { Github } from 'lucide-react'
|
||||
import { Button } from '@/components/ui/button'
|
||||
|
||||
const navigation = [
|
||||
{ name: '微信公众号', href: '/wechat' },
|
||||
@ -48,6 +50,20 @@ export function MainNav() {
|
||||
专业的内容转换工具
|
||||
</p>
|
||||
<ThemeToggle />
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
asChild
|
||||
>
|
||||
<Link
|
||||
href="https://github.com/tianyaxiang/neurapress"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Github className="h-5 w-5" />
|
||||
<span className="sr-only">GitHub</span>
|
||||
</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user