fix: better link style
This commit is contained in:
		
							parent
							
								
									aa90b72f29
								
							
						
					
					
						commit
						aee135386b
					
				
							
								
								
									
										1
									
								
								components.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								components.d.ts
									
									
									
									
										vendored
									
									
								
							| @ -132,6 +132,7 @@ declare module '@vue/runtime-core' { | |||||||
|     NConfigProvider: typeof import('naive-ui')['NConfigProvider'] |     NConfigProvider: typeof import('naive-ui')['NConfigProvider'] | ||||||
|     NDivider: typeof import('naive-ui')['NDivider'] |     NDivider: typeof import('naive-ui')['NDivider'] | ||||||
|     NEllipsis: typeof import('naive-ui')['NEllipsis'] |     NEllipsis: typeof import('naive-ui')['NEllipsis'] | ||||||
|  |     NForm: typeof import('naive-ui')['NForm'] | ||||||
|     NFormItem: typeof import('naive-ui')['NFormItem'] |     NFormItem: typeof import('naive-ui')['NFormItem'] | ||||||
|     NGi: typeof import('naive-ui')['NGi'] |     NGi: typeof import('naive-ui')['NGi'] | ||||||
|     NGrid: typeof import('naive-ui')['NGrid'] |     NGrid: typeof import('naive-ui')['NGrid'] | ||||||
|  | |||||||
| @ -7,6 +7,8 @@ import VueMarkdown from 'vue-markdown-render'; | |||||||
| import BaseLayout from './base.layout.vue'; | import BaseLayout from './base.layout.vue'; | ||||||
| import FavoriteButton from '@/components/FavoriteButton.vue'; | import FavoriteButton from '@/components/FavoriteButton.vue'; | ||||||
| import type { Tool } from '@/tools/tools.types'; | import type { Tool } from '@/tools/tools.types'; | ||||||
|  | import { useTheme } from '@/ui/c-link/c-link.theme'; | ||||||
|  | import { useThemeVars } from 'naive-ui'; | ||||||
| 
 | 
 | ||||||
| const route = useRoute(); | const route = useRoute(); | ||||||
| 
 | 
 | ||||||
| @ -33,7 +35,10 @@ const toolFooter = computed<string>(() => { | |||||||
|   const createLink = (linkText: string, url: string) => { |   const createLink = (linkText: string, url: string) => { | ||||||
|     return `[${linkText.replace('[', '\\[').replace(']', '\\]')}](${url.replace('(', '%28').replace(')', '%29')})`; |     return `[${linkText.replace('[', '\\[').replace(']', '\\]')}](${url.replace('(', '%28').replace(')', '%29')})`; | ||||||
|   }; |   }; | ||||||
|   const footer = t(`tools.${i18nKey.value}.footer`, String(route.meta.footer)); |   let footer = t(`tools.${i18nKey.value}.footer`, String(route.meta.footer)); | ||||||
|  |   if (footer === 'undefined') { | ||||||
|  |     footer = ''; | ||||||
|  |   } | ||||||
|   const npmPackages = (route.meta.npmPackages as string[] || []) |   const npmPackages = (route.meta.npmPackages as string[] || []) | ||||||
|     .map( |     .map( | ||||||
|       packageName => createLink( |       packageName => createLink( | ||||||
| @ -42,6 +47,7 @@ const toolFooter = computed<string>(() => { | |||||||
|     ); |     ); | ||||||
|   return ((npmPackages.length > 0 ? `Made with ${npmPackages.join(', ')}\n` : '') + footer).trim(); |   return ((npmPackages.length > 0 ? `Made with ${npmPackages.join(', ')}\n` : '') + footer).trim(); | ||||||
| }); | }); | ||||||
|  | const themeVars = useThemeVars(); | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
| <template> | <template> | ||||||
| @ -124,9 +130,15 @@ const toolFooter = computed<string>(() => { | |||||||
|       opacity: 0.7; |       opacity: 0.7; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|   .tool-footer { | } | ||||||
|  | .tool-footer { | ||||||
|     opacity: 0.7; |     opacity: 0.7; | ||||||
|     font-size: 12px; |     font-size: 12px; | ||||||
|  |     text-align: center; | ||||||
|  | 
 | ||||||
|  |     ::v-deep(a) { | ||||||
|  |       color: v-bind('themeVars.textColor1'); | ||||||
|  |       font-style: italic; | ||||||
|  |     } | ||||||
|   } |   } | ||||||
| } |  | ||||||
| </style> | </style> | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user