File tree Expand file tree Collapse file tree 3 files changed +45
-2
lines changed Expand file tree Collapse file tree 3 files changed +45
-2
lines changed Original file line number Diff line number Diff line change 1+ export const WorldIcon = ( ) => {
2+ return (
3+ < svg
4+ xmlns = "http://www.w3.org/2000/svg"
5+ viewBox = "0 0 24 24"
6+ fill = "none"
7+ stroke = "currentColor"
8+ stroke-width = "2"
9+ stroke-linecap = "round"
10+ stroke-linejoin = "round"
11+ class = "icon icon-tabler icons-tabler-outline icon-tabler-world"
12+ role = "graphics-symbol"
13+ >
14+ < path stroke = "none" d = "M0 0h24v24H0z" fill = "none" />
15+ < path d = "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" />
16+ < path d = "M3.6 9h16.8" />
17+ < path d = "M3.6 15h16.8" />
18+ < path d = "M11.5 3a17 17 0 0 0 0 18" />
19+ < path d = "M12.5 3a17 17 0 0 1 0 18" />
20+ </ svg >
21+ ) ;
22+ } ;
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export { MenuIcon } from "./MenuIcon";
1111export { CloseIcon } from "./CloseIcon" ;
1212export { SearchIcon } from "./SearchIcon" ;
1313export { LanguageIcon } from "./LanguageIcon" ;
14+ export { WorldIcon } from "./WorldIcon" ;
1415
1516// Simple Icons
1617// https://simpleicons.org/
Original file line number Diff line number Diff line change 77 ChevronRightIcon ,
88 CloseIcon ,
99 InfoCircleIcon ,
10+ WorldIcon ,
1011} from "../icons" ;
1112import {
1213 Breadcrumbs ,
@@ -176,14 +177,33 @@ export const BaseTemplate: FC<BaseTemplateProps> = ({
176177 < main class = "flex-1 flex flex-col px-3.5 py-4 mb-8" >
177178 < Breadcrumbs path = { path } />
178179
179- < div class = "mt-4" >
180+ < div class = "mt-4 flex flex-col gap-2 " >
180181 < TranslationStatusAlert status = { translationStatus } />
181182 </ div >
182183
183- < div class = "prose max-w-none w-full mt -6 flex-grow" >
184+ < div class = "prose max-w-none w-full my -6 flex-grow" >
184185 { children }
185186 </ div >
186187
188+ { translationStatus !== "community" && (
189+ < a
190+ href = { `https://typst.app${ route } ` }
191+ target = "_blank"
192+ rel = "noopener noreferrer"
193+ class = "group inline-flex items-center px-3 py-2 rounded-md border border-gray-200 bg-white hover:border-gray-500 hover:bg-gray-50 transition-all duration-200 w-fit"
194+ >
195+ < div class = "w-4 h-4 mr-2 text-gray-600 transition-colors" >
196+ < WorldIcon />
197+ </ div >
198+ < span class = "text-sm font-medium text-gray-800 group-hover:text-gray-900 transition-colors" >
199+ 原文(英語)を開く
200+ </ span >
201+ < div class = "w-4 h-4 ml-2 text-gray-400 transition-colors" >
202+ < ChevronRightIcon />
203+ </ div >
204+ </ a >
205+ ) }
206+
187207 { route === "/docs/" ? (
188208 < div class = "doc-categories grid grid-cols-1 md:grid-cols-2 gap-6 mt-8" >
189209 < a
You can’t perform that action at this time.
0 commit comments