Commit ·
ace8ae5
1
Parent(s): d593e73
cross platform installers: windows powershell plus macos and every linux distro
Browse files- README.md +20 -9
- package/LICENSE +21 -0
- package/USAGE.md +21 -3
- package/install.ps1 +30 -0
- package/install.sh +70 -11
- package/styles/tokens.dssl +122 -0
- public/install.sh +78 -0
README.md
CHANGED
|
@@ -62,22 +62,32 @@ This repo eats its own cooking. Everything you see on the website is styled by t
|
|
| 62 |
|
| 63 |
The site is live. No setup, no build, nothing to install: https://dssl-sable.vercel.app
|
| 64 |
|
| 65 |
-
Want the engine on your own page?
|
| 66 |
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
|
|
|
| 70 |
```
|
| 71 |
|
| 72 |
-
|
| 73 |
|
| 74 |
-
|
|
|
|
|
|
|
| 75 |
|
| 76 |
-
```sh
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
```
|
| 79 |
|
| 80 |
-
|
| 81 |
|
| 82 |
Clone this repo if you want to read the engine. Everything runs in the browser.
|
| 83 |
|
|
@@ -85,6 +95,7 @@ Clone this repo if you want to read the engine. Everything runs in the browser.
|
|
| 85 |
|
| 86 |
- `public/dssl/` the engine: parser, resolver, boot
|
| 87 |
- `public/styles/` the styles that drive the site
|
|
|
|
| 88 |
- `src/` the Next.js site
|
| 89 |
- `scripts/` smoke tests for the engine
|
| 90 |
|
|
|
|
| 62 |
|
| 63 |
The site is live. No setup, no build, nothing to install: https://dssl-sable.vercel.app
|
| 64 |
|
| 65 |
+
Want the engine on your own page? One line per platform.
|
| 66 |
|
| 67 |
+
macOS or Linux (any distro, bash not required):
|
| 68 |
+
|
| 69 |
+
```sh
|
| 70 |
+
curl -fsSL https://dssl-sable.vercel.app/install.sh | sh
|
| 71 |
```
|
| 72 |
|
| 73 |
+
Windows (PowerShell 5.1 or newer, no admin rights):
|
| 74 |
|
| 75 |
+
```powershell
|
| 76 |
+
irm https://dssl-sable.vercel.app/install.ps1 | iex
|
| 77 |
+
```
|
| 78 |
|
| 79 |
+
Both drop a `dssl-engine/` folder next to you: the engine, a starter token set, a tiny example stylesheet and a usage guide. The sh one is a POSIX script. It downloads with curl or wget, whichever you have, and unpacks with tar, which every distro and macOS already ship. If tar is missing it falls back to unzip, then python3. Want it somewhere specific? Append a folder: `... | sh -s -- ~/my-site`.
|
| 80 |
+
|
| 81 |
+
Prefer to click: [dssl-engine.zip](https://dssl-sable.vercel.app/dssl-engine.zip) or [dssl-engine.tar.gz](https://dssl-sable.vercel.app/dssl-engine.tar.gz). Same package, straight from the browser.
|
| 82 |
+
|
| 83 |
+
Then wire it into a page with two tags:
|
| 84 |
+
|
| 85 |
+
```html
|
| 86 |
+
<script type="module" src="/dssl/boot.js"></script>
|
| 87 |
+
<link rel="stylesheet/dssl" href="/styles/tokens.dssl">
|
| 88 |
```
|
| 89 |
|
| 90 |
+
Every `<link rel="stylesheet/dssl">` on the page gets fetched and applied automatically, and the engine keeps restyling the DOM live as elements come and go. That is the whole install. The package's USAGE.md covers the same ground in two minutes, and the source files also live in `package/` in this repo.
|
| 91 |
|
| 92 |
Clone this repo if you want to read the engine. Everything runs in the browser.
|
| 93 |
|
|
|
|
| 95 |
|
| 96 |
- `public/dssl/` the engine: parser, resolver, boot
|
| 97 |
- `public/styles/` the styles that drive the site
|
| 98 |
+
- `package/` what ships in the download: engine, starter files, usage guide, installers
|
| 99 |
- `src/` the Next.js site
|
| 100 |
- `scripts/` smoke tests for the engine
|
| 101 |
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2026 EHS-Studio
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
package/USAGE.md
CHANGED
|
@@ -1,16 +1,32 @@
|
|
| 1 |
-
# DSSL engine
|
| 2 |
|
| 3 |
DSSL is a style language that runs in the browser. You write `.dssl` files, add two tags to your page, and the engine does the rest. No compiler, no build step, no CSS output. The engine walks your DOM live and writes styles straight onto the elements it matches, including elements that show up later.
|
| 4 |
|
| 5 |
## 1. Get the engine
|
| 6 |
|
| 7 |
-
|
|
|
|
|
|
|
| 8 |
|
| 9 |
```sh
|
| 10 |
curl -fsSL https://dssl-sable.vercel.app/install.sh | sh
|
| 11 |
```
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
## 2. Wire it up
|
| 16 |
|
|
@@ -87,6 +103,8 @@ gives one subtree its own engine, its own tokens and its own cascade. The playgr
|
|
| 87 |
- `dssl/` the engine. `boot.js` is the entry, `index.js` the public API.
|
| 88 |
- `styles/tokens.dssl` the starter token set (colors, fonts, radii, shadows)
|
| 89 |
- `examples/hello.dssl` a tiny starter stylesheet
|
|
|
|
|
|
|
| 90 |
- `USAGE.md` this file
|
| 91 |
- `LICENSE` MIT
|
| 92 |
|
|
|
|
| 1 |
+
# DSSL engine quickstart
|
| 2 |
|
| 3 |
DSSL is a style language that runs in the browser. You write `.dssl` files, add two tags to your page, and the engine does the rest. No compiler, no build step, no CSS output. The engine walks your DOM live and writes styles straight onto the elements it matches, including elements that show up later.
|
| 4 |
|
| 5 |
## 1. Get the engine
|
| 6 |
|
| 7 |
+
Pick your platform. All three routes land the same thing: a `dssl-engine/` folder with the engine, a starter token set, an example stylesheet and this guide.
|
| 8 |
+
|
| 9 |
+
macOS or Linux (any distro, bash not required):
|
| 10 |
|
| 11 |
```sh
|
| 12 |
curl -fsSL https://dssl-sable.vercel.app/install.sh | sh
|
| 13 |
```
|
| 14 |
|
| 15 |
+
The installer runs with plain sh (dash, ash and busybox are fine), downloads with curl or wget, whichever you have, and unpacks with tar, which every distro and macOS ship by default. If tar is somehow missing it falls back to unzip, then to python3.
|
| 16 |
+
|
| 17 |
+
Windows (PowerShell 5.1 or newer, no admin rights):
|
| 18 |
+
|
| 19 |
+
```powershell
|
| 20 |
+
irm https://dssl-sable.vercel.app/install.ps1 | iex
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
No terminal at all? Download the package straight from the browser: [dssl-engine.zip](https://dssl-sable.vercel.app/dssl-engine.zip) or [dssl-engine.tar.gz](https://dssl-sable.vercel.app/dssl-engine.tar.gz), and unzip it anywhere.
|
| 24 |
+
|
| 25 |
+
To install into a specific folder, append it as an argument:
|
| 26 |
+
|
| 27 |
+
```sh
|
| 28 |
+
curl -fsSL https://dssl-sable.vercel.app/install.sh | sh -s -- ~/my-site
|
| 29 |
+
```
|
| 30 |
|
| 31 |
## 2. Wire it up
|
| 32 |
|
|
|
|
| 103 |
- `dssl/` the engine. `boot.js` is the entry, `index.js` the public API.
|
| 104 |
- `styles/tokens.dssl` the starter token set (colors, fonts, radii, shadows)
|
| 105 |
- `examples/hello.dssl` a tiny starter stylesheet
|
| 106 |
+
- `install.sh` the macOS and Linux installer, same one the one-liner pipes
|
| 107 |
+
- `install.ps1` the Windows installer
|
| 108 |
- `USAGE.md` this file
|
| 109 |
- `LICENSE` MIT
|
| 110 |
|
package/install.ps1
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DSSL installer for Windows. PowerShell 5.1 or newer, no admin rights needed.
|
| 2 |
+
#
|
| 3 |
+
# irm https://dssl-sable.vercel.app/install.ps1 | iex
|
| 4 |
+
#
|
| 5 |
+
# Drops a dssl-engine folder into your current directory.
|
| 6 |
+
|
| 7 |
+
$ErrorActionPreference = "Stop"
|
| 8 |
+
|
| 9 |
+
$Base = "https://dssl-sable.vercel.app"
|
| 10 |
+
$Dest = Join-Path (Get-Location).Path "dssl-engine"
|
| 11 |
+
|
| 12 |
+
# some Windows PowerShell 5.1 installs still default to ancient TLS; be explicit
|
| 13 |
+
try { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 } catch {}
|
| 14 |
+
|
| 15 |
+
Write-Host "fetching the DSSL engine..."
|
| 16 |
+
$Zip = Join-Path ([IO.Path]::GetTempPath()) "dssl-engine.zip"
|
| 17 |
+
Invoke-WebRequest -Uri "$Base/dssl-engine.zip" -OutFile $Zip -UseBasicParsing
|
| 18 |
+
|
| 19 |
+
if (Test-Path $Dest) { Remove-Item -Recurse -Force $Dest }
|
| 20 |
+
|
| 21 |
+
$Stage = Join-Path ([IO.Path]::GetTempPath()) ("dssl-unpack-" + [Guid]::NewGuid().ToString("N").Substring(0, 8))
|
| 22 |
+
Expand-Archive -Path $Zip -DestinationPath $Stage -Force
|
| 23 |
+
Move-Item -Path (Join-Path $Stage "dssl-engine") -Destination $Dest -Force
|
| 24 |
+
Remove-Item -Recurse -Force $Stage
|
| 25 |
+
Remove-Item -Force $Zip
|
| 26 |
+
|
| 27 |
+
Write-Host ""
|
| 28 |
+
Write-Host "DSSL engine installed to $Dest"
|
| 29 |
+
Write-Host ""
|
| 30 |
+
Write-Host "next: open USAGE.md in that folder. It is two tags and one example file."
|
package/install.sh
CHANGED
|
@@ -1,19 +1,78 @@
|
|
| 1 |
#!/bin/sh
|
| 2 |
-
# DSSL
|
|
|
|
| 3 |
# curl -fsSL https://dssl-sable.vercel.app/install.sh | sh
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
BASE="https://dssl-sable.vercel.app"
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
echo "fetching the DSSL engine..."
|
| 12 |
-
curl -fsSL "$BASE/dssl-engine.zip" -o "$ZIP"
|
| 13 |
-
rm -rf dssl-engine
|
| 14 |
-
unzip -q "$ZIP" -d .
|
| 15 |
-
rm -f "$ZIP"
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
echo ""
|
| 18 |
-
echo "
|
| 19 |
-
echo "read dssl-engine/USAGE.md to wire it into a page."
|
|
|
|
| 1 |
#!/bin/sh
|
| 2 |
+
# DSSL installer. macOS, Linux, the BSDs, busybox: anything with a POSIX shell.
|
| 3 |
+
#
|
| 4 |
# curl -fsSL https://dssl-sable.vercel.app/install.sh | sh
|
| 5 |
+
#
|
| 6 |
+
# wget works just as well:
|
| 7 |
+
# wget -qO- https://dssl-sable.vercel.app/install.sh | sh
|
| 8 |
+
#
|
| 9 |
+
# install somewhere else by appending a folder:
|
| 10 |
+
# curl -fsSL https://dssl-sable.vercel.app/install.sh | sh -s -- ~/my-site
|
| 11 |
+
set -eu
|
| 12 |
+
|
| 13 |
BASE="https://dssl-sable.vercel.app"
|
| 14 |
+
DEST="${1:-.}"
|
| 15 |
+
|
| 16 |
+
fetch() {
|
| 17 |
+
# fetch <url> <file>. curl first, wget second, an honest no otherwise.
|
| 18 |
+
if command -v curl >/dev/null 2>&1; then
|
| 19 |
+
curl -fsSL "$1" -o "$2"
|
| 20 |
+
elif command -v wget >/dev/null 2>&1; then
|
| 21 |
+
wget -qO "$2" "$1"
|
| 22 |
+
else
|
| 23 |
+
echo "dssl installer: I need 'curl' or 'wget' to download the engine. Install either one and run this again." >&2
|
| 24 |
+
exit 1
|
| 25 |
+
fi
|
| 26 |
+
}
|
| 27 |
|
| 28 |
+
unpack() {
|
| 29 |
+
# unpack <archive> <where>. tar.gz is the default package and tar ships
|
| 30 |
+
# with every distro and macOS. No tar? Take the zip route via unzip,
|
| 31 |
+
# or python3 if even unzip is missing.
|
| 32 |
+
archive="$1"
|
| 33 |
+
where="$2"
|
| 34 |
+
case "$archive" in
|
| 35 |
+
*.tar.gz)
|
| 36 |
+
tar -xzf "$archive" -C "$where"
|
| 37 |
+
;;
|
| 38 |
+
*.zip)
|
| 39 |
+
if command -v unzip >/dev/null 2>&1; then
|
| 40 |
+
unzip -q "$archive" -d "$where"
|
| 41 |
+
elif command -v python3 >/dev/null 2>&1; then
|
| 42 |
+
python3 -c "import sys, zipfile; zipfile.ZipFile(sys.argv[1]).extractall(sys.argv[2])" "$archive" "$where"
|
| 43 |
+
else
|
| 44 |
+
echo "dssl installer: no tar, no unzip, no python3. One of the three, please." >&2
|
| 45 |
+
exit 1
|
| 46 |
+
fi
|
| 47 |
+
;;
|
| 48 |
+
esac
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
# a scratch dir, gone when we are
|
| 52 |
+
TMP="$(mktemp -d 2>/dev/null || echo "${TMPDIR:-/tmp}/dssl-install-$$")"
|
| 53 |
+
mkdir -p "$TMP"
|
| 54 |
+
trap 'rm -rf "$TMP"' EXIT INT TERM
|
| 55 |
|
| 56 |
echo "fetching the DSSL engine..."
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
+
if command -v tar >/dev/null 2>&1; then
|
| 59 |
+
fetch "$BASE/dssl-engine.tar.gz" "$TMP/engine.tar.gz"
|
| 60 |
+
unpack "$TMP/engine.tar.gz" "$TMP"
|
| 61 |
+
else
|
| 62 |
+
fetch "$BASE/dssl-engine.zip" "$TMP/engine.zip"
|
| 63 |
+
unpack "$TMP/engine.zip" "$TMP"
|
| 64 |
+
fi
|
| 65 |
+
|
| 66 |
+
if [ ! -d "$TMP/dssl-engine" ]; then
|
| 67 |
+
echo "dssl installer: the package came down in an unexpected shape. Grab it manually: $BASE/dssl-engine.zip" >&2
|
| 68 |
+
exit 1
|
| 69 |
+
fi
|
| 70 |
+
|
| 71 |
+
mkdir -p "$DEST"
|
| 72 |
+
rm -rf "$DEST/dssl-engine"
|
| 73 |
+
cp -R "$TMP/dssl-engine" "$DEST/dssl-engine"
|
| 74 |
+
|
| 75 |
+
echo ""
|
| 76 |
+
echo "DSSL engine installed to $DEST/dssl-engine"
|
| 77 |
echo ""
|
| 78 |
+
echo "next: open dssl-engine/USAGE.md. It is two tags and one example file."
|
|
|
package/styles/tokens.dssl
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// =========================================================================
|
| 2 |
+
// tokens.dssl — DSSL's own design tokens
|
| 3 |
+
// v0.3.3 "The Classic Edition": a print-era look — parchment paper, ink,
|
| 4 |
+
// oxblood accent, serif display type, squared corners, hairline rules.
|
| 5 |
+
// The dark palette lives in a behavior and is `use`d by both the system
|
| 6 |
+
// preference and the manual theme signal — define once, apply twice.
|
| 7 |
+
// =========================================================================
|
| 8 |
+
|
| 9 |
+
tokens {
|
| 10 |
+
font {
|
| 11 |
+
serif: "Charter", "Iowan Old Style", "Palatino Linotype", "Palatino", "Georgia", "Times New Roman", serif
|
| 12 |
+
sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif
|
| 13 |
+
mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace
|
| 14 |
+
}
|
| 15 |
+
color {
|
| 16 |
+
paper: #f5f0e4
|
| 17 |
+
card: #fdfaf2
|
| 18 |
+
ink: #26201a
|
| 19 |
+
muted: #6f6250
|
| 20 |
+
line: #ddd2bc
|
| 21 |
+
accent: #7c2d2d
|
| 22 |
+
accent-ink: #f9efdd
|
| 23 |
+
ok: #3d6b46
|
| 24 |
+
err: #a83226
|
| 25 |
+
code-bg: #ece4cf
|
| 26 |
+
code-ink: #2b2318
|
| 27 |
+
code-line: #d8cbac
|
| 28 |
+
code-key: #8e3b1f
|
| 29 |
+
code-sel: #38614f
|
| 30 |
+
code-prop: #35566e
|
| 31 |
+
code-str: #6f5a22
|
| 32 |
+
code-num: #6e3b52
|
| 33 |
+
code-com: #6f6350
|
| 34 |
+
}
|
| 35 |
+
radius {
|
| 36 |
+
sm: 2
|
| 37 |
+
md: 4
|
| 38 |
+
lg: 6
|
| 39 |
+
xl: 8
|
| 40 |
+
full: 999
|
| 41 |
+
}
|
| 42 |
+
shadow {
|
| 43 |
+
sm: 0 1 2 color.ink/12
|
| 44 |
+
md: 0 2 6 color.ink/14
|
| 45 |
+
lg: 0 6 18 color.ink/16
|
| 46 |
+
}
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
// ---- dark palette (shared) ---------------------------------------------
|
| 50 |
+
// classic dark = a candlelit study: deep walnut, parchment text, brass accent
|
| 51 |
+
|
| 52 |
+
behavior palette-dark {
|
| 53 |
+
tokens {
|
| 54 |
+
font {
|
| 55 |
+
serif: "Charter", "Iowan Old Style", "Palatino Linotype", "Palatino", "Georgia", "Times New Roman", serif
|
| 56 |
+
sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif
|
| 57 |
+
mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace
|
| 58 |
+
}
|
| 59 |
+
color {
|
| 60 |
+
paper: #181310
|
| 61 |
+
card: #221b15
|
| 62 |
+
ink: #ece2cd
|
| 63 |
+
muted: #a5937a
|
| 64 |
+
line: #372d21
|
| 65 |
+
accent: #c98d52
|
| 66 |
+
accent-ink: #241402
|
| 67 |
+
ok: #7fae8a
|
| 68 |
+
err: #d97e6c
|
| 69 |
+
code-bg: #120e0b
|
| 70 |
+
code-ink: #e5d9bd
|
| 71 |
+
code-line: #2e261c
|
| 72 |
+
code-key: #d99a62
|
| 73 |
+
code-sel: #8fb8a2
|
| 74 |
+
code-prop: #92b4cc
|
| 75 |
+
code-str: #c9b47c
|
| 76 |
+
code-num: #c9a0b4
|
| 77 |
+
code-com: #94856a
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
@media (prefers-color-scheme: dark) {
|
| 83 |
+
use palette-dark
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
@signal theme == dark {
|
| 87 |
+
use palette-dark
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
@signal theme == light {
|
| 91 |
+
use palette-light
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
behavior palette-light {
|
| 95 |
+
tokens {
|
| 96 |
+
font {
|
| 97 |
+
serif: "Charter", "Iowan Old Style", "Palatino Linotype", "Palatino", "Georgia", "Times New Roman", serif
|
| 98 |
+
sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif
|
| 99 |
+
mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace
|
| 100 |
+
}
|
| 101 |
+
color {
|
| 102 |
+
paper: #f5f0e4
|
| 103 |
+
card: #fdfaf2
|
| 104 |
+
ink: #26201a
|
| 105 |
+
muted: #6f6250
|
| 106 |
+
line: #ddd2bc
|
| 107 |
+
accent: #7c2d2d
|
| 108 |
+
accent-ink: #f9efdd
|
| 109 |
+
ok: #3d6b46
|
| 110 |
+
err: #a83226
|
| 111 |
+
code-bg: #ece4cf
|
| 112 |
+
code-ink: #2b2318
|
| 113 |
+
code-line: #d8cbac
|
| 114 |
+
code-key: #8e3b1f
|
| 115 |
+
code-sel: #38614f
|
| 116 |
+
code-prop: #35566e
|
| 117 |
+
code-str: #6f5a22
|
| 118 |
+
code-num: #6e3b52
|
| 119 |
+
code-com: #6f6350
|
| 120 |
+
}
|
| 121 |
+
}
|
| 122 |
+
}
|
public/install.sh
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
# DSSL installer. macOS, Linux, the BSDs, busybox: anything with a POSIX shell.
|
| 3 |
+
#
|
| 4 |
+
# curl -fsSL https://dssl-sable.vercel.app/install.sh | sh
|
| 5 |
+
#
|
| 6 |
+
# wget works just as well:
|
| 7 |
+
# wget -qO- https://dssl-sable.vercel.app/install.sh | sh
|
| 8 |
+
#
|
| 9 |
+
# install somewhere else by appending a folder:
|
| 10 |
+
# curl -fsSL https://dssl-sable.vercel.app/install.sh | sh -s -- ~/my-site
|
| 11 |
+
set -eu
|
| 12 |
+
|
| 13 |
+
BASE="https://dssl-sable.vercel.app"
|
| 14 |
+
DEST="${1:-.}"
|
| 15 |
+
|
| 16 |
+
fetch() {
|
| 17 |
+
# fetch <url> <file>. curl first, wget second, an honest no otherwise.
|
| 18 |
+
if command -v curl >/dev/null 2>&1; then
|
| 19 |
+
curl -fsSL "$1" -o "$2"
|
| 20 |
+
elif command -v wget >/dev/null 2>&1; then
|
| 21 |
+
wget -qO "$2" "$1"
|
| 22 |
+
else
|
| 23 |
+
echo "dssl installer: I need 'curl' or 'wget' to download the engine. Install either one and run this again." >&2
|
| 24 |
+
exit 1
|
| 25 |
+
fi
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
unpack() {
|
| 29 |
+
# unpack <archive> <where>. tar.gz is the default package and tar ships
|
| 30 |
+
# with every distro and macOS. No tar? Take the zip route via unzip,
|
| 31 |
+
# or python3 if even unzip is missing.
|
| 32 |
+
archive="$1"
|
| 33 |
+
where="$2"
|
| 34 |
+
case "$archive" in
|
| 35 |
+
*.tar.gz)
|
| 36 |
+
tar -xzf "$archive" -C "$where"
|
| 37 |
+
;;
|
| 38 |
+
*.zip)
|
| 39 |
+
if command -v unzip >/dev/null 2>&1; then
|
| 40 |
+
unzip -q "$archive" -d "$where"
|
| 41 |
+
elif command -v python3 >/dev/null 2>&1; then
|
| 42 |
+
python3 -c "import sys, zipfile; zipfile.ZipFile(sys.argv[1]).extractall(sys.argv[2])" "$archive" "$where"
|
| 43 |
+
else
|
| 44 |
+
echo "dssl installer: no tar, no unzip, no python3. One of the three, please." >&2
|
| 45 |
+
exit 1
|
| 46 |
+
fi
|
| 47 |
+
;;
|
| 48 |
+
esac
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
# a scratch dir, gone when we are
|
| 52 |
+
TMP="$(mktemp -d 2>/dev/null || echo "${TMPDIR:-/tmp}/dssl-install-$$")"
|
| 53 |
+
mkdir -p "$TMP"
|
| 54 |
+
trap 'rm -rf "$TMP"' EXIT INT TERM
|
| 55 |
+
|
| 56 |
+
echo "fetching the DSSL engine..."
|
| 57 |
+
|
| 58 |
+
if command -v tar >/dev/null 2>&1; then
|
| 59 |
+
fetch "$BASE/dssl-engine.tar.gz" "$TMP/engine.tar.gz"
|
| 60 |
+
unpack "$TMP/engine.tar.gz" "$TMP"
|
| 61 |
+
else
|
| 62 |
+
fetch "$BASE/dssl-engine.zip" "$TMP/engine.zip"
|
| 63 |
+
unpack "$TMP/engine.zip" "$TMP"
|
| 64 |
+
fi
|
| 65 |
+
|
| 66 |
+
if [ ! -d "$TMP/dssl-engine" ]; then
|
| 67 |
+
echo "dssl installer: the package came down in an unexpected shape. Grab it manually: $BASE/dssl-engine.zip" >&2
|
| 68 |
+
exit 1
|
| 69 |
+
fi
|
| 70 |
+
|
| 71 |
+
mkdir -p "$DEST"
|
| 72 |
+
rm -rf "$DEST/dssl-engine"
|
| 73 |
+
cp -R "$TMP/dssl-engine" "$DEST/dssl-engine"
|
| 74 |
+
|
| 75 |
+
echo ""
|
| 76 |
+
echo "DSSL engine installed to $DEST/dssl-engine"
|
| 77 |
+
echo ""
|
| 78 |
+
echo "next: open dssl-engine/USAGE.md. It is two tags and one example file."
|