feat(root page): prettify and add new home page content #7

Open
jakehamilton wants to merge 4 commits from jakehamilton/feat/home-content into jakehamilton/feat/hero-links
9 changed files with 298 additions and 46 deletions
Showing only changes of commit 920862b82f - Show all commits

View file

@ -9,13 +9,13 @@
alt
} = $props();
let renderedCode = $derived(slice ? code.replace(/#<hidden>[^]*?#<\/hidden>/, "")
: code.replace(/#(<hidden>|<\/hidden>)/g,""));
let renderedCode = $derived(slice ? code.replace(/\/\*<hidden>[^]*?<\/hidden>\*\//, "")
: code.replace(/\/\*(<hidden>|<\/hidden>)\*\//g,""));
</script>
<p class="sr-only">{alt}</p>
<div class=" font-mono relative" aria-hidden title={alt}>
<div class="font-mono relative" aria-hidden title={alt}>
<!-- HACK: apply the pre-wrap style to the child to avoid
HTML formatting whitespace issues down the line. -->
<div class="*:whitespace-pre-wrap"><Highlight {language} code={renderedCode} /></div>
@ -27,4 +27,3 @@
({slice ? "show" : "hide"} full)
</button>
</div>

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
sodipodi:docname="arrow-from-left-to-down.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="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
inkscape:zoom="2.0436167"
inkscape:cx="387.79288"
inkscape:cy="184.2322"
inkscape:window-width="2560"
inkscape:window-height="1360"
inkscape:window-x="30"
inkscape:window-y="26"
inkscape:window-maximized="0"
inkscape:current-layer="layer1" />
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
style="fill:none;stroke:#b1e9d0;stroke-width:5.29167;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 7.7680906,7.5091541 c 0,0 38.4917724,-4.5181708 58.9080194,0.7768092 6.293471,1.6322199 13.239679,7.0217937 14.112031,13.4646907 1.34283,9.91768 -7.073472,16.7234 -14.77889,15.435432 -8.086315,-1.351635 -9.539445,-10.597699 -6.065485,-14.788091 8.975288,-10.826254 21.354159,-4.201044 30.166085,0.64734 2.989795,1.645006 7.69663,6.452256 9.710113,10.875327 4.705176,10.335987 3.978976,18.111457 -3.884045,20.973846 C 90.59464,56.838903 81.70025,53.264158 81.69442,44.407585 81.68972,37.287142 88.552418,32.24187 95.938614,31.83997 107.58063,31.2065 115.43554,39.783947 118.1221,45.677357 c 2.40997,5.286669 4.24774,17.185947 3.44851,22.940777 -1.69551,12.208548 -16.05405,30.036616 -16.05405,30.036616"
id="path3"
sodipodi:nodetypes="csssssssssssc" />
<path
sodipodi:type="star"
style="fill:#b1e9d0;fill-opacity:1;stroke:#b1e9d0;stroke-width:5.29167;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
id="path2"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="57.973808"
sodipodi:cy="96.324318"
sodipodi:r1="24.403963"
sodipodi:r2="12.201981"
sodipodi:arg1="0.53437152"
sodipodi:arg2="1.5815691"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 78.975588,108.75326 57.842362,108.52559 36.709136,108.29792 47.47292,90.109846 58.236701,71.921771 68.606144,90.337518 Z"
inkscape:transform-center-x="-5.9930106"
inkscape:transform-center-y="0.12432086"
transform="rotate(-151.201,79.803925,98.585649)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="512"
height="512"
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
sodipodi:docname="arrow-from-up-to-down.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="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
inkscape:zoom="1.0218084"
inkscape:cx="-239.28166"
inkscape:cy="117.92818"
inkscape:window-width="2560"
inkscape:window-height="1360"
inkscape:window-x="30"
inkscape:window-y="26"
inkscape:window-maximized="0"
inkscape:current-layer="layer1" />
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
style="fill:none;stroke:#b1e9d0;stroke-width:5.29167;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 50.793004,3.8400172 c 0.04577,8.2393038 1.789258,13.0051818 11.002986,16.1775828 8.487892,2.922487 10.530007,10.902745 9.095497,17.254543 -2.20475,9.762305 -12.026078,13.604391 -18.921467,9.932072 -7.236246,-3.853849 -5.672512,-13.081852 -1.04597,-15.94941 11.953088,-7.408596 21.581254,2.810421 28.393024,10.210195 2.311161,2.510667 5.244184,8.56553 5.745989,13.399355 1.172635,11.295848 -1.989381,18.436358 -10.354507,18.64865 -5.68235,0.144207 -12.977472,-6.074328 -10.16553,-14.472655 2.260712,-6.75203 10.371898,-9.352025 17.502237,-7.383337 11.238728,3.103015 15.956913,13.733677 16.629083,20.175576 0.60296,5.778691 -1.440166,17.644438 -4.028604,22.846059"
id="path3"
sodipodi:nodetypes="cssssssssssc" />
<path
sodipodi:type="star"
style="fill:#b1e9d0;fill-opacity:1;stroke:#b1e9d0;stroke-width:5.29167;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1;paint-order:markers fill stroke"
id="path2"
inkscape:flatsided="false"
sodipodi:sides="3"
sodipodi:cx="57.973808"
sodipodi:cy="96.324318"
sodipodi:r1="24.403963"
sodipodi:r2="12.201981"
sodipodi:arg1="0.53437152"
sodipodi:arg2="1.5815691"
inkscape:rounded="0"
inkscape:randomized="0"
d="M 78.975588,108.75326 57.842362,108.52559 36.709136,108.29792 47.47292,90.109846 58.236701,71.921771 68.606144,90.337518 Z"
inkscape:transform-center-x="-4.7162935"
inkscape:transform-center-y="1.5424015"
transform="rotate(-157.87918,75.76367,97.954627)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

45
src/lib/assets/box.svg Normal file
View file

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
viewBox="0 0 135.46666 135.46667"
version="1.1"
id="svg1"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
sodipodi:docname="box.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="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showguides="true"
inkscape:zoom="2"
inkscape:cx="144.75"
inkscape:cy="288.25"
inkscape:window-width="2560"
inkscape:window-height="1360"
inkscape:window-x="30"
inkscape:window-y="26"
inkscape:window-maximized="0"
inkscape:current-layer="layer1" />
<defs
id="defs1" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<path
id="path1-2"
style="fill:none;stroke:currentColor;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="M 67.733331,5.8132883 12.707612,35.665484 V 99.801825 L 67.733331,129.65338 122.75906,99.801825 V 35.665484 Z m 0,123.8400917 V 65.64932 Z M 12.707604,35.665484 67.733331,65.51703 122.75906,35.665484 M 40.220467,20.739056 95.246189,50.591263 Z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -3,7 +3,7 @@
import flowerGray from "$lib/assets/flower-gray.svg";
</script>
<div class="flex w-full justify-center gap-x-12">
<div class="flex w-full justify-center gap-x-12 flex-nowrap">
<!--
NOTE: enhanced:img seems to break when trying to have more than one element, so we are
using the normal img element instead...

View file

@ -0,0 +1,12 @@
<script lang="ts">
import box from "$lib/assets/box.svg?raw";
let props = $props();
</script>
<div class="flex pr-4 shadow w-60 rounded-full whitespace-nowrap bg-zinc-100 font-bold overflow-hidden">
<span class="w-11 h-10 bg-teal-500 py-2 pl-3 pr-2 text-white">
{@html box}
</span>
<span class="flex py-2 pl-2">{@render props.children?.()}</span>
</div>

View file

@ -7,8 +7,9 @@
import clsx from "clsx";
let { children } = $props();
globalThis.PKGS = "petalpkgs";
globalThis.PKGS = "Petalpkgs";
globalThis.DISTRO = "FleurixOS";
globalThis.PKGS_COUNT = "67,589";
Review

Let's avoiding adding more things to the global scope and start removing all of these defs soon. They were a hack for the name, and at this point an actual $lib/consts.ts is warranted if we decide we really need this, which I think we don't.

Let's avoiding adding more things to the global scope and start removing all of these defs soon. They were a hack for the name, and at this point an actual `$lib/consts.ts` is warranted if we decide we really need this, which I think we don't.
</script>
<svelte:head>
@ -16,12 +17,12 @@
<meta property="og:title" content="floral.systems" />
<meta property="og:type" content="website" />
<meta property="og:url" content={$page.url?.toString()} />
<meta name="theme-color" content="#136951">
<meta name="theme-color" content="#27a27b">
Review

Nice catch!

Nice catch!
</svelte:head>
<div class="flex flex-col underline-offset-[4px]">
<nav class="min-h-16 h-16 bg-zinc-50 mb-2">
<div class="mx-auto container flex h-full justify-between">
<div class="mx-auto container flex h-full justify-between px-2">
<a class="group flex h-full items-center justify-center font-aladin text-3xl/10
text-coral-970 transition-colors duration-75 no-link-style gap-x-2
hover:bg-clip-text hover:bg-gradient-to-r hover:from-coral-500 hover:from-15% hover:to-coral-400 hover:text-transparent"

View file

@ -1,20 +1,24 @@
<script>
import Highlight from "$lib/Highlight.svelte";
import LinkChip from "$lib/components/LinkChip.svelte";
import PackageTile from "$lib/components/PackageTile.svelte";
import FlowerDivider from "$lib/components/FlowerDivider.svelte";
import leaf from "$lib/assets/leaf.svg";
import petal from "$lib/assets/petal.svg";
import nix from "svelte-highlight/languages/nix";
import demo1 from "./demo1/vm.nix?raw";
import forkGraph from "./fork.svg?raw";
</script>
<div class="flex flex-col gap-y-24">
<div class="mt-16">
<h1 class="text-6xl text-balance">A declarative, comprehensive <span class="text-teal-500 font-aladin font-bold">package&nbsp;ecosystem</span></h1>
<p class="mt-4 text-xl lg:text-2xl max-w-4xl text-balance">
<div class="flex flex-col gap-y-16 px-2">
<div class="mt-4 sm:mt-16">
<h1 class="text-5xl sm:text-6xl text-balance">A declarative, comprehensive <span class="text-teal-500 font-aladin font-bold">package&nbsp;ecosystem</span></h1>
<p class="mt-4 text-xl lg:text-2xl max-w-3xl text-balance">
Declaratively own your Linux systems with<wbr>
full end-to-end&nbsp;customizability of <b class="text-teal-500">67,589</b> packages.
full end-to-end&nbsp;customizability of <b class="text-teal-500">{PKGS_COUNT}</b> packages.
</p>
<div class="flex pt-4 gap-x-2">
<LinkChip
@ -48,35 +52,96 @@
<div class="">
<h2 class="w-fit text-4xl pb-4">
<span class="text-teal-500">{DISTRO}</span> — our linux distribution
<span class="font-aladin font-bold text-teal-500">{DISTRO}</span> — our Linux distribution
</h2>
<div class="grid lg:grid-cols-[1.15fr,calc(theme(gap.12)),1fr] items-end">
<div class="clear-left text-xl flex flex-col h-full">
Gain certainty in your deployed system configuration by
replacing your opaque state with code.
<div class="grow"></div>
<div class="text-sm bg-blue-50 p-2 rounded-md drop-shadow mt-2">
<Highlight
language={nix} code={demo1}
alt="Definition of a simple {DISTRO} system running MediaWiki with the HTTP port opened."
/>
</div>
</div>
<div class="text-4xl flex justify-center items-center h-full">
Review
Maybe an arrow, ref: https://matrix.to/#/!jElecDkufeieslnxJz:matrix.org/$bHWQyEFUpU_emyv9oQtfaG44Jvc7Pdm6fP4fsuzEz3o?via=lix.systems&via=matrix.org&via=ckie.dev
</div>
<div class="float-right drop-shadow flex flex-col rounded overflow-hidden">
<div class="p-2 bg-gradient-to-b from-zinc-100 from-40% to-white w-full flex justify-between grow bg-teal-500">
<div class="p-1 px-3 bg-zinc-200 w-full rounded-sm">
<span class="text-zinc-700">http://</span><b>localhost</b>:80
</div>
<span class="text-zinc-700 font-black text-lg select-none pl-2"></span>
</div>
<!-- screenshot taken as Responsive (3660x2121), DPR=1 in Firefox DevTools (@the phone/tablet icon) -->
<enhanced:img src="./demo1/mediawiki.png?format=png"
alt="The main page of a brand-new MediaWiki instance hosted on the VM. It starts: 'MediaWiki has been installed.'"
<div class="text-xl flex flex-col h-full max-w-3xl">
Gain certainty in your deployed system configuration by
replacing your opaque state with code.
</div>
<div class="pt-4">
<LinkChip
href="https://fleurixos.org"
target="_blank"
class="hover:border-teal-200"
>
<!-- NOTE: enhanced:img breaks when creating multiple elements with the same src -->
Review

huhh. that's pretty absurd of it. you could workaround with {#each} and a {#snippet}

{#snippet flower()}
  <enhanced:img />
{/snippet}

{#each range(1, 5) as i}
  {@render flower()}
{/each}
huhh. that's pretty absurd of it. you could workaround with {#each} and a {#snippet} ```svelte {#snippet flower()} <enhanced:img …/> {/snippet} {#each range(1, 5) as i} {@render flower()} {/each} ```
Review

doing for you in #5, #6 for the flower one

doing for you in #5, #6 for the flower one
<img src={leaf} width="24" height="24" />
<span>Try FleurixOS</span>
</LinkChip>
</div>
<div class="flex w-fit relative pt-4">
<div class="text-sm bg-blue-50 p-2 rounded-md drop-shadow mt-2 max-w-3xl max-sm:max-w-full">
<Highlight
language={nix} code={demo1}
alt="Definition of a simple {DISTRO} system running MediaWiki with the HTTP port opened."
/>
</div>
<enhanced:img src="$lib/assets/arrow-from-left-to-down.svg" width="80" height="80" alt="leaf" class="absolute left-full bottom-0 transform translate-x-5 translate-y-5 max-sm:hidden" />
</div>
<div class="drop-shadow flex flex-col mx-auto rounded overflow-hidden mt-8 w-full max-w-3xl">
<div class="p-2 bg-zinc-100 w-full flex justify-between grow">
<div class="p-1 px-3 bg-zinc-200 w-full rounded-sm">
<span class="text-zinc-500">http://</span><b>localhost</b><span class="text-zinc-500">:80</span>
</div>
<div class="flex items-center pl-4 pr-2 gap-x-2">
<div class="w-3 h-3 rounded-full bg-[#facc15]" />
<div class="w-3 h-3 rounded-full bg-teal-400" />
<div class="w-3 h-3 rounded-full bg-coral-400" />
</div>
</div>
<!-- screenshot taken as Responsive (3660x2121), DPR=1 in Firefox DevTools (@the phone/tablet icon) -->
<enhanced:img src="./demo1/mediawiki.png?format=png"
alt="The main page of a brand-new MediaWiki instance hosted on the VM. It starts: 'MediaWiki has been installed.'"
class="w-full"
/>
</div>
</div>
<FlowerDivider />
<div>
<h2 class="text-4xl w-fit pb-4">
<span class="font-aladin font-bold text-teal-500">{PKGS}</span> — our package set
</h2>
<div class="text-xl h-full max-w-3xl">
A complete package set with <b class="text-teal-500">{PKGS_COUNT}</b> packages, built on top of 21 years of volunteer labor to reproducibly package software.
</div>
<div class="pt-4">
<LinkChip
href="https://fleurixos.org"
target="_blank"
class="hover:border-coral-200"
>
<!-- NOTE: enhanced:img breaks when creating multiple elements with the same src -->
<img src={petal} width="24" height="24" />
<span>Use Petalpkgs</span>
</LinkChip>
</div>
<div class="grid grid-cols-2 lg:grid-cols-4 place-items-center grid-flow-dense gap-4 max-w-5xl mx-auto mt-6">
<PackageTile>LLVM</PackageTile>
<PackageTile>GCC</PackageTile>
Review

Nit/general: I find it unlikely we'll have PackageTiles on many pages, so a {#snippet} would be more appropriate to not pollute the $lib/components scope, which should be when you're expecting usage from multiple components.

Nit/general: I find it unlikely we'll have `PackageTile`s on many pages, so a [`{#snippet}`](https://svelte.dev/docs/svelte/snippet) would be more appropriate to not pollute the `$lib/components` scope, which should be when you're expecting usage from multiple components.
<PackageTile>NodeJS</PackageTile>
Review

But we'll want to take this vague idea into docs for some featured usecases we write about, a bit like the "Learn by example." bit on bun's website. But probably more colorful.

But we'll want to take this vague idea into docs for some featured usecases we write about, a bit like the "Learn by example." bit on [bun's website](https://bun.sh/). But probably more colorful.
<PackageTile>Rust</PackageTile>
<PackageTile>Firefox</PackageTile>
<PackageTile>Aseprite</PackageTile>
<PackageTile>Discord</PackageTile>
<PackageTile>KDE</PackageTile>
<PackageTile>Python</PackageTile>
<PackageTile>Inkscape</PackageTile>
<PackageTile>Pipewire</PackageTile>
<PackageTile>Kitty</PackageTile>
<PackageTile>Element</PackageTile>
<PackageTile>Blender</PackageTile>
<PackageTile>Ruby</PackageTile>
<PackageTile>Chromium</PackageTile>
<PackageTile>Steam</PackageTile>
<PackageTile>Thunderbird</PackageTile>
<PackageTile>VS Code</PackageTile>
<PackageTile>Vim</PackageTile>
<PackageTile>GNOME Desktop</PackageTile>
<PackageTile>Emacs</PackageTile>
<PackageTile>Lutris</PackageTile>
<PackageTile>Lix</PackageTile>
</div>
</div>
@ -84,7 +149,7 @@
<div class="pb-60">
<h2 class="text-4xl w-fit pb-4">
A <span class="text-teal-500">reimagining</span> of the NixOS community
Our <span class="font-aladin font-bold text-teal-500">vision</span> for <span class="font-aladin fontold text-coral-970">floral.systems</span>
</h2>
Review

the font-aladin & text-coral-970 here foul skimmers.

  • a different off-black hue looks bad / inconsistent / out of the text flow.
  • aladin should be used very sparingly as its our ~'brand font'~
the `font-aladin` & `text-coral-970` here foul skimmers. - a different off-black hue looks bad / inconsistent / out of the text flow. - aladin should be used very sparingly as its our ~'brand font'~
<div class="grid lg:grid-cols-[1.15fr,1fr] gap-12">
<div class="text-xl flex flex-col gap-4">

View file

@ -8,7 +8,7 @@ with import <nixpkgs> { }; nixos
pkgs.writeText "password" "correcthorsebatterystaple";
};
networking.firewall.allowedTCPPorts = [ 80 ];#<hidden>
networking.firewall.allowedTCPPorts = [ 80 ];/*<hidden>*/
Review

I don't mind this but, I'm curious what your reasoning is?

I don't mind this but, I'm curious what your reasoning is?
users.users.root.openssh.authorizedKeys.keys = [
"your key here"
@ -18,8 +18,8 @@ with import <nixpkgs> { }; nixos
settings.PermitRootLogin = "yes";
};
# run with:
# nix-build vm.nix -A vm && (rm nixos.qcow2 ; QEMU_NET_OPTS='hostfwd=tcp::3000-:80' ./result/bin/run-nixos-vm)
# xdg-open http://localhost:3000
#</hidden>
# nix-build vm.nix -A vm && \
# (rm nixos.qcow2 ; QEMU_NET_OPTS='hostfwd=tcp::3000-:80' ./result/bin/run-nixos-vm)
#
# xdg-open http://localhost:3000/*</hidden>*/
}