From b2e8162e1319515fdf9092d983ce8170eba2bd18 Mon Sep 17 00:00:00 2001 From: eltrac Date: Tue, 10 Feb 2026 11:55:47 +0800 Subject: docs: update README --- README.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 2d4256c..65f54ed 100644 --- a/README.md +++ b/README.md @@ -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 -- cgit v1.2.3