File tree Expand file tree Collapse file tree 4 files changed +62
-3
lines changed Expand file tree Collapse file tree 4 files changed +62
-3
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,49 @@ 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 = "flex flex-col gap-2 my -4" > 
180181								< TranslationStatusAlert  status = { translationStatus }  /> 
181182							</ div > 
182183
183- 							< div  class = "prose max-w-none w-full mt-6 flex-grow" > 
184+ 							{ translationStatus  !==  "community"  &&  ( 
185+ 								< div  class = "flex" > 
186+ 									< a 
187+ 										href = { `https://typst.app${ route }  ` } 
188+ 										target = "_blank" 
189+ 										rel = "noopener noreferrer" 
190+ 										class = "inline-flex items-center text-sm  underline text-gray-400 hover:text-gray-600 transition-colors" 
191+ 									> 
192+ 										< div  class = "w-4 h-4 mr-1 " > 
193+ 											< WorldIcon  /> 
194+ 										</ div > 
195+ 										原文(英語)を開く
196+ 									</ a > 
197+ 								</ div > 
198+ 							) } 
199+ 
200+ 							< div  class = "prose max-w-none w-full my-6 flex-grow" > 
184201								{ children } 
185202							</ div > 
186203
204+ 							{ translationStatus  !==  "community"  &&  ( 
205+ 								< a 
206+ 									href = { `https://typst.app${ route }  ` } 
207+ 									target = "_blank" 
208+ 									rel = "noopener noreferrer" 
209+ 									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" 
210+ 								> 
211+ 									< div  class = "w-4 h-4 mr-2 text-gray-600 transition-colors" > 
212+ 										< WorldIcon  /> 
213+ 									</ div > 
214+ 									< span  class = "text-sm font-medium text-gray-800 group-hover:text-gray-900 transition-colors" > 
215+ 										原文(英語)を開く
216+ 									</ span > 
217+ 									< div  class = "w-4 h-4 ml-2 text-gray-400 transition-colors" > 
218+ 										< ChevronRightIcon  /> 
219+ 									</ div > 
220+ 								</ a > 
221+ 							) } 
222+ 
187223							{ route  ===  "/docs/"  ? ( 
188224								< div  class = "doc-categories grid grid-cols-1 md:grid-cols-2 gap-6 mt-8" > 
189225									< a 
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export const TranslationStatusAlert: FC<TranslationStatusAlertProps> = ({
6767	return  ( 
6868		< div 
6969			class = { twMerge ( 
70- 				"border rounded-md p-4 mb-6 " , 
70+ 				"border rounded-md p-4" , 
7171				config . bgColor , 
7272				config . borderColor , 
7373				config . textColor , 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments