Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔠 Flexible Grids #162

Merged
merged 11 commits into from
Jun 9, 2022
Merged

🔠 Flexible Grids #162

merged 11 commits into from
Jun 9, 2022

Conversation

philippamarkovics
Copy link
Member

@philippamarkovics philippamarkovics commented Jun 2, 2022

This PR brings grid-like layouts that can be composed from cols and rows. The col and row viewers are variadic but also understand passing any sequential? so they support assing the viewers via ::clerk/viewer metadata.

CleanShot 2022-06-07 at 09 36 20@2x

CleanShot 2022-06-07 at 09 36 49@2x

CleanShot 2022-06-07 at 09 37 10@2x

@philippamarkovics philippamarkovics marked this pull request as draft June 2, 2022 14:23
@mk mk force-pushed the flexble-grids branch from ace2aea to dca02fa Compare June 3, 2022 08:33
@philippamarkovics philippamarkovics changed the title Flexible Grids 🔠 Flexible Grids Jun 7, 2022
@philippamarkovics philippamarkovics marked this pull request as ready for review June 7, 2022 07:40
@mk mk force-pushed the flexble-grids branch from 4c4e0a8 to 112d934 Compare June 9, 2022 08:52
@mk mk merged commit de52f29 into main Jun 9, 2022
@mk mk deleted the flexble-grids branch June 9, 2022 09:04
mk pushed a commit that referenced this pull request Jun 9, 2022
Support grid-like layouts that can be composed from `cols` and `rows`. The `col` and `row` viewers are variadic but also understand passing any `sequential?` so they support assing the viewers via `::clerk/viewer` metadata.

```clojure
(v/row image-1 image-2 image-3) ;; single row
(v/col {::clerk/opts {:width 150}} image-1 image-2 image-3) ;; single col, each 150px wide
```

See https://snapshots.nextjournal.com/clerk/build/112d934c7b81f0abeeb79e3ea8d3669d292e37ad/index.html#/notebooks/viewers/grid.clj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants