design: update loaders

This commit is contained in:
Xylight committed 2024-09-26 17:34:14 -07:00
1 parent bb34c943c1
commit e284ae14ef
2 files changed
+72 -61

No files matched your search

+57 -48
View File
@@ -27,55 +27,64 @@
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div class="loader">
<svg
width="24"
height="24"
role="status"
class="spinner animate-spin inline text-zinc-400 fill-primary-900
dark:text-zinc-600 dark:fill-primary-100 mx-auto"
viewBox="0 0 100 101"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
fill="currentColor"
/>
<path
d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
fill="currentFill"
/>
</svg>
</div>
<div class="loader">
<svg
width="40"
height="40"
viewBox="15 15 70 70"
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
>
<path
d="M45 20.8868C48.094 19.1004 51.906 19.1004 55 20.8868L72.7128 31.1132C75.8068 32.8996 77.7128 36.2008 77.7128 39.7735V60.2265C77.7128 63.7992 75.8068 67.1004 72.7128 68.8867L55 79.1133C51.906 80.8996 48.094 80.8996 45 79.1133L27.2872 68.8867C24.1932 67.1004 22.2872 63.7992 22.2872 60.2265V39.7735C22.2872 36.2008 24.1932 32.8996 27.2872 31.1132L45 20.8868Z"
/>
</svg>
<svg
stroke="currentColor"
fill="none"
stroke-width="2"
viewBox="0 0 24 24"
stroke-linecap="round"
stroke-linejoin="round"
height="20"
width="20"
class="animate-spin"
xmlns="http://www.w3.org/2000/svg"
>
<line x1="12" y1="2" x2="12" y2="6"></line>
<line x1="12" y1="18" x2="12" y2="22"></line>
<line x1="4.93" y1="4.93" x2="7.76" y2="7.76"></line>
<line x1="16.24" y1="16.24" x2="19.07" y2="19.07"></line>
<line x1="2" y1="12" x2="6" y2="12"></line>
<line x1="18" y1="12" x2="22" y2="12"></line>
<line x1="4.93" y1="19.07" x2="7.76" y2="16.24"></line>
<line x1="16.24" y1="7.76" x2="19.07" y2="4.93"></line>
</svg>
</div>
<div style="display: contents">%sveltekit.body%</div>
</body>
<style>
.loader {
width: 100svw;
height: 100svh;
display: grid;
place-items: center;
z-index: -50;
position: absolute;
top: 0;
left: 0;
}
.spinner {
display: inline;
margin-top: -1px;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.animate-spin {
animation: spin 0.8s linear infinite;
}
</style>
<style>
@keyframes spin {
to {
transform: rotate(360deg);
}
}
.animate-spin {
animation: spin 0.9s linear infinite;
}
.loader {
width: 100vw;
height: 100vh;
z-index: -50;
position: absolute;
top: 0;
left: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1rem;
}
</style>
</html>