Add grouping feature
This commit is contained in:
52
README.md
52
README.md
@@ -23,6 +23,7 @@ luxtools provides DokuWiki syntax that:
|
||||
|
||||
- Lists a directory's direct children (files + folders) or files matching a glob pattern
|
||||
- Renders an image thumbnail gallery (with lightbox)
|
||||
- Groups multiple `{{image>...}}` blocks in compact grid/flex layouts
|
||||
- Provides "open this folder/path" links for local workflows
|
||||
- Embeds file-backed scratchpads with a minimal inline editor (no wiki revisions)
|
||||
- Links a page to a media folder via a UUID (.pagelink), enabling a `blobs/` alias
|
||||
@@ -310,7 +311,52 @@ The image links to the full-size version when clicked.
|
||||
|
||||
Remote images (HTTP/HTTPS URLs) are linked directly without proxying or thumbnailing.
|
||||
|
||||
### 5) Open a local path/folder (best-effort)
|
||||
### 5) Group multiple image boxes compactly
|
||||
|
||||
Use `<grouping> ... </grouping>` to arrange multiple `{{image>...}}` entries in less vertical space.
|
||||
|
||||
```text
|
||||
<grouping>
|
||||
{{image>/Scape/photos/1.jpg|One|300}}
|
||||
{{image>/Scape/photos/2.jpg|Two|300}}
|
||||
{{image>/Scape/photos/3.jpg|Three|300}}
|
||||
{{image>/Scape/photos/4.jpg|Four|300}}
|
||||
</grouping>
|
||||
|
||||
<grouping layout="flex" gap="0" justify="start" align="start">
|
||||
{{image>/Scape/photos/1.jpg|One|220}}
|
||||
{{image>/Scape/photos/2.jpg|Two|220}}
|
||||
{{image>/Scape/photos/3.jpg|Three|220}}
|
||||
</grouping>
|
||||
|
||||
<grouping layout="grid" cols="3" gap="0.4rem">
|
||||
{{image>/Scape/photos/1.jpg|One|260}}
|
||||
{{image>/Scape/photos/2.jpg|Two|260}}
|
||||
{{image>/Scape/photos/3.jpg|Three|260}}
|
||||
</grouping>
|
||||
|
||||
<grouping layout="flex" gap="0.5rem" justify="space-between" align="center">
|
||||
{{image>/Scape/photos/1.jpg|One|220}}
|
||||
{{image>/Scape/photos/2.jpg|Two|220}}
|
||||
{{image>/Scape/photos/3.jpg|Three|220}}
|
||||
</grouping>
|
||||
```
|
||||
|
||||
Supported attributes on the opening tag:
|
||||
|
||||
- `layout`: `flex` (default) or `grid`
|
||||
- `cols`: integer >= 1 (default `2`, used by `grid`)
|
||||
- `gap`: CSS length token such as `0`, `0.6rem`, `8px` (default `0`)
|
||||
- `justify`: `start`, `center`, `end`, `space-between`, `space-around`, `space-evenly` (default `start`)
|
||||
- `align`: `start`, `center`, `end`, `stretch`, `baseline` (default `start`)
|
||||
|
||||
Notes:
|
||||
- The wrapper only controls layout. It adds no own border/background/frame.
|
||||
- Invalid values silently fall back to defaults.
|
||||
- Unknown attributes render a small warning string, e.g. `[grouping: unknown option(s): gpa]`.
|
||||
- Existing standalone `{{image>...}}` behavior is unchanged outside `<grouping>`.
|
||||
|
||||
### 6) Open a local path/folder (best-effort)
|
||||
|
||||
```
|
||||
{{open>/Scape/projects|Open projects folder}}
|
||||
@@ -322,7 +368,7 @@ Behaviour:
|
||||
- Prefer calling the configured local client service (open_service_url).
|
||||
- Fall back to opening a file:// URL in a new tab (often blocked by browsers).
|
||||
|
||||
### 6) Scratchpads (shared, file-backed, no page revisions)
|
||||
### 7) Scratchpads (shared, file-backed, no page revisions)
|
||||
|
||||
```
|
||||
{{scratchpad>start}}
|
||||
@@ -330,7 +376,7 @@ Behaviour:
|
||||
|
||||
Scratchpads render the referenced file as wikitext and (when you have edit rights on the host page) provide an inline editor that saves directly to the backing file.
|
||||
|
||||
### 7) Link Favicons (automatic)
|
||||
### 8) Link Favicons (automatic)
|
||||
|
||||
External links automatically display the favicon of the linked website. This feature:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user