first commit 🎉

This commit is contained in:
ari melody 2024-04-18 02:26:03 +01:00
commit 81205598f1
Signed by: ari
GPG key ID: CF99829C92678188
19 changed files with 2256 additions and 0 deletions

10
.gitignore vendored Normal file
View file

@ -0,0 +1,10 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

1
.npmrc Normal file
View file

@ -0,0 +1 @@
engine-strict=true

38
README.md Normal file
View file

@ -0,0 +1,38 @@
# create-svelte
Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).
## Creating a project
If you're seeing this, you've probably already done this step. Congrats!
```bash
# create a new project in the current directory
npm create svelte@latest
# create a new project in my-app
npm create svelte@latest my-app
```
## Developing
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
```bash
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
```
## Building
To create a production version of your app:
```bash
npm run build
```
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.

1955
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

23
package.json Normal file
View file

@ -0,0 +1,23 @@
{
"name": "svelting-my-svelte",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"svelte": "^4.2.7",
"svelte-check": "^3.6.0",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^5.0.3"
},
"type": "module"
}

13
src/app.d.ts vendored Normal file
View file

@ -0,0 +1,13 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}
export {};

35
src/app.html Normal file
View file

@ -0,0 +1,35 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
<style>
html {
color-scheme: light dark;
}
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
a, a:visited {
color: #77b318;
}
code {
margin: -2px;
padding: 2px;
font-size: 1.2em;
background-color: #00000080;
border-radius: 4px;
}
</style>
</head>
<body data-sveltekit-preload-data="hover">
%sveltekit.body%
</body>
</html>

View file

@ -0,0 +1,52 @@
<script lang="ts">
import { page } from "$app/stores";
export let href: string = "/";
export let title: string = "page";
let active: boolean = href === $page.url.pathname;
</script>
{#if href}
<li>
{#if active}
<a href="{href}" class="active">
<slot></slot>
</a>
{:else}
<a href="{href}">
<slot></slot>
</a>
{/if}
</li>
{:else}
<li>
<span>
<slot></slot>
</span>
</li>
{/if}
<style>
a {
color: #77b318;
padding: 4px 16px;
border-bottom: 1px solid #77b318;
text-decoration: none;
}
a.active, a:hover {
padding-bottom: 3px;
border-bottom-color: #77b318;
border-bottom-width: 2px;
background-color: #00000040;
}
span {
color: #808080;
padding: 4px 16px;
text-decoration: none;
}
</style>

View file

@ -0,0 +1,28 @@
<script lang="ts">
import HeaderItem from "./header-item.svelte";
</script>
<header>
<nav>
<ul>
<HeaderItem href="/" active=true>
home
</HeaderItem>
<HeaderItem href="/about">
about
</HeaderItem>
<HeaderItem href="/misc">
misc
</HeaderItem>
</ul>
</nav>
</header>
<style>
ul {
display: flex;
flex-direction: row;
padding: 0;
list-style: "";
}
</style>

View file

@ -0,0 +1,3 @@
<main>
<slot></slot>
</main>

BIN
src/img/rover photo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

2
src/lib/index.ts Normal file
View file

@ -0,0 +1,2 @@
// place files you want to import through the `$lib` alias in this folder.
let something: string = "blah";

22
src/routes/+page.svelte Normal file
View file

@ -0,0 +1,22 @@
<script lang="ts">
import Header from "../components/header.svelte";
import Main from "../components/main.svelte";
</script>
<Header></Header>
<Main>
<h1>hello from svelte!</h1>
<p>if you see this page, i totally fucked up the cobblestone generator, and i'm so sorry. further configuration is required.</p>
<p>
for shits and giggles please refer to
<a href="https://arimelody.me/" target="_blank">arimelody.me</a>.
</p>
<p><em>thank you for going trick-or-treating.</em></p>
<hr>
<p><em>duckwarez/1.7.3</em></p>
</Main>
<!-- <Footer></Footer> -->

View file

@ -0,0 +1,13 @@
<script lang="ts">
import Header from "../../components/header.svelte";
import Main from "../../components/main.svelte";
</script>
<Header></Header>
<Main>
<h1>about this place</h1>
<p>there is nothing to say :3</p>
</Main>
<!-- <Footer></Footer> -->

View file

@ -0,0 +1,18 @@
<script lang="ts">
import Header from "../../components/header.svelte";
import Main from "../../components/main.svelte";
import AwesomeImage from "../../img/rover photo.png";
</script>
<Header></Header>
<Main>
<h1>miscellaneous informations</h1>
<p>have this awesome image:</p>
<img src={AwesomeImage}
alt="rover the dog showing you a photo of rover the dog"
width="240" height="240" />
</Main>
<!-- <Footer></Footer> -->

BIN
static/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

18
svelte.config.js Normal file
View file

@ -0,0 +1,18 @@
import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(),
kit: {
// 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: adapter()
}
};
export default config;

19
tsconfig.json Normal file
View file

@ -0,0 +1,19 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"moduleResolution": "bundler"
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
// except $lib which is handled by https://kit.svelte.dev/docs/configuration#files
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
}

6
vite.config.ts Normal file
View file

@ -0,0 +1,6 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()]
});