Skip to content

Commit

Permalink
docs: improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaokang2022 committed Oct 31, 2024
1 parent 7fba332 commit 602f76f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions demo-mkdocs/docs/gallery/gallery.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,11 @@ There are two galleries: taipei and seattle.

<figcaption>Seattle, America. Credit: Yuyu Liu</figcaption>
</figure>

## Dark and light mode

If you are using the mkdocs theme is material, then we provide an option `auto_themed` to enable the dark and light mode of the material theme. When enabled, the image with the same theme will be grouped as a galley in the light box.

Enabled in a similar way to option [`auto_caption`](../caption/caption.md#image-alt-as-the-caption).

Check more details about the dark and light mode on the [official document](https://squidfunk.github.io/mkdocs-material/reference/images/#light-and-dark-mode).
2 changes: 2 additions & 0 deletions demo-mkdocs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ GLightbox is a pure javascript lightbox library with mobile support.
draggable: true
skip_classes:
- custom-skip-class-name
auto_themed: false
auto_caption: false
caption_position: bottom
background: white
Expand All @@ -65,6 +66,7 @@ GLightbox is a pure javascript lightbox library with mobile support.
| zoomable | true | Enable or disable zoomable images. |
| draggable | true | Enable or disable mouse drag to go prev and next slide. |
| skip_classes | [ ] | Disable lightbox of those image with specific custom class name. |
| auto_themed | false | Enable or disable supporting light and dark mode of mkdocs material. |
| auto_caption | false | Enable or disable using alt of image as caption title automatically. |
| caption_position | bottom | Default captions position. (bottom, top, left, right) |
| background | white | The background CSS of lightbox image. The background will shown when the image is transparent. You can use any CSS value for the background for example `#74b9ff` or `Gainsboro` or `none` for nothing. |
Expand Down

0 comments on commit 602f76f

Please sign in to comment.