initial commit :3

This commit is contained in:
mei (ckie) 2024-09-16 14:00:04 +03:00
commit 12bacfca52
Signed by: ckie
GPG key ID: 13E79449C0525215
26 changed files with 583 additions and 0 deletions

14
.editorconfig Normal file
View file

@ -0,0 +1,14 @@
# EditorConfig is awesome: https://editorconfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
[*.{js,ts,svelte}]
charset = utf-8
indent_style = tab
indent_size = 4

21
.gitignore vendored Normal file
View file

@ -0,0 +1,21 @@
node_modules
# Output
.output
.vercel
/.svelte-kit
/build
# OS
.DS_Store
Thumbs.db
# Env
.env
.env.*
!.env.example
!.env.test
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

1
.npmrc Normal file
View file

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

4
.prettierignore Normal file
View file

@ -0,0 +1,4 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock

8
.prettierrc Normal file
View file

@ -0,0 +1,8 @@
{
"useTabs": true,
"singleQuote": false,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}

42
README.md Normal file
View file

@ -0,0 +1,42 @@
# create-svelte
```bash
bun i
bun dev
```
## Building
To create a production version of your app:
```bash
bun 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.
## license
> MIT License
>
> Copyright (c) 2024 the floral.systems contributors
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all
> copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE.

BIN
bun.lockb Executable file

Binary file not shown.

61
flake.lock Normal file
View file

@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1726243404,
"narHash": "sha256-sjiGsMh+1cWXb53Tecsm4skyFNag33GPbVgCdfj3n9I=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "345c263f2f53a3710abe117f28a5cb86d0ba4059",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

18
flake.nix Normal file
View file

@ -0,0 +1,18 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in {
# For local development...
devShell = pkgs.mkShell { buildInputs = with pkgs; [ bun ]; };
# ... and remote deployment.
# packages = {};
});
}

19
jsconfig.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
}

29
package.json Normal file
View file

@ -0,0 +1,29 @@
{
"name": "floral.systems",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch",
"lint": "prettier --check .",
"format": "prettier --write ."
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.47",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"svelte": "^4.2.7",
"svelte-check": "^4.0.0",
"tailwindcss": "^3.4.11",
"typescript": "^5.0.0",
"vite": "^5.0.3"
},
"type": "module"
}

6
postcss.config.js Normal file
View file

@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
};

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 {};

12
src/app.html Normal file
View file

@ -0,0 +1,12 @@
<!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%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>

1
src/lib/index.js Normal file
View file

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

44
src/main.css Normal file
View file

@ -0,0 +1,44 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@font-face {
font-family: "Aladin";
src: url("/aladin/Aladin-Regular.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
::view-transition-old(root),
::view-transition-new(root) {
animation-duration: 0.08s;
}
html {
@apply h-full;
}
body {
@apply h-[100%] flex;
> div {
line-height: inherit;
> * {
/* The layout's root node */
flex: 1 1 0;
}
}
}
b {
@apply text-lavender-500;
}
a:not(.no-link-style), button.link-style {
@apply link-style-u;
}
@layer utilities {
.link-style-u {
@apply text-lavender-500 hover:text-lavender-700 active:text-lavender-950 visited:text-spring-500 visited:hover:text-spring-700 active:text-spring-950 underline;
}
}

32
src/routes/+layout.svelte Normal file
View file

@ -0,0 +1,32 @@
<script>
import "../main.css";
globalThis.PKGS = "budpkgs";
globalThis.DISTRO = "BloomOS";
</script>
<div class="flex flex-col">
<nav class="min-h-16 h-16 bg-spring-700 text-lavender-50 mb-2">
<div class="mx-auto container flex h-full justify-between">
<a class="flex h-full flex-col justify-center font-aladin text-4xl
text-lavender-50 no-link-style"
href="/">
█▌floral.systems
</a>
<span></span>
<div
class="text-lg flex gap-2 h-full items-center
*:p-1 *:h-min *:bg-lavender-600 *:rounded-md *:border-b-2 *:border-r-2 *:border-lavender-700"
>
<a href="#" class="no-link-style">Try {DISTRO}</a>
<a href="#" class="no-link-style">Use {PKGS}</a>
</div>
</div>
</nav>
<section class="container mx-auto">
<slot />
<a href="/colors">colors</a>
</section>
</div>

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

@ -0,0 +1,27 @@
<h1 class="text-5xl my-4">An all-encompassing declarative<br> <span class="text-spring-900">build ecosystem</span>.</h1>
<p class="text-2xl">Build your *nix programs with <b>{PKGS}</b>'s extensive collection of <b>68368</b> packages<br>
and configure your machines with <b>{DISTRO}</b> using the <a href="https://nix.dev/manual/nix/latest/language/">Nix</a> language.</p>
<!-- https://pad.lix.systems/v0Bew569R_2IB0abRSy4kA?view=#Pretty-much-final-draft-About-us -->
<div class="grid grid-cols-3 gap-6 justify-center my-8 w-[115%] -ms-[7.5%]">
<div class="bg-violet-50 p-4 rounded-lg drop-shadow-lg">
<h3 class="text-2xl font-bold text-lavender-600">Community Focused</h3>
Floral is a non-profit ran by volunteer developers.
together, we maintain <b>{PKGS}</b> and our extensive build infrastructure.
</div>
<div class="bg-violet-50 p-4 rounded-lg drop-shadow-lg">
<h3 class="text-2xl font-bold text-lavender-600">Battle-hardened</h3>
<b>{DISTRO}</b> is a fork of <a href="https://nixos.org">NixOS</a> and inherits
its <b>932</b> integration tests, running a whole VM before new packages
ever reach your system.
</div>
<div class="bg-violet-50 p-4 rounded-lg drop-shadow-lg">
<h3 class="text-2xl font-bold text-lavender-600">Friendly</h3>
We take care of eachother! With a focus on
integrated infrastructure, clear code & documentation,
you should have an easy time compared to traditional *nix distributions.
</div>
</div>
<!-- show nixos tests -->

View file

@ -0,0 +1,17 @@
<script lang="ts">
import resolveConfig from "tailwindcss/resolveConfig";
import tailwindConfig from "../../../tailwind.config.js";
import Color from "./Color.svelte";
const fullConfig = resolveConfig(tailwindConfig);
const colors = fullConfig.theme.colors as unknown as Record<
string,
string | Record<string, string>
>;
delete colors["current"]; // :P
delete colors["transparent"];
</script>
{#each Object.keys(colors) as name}
<Color {name} {colors} />
{/each}

View file

@ -0,0 +1,24 @@
<script lang="ts">
export let colors;
export let name;
export let path = [];
</script>
{#if typeof colors[name] == "object"}
<h3 class="mb-0 text-xl text-center">{name}</h3>
<div class="p-4 grid gap-4 grid-cols-2 lg:grid-cols-4 xl:grid-cols-6 auto-rows-auto">
{#each Object.keys(colors[name]) as n}
<svelte:self name={n} colors={colors[name]} path={[...path, name]} />
{/each}
</div>
<hr />
{:else if typeof colors[name] == "string"}
<div
class={`bg-${[...path, name].join("-")} p-4 hover:border-black border border-transparent transition-colors min-w-32`}
>
<span class="text-white mix-blend-difference font-bolder">
{name}
<small class="text-white font-mono font-xs">{colors[name]}</small>
</span>
</div>
{/if}

Binary file not shown.

94
static/aladin/OFL.txt Normal file
View file

@ -0,0 +1,94 @@
Copyright (c) 2011 Angel Koziupa (sudtipos@sudtipos.com),
Copyright (c) 2011 Alejandro Paul (sudtipos@sudtipos.com),
with Reserved Font Name "Aladin"
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

BIN
static/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

15
svelte.config.js Normal file
View file

@ -0,0 +1,15 @@
import adapter from "@sveltejs/adapter-auto";
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
/** @type {import('@sveltejs/kit').Config} */
const config = {
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()
},
preprocess: vitePreprocess()
};
export default config;

70
tailwind.config.js Normal file
View file

@ -0,0 +1,70 @@
import colors from "tailwindcss/colors";
/** @type {import("tailwindcss").Config} */
export default {
content: ["./src/**/*.{html,js,svelte,ts}"],
theme: {
extend: {
fontFamily: {
aladin: ["Aladin", "sans-serif"]
}
},
colors: {
transparent: "transparent",
current: "currentColor",
black: colors.black,
white: colors.white,
violet: {
50: "#f3f4fb",
100: "#e3e6f6",
200: "#ced5ef",
300: "#acb8e4",
400: "#8495d6",
500: "#6775ca",
600: "#5158bb",
700: "#494bac",
800: "#41408d",
900: "#383870",
950: "#252546"
},
lavender: {
50: "#fff4ff",
100: "#fee7ff",
200: "#fdcfff",
300: "#fea4fe",
400: "#fc76fa",
500: "#f342f0",
600: "#d722d0",
700: "#b318aa",
800: "#921689",
900: "#77186e",
950: "#500248"
},
'spring': {
'50': '#f5faf3',
'100': '#e7f5e3',
'200': '#d0e9c9',
'300': '#9cd08f',
'400': '#7dbb6d',
'500': '#599f48',
'600': '#458237',
'700': '#39672e',
'800': '#305328',
'900': '#294423',
'950': '#12240f',
},
},
screens: {
sm: "640px",
md: "768px",
lg: "1024px"
// >=xl removed as site isn't
// that dense https://tailwindcss.com/docs/screens
}
},
plugins: [],
safelist: [
// this is pretty sensible, and depended on in src/routes/colors/Color.svelte
{ pattern: /bg-.+/ }
]
};

11
vite.config.js Normal file
View file

@ -0,0 +1,11 @@
import { sveltekit } from "@sveltejs/kit/vite";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [sveltekit()],
server: {
fs: {
allow: ["./tailwind.config.js"]
}
}
});