|
@@ -52,6 +52,7 @@
|
|
|
showThemeSwitchStore.set(false);
|
|
showThemeSwitchStore.set(false);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ let showVersion = false;
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<div
|
|
<div
|
|
@@ -96,7 +97,33 @@
|
|
|
</svg>
|
|
</svg>
|
|
|
</div>
|
|
</div>
|
|
|
</a>
|
|
</a>
|
|
|
- <span class="text-primary dark:text-dark text-sm">v0.x</span>
|
|
|
|
|
|
|
+ <!-- 下拉选项,选择版本 -->
|
|
|
|
|
+ {#if window.location.pathname === '' || window.location.pathname === '/'}
|
|
|
|
|
+ <div class="relative bottom-1">
|
|
|
|
|
+ <button class="flex rounded bg-black/5 py-0.5 pl-2 pr-4 text-sm dark:bg-white/20" on:click={() => (showVersion = !showVersion)}>
|
|
|
|
|
+ v0
|
|
|
|
|
+ <span class="absolute bottom-0.5 left-5 w-4 text-gray-500">
|
|
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
|
|
|
+ <path d="M12 15.0006L7.75732 10.758L9.17154 9.34375L12 12.1722L14.8284 9.34375L16.2426 10.758L12 15.0006Z"></path>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </button>
|
|
|
|
|
+ {#if showVersion}
|
|
|
|
|
+ <div class="absolute left-0 top-8 w-12 rounded-md bg-white p-1 text-xs shadow-md dark:bg-black dark:shadow-white/10">
|
|
|
|
|
+ <a href="https://stdf.design" target="_blank" class="block rounded px-2 py-0.5 hover:bg-black/5 dark:hover:bg-white/20"> v1 </a>
|
|
|
|
|
+ <a href="/" class="relative flex rounded py-0.5 pl-2 hover:bg-black/5 dark:hover:bg-white/20"
|
|
|
|
|
+ >v0
|
|
|
|
|
+ <span class="absolute bottom-0.5 left-4 ml-2 w-3 mt-2">
|
|
|
|
|
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
|
|
|
|
+ <path d="M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z"
|
|
|
|
|
+ ></path>
|
|
|
|
|
+ </svg>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </a>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {/if}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ {/if}
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<div class="cursor-pointer md:hidden p-4">
|
|
<div class="cursor-pointer md:hidden p-4">
|