inkblot 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.build.yml +2 -1
- data/Rakefile +5 -1
- data/docs/inkblot.yml +1 -0
- data/docs/pages/docs/tailwind.md +6 -1
- data/js-src/main.ts +1 -0
- data/js-src/search.ts +19 -0
- data/lib/assets/main.js +508 -0
- data/lib/inkblot/cli.rb +5 -0
- data/lib/inkblot/layout.rb +10 -1
- data/lib/inkblot/search.rb +11 -0
- data/lib/inkblot/version.rb +1 -1
- data/lib/inkblot.min.css +1 -1
- data/package-lock.json +1167 -0
- data/package.json +10 -0
- metadata +7 -4
- data/.rspec_status +0 -3
- data/docs/pages/test.md +0 -4
- data/docs/pages/test2.md +0 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fff52ea3fb5dd275aa1a68e181813b8f41f452cf28ab7ce003f870b2f63ec6fd
|
|
4
|
+
data.tar.gz: 6d0b29bd0f6e8e957c92da7932cab729eb31df15f0c0c23b5eb5f02badbe5b74
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92a26ae8322524f78c1e8a1d79c688ba4e8b58fcfaa880a680a77bab11432f608f701f6bf7775ea495cbcc910d29f1ca02da247977e04edd3cd8fe967ed919e0
|
|
7
|
+
data.tar.gz: a31d29ea64c8ed92270801a5cd2a613986d6d7f806a55c72d282b275a2c1aeba23a3d4255993c38536d22937be7462251fec45365d4fa84226ddfa53b7442576
|
data/.build.yml
CHANGED
|
@@ -9,6 +9,7 @@ packages:
|
|
|
9
9
|
- ruby
|
|
10
10
|
- ruby-dev
|
|
11
11
|
- ruby-bundler
|
|
12
|
+
- esbuild
|
|
12
13
|
oauth: "pages.sr.ht/PAGES:RW"
|
|
13
14
|
environment:
|
|
14
15
|
site: inkblot.farthergate.com
|
|
@@ -16,7 +17,7 @@ environment:
|
|
|
16
17
|
tasks:
|
|
17
18
|
- deps: |
|
|
18
19
|
cd inkblot
|
|
19
|
-
npm i
|
|
20
|
+
npm i
|
|
20
21
|
bundle config set path vendor/bundle
|
|
21
22
|
bundle install
|
|
22
23
|
- build: |
|
data/Rakefile
CHANGED
|
@@ -13,6 +13,10 @@ task :css do
|
|
|
13
13
|
system("tailwindcss -i tailwind.css --minify -o lib/inkblot.min.css")
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
+
task :js do
|
|
17
|
+
system("esbuild --minify --bundle --splitting --format=esm --external:'*.json' --outdir=lib/assets ./js-src/main.ts")
|
|
18
|
+
end
|
|
19
|
+
|
|
16
20
|
require "inkblot/cli"
|
|
17
21
|
|
|
18
22
|
task :docs do
|
|
@@ -21,4 +25,4 @@ task :docs do
|
|
|
21
25
|
puts 'built docs'
|
|
22
26
|
end
|
|
23
27
|
|
|
24
|
-
task default: %i[spec css docs]
|
|
28
|
+
task default: %i[spec css js docs]
|
data/docs/inkblot.yml
CHANGED
data/docs/pages/docs/tailwind.md
CHANGED
|
@@ -5,4 +5,9 @@ title: TailwindCSS
|
|
|
5
5
|
|
|
6
6
|
# TailwindCSS
|
|
7
7
|
|
|
8
|
-
Inkblot comes with prebuilt Tailwind-based styles for its own UI, but if you want to style your own content as well, you can add a `tailwind.css` file, which will be automatically picked up and
|
|
8
|
+
Inkblot comes with prebuilt Tailwind-based styles for its own UI, but if you want to style your own content as well, you can add a `tailwind.css` file, which will be automatically picked up and built. Here's a basic one to get you started:
|
|
9
|
+
|
|
10
|
+
~~~ css
|
|
11
|
+
@import "tailwindcss";
|
|
12
|
+
@plugin "@tailwindcss/typography";
|
|
13
|
+
~~~
|
data/js-src/main.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./search";
|
data/js-src/search.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "ninja-keys";
|
|
2
|
+
|
|
3
|
+
type Page = {
|
|
4
|
+
out: string;
|
|
5
|
+
fm: Record<string, any>;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
fetch(import.meta.resolve("./search.index.json")).then(async (resp) => {
|
|
9
|
+
const index = await resp.json();
|
|
10
|
+
document.querySelector("ninja-keys")!.data = (
|
|
11
|
+
Object.entries(index) as [string, Page][]
|
|
12
|
+
).map(([id, { out, fm }]) => ({
|
|
13
|
+
id,
|
|
14
|
+
title: "title" in fm ? fm.title : id,
|
|
15
|
+
handler: () => {
|
|
16
|
+
location.assign(out);
|
|
17
|
+
},
|
|
18
|
+
}));
|
|
19
|
+
});
|