Add initial plantwiki style and content

main
trivernis 6 months ago
commit 826e9e01c7
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

10
.gitignore vendored

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

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

@ -0,0 +1,38 @@
# 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
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.

@ -0,0 +1,12 @@
{
"$schema": "https://biomejs.dev/schemas/1.3.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}

1867
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,25 @@
{
"name": "plantwiki-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": "^2.0.0",
"@sveltejs/kit": "^1.27.4",
"lorem-ipsum": "^2.0.8",
"sass": "^1.69.5",
"svelte": "^4.0.5",
"svelte-check": "^3.6.0",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^4.4.2",
"vite-plugin-toml": "^0.6.0"
},
"type": "module"
}

12
src/app.d.ts vendored

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

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<title>Plantwiki</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>

@ -0,0 +1,27 @@
@use "./colors.scss";
@import "https://cdn.jsdelivr.net/npm/remixicon@3.2.0/fonts/remixicon.css";
body {
font-family: "Noto Sans", "Verdana", sans-serif;
background-color: colors.$background;
color: colors.$text;
}
img {
image-orientation: from-image;
}
a {
text-decoration-line: underline;
text-decoration-color: colors.$secondary;
text-decoration-thickness: .125em;
color: colors.$text;
}
.float-left {
float: left;
}
.float-right {
float: right;
}

@ -0,0 +1,13 @@
$background: #82ae8a;
$highlight: #292c1d;
$secondary: white;
$highlight-text: white;
$text: black;
$inactive-text: lighten($text, 20%);
$highlight-inactive-text: darken($highlight-text, 20%);
$blue: #848fab;
$yellow: #a7ad86;
$red: #a88b83;

@ -0,0 +1 @@
// place files you want to import through the `$lib` alias in this folder.

@ -0,0 +1,22 @@
<script lang="ts">
import Footer from "./Footer.svelte";
import Header from "./Header.svelte";
import "../app.scss";
</script>
<Header />
<section class="main">
<slot />
</section>
<Footer />
<style lang="scss">
@import "../colors.scss";
.main {
margin: auto;
width: 75%;
padding-top: 3em;
padding-bottom: 2em;
}
</style>

@ -0,0 +1,9 @@
<script lang="ts">
import { loremIpsum } from "lorem-ipsum";
</script>
<h1>Welcome to SvelteKit</h1>
<p>
Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation
</p>
<p>{loremIpsum({ count: 200 })}</p>

@ -0,0 +1,40 @@
<footer>
<div class="footer-item float-left">
<a href="https://trivernis.net">My Website</a>
</div>
<div class="footer-item float-right">
<a href="https://git.trivernis.net/trivernis/plantwiki">Source</a>
</div>
</footer>
<style lang="scss">
@use "../colors.scss";
footer {
position: fixed;
bottom: 0;
left: 0;
margin: 0.5em;
padding: 0 0.5em;
overflow: hidden;
background-color: colors.$highlight;
color: colors.$highlight-inactive-text;
width: calc(100% - 2em);
border-radius: 0.5em;
.footer-item {
display: block;
padding: 0.5em 1em;
}
a {
color: colors.$highlight-inactive-text;
text-decoration-color: colors.$highlight-inactive-text;
&:hover {
color: colors.$highlight-text;
text-decoration-color: colors.$highlight-text;
}
}
}
</style>

@ -0,0 +1,45 @@
<header>
<ul class="navbar">
<li>
<a href="/">Home</a>
</li>
</ul>
</header>
<style lang="scss">
@use "../colors.scss";
ul.navbar {
list-style-type: none;
position: fixed;
margin: 0;
padding: 0;
display: block;
background-color: colors.$highlight;
overflow: hidden;
width: calc(100% - 1em);
color: colors.$highlight-text;
border-radius: 0.5em;
z-index: 99;
li {
display: inline;
float: left;
a {
display: block;
padding: 1em 2em;
text-decoration: none;
font-weight: bold;
color: colors.$highlight-text;
&:hover {
background-color: darken(colors.$highlight, 5%);
}
}
}
li.selected a {
background-color: lighten(colors.$highlight, 5%);
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@ -0,0 +1,18 @@
import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/kit/vite';
/** @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;

@ -0,0 +1,17 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true
}
// Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias
//
// 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
}

@ -0,0 +1,7 @@
import { sveltekit } from "@sveltejs/kit/vite";
import { defineConfig } from "vite";
import { ViteToml } from "vite-plugin-toml";
export default defineConfig({
plugins: [sveltekit(), ViteToml()],
});
Loading…
Cancel
Save