diff options
| author | eltrac <hi@eltr.ac> | 2026-02-10 11:55:47 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-02-10 11:55:47 +0800 |
| commit | b2e8162e1319515fdf9092d983ce8170eba2bd18 (patch) | |
| tree | fe268a5da94fd464925602b7a9164bb4f574f110 | |
| parent | f0f473184c362520cc12bd9a1cc149d0ced9b19c (diff) | |
docs: update README
| -rw-r--r-- | README.md | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -43,6 +43,7 @@ You can configure Libra.js by passing an object to the constructor. The defaults new LightBox({ selector: "[data-libra]", // Selector for images to be lightboxed margin: 50, // Margin around the lightbox + zeroMarginBreakpoint: 786, // When to not use margin (screen width) offset: { x: 0, y: 0 }, // Offset for the lightbox position transitionDuration: 200, // Animation duration in milliseconds imageCursor: "zoom-in", // Cursor style for hoverable images @@ -51,7 +52,7 @@ new LightBox({ ### Z-index Configuration -Z-index values are managed through CSS classes for better maintainability: +Z-index values are managed through CSS classes: - `.libra-overlay.libra-visible`: z-index 900 (overlay when visible) - `.libra-overlay.libra-hidden`: z-index -100 (overlay when hidden) @@ -61,11 +62,19 @@ You can customize these values by overriding the CSS classes in your own stylesh ## Development +```shell +pnpm install +pnpm build ``` -npm install -npm run build + +There is no `dev` command. To develop, simply start a HTTP server at root directory, for example, with Python. + +```shell +python -m http.server 8080 ``` +Then open `localhost:8080/test` in your browser. + ## Philosophy ### Why I made Libra.js |
