chore: improve lighthouse
This commit is contained in:
		
							parent
							
								
									1fdc7e710c
								
							
						
					
					
						commit
						edec07ad44
					
				@ -75,7 +75,7 @@
 | 
			
		||||
- [TypeScript](https://www.typescriptlang.org/)
 | 
			
		||||
  - [Vue TypeScript Plugin](https://github.com/znck/vue-developer-experience/tree/master/packages/typescript-plugin-vue) - better type support for Vue
 | 
			
		||||
- [pnpm](https://pnpm.js.org/) - fast, disk space efficient package manager
 | 
			
		||||
- [presite](https://github.com/egoist/presite) - Server-side generation
 | 
			
		||||
- [vite-ssg](https://github.com/antfu/vite-ssg) - Server-side generation
 | 
			
		||||
- [Netlify](https://www.netlify.com/) - deploy
 | 
			
		||||
- [VS Code Extensions](./.vscode/extensions.json)
 | 
			
		||||
  - [Iconify IntelliSense](https://marketplace.visualstudio.com/items?itemName=antfu.iconify)
 | 
			
		||||
@ -98,7 +98,7 @@ As this template is strongly opinionated, the following provides a curated list
 | 
			
		||||
 | 
			
		||||
### Clone to local
 | 
			
		||||
 | 
			
		||||
If you prefer to do it manually with cleaner git history
 | 
			
		||||
If you prefer to do it manually with the cleaner git history
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
npx degit antfu/vitesse my-vitesse-app
 | 
			
		||||
 | 
			
		||||
@ -7,6 +7,7 @@
 | 
			
		||||
  <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#00aba9">
 | 
			
		||||
  <meta name="msapplication-TileColor" content="#00aba9">
 | 
			
		||||
  <meta name="theme-color" content="#ffffff">
 | 
			
		||||
  <meta name="description" content="Opinionated Vite Starter Template">
 | 
			
		||||
  <title>Vitesse</title>
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,11 @@
 | 
			
		||||
{
 | 
			
		||||
  "button": {
 | 
			
		||||
    "about": "About",
 | 
			
		||||
    "back": "Back",
 | 
			
		||||
    "go": "GO"
 | 
			
		||||
    "go": "GO",
 | 
			
		||||
    "home": "Home",
 | 
			
		||||
    "toggle_dark": "Toggle dark mode",
 | 
			
		||||
    "toggle_langs": "Change languages"
 | 
			
		||||
  },
 | 
			
		||||
  "intro": {
 | 
			
		||||
    "desc": "Opinionated Vite Starter Template",
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="px-4 py-10 text-center text-gray-700 dark:text-gray-200">
 | 
			
		||||
  <main class="px-4 py-10 text-center text-gray-700 dark:text-gray-200">
 | 
			
		||||
    <router-view />
 | 
			
		||||
    <Footer />
 | 
			
		||||
  </div>
 | 
			
		||||
  </main>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
@ -1,25 +1,25 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="text-xl mt-6">
 | 
			
		||||
    <router-link class="icon-btn mx-2" to="/">
 | 
			
		||||
  <nav class="text-xl mt-6">
 | 
			
		||||
    <router-link class="icon-btn mx-2" to="/" :title="t('button.home')">
 | 
			
		||||
      <Icon icon="carbon:campsite" class="inline-block" />
 | 
			
		||||
    </router-link>
 | 
			
		||||
 | 
			
		||||
    <div class="icon-btn mx-2" @click="isDark = !isDark">
 | 
			
		||||
    <a class="icon-btn mx-2" @click="isDark = !isDark" :title="t('button.toggle_dark')">
 | 
			
		||||
      <Icon :icon="isDark ? 'carbon:moon' : 'carbon:sun'" class="inline-block" />
 | 
			
		||||
    </div>
 | 
			
		||||
    </a>
 | 
			
		||||
 | 
			
		||||
    <div class="icon-btn mx-2" @click="toggleLocales">
 | 
			
		||||
    <a class="icon-btn mx-2" @click="toggleLocales" :title="t('button.toggle_langs')">
 | 
			
		||||
      <Icon icon="carbon:language" class="inline-block" />
 | 
			
		||||
    </div>
 | 
			
		||||
    </a>
 | 
			
		||||
 | 
			
		||||
    <router-link class="icon-btn mx-2" to="/about">
 | 
			
		||||
    <router-link class="icon-btn mx-2" to="/about" :title="t('button.about')">
 | 
			
		||||
      <Icon icon="carbon:dicom-overlay" class="inline-block" />
 | 
			
		||||
    </router-link>
 | 
			
		||||
 | 
			
		||||
    <a class="icon-btn mx-2" href="https://github.com/antfu/vitesse" target="_blank">
 | 
			
		||||
    <a class="icon-btn mx-2" rel="noreferrer" href="https://github.com/antfu/vitesse" target="_blank" title="GitHub">
 | 
			
		||||
      <Icon icon="carbon:logo-github" class="inline-block" />
 | 
			
		||||
    </a>
 | 
			
		||||
  </div>
 | 
			
		||||
  </nav>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script setup lang='ts'>
 | 
			
		||||
 | 
			
		||||
@ -4,12 +4,12 @@
 | 
			
		||||
      <Icon class="iconify inline-block" icon="carbon:campsite" />
 | 
			
		||||
    </p>
 | 
			
		||||
    <p>
 | 
			
		||||
      <a href="https://github.com/antfu/vitesse" target="_blank">
 | 
			
		||||
      <a rel="noreferrer" href="https://github.com/antfu/vitesse" target="_blank">
 | 
			
		||||
        Vitesse
 | 
			
		||||
      </a>
 | 
			
		||||
    </p>
 | 
			
		||||
    <p class="text-sm opacity-50">
 | 
			
		||||
      <em>{{ t('intro.desc') }}</em>
 | 
			
		||||
    <p>
 | 
			
		||||
      <em class="text-sm opacity-50">{{ t('intro.desc') }}</em>
 | 
			
		||||
    </p>
 | 
			
		||||
 | 
			
		||||
    <div class="py-4" />
 | 
			
		||||
@ -17,6 +17,9 @@
 | 
			
		||||
    <input
 | 
			
		||||
      v-model="name"
 | 
			
		||||
      :placeholder="t('intro.whats-your-name')"
 | 
			
		||||
      type="text"
 | 
			
		||||
      autocomplete="false"
 | 
			
		||||
      autofocus
 | 
			
		||||
      class="px-4 py-2 border border-gray-200 rounded text-center text-sm outline-none active:outline-none bg-transparent dark:border-gray-700"
 | 
			
		||||
      style="width: 250px"
 | 
			
		||||
      @keydown.enter="go"
 | 
			
		||||
 | 
			
		||||
@ -32,6 +32,7 @@ module.exports = {
 | 
			
		||||
      },
 | 
			
		||||
      opacity: {
 | 
			
		||||
        10: '0.1',
 | 
			
		||||
        50: '0.5',
 | 
			
		||||
        85: '0.85',
 | 
			
		||||
      },
 | 
			
		||||
      typography: {
 | 
			
		||||
 | 
			
		||||
@ -62,6 +62,7 @@ const config: UserConfig = {
 | 
			
		||||
      manifest: {
 | 
			
		||||
        name: 'Vitesse',
 | 
			
		||||
        short_name: 'Vitesse',
 | 
			
		||||
        theme_color: '#ffffff',
 | 
			
		||||
        icons: [
 | 
			
		||||
          {
 | 
			
		||||
            src: '/pwa-192x192.png',
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user