upgrade to sveltekit 1
This commit is contained in:
parent
3a59f45e58
commit
1b2d55173a
5
.gitignore
vendored
5
.gitignore
vendored
@ -3,3 +3,8 @@ node_modules
|
|||||||
/build
|
/build
|
||||||
/.svelte-kit
|
/.svelte-kit
|
||||||
/package
|
/package
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
vite.config.js.timestamp-*
|
||||||
|
vite.config.ts.timestamp-*
|
||||||
|
14
README.md
14
README.md
@ -1,6 +1,6 @@
|
|||||||
# create-svelte
|
# create-svelte
|
||||||
|
|
||||||
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte);
|
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte).
|
||||||
|
|
||||||
## Creating a project
|
## Creating a project
|
||||||
|
|
||||||
@ -8,14 +8,12 @@ If you're seeing this, you've probably already done this step. Congrats!
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# create a new project in the current directory
|
# create a new project in the current directory
|
||||||
npm init svelte@next
|
npm create svelte@latest
|
||||||
|
|
||||||
# create a new project in my-app
|
# create a new project in my-app
|
||||||
npm init svelte@next my-app
|
npm create svelte@latest my-app
|
||||||
```
|
```
|
||||||
|
|
||||||
> Note: the `@next` is temporary
|
|
||||||
|
|
||||||
## Developing
|
## Developing
|
||||||
|
|
||||||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
||||||
@ -29,10 +27,12 @@ npm run dev -- --open
|
|||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs#adapters) for your target environment. Then:
|
To create a production version of your app:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run build
|
npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.
|
You can preview the production build with `npm run preview`.
|
||||||
|
|
||||||
|
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "./.svelte-kit/tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"baseUrl": ".",
|
|
||||||
"paths": {
|
|
||||||
"$lib": ["src/lib"],
|
|
||||||
"$lib/*": ["src/lib/*"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"]
|
|
||||||
}
|
|
8222
package-lock.json
generated
8222
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
41
package.json
41
package.json
@ -1,22 +1,23 @@
|
|||||||
{
|
{
|
||||||
"name": "blog",
|
"name": "blog.jfmonty2.com",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"scripts": {
|
"private": true,
|
||||||
"dev": "svelte-kit dev",
|
"scripts": {
|
||||||
"build": "svelte-kit build",
|
"dev": "vite dev",
|
||||||
"preview": "svelte-kit preview"
|
"build": "vite build",
|
||||||
},
|
"preview": "vite preview"
|
||||||
"devDependencies": {
|
},
|
||||||
"@sveltejs/adapter-static": "^1.0.0-next.21",
|
"devDependencies": {
|
||||||
"@sveltejs/kit": "next",
|
"@sveltejs/adapter-auto": "^2.0.0",
|
||||||
"mdsvex": "^0.9.8",
|
"@sveltejs/adapter-static": "^2.0.3",
|
||||||
"node-sass": "^6.0.1",
|
"@sveltejs/kit": "^1.20.4",
|
||||||
"svelte": "^3.42.6",
|
"hast-util-to-text": "^4.0.0",
|
||||||
"svelte-preprocess": "^4.9.8",
|
"mdast-util-to-string": "^4.0.0",
|
||||||
"unist-util-visit": "^5.0.0",
|
"mdsvex": "^0.11.0",
|
||||||
"unist-util-find": "^2.0.0",
|
"svelte": "^4.0.5",
|
||||||
"hast-util-to-text": "^3.1.2",
|
"unist-util-find": "^3.0.0",
|
||||||
"mdast-util-to-string": "^4.0.0"
|
"unist-util-visit": "^5.0.0",
|
||||||
},
|
"vite": "^4.4.2"
|
||||||
"type": "module"
|
},
|
||||||
|
"type": "module"
|
||||||
}
|
}
|
||||||
|
10
src/app.html
10
src/app.html
@ -4,12 +4,12 @@
|
|||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="preload" href="/Tajawal-Regular.woff2" as="font" type="font/woff2" />
|
<link rel="preload" href="/Tajawal-Regular.woff2" as="font" type="font/woff2" />
|
||||||
<link rel="preload" href="/Baskerville-Regular.woff2" as="font" type="font/woff2" />
|
<link rel="preload" href="/Baskerville-Regular.woff2" as="font" type="font/woff2" />
|
||||||
<link rel="icon" href="/favicon.png" />
|
|
||||||
<link rel="stylesheet" href="/style.css" />
|
<link rel="stylesheet" href="/style.css" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
||||||
%svelte.head%
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
%sveltekit.head%
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body data-sveltekit-preload-data="hover">
|
||||||
<div id="svelte">%svelte.body%</div>
|
<div style="display: contents">%sveltekit.body%</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
|
|
||||||
{#if href.startsWith('/') || host(href) === $page.host}
|
{#if href.startsWith('/') || host(href) === $page.host}
|
||||||
<a sveltekit:prefetch {href}>
|
<a data-sveltekit-preload-data="hover" {href}>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</a>
|
</a>
|
||||||
{:else}
|
{:else}
|
||||||
|
1
src/routes/+layout.js
Normal file
1
src/routes/+layout.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
export const prerender = true;
|
@ -1,13 +1,3 @@
|
|||||||
<script>
|
|
||||||
import Toc from '$lib/Toc.svelte';
|
|
||||||
|
|
||||||
const items = [
|
|
||||||
{depth: 2, text: 'The Suboptimal Solution: Absolute Positioning'},
|
|
||||||
{depth: 2, text: 'CSS Wizardry'},
|
|
||||||
{depth: 2, text: 'Implementation'},
|
|
||||||
];
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.header {
|
.header {
|
||||||
grid-column-start: 1;
|
grid-column-start: 1;
|
||||||
@ -38,9 +28,9 @@
|
|||||||
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<nav>
|
<nav>
|
||||||
<a sveltekit:prefetch href="/">Home</a>
|
<a data-sveltekit-preload-data="hover" href="/">Home</a>
|
||||||
<a sveltekit:prefetch href="/posts">Posts</a>
|
<a data-sveltekit-preload-data="hover" href="/posts">Posts</a>
|
||||||
<a sveltekit:prefetch href="/">About</a>
|
<a data-sveltekit-preload-data="hover" href="/">About</a>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
8
src/routes/+page.js
Normal file
8
src/routes/+page.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
export async function load({ fetch }) {
|
||||||
|
const resp = await fetch('/latest');
|
||||||
|
const postMeta = await resp.json();
|
||||||
|
const post = await import(`./_posts/${postMeta.slug}.svx`);
|
||||||
|
return {
|
||||||
|
post: post.default,
|
||||||
|
}
|
||||||
|
}
|
5
src/routes/+page.svelte
Normal file
5
src/routes/+page.svelte
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<script>
|
||||||
|
export let data;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svelte:component this={data.post} />
|
@ -1,24 +0,0 @@
|
|||||||
<script context="module">
|
|
||||||
export async function load({ url, params }) {
|
|
||||||
try {
|
|
||||||
let post = await import(`./_posts/${params.slug}.svx`);
|
|
||||||
return {
|
|
||||||
props: {
|
|
||||||
post: post.default
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (err) {
|
|
||||||
return {
|
|
||||||
status: 404,
|
|
||||||
error: `Not found: ${url.pathname}`,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export let post;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svelte:component this={post} />
|
|
14
src/routes/[slug]/+page.js
Normal file
14
src/routes/[slug]/+page.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import { error } from '@sveltejs/kit';
|
||||||
|
|
||||||
|
|
||||||
|
export async function load({ url, params }) {
|
||||||
|
try {
|
||||||
|
let post = await import(`../_posts/${params.slug}.svx`);
|
||||||
|
return {
|
||||||
|
post: post.default,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
throw error(404, `Not found: ${url.pathname}`);
|
||||||
|
}
|
||||||
|
}
|
5
src/routes/[slug]/+page.svelte
Normal file
5
src/routes/[slug]/+page.svelte
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<script>
|
||||||
|
export let data;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svelte:component this={data.post} />
|
@ -1,28 +1,25 @@
|
|||||||
import { dev } from '$app/env';
|
import { dev } from '$app/environment';
|
||||||
const posts = import.meta.globEager('./_posts/*.svx');
|
const posts = import.meta.globEager('./*.svx');
|
||||||
|
|
||||||
export let postData = [];
|
|
||||||
|
|
||||||
|
let postData = [];
|
||||||
for (const path in posts) {
|
for (const path in posts) {
|
||||||
// skip draft posts in production mode
|
// skip draft posts in production mode
|
||||||
if (!dev && posts[path].metadata.draft) {
|
if (!dev && posts[path].metadata.draft) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const slug = path.slice(9, -4)
|
// slice off the ./ and the .svx
|
||||||
|
const slug = path.slice(2, -4);
|
||||||
posts[path].metadata.slug = slug;
|
posts[path].metadata.slug = slug;
|
||||||
postData.push(posts[path].metadata);
|
postData.push(posts[path].metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
postData.sort((a, b) => {
|
postData.sort((a, b) => {
|
||||||
// sorting in reverse, so we flip the intuitive order
|
// sorting in reverse, so we flip the intuitive order
|
||||||
if (a.date > b.date) return -1;
|
if (a.date > b.date) return -1;
|
||||||
if (a.date < b.date) return 1;
|
if (a.date < b.date) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
})
|
});
|
||||||
|
|
||||||
export async function get() {
|
|
||||||
return {
|
|
||||||
body: {postData}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
export { postData };
|
@ -1,18 +0,0 @@
|
|||||||
<script context="module">
|
|
||||||
export async function load({ fetch }) {
|
|
||||||
const resp = await fetch('/latest.json');
|
|
||||||
const postMeta = await resp.json();
|
|
||||||
const post = await import(`./_posts/${postMeta.slug}.svx`);
|
|
||||||
return {
|
|
||||||
props: {
|
|
||||||
post: post.default,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export let post;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svelte:component this={post} />
|
|
@ -1,5 +0,0 @@
|
|||||||
import { postData } from './posts.js';
|
|
||||||
|
|
||||||
export async function get() {
|
|
||||||
return {body: postData[0]};
|
|
||||||
}
|
|
7
src/routes/latest/+server.js
Normal file
7
src/routes/latest/+server.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { json } from '@sveltejs/kit';
|
||||||
|
import { postData } from '../_posts/all.js';
|
||||||
|
|
||||||
|
|
||||||
|
export async function GET() {
|
||||||
|
return json(postData[0]);
|
||||||
|
}
|
@ -1,13 +1,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import { formatDate } from '$lib/datefmt.js';
|
import { formatDate } from '$lib/datefmt.js';
|
||||||
export let postData;
|
import { postData } from '../_posts/all.js';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style>
|
||||||
#posts {
|
#posts {
|
||||||
/*text-align: center;*/
|
/*text-align: center;*/
|
||||||
max-width: 24rem;
|
max-width: 24rem;
|
||||||
// margin-top: 1.25rem;
|
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
@ -17,11 +16,6 @@
|
|||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .post-title {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 1.2rem;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
.post-date {
|
.post-date {
|
||||||
color: #808080;
|
color: #808080;
|
||||||
}
|
}
|
||||||
@ -60,7 +54,7 @@
|
|||||||
<div class="post">
|
<div class="post">
|
||||||
<div class="post-date">{new Date(post.date).toISOString().split('T')[0]}</div>
|
<div class="post-date">{new Date(post.date).toISOString().split('T')[0]}</div>
|
||||||
<div>
|
<div>
|
||||||
<a sveltekit:prefetch class="post-link" href="/{post.slug}">
|
<a data-sveltekit-preload-data="hover" class="post-link" href="/{post.slug}">
|
||||||
<h3>{post.title}<h3>
|
<h3>{post.title}<h3>
|
||||||
</a>
|
</a>
|
||||||
{#if post.draft}
|
{#if post.draft}
|
@ -1,11 +1,10 @@
|
|||||||
import { mdsvex } from 'mdsvex';
|
|
||||||
import staticAdapter from '@sveltejs/adapter-static';
|
import staticAdapter from '@sveltejs/adapter-static';
|
||||||
import svp from 'svelte-preprocess';
|
import { mdsvex } from 'mdsvex';
|
||||||
|
|
||||||
import { localRemark } from './src/plugins/remark.js';
|
import { localRemark } from './src/plugins/remark.js';
|
||||||
import { localRehype } from './src/plugins/rehype.js';
|
import { localRehype } from './src/plugins/rehype.js';
|
||||||
|
|
||||||
|
/** @type {import('@sveltejs/kit').Config} */
|
||||||
const config = {
|
const config = {
|
||||||
extensions: ['.svelte', '.svx'],
|
extensions: ['.svelte', '.svx'],
|
||||||
preprocess: [
|
preprocess: [
|
||||||
@ -14,14 +13,12 @@ const config = {
|
|||||||
remarkPlugins: [localRemark],
|
remarkPlugins: [localRemark],
|
||||||
rehypePlugins: [localRehype],
|
rehypePlugins: [localRehype],
|
||||||
}),
|
}),
|
||||||
svp.scss(),
|
|
||||||
],
|
],
|
||||||
kit: {
|
kit: {
|
||||||
// hydrate the <div id="svelte"> element in src/app.html
|
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
|
||||||
|
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
|
||||||
|
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
|
||||||
adapter: staticAdapter(),
|
adapter: staticAdapter(),
|
||||||
prerender: {
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
281
tmp/crane.svg
281
tmp/crane.svg
@ -1,281 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
<!-- Crane image created by macrovector on Freepik: https://www.freepik.com/free-vector/construction-icons-set_1537228.htm#query=crane&position=3&from_view=keyword -->
|
|
||||||
|
|
||||||
<svg
|
|
||||||
width="28.305676mm"
|
|
||||||
height="28.174238mm"
|
|
||||||
viewBox="0 0 28.305676 28.174238"
|
|
||||||
version="1.1"
|
|
||||||
id="svg1392"
|
|
||||||
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
|
|
||||||
sodipodi:docname="crane.svg"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<sodipodi:namedview
|
|
||||||
id="namedview1394"
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#000000"
|
|
||||||
borderopacity="0.25"
|
|
||||||
inkscape:showpageshadow="2"
|
|
||||||
inkscape:pageopacity="0.0"
|
|
||||||
inkscape:pagecheckerboard="0"
|
|
||||||
inkscape:deskcolor="#d1d1d1"
|
|
||||||
inkscape:document-units="mm"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:zoom="2.1089995"
|
|
||||||
inkscape:cx="-5.6899017"
|
|
||||||
inkscape:cy="78.710306"
|
|
||||||
inkscape:window-width="1920"
|
|
||||||
inkscape:window-height="1017"
|
|
||||||
inkscape:window-x="-8"
|
|
||||||
inkscape:window-y="-8"
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:current-layer="layer1" />
|
|
||||||
<defs
|
|
||||||
id="defs1389" />
|
|
||||||
<g
|
|
||||||
inkscape:label="Layer 1"
|
|
||||||
inkscape:groupmode="layer"
|
|
||||||
id="layer1"
|
|
||||||
transform="translate(-139.84716,-103.71933)">
|
|
||||||
<path
|
|
||||||
d="m 166.79605,124.82179 h 0.18627 v -20.83188 h -0.18627 v 20.83188"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path324" />
|
|
||||||
<path
|
|
||||||
d="m 166.25101,125.97184 h 1.27635 v -0.51893 c 0,-0.1323 -0.10724,-0.23919 -0.23918,-0.23919 h -0.79763 c -0.13229,0 -0.23954,0.10689 -0.23954,0.23919 v 0.51893"
|
|
||||||
style="fill:#e4731a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path326" />
|
|
||||||
<path
|
|
||||||
d="m 166.6934,125.21372 h 0.39193 v -0.64981 h -0.39193 v 0.64981"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path328" />
|
|
||||||
<path
|
|
||||||
d="m 165.62554,126.85626 c 0,0.69814 0.56585,1.26365 1.26365,1.26365 0.69779,0 1.26365,-0.56551 1.26365,-1.26365 0,-0.6978 -0.56586,-1.26365 -1.26365,-1.26365 -0.6978,0 -1.26365,0.56585 -1.26365,1.26365"
|
|
||||||
style="fill:#f9a727;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path330" />
|
|
||||||
<path
|
|
||||||
d="m 143.76637,124.8673 19.84057,-20.49675 -0.0935,-0.0903 -19.84093,20.49639 0.0938,0.0907"
|
|
||||||
style="fill:#100f0d;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path332" />
|
|
||||||
<path
|
|
||||||
d="m 149.82885,128.1506 2.90478,-6.56802 10.82675,-17.25718 1.80869,1.13488 -10.81899,17.2466 -4.61751,5.50863 z m 13.67261,-24.08167 -10.93188,17.42652 -2.97638,6.72711 0.37782,0.23707 4.72899,-5.64338 10.92553,-17.41488 -2.12408,-1.33244"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path334" />
|
|
||||||
<path
|
|
||||||
d="m 154.67073,122.68783 -0.0988,0.1577 -1.96638,-1.23367 0.0988,-0.15769 1.96638,1.23366"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path336" />
|
|
||||||
<path
|
|
||||||
d="m 154.712,122.74604 -0.18132,0.0413 -0.71791,-3.13443 0.18168,-0.0416 0.71755,3.13478"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path338" />
|
|
||||||
<path
|
|
||||||
d="m 155.85042,120.93135 -3.13443,0.71755 -0.0416,-0.18132 3.13478,-0.71791 0.0413,0.18168"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path340" />
|
|
||||||
<path
|
|
||||||
d="m 155.87935,120.76167 -0.0991,0.15769 -1.96639,-1.23366 0.0991,-0.1577 1.96639,1.23367"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path342" />
|
|
||||||
<path
|
|
||||||
d="m 155.92062,120.81952 -0.18168,0.0416 -0.71755,-3.13443 0.18133,-0.0416 0.7179,3.13443"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path344" />
|
|
||||||
<path
|
|
||||||
d="m 157.05903,119.00483 -3.13478,0.71791 -0.0413,-0.18133 3.13443,-0.7179 0.0416,0.18132"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path346" />
|
|
||||||
<path
|
|
||||||
d="m 157.08761,118.8355 -0.0988,0.15769 -1.96638,-1.23366 0.0988,-0.15769 1.96638,1.23366"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path348" />
|
|
||||||
<path
|
|
||||||
d="m 157.12888,118.89336 -0.18132,0.0416 -0.71791,-3.13478 0.18168,-0.0413 0.71755,3.13443"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path350" />
|
|
||||||
<path
|
|
||||||
d="m 158.2673,117.07867 -3.13443,0.7179 -0.0416,-0.18168 3.13478,-0.71755 0.0413,0.18133"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path352" />
|
|
||||||
<path
|
|
||||||
d="m 158.29623,116.90898 -0.0991,0.15769 -1.96639,-1.23331 0.0991,-0.15804 1.96639,1.23366"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path354" />
|
|
||||||
<path
|
|
||||||
d="m 158.3375,116.96719 -0.18168,0.0416 -0.71755,-3.13479 0.18133,-0.0413 0.7179,3.13443"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path356" />
|
|
||||||
<path
|
|
||||||
d="m 159.47592,115.1525 -3.13479,0.7179 -0.0413,-0.18168 3.13443,-0.71755 0.0416,0.18133"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path358" />
|
|
||||||
<path
|
|
||||||
d="m 159.50449,114.98282 -0.0988,0.15804 -1.96638,-1.23366 0.0988,-0.15805 1.96638,1.23367"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path360" />
|
|
||||||
<path
|
|
||||||
d="m 159.54577,115.04102 -0.18133,0.0416 -0.71791,-3.13478 0.18169,-0.0413 0.71755,3.13443"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path362" />
|
|
||||||
<path
|
|
||||||
d="m 160.68418,113.22633 -3.13443,0.71791 -0.0416,-0.18168 3.13478,-0.71755 0.0413,0.18132"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path364" />
|
|
||||||
<path
|
|
||||||
d="m 160.71311,113.05665 -0.0991,0.15769 -1.96639,-1.23331 0.0991,-0.15805 1.96639,1.23367"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path366" />
|
|
||||||
<path
|
|
||||||
d="m 160.75438,113.11486 -0.18168,0.0416 -0.7179,-3.13478 0.18168,-0.0413 0.7179,3.13443"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path368" />
|
|
||||||
<path
|
|
||||||
d="m 161.8928,111.30017 -3.13479,0.7179 -0.0413,-0.18168 3.13443,-0.71755 0.0416,0.18133"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path370" />
|
|
||||||
<path
|
|
||||||
d="m 161.92137,111.13048 -0.0991,0.15805 -1.96603,-1.23367 0.0988,-0.15804 1.96638,1.23366"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path372" />
|
|
||||||
<path
|
|
||||||
d="m 161.96265,111.18869 -0.18133,0.0416 -0.71791,-3.13479 0.18169,-0.0416 0.71755,3.13478"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path374" />
|
|
||||||
<path
|
|
||||||
d="m 163.10106,109.374 -3.13443,0.7179 -0.0416,-0.18168 3.13478,-0.7179 0.0413,0.18168"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path376" />
|
|
||||||
<path
|
|
||||||
d="m 163.12999,109.20432 -0.0991,0.15769 -1.96639,-1.23367 0.0991,-0.15769 1.96639,1.23367"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path378" />
|
|
||||||
<path
|
|
||||||
d="m 163.17126,109.26252 -0.18168,0.0413 -0.71755,-3.13443 0.18133,-0.0416 0.7179,3.13478"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path380" />
|
|
||||||
<path
|
|
||||||
d="m 164.30968,107.44783 -3.13479,0.71755 -0.0413,-0.18132 3.13443,-0.71791 0.0416,0.18168"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path382" />
|
|
||||||
<path
|
|
||||||
d="m 164.33825,107.27815 -0.0988,0.15769 -1.96638,-1.23366 0.0988,-0.1577 1.96638,1.23367"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path384" />
|
|
||||||
<path
|
|
||||||
d="m 164.37953,107.33636 -0.18133,0.0413 -0.7179,-3.13443 0.18168,-0.0416 0.71755,3.13479"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path386" />
|
|
||||||
<path
|
|
||||||
d="m 165.51794,105.52167 -3.13443,0.71755 -0.0416,-0.18133 3.13443,-0.7179 0.0416,0.18168"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path388" />
|
|
||||||
<path
|
|
||||||
d="m 153.38944,124.32366 -0.18133,0.0416 -0.64382,-2.81128 0.18133,-0.0416 0.64382,2.81128"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path390" />
|
|
||||||
<path
|
|
||||||
d="m 153.34817,124.26581 -0.0988,0.15769 -1.48908,-0.93415 0.0991,-0.1577 1.48873,0.93416"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path392" />
|
|
||||||
<path
|
|
||||||
d="m 154.64215,122.85752 -2.81163,0.64382 -0.0413,-0.18168 2.81129,-0.64382 0.0416,0.18168"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path394" />
|
|
||||||
<path
|
|
||||||
d="m 152.06476,125.91399 -0.18556,0.012 -0.16228,-2.50931 0.18591,-0.0123 0.16193,2.50966"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path396" />
|
|
||||||
<path
|
|
||||||
d="m 152.02137,125.84096 -0.0988,0.15769 -0.98954,-0.62053 0.0991,-0.15769 0.98919,0.62053"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path398" />
|
|
||||||
<path
|
|
||||||
d="m 153.33405,124.43056 -2.31598,0.95461 -0.0709,-0.17215 2.31599,-0.95462 0.0709,0.17216"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path400" />
|
|
||||||
<path
|
|
||||||
d="m 167.06769,103.88196 c -0.20602,-0.12912 -0.44944,-0.1838 -0.69074,-0.15523 l -2.87549,0.3422 -0.0935,0.16122 2.09691,1.31551 1.58573,-1.32151 c 0.0522,-0.0434 0.0801,-0.10936 0.0759,-0.17709 -0.005,-0.0677 -0.0416,-0.12912 -0.0988,-0.1651"
|
|
||||||
style="fill:#e4731a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path402" />
|
|
||||||
<path
|
|
||||||
d="m 163.77733,104.24179 2.71922,-0.33902 c 0.13687,-0.0169 0.27551,0.0138 0.39264,0.0871 l 0.0395,0.0247 c 0.0162,0.0102 0.0265,0.0275 0.0279,0.0466 0.001,0.019 -0.007,0.0378 -0.0215,0.0501 l -1.44533,1.20474 -1.71239,-1.07421"
|
|
||||||
style="fill:#f9a727;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path404" />
|
|
||||||
<path
|
|
||||||
d="m 145.63997,128.61168 h 3.81459 v 0.62547 h -3.81459 v -0.62547"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path406" />
|
|
||||||
<path
|
|
||||||
d="m 140.21425,126.26888 c 0.0783,-0.35489 0.34149,-0.63994 0.68897,-0.74683 l 6.68832,-2.05246 -0.3549,5.14209 h -6.77756 c -0.18556,0 -0.3609,-0.084 -0.47696,-0.2286 -0.11606,-0.14429 -0.16051,-0.33373 -0.12065,-0.5147 l 0.35278,-1.5995"
|
|
||||||
style="fill:#f9a727;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path408" />
|
|
||||||
<path
|
|
||||||
d="m 151.90037,131.89357 c 0.75917,0 1.37689,-0.61771 1.37689,-1.37724 0,-0.75918 -0.61772,-1.3769 -1.37689,-1.3769 -0.0243,-0.002 -3.12667,-0.22013 -4.15961,-0.22013 -1.03293,0 -4.13526,0.21802 -4.1663,0.22049 h -7.1e-4 c -0.75212,0 -1.36948,0.61736 -1.36948,1.37654 0,0.75953 0.61771,1.37724 1.37689,1.37724 h 8.31921"
|
|
||||||
style="fill:#252529;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path410" />
|
|
||||||
<path
|
|
||||||
d="m 143.58116,131.69778 c -0.65158,0 -1.18145,-0.52987 -1.18145,-1.18145 0,-0.65123 0.52669,-1.1811 1.17475,-1.1811 l 0.0141,-7.1e-4 c 0.03,-0.002 3.12667,-0.21943 4.15219,-0.21943 1.03082,0 4.11551,0.21696 4.14338,0.21908 l 0.008,7e-4 h 0.008 c 0.65158,0 1.18145,0.53023 1.18145,1.18146 0,0.65158 -0.52987,1.18145 -1.18145,1.18145 h -8.31921"
|
|
||||||
style="fill:#e4731a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path412" />
|
|
||||||
<path
|
|
||||||
d="m 150.71891,130.51633 c 0,-0.65229 0.52882,-1.18146 1.18146,-1.18146 0.65263,0 1.18145,0.52917 1.18145,1.18146 0,0.65263 -0.52882,1.18145 -1.18145,1.18145 -0.65264,0 -1.18146,-0.52882 -1.18146,-1.18145"
|
|
||||||
style="fill:#b8bbb6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path414" />
|
|
||||||
<path
|
|
||||||
d="m 151.90037,131.19507 c 0.37429,0 0.67874,-0.30445 0.67874,-0.67874 0,-0.3743 -0.30445,-0.67875 -0.67874,-0.67875 -0.3743,0 -0.67875,0.30445 -0.67875,0.67875 0,0.37429 0.30445,0.67874 0.67875,0.67874"
|
|
||||||
style="fill:#252529;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path416" />
|
|
||||||
<path
|
|
||||||
d="m 145.53555,129.58146 c 0,-0.19014 0.15416,-0.34431 0.34431,-0.34431 0.19015,0 0.34431,0.15417 0.34431,0.34431 0,0.19015 -0.15416,0.34432 -0.34431,0.34432 -0.19015,0 -0.34431,-0.15417 -0.34431,-0.34432"
|
|
||||||
style="fill:#252529;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path418" />
|
|
||||||
<path
|
|
||||||
d="m 145.54331,131.35311 c 0,-0.19014 0.15416,-0.34431 0.34431,-0.34431 0.19015,0 0.34396,0.15417 0.34396,0.34431 0,0.19015 -0.15381,0.34432 -0.34396,0.34432 -0.19015,0 -0.34431,-0.15417 -0.34431,-0.34432"
|
|
||||||
style="fill:#252529;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path420" />
|
|
||||||
<path
|
|
||||||
d="m 149.25735,131.35311 c 0,-0.19014 0.15417,-0.34431 0.34432,-0.34431 0.19014,0 0.34431,0.15417 0.34431,0.34431 0,0.19015 -0.15417,0.34432 -0.34431,0.34432 -0.19015,0 -0.34432,-0.15417 -0.34432,-0.34432"
|
|
||||||
style="fill:#252529;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path422" />
|
|
||||||
<path
|
|
||||||
d="m 149.94598,129.58146 c 0,-0.19014 -0.15417,-0.34431 -0.34431,-0.34431 -0.19015,0 -0.34432,0.15417 -0.34432,0.34431 0,0.19015 0.15417,0.34432 0.34432,0.34432 0.19014,0 0.34431,-0.15417 0.34431,-0.34432"
|
|
||||||
style="fill:#252529;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path424" />
|
|
||||||
<path
|
|
||||||
d="m 144.76261,130.51633 c 0,-0.65229 -0.52881,-1.18146 -1.18145,-1.18146 -0.65264,0 -1.18145,0.52917 -1.18145,1.18146 0,0.65263 0.52881,1.18145 1.18145,1.18145 0.65264,0 1.18145,-0.52882 1.18145,-1.18145"
|
|
||||||
style="fill:#b8bbb6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path426" />
|
|
||||||
<path
|
|
||||||
d="m 143.58116,131.19507 c 0.3743,0 0.67874,-0.30445 0.67874,-0.67874 0,-0.3743 -0.30444,-0.67875 -0.67874,-0.67875 -0.3743,0 -0.67874,0.30445 -0.67874,0.67875 0,0.37429 0.30444,0.67874 0.67874,0.67874"
|
|
||||||
style="fill:#252529;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path428" />
|
|
||||||
<path
|
|
||||||
d="m 143.43652,131.0088 h 8.60848 v -0.98495 h -8.60848 v 0.98495"
|
|
||||||
style="fill:#f9a727;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path430" />
|
|
||||||
<path
|
|
||||||
d="m 147.23664,128.61168 h 3.55812 c 0.33761,0 0.61172,-0.27376 0.61172,-0.61172 v -0.73236 c 0,-0.72073 0.11465,-2.63737 -0.76377,-3.69429 -0.0744,-0.0896 -0.18485,-0.14147 -0.30092,-0.14147 h -2.60173 c -0.16158,0 -0.29704,0.12277 -0.31256,0.28364 l -0.19086,1.97943 v 2.91677"
|
|
||||||
style="fill:#e4731a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path432" />
|
|
||||||
<path
|
|
||||||
d="m 150.76301,128.2649 c 0.16969,0 0.30797,-0.13794 0.30797,-0.30762 v -0.7165 c 0,-0.066 7.1e-4,-0.14217 0.002,-0.22648 0.01,-0.76165 0.03,-2.34562 -0.68192,-3.20216 -0.0173,-0.0212 -0.0437,-0.0335 -0.0709,-0.0335 h -2.54529 c -0.008,0 -0.0155,0.006 -0.0162,0.0148 l -0.16404,1.69827 c -0.0141,0.14464 0.025,0.28928 0.10971,0.40711 l 1.52153,2.11702 c 0.11219,0.15628 0.29316,0.24906 0.48578,0.24906 h 1.05163"
|
|
||||||
style="fill:#4c5462;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path434" />
|
|
||||||
<path
|
|
||||||
d="m 141.47331,125.91928 h 2.36891 c 0.0723,0 0.13052,0.0924 0.13052,0.20637 h -0.13052 -0.13053 -2.10785 -0.13053 -0.13053 c 0,-0.11394 0.0582,-0.20637 0.13053,-0.20637"
|
|
||||||
style="fill:#e4731a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path436" />
|
|
||||||
<path
|
|
||||||
d="m 141.47331,126.34649 h 2.36891 c 0.0723,0 0.13052,0.0924 0.13052,0.20673 h -0.13052 -0.13053 -2.10785 -0.13053 -0.13053 c 0,-0.1143 0.0582,-0.20673 0.13053,-0.20673"
|
|
||||||
style="fill:#e4731a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path438" />
|
|
||||||
<path
|
|
||||||
d="m 141.47331,126.77406 h 2.36891 c 0.0723,0 0.13052,0.0924 0.13052,0.20637 h -0.13052 -0.13053 -2.10785 -0.13053 -0.13053 c 0,-0.11394 0.0582,-0.20637 0.13053,-0.20637"
|
|
||||||
style="fill:#e4731a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
|
|
||||||
id="path440" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 17 KiB |
@ -1,99 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Under Construction</title>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
main {
|
|
||||||
background-color: #f2f2f2;
|
|
||||||
padding: 1rem;
|
|
||||||
height: 100vh;
|
|
||||||
width: 100vw;
|
|
||||||
justify-content: center;
|
|
||||||
align-content: center;
|
|
||||||
display: grid;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hero {
|
|
||||||
padding: 4rem;
|
|
||||||
background-color: white;
|
|
||||||
border-radius: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
#hero img {
|
|
||||||
width: 16rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
font-family: sans-serif;
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
margin-top: 2rem;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/luxon/3.0.4/luxon.min.js" integrity="sha512-XdACFfCJeqqfVU8mvvXReyFR130qjFvfv/PZOFGwVyBz0HC+57fNkSacMPF2Dyek5jqi4D7ykFrx/T7N6F2hwQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<main>
|
|
||||||
<p style="font-size:2.5rem;color:#505050">Coming Soon™</p>
|
|
||||||
<div id="hero">
|
|
||||||
<img src="/crane.svg">
|
|
||||||
</div>
|
|
||||||
<p>
|
|
||||||
Under Construction for <br />
|
|
||||||
<span id="counter" style="margin-top:0.5rem"></span>
|
|
||||||
</p>
|
|
||||||
</main>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
function u(v, unit) {
|
|
||||||
if (v === 1) {
|
|
||||||
return `${v} ${unit}`;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return `${v} ${unit}s`;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function f(n) {
|
|
||||||
let s = n.toString();
|
|
||||||
if (s.length == 1) {
|
|
||||||
return '0' + s;
|
|
||||||
}
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
|
|
||||||
const start = luxon.DateTime.fromSeconds(1634529923);
|
|
||||||
function setDuration() {
|
|
||||||
var diff = luxon.DateTime.now().diff(start);
|
|
||||||
const years = Math.floor(diff.as('years'));
|
|
||||||
diff = diff.minus(luxon.Duration.fromObject({years}));
|
|
||||||
const months = Math.floor(diff.as('months'));
|
|
||||||
diff = diff.minus(luxon.Duration.fromObject({months}));
|
|
||||||
const days = Math.floor(diff.as('days'));
|
|
||||||
diff = diff.minus(luxon.Duration.fromObject({days}));
|
|
||||||
const hours = Math.floor(diff.as('hours'))
|
|
||||||
diff = diff.minus(luxon.Duration.fromObject({hours}));
|
|
||||||
const minutes = Math.floor(diff.as('minutes'));
|
|
||||||
diff = diff.minus(luxon.Duration.fromObject({minutes}));
|
|
||||||
const seconds = Math.floor(diff.as('seconds'));
|
|
||||||
diff = diff.minus(luxon.Duration.fromObject({seconds}));
|
|
||||||
const millis = diff.as('milliseconds');
|
|
||||||
|
|
||||||
const timeString = `${u(years, "year")}, ${u(months, "month")}, ${u(days, "day")}, ${f(hours)}:${f(minutes)}:${f(seconds)}.${Math.floor(millis / 100)}`;
|
|
||||||
document.getElementById('counter').innerHTML = timeString;
|
|
||||||
|
|
||||||
window.setTimeout(setDuration, 10);
|
|
||||||
}
|
|
||||||
setDuration();
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</html>
|
|
6
vite.config.js
Normal file
6
vite.config.js
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
import { sveltekit } from '@sveltejs/kit/vite';
|
||||||
|
import { defineConfig } from 'vite';
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [sveltekit()]
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user