Skip to content

Commit 1931592

Browse files
committed
feat: convert to pwa
- seo - pwa app
1 parent 2fa158f commit 1931592

File tree

10 files changed

+129
-4
lines changed

10 files changed

+129
-4
lines changed

index.html

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,83 @@
55
<meta charset="UTF-8" />
66
<link rel="icon"
77
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🎭</text></svg>" />
8+
<link rel="apple-touch-icon" sizes="180x180" href="/icon_180x180.png">
9+
<link rel="icon" type="image/png" sizes="32x32" href="/icon_32x32.png">
10+
<link rel="icon" type="image/png" sizes="16x16" href="/icon_16x16.png">
11+
<link rel="manifest" href="/site.webmanifest">
12+
813
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
9-
<title>CCEditor - Character Card Editor</title>
14+
15+
<title>CCEditor - Online AI Character Card Editor | Multi-Format Support</title>
16+
<meta name="description"
17+
content="CCEditor: A free, open-source online editor for AI character cards. Supports multiple formats (v1, v2, v3), multi-language UI, local history, and direct URL loading. Ideal for SillyTavern and AI enthusiasts." />
18+
<meta name="keywords"
19+
content="character card editor, ai character, cceditor, sillytavern, prompt editor, character definition, online editor, open source, v1 card, v2 card, v3 card, ai tools, character creation" />
20+
<meta name="author" content="lenML" />
21+
<link rel="canonical" href="https://lenml.github.io/CCEditor/" />
22+
23+
<meta property="og:title" content="CCEditor - Online AI Character Card Editor" />
24+
<meta property="og:description"
25+
content="Create and edit AI character cards with CCEditor. Supports multiple formats, languages, and features a VSCode-like editor. Free and open-source." />
26+
<meta property="og:type" content="website" />
27+
<meta property="og:url" content="https://lenml.github.io/CCEditor/" />
28+
<meta property="og:image" content="https://lenml.github.io/CCEditor/share_screenshot.jpg" />
29+
<meta property="og:site_name" content="CCEditor" />
30+
<meta property="og:locale" content="en_US" />
31+
<meta property="og:locale:alternate" content="zh_CN" />
32+
<meta property="og:locale:alternate" content="ja_JP" />
33+
<meta property="og:locale:alternate" content="ko_KR" />
34+
35+
36+
<meta name="twitter:card" content="summary_large_image" />
37+
<meta name="twitter:title" content="CCEditor - Online AI Character Card Editor" />
38+
<meta name="twitter:description"
39+
content="CCEditor: A free, open-source online editor for AI character cards. Supports multiple formats (v1, v2, v3), multi-language UI, and more." />
40+
<meta name="twitter:image" content="https://lenml.github.io/CCEditor/share_screenshot.jpg" />
41+
42+
<script type="application/ld+json">
43+
{
44+
"@context": "https://schema.org",
45+
"@type": "SoftwareApplication",
46+
"name": "CCEditor",
47+
"applicationCategory": "DesignApplication",
48+
"operatingSystem": "Web Browser",
49+
"description": "An online character card editor for AI character definitions. Supports multiple formats (v1, v2, v3), multi-language UI, local history, built-in code editor, export options, and direct card loading via URL.",
50+
"url": "https://lenml.github.io/CCEditor/",
51+
"screenshot": "https://lenml.github.io/CCEditor/share_screenshot.jpg",
52+
"softwareVersion": "1.0.7",
53+
"offers": {
54+
"@type": "Offer",
55+
"price": "0",
56+
"priceCurrency": "USD"
57+
},
58+
"author": {
59+
"@type": "lenML",
60+
"name": "lenML",
61+
"url": "https://github.com/lenML"
62+
},
63+
"keywords": "character card editor, ai character, cceditor, sillytavern, prompt editor, character definition, online editor, open source",
64+
"inLanguage": ["en", "zh", "ja", "ko"],
65+
"license": "https://spdx.org/licenses/AGPL-3.0-only.html"
66+
}
67+
</script>
68+
1069
</head>
1170

1271
<body>
13-
<div id="root"></div>
72+
<div id="root">
73+
<noscript>
74+
<h1>CCEditor - AI Character Card Editor</h1>
75+
<p>
76+
CCEditor is an online tool for creating and editing AI character cards.
77+
It supports multiple formats, languages, and offers a built-in code editor.
78+
Please enable JavaScript to use CCEditor.
79+
</p>
80+
<p>
81+
Visit our project on <a href="https://github.com/lenML/CCEditor">GitHub</a>.
82+
</p>
83+
</noscript>
84+
</div>
1485
<script type="module" src="/src/main.tsx"></script>
1586
</body>
1687

public/icon.png

40.5 KB
Loading

public/icon_16x16.png

1.5 KB
Loading

public/icon_180x180.png

36.9 KB
Loading

public/icon_192x192.png

40.8 KB
Loading

public/icon_32x32.png

3.05 KB
Loading

public/icon_512x512.png

180 KB
Loading

public/share_screenshot.jpg

36.8 KB
Loading

public/site.webmanifest

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "CCEditor",
3+
"short_name": "CCEditor",
4+
"start_url": "/",
5+
"id": "CCEditor",
6+
"icons": [
7+
{
8+
"src": "/icon_192x192.png",
9+
"sizes": "192x192",
10+
"type": "image/png"
11+
},
12+
{
13+
"src": "/icon_512x512.png",
14+
"sizes": "512x512",
15+
"type": "image/png"
16+
}
17+
],
18+
"theme_color": "#242424",
19+
"background_color": "#242424",
20+
"display": "standalone"
21+
}

src/components/edit/FullscreenEditor.tsx

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,41 @@ export function FullscreenEditor(
164164
minimap: { enabled: false },
165165
wordWrap: "on",
166166
}}
167-
onMount={(editorInstance) => {
168-
editorRef.current = editorInstance;
167+
onMount={(editor, monaco) => {
168+
editorRef.current = editor;
169+
monaco.languages.registerCompletionItemProvider("markdown", {
170+
provideCompletionItems(model, position, context, token) {
171+
return {
172+
suggestions: [
173+
{
174+
label: "模板",
175+
kind: monaco.languages.CompletionItemKind.Snippet,
176+
documentation: "人设模板",
177+
insertTextRules:
178+
monaco.languages.CompletionItemInsertTextRule
179+
.InsertAsSnippet,
180+
insertText: `<worldview>
181+
$\{1:世界观}
182+
</worldview>
183+
184+
<character name="$\{2:角色名}">
185+
job: $\{3:角色职业}
186+
appearance: $\{2:角色名} $\{4:角色描述}
187+
personalities: $\{5:角色性格}
188+
skills: $\{6:角色技能}
189+
$\{7:其他设定}
190+
</character>`,
191+
range: {
192+
startLineNumber: position.lineNumber,
193+
startColumn: position.column - 1,
194+
endLineNumber: position.lineNumber,
195+
endColumn: position.column,
196+
},
197+
},
198+
],
199+
};
200+
},
201+
});
169202
}}
170203
/>
171204
<Text

0 commit comments

Comments
 (0)