☰ GDG /
Docstrings (001–005)
#001 gdtest_minimal #002 gdtest_google #003 gdtest_sphinx #004 gdtest_nodocs #005 gdtest_mixed_docs
Layouts (006–013)
#006 gdtest_src_layout #007 gdtest_python_layout #008 gdtest_lib_layout #009 gdtest_hatch #010 gdtest_setuptools_find #011 gdtest_setup_cfg #012 gdtest_setup_py #013 gdtest_auto_discover
Exports (014–017)
#014 gdtest_no_all #015 gdtest_all_concat #016 gdtest_config_exclude #017 gdtest_auto_exclude
Object Types (018–027)
#018 gdtest_small_class #019 gdtest_big_class #020 gdtest_dataclasses #021 gdtest_enums #022 gdtest_typed_containers #023 gdtest_protocols #024 gdtest_descriptors #025 gdtest_dunders #026 gdtest_nested_class #027 gdtest_constants
Directives (028–032)
#028 gdtest_seealso #029 gdtest_nodoc #030 gdtest_user_guide_auto #031 gdtest_user_guide_sections #032 gdtest_user_guide_subdirs
User Guide (033–038)
#033 gdtest_user_guide_explicit #034 gdtest_user_guide_custom_dir #035 gdtest_user_guide_hyphen #036 gdtest_readme_rst #037 gdtest_index_qmd #038 gdtest_index_md
Landing Pages (039–043)
#039 gdtest_no_readme #040 gdtest_index_wins #041 gdtest_full_extras #042 gdtest_github_contrib #043 gdtest_cli_click
Extras & Config (044–050)
#044 gdtest_cli_nested #045 gdtest_explicit_ref #046 gdtest_kitchen_sink #047 gdtest_name_mismatch #048 gdtest_src_big_class #049 gdtest_google_big_class #050 gdtest_user_guide_cli
Cross-Dimension (051–065)
#051 gdtest_explicit_big_class #052 gdtest_src_no_all #053 gdtest_extras_guide #054 gdtest_google_seealso #055 gdtest_setup_cfg_src #056 gdtest_exclude_cli #057 gdtest_src_explicit_ref #058 gdtest_async_funcs #059 gdtest_generators #060 gdtest_overloads #061 gdtest_abstract_props #062 gdtest_multi_inherit #063 gdtest_slots_class #064 gdtest_frozen_dc #065 gdtest_generics
API Patterns (066–077)
#066 gdtest_context_mgr #067 gdtest_decorators #068 gdtest_exceptions #069 gdtest_reexports #070 gdtest_many_exports #071 gdtest_deep_nesting #072 gdtest_long_docs #073 gdtest_many_guides #074 gdtest_many_big_classes #075 gdtest_flit #076 gdtest_pdm #077 gdtest_namespace
Scale & Stress (078–082)
#078 gdtest_monorepo #079 gdtest_multi_module #080 gdtest_src_legacy #081 gdtest_empty_module #082 gdtest_all_private
Build Systems (083–088)
#083 gdtest_duplicate_all #084 gdtest_badge_readme #085 gdtest_math_docs #086 gdtest_mixed_guide_ext #087 gdtest_unicode_docs #088 gdtest_config_all_on
Edge Cases (089–095)
#089 gdtest_config_display #090 gdtest_config_minimal #091 gdtest_config_parser #092 gdtest_config_extra_keys #093 gdtest_github_icon #094 gdtest_source_branch #095 gdtest_source_path
Config Matrix (096–100)
#096 gdtest_source_title #097 gdtest_source_disabled #098 gdtest_sidebar_disabled #099 gdtest_sidebar_min_items #100 gdtest_sidebar_float
Config Options (101–125)
#101 gdtest_cli_name #102 gdtest_dynamic_false #103 gdtest_parser_google #104 gdtest_parser_sphinx #105 gdtest_display_name #106 gdtest_funding #107 gdtest_authors_multi #108 gdtest_no_darkmode #109 gdtest_exclude_list #110 gdtest_jupyter_kernel #111 gdtest_config_sections #112 gdtest_config_ug_string #113 gdtest_config_ug_list #114 gdtest_config_changelog #115 gdtest_config_reference #116 gdtest_config_combo_a #117 gdtest_config_combo_b #118 gdtest_config_combo_c #119 gdtest_config_combo_d #120 gdtest_config_combo_e #121 gdtest_config_combo_f #122 gdtest_attribution_on #123 gdtest_attribution_off #124 gdtest_rst_versionadded #125 gdtest_rst_deprecated
Docstring Richness (126–150)
#126 gdtest_rst_note #127 gdtest_rst_warning #128 gdtest_rst_tip #129 gdtest_rst_caution #130 gdtest_rst_danger #131 gdtest_rst_important #132 gdtest_rst_mixed_dirs #133 gdtest_sphinx_func_role #134 gdtest_sphinx_class_role #135 gdtest_sphinx_exc_role #136 gdtest_sphinx_meth_role #137 gdtest_sphinx_mixed_roles #138 gdtest_numpy_rich #139 gdtest_google_rich #140 gdtest_sphinx_rich #141 gdtest_docstring_examples #142 gdtest_docstring_notes #143 gdtest_docstring_warnings #144 gdtest_docstring_references #145 gdtest_docstring_seealso #146 gdtest_docstring_math #147 gdtest_docstring_tables #148 gdtest_docstring_combo #149 gdtest_ug_auto #150 gdtest_ug_numbered
UG Variations (151–165)
#151 gdtest_ug_sections_fm #152 gdtest_ug_subdirs #153 gdtest_ug_custom_dir #154 gdtest_ug_deep_nest #155 gdtest_ug_mixed_ext #156 gdtest_ug_many_pages #157 gdtest_ug_explicit_order #158 gdtest_ug_single_page #159 gdtest_ug_no_frontmatter #160 gdtest_ug_with_code #161 gdtest_ug_with_images #162 gdtest_ug_hyphen_dir #163 gdtest_ug_combo #164 gdtest_sec_examples #165 gdtest_sec_tutorials
Custom Sections (166–175)
#166 gdtest_sec_recipes #167 gdtest_sec_blog #168 gdtest_sec_faq #169 gdtest_sec_multi #170 gdtest_sec_navbar_after #171 gdtest_sec_with_ug #172 gdtest_sec_with_ref #173 gdtest_sec_deep #174 gdtest_sec_index_opt #175 gdtest_sec_index_hero
Reference Config (176–185)
#176 gdtest_sec_sidebar_single #177 gdtest_custom_passthrough_navbar #178 gdtest_custom_raw_navbar_after #179 gdtest_custom_mixed_modes #180 gdtest_custom_nested_combo #181 gdtest_custom_basename_output #182 gdtest_custom_nested_output #183 gdtest_custom_missing_dir_combo #184 gdtest_ref_explicit #185 gdtest_ref_members_false
Site Theming (186–195)
#186 gdtest_ref_mixed #187 gdtest_ref_reorder #188 gdtest_ref_sectioned #189 gdtest_ref_single_section #190 gdtest_ref_module_expand #191 gdtest_ref_big_class #192 gdtest_ref_multi_big #193 gdtest_ref_title #194 gdtest_theme_cosmo #195 gdtest_theme_lumen
Stress Tests (196–200)
#196 gdtest_theme_cerulean #197 gdtest_toc_disabled #198 gdtest_toc_depth #199 gdtest_toc_title #200 gdtest_site_combo #201 gdtest_display_badges #202 gdtest_display_authors #203 gdtest_display_funding #204 gdtest_stress_all_config #205 gdtest_stress_all_docstr #206 gdtest_stress_all_ug #207 gdtest_stress_all_sections #208 gdtest_stress_everything #209 gdtest_src_google_seealso #210 gdtest_hatch_nodoc #211 gdtest_pdm_big_class #212 gdtest_flit_enums #213 gdtest_namespace_ug #214 gdtest_ug_subdir_numbered #215 gdtest_homepage_ug #216 gdtest_long_names #217 gdtest_logo #218 gdtest_hero_basic #219 gdtest_hero_readme_badges #220 gdtest_hero_disabled #221 gdtest_hero_custom #222 gdtest_hero_wordmark #223 gdtest_hero_no_logo #224 gdtest_hero_explicit_badges #225 gdtest_hero_index_qmd #226 gdtest_hero_auto_logo #227 gdtest_md_disabled #228 gdtest_md_no_widget #229 gdtest_announce_simple #230 gdtest_announce_dict #231 gdtest_announce_disabled #232 gdtest_gradient_sky #233 gdtest_gradient_peach #234 gdtest_gradient_prism #235 gdtest_gradient_lilac #236 gdtest_gradient_slate #237 gdtest_gradient_honey #238 gdtest_gradient_dusk #239 gdtest_gradient_mint #240 gdtest_gradient_navbar #241 gdtest_gradient_both #242 gdtest_gradient_mixed #243 gdtest_gradient_no_dismiss #244 gdtest_header_text #245 gdtest_header_list #246 gdtest_header_file #247 gdtest_navbar_color #248 gdtest_navbar_color_light #249 gdtest_navbar_color_dark #250 gdtest_navbar_color_same #251 gdtest_navbar_color_split #252 gdtest_kitchen_sink_q #253 gdtest_stress_everything_q #254 gdtest_seealso_desc #255 gdtest_numpy_seealso_desc #256 gdtest_interlinks_prose #257 gdtest_autolink #258 gdtest_skill_default #259 gdtest_skill_curated #260 gdtest_skill_config #261 gdtest_skill_disabled #262 gdtest_skill_rich #263 gdtest_skill_combo #264 gdtest_skill_complex #265 gdtest_i18n_french #266 gdtest_i18n_japanese #267 gdtest_i18n_arabic #268 gdtest_code_cells #269 gdtest_nav_icons #270 gdtest_page_tags #271 gdtest_page_status #272 gdtest_tag_location #273 gdtest_icon_shortcode #274 gdtest_homepage_ug_subdirs #275 gdtest_gt_tables #276 gdtest_scale_to_fit #277 gdtest_scale_min_scale #278 gdtest_homepage_wide #279 gdtest_interlinks_userguide #280 gdtest_code_span_headings #281 gdtest_sec_blog_user_index #282 gdtest_sec_dir_titles #283 gdtest_namespace_src #284 gdtest_auto_include #285 gdtest_no_auto_exclude #286 gdtest_tbl_preview #287 gdtest_tbl_shortcode #288 gdtest_tbl_explorer #289 gdtest_hr_shortcode #290 gdtest_accent_color #291 gdtest_keys_shortcode #292 gdtest_inline_methods #293 gdtest_inline_always #294 gdtest_inline_never #295 gdtest_inline_threshold #296 gdtest_ref_inherited_explicit #297 gdtest_ref_include_inherited #298 gdtest_mock_code #299 gdtest_details_shortcode #300 gdtest_termshow #301 gdtest_lightbox
301/301 built ⏱ 23.8s 🧪 17/21

gdtest-lightbox

A synthetic package showcasing the gd-lightbox extension for Great Docs.

Overview

This site demonstrates all lightbox features:

  • Click-to-zoom with origin animation
  • Dark-mode image variants
  • Gallery with filmstrip navigation
  • Copy/download toolbar
  • Deep-linking
App Screenshot

Architecture

Architecture Diagram

Lightbox extension showcase demonstrating the gd-lightbox image viewer with all feature combinations: explicit .lightbox class, auto mode (lightbox: true), dark-mode image variants (naming convention and explicit dark= attribute), gallery grouping with filmstrip navigation, captions and credits, .nolightbox opt-out, and deep-linking.

Source files
📁 gdtest_lightbox/
📄 __init__.py
"""A test package for the gd-lightbox extension."""

__version__ = "1.0.0"
__all__ = ["create_figure"]


def create_figure(title: str, width: int = 600, height: int = 400) -> str:
    """
    Create a placeholder figure.

    Parameters
    ----------
    title
        The title text to render on the figure.
    width
        Figure width in pixels.
    height
        Figure height in pixels.

    Returns
    -------
    str
        SVG markup for the figure.
    """
    return f"<svg>{title}</svg>"
📁 images/
📄 diagram.svg
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="500"><rect width="800" height="500" fill="#2c3e50" rx="8"/><text x="400" y="256" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Architecture Diagram</text></svg>
📄 screenshot.svg
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400"><rect width="600" height="400" fill="#4a90d9" rx="8"/><text x="300" y="206" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">App Screenshot</text></svg>
📁 user_guide/
📁 images/
📄 after.svg
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400"><rect width="600" height="400" fill="#2ecc71" rx="8"/><text x="300" y="206" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">After (v0.9)</text></svg>
📄 api-reference.svg
<svg xmlns="http://www.w3.org/2000/svg" width="700" height="450"><rect width="700" height="450" fill="#1e3a5f" rx="8"/><text x="350" y="231" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">API Reference Page</text></svg>
📄 app-layout.dark.svg
<svg xmlns="http://www.w3.org/2000/svg" width="900" height="500"><rect x="0" width="225" height="500" fill="#1a1a2e"/><rect x="225" width="225" height="500" fill="#16213e"/><rect x="450" width="225" height="500" fill="#0f3460"/><rect x="675" width="225" height="500" fill="#1a1a2e"/><text x="450" y="256" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">App Layout (Dark)</text></svg>
📄 app-layout.svg
<svg xmlns="http://www.w3.org/2000/svg" width="900" height="500"><rect x="0" width="225" height="500" fill="#2c3e50"/><rect x="225" width="225" height="500" fill="#34495e"/><rect x="450" width="225" height="500" fill="#3d566e"/><rect x="675" width="225" height="500" fill="#ecf0f1"/><text x="450" y="256" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">App Layout</text></svg>
📄 before.svg
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400"><rect width="600" height="400" fill="#bdc3c7" rx="8"/><text x="300" y="206" text-anchor="middle" fill="#333" font-size="16" font-family="sans-serif">Before (v0.8)</text></svg>
📄 chart-1600.svg
<svg xmlns="http://www.w3.org/2000/svg" width="1600" height="1120"><rect width="1600" height="1120" fill="#8e44ad" rx="8"/><text x="800" y="566" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Chart 1600w (Full)</text></svg>
📄 chart-400.svg
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="280"><rect width="400" height="280" fill="#8e44ad" rx="8"/><text x="200" y="146" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Chart 400w</text></svg>
📄 chart-800.svg
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="560"><rect width="800" height="560" fill="#8e44ad" rx="8"/><text x="400" y="286" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Chart 800w</text></svg>
📄 chart.svg
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="350"><rect width="500" height="350" fill="#8e44ad" rx="8"/><text x="250" y="181" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Revenue Chart</text></svg>
📄 config-panel.svg
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400"><rect width="600" height="400" fill="#4a1e5f" rx="8"/><text x="300" y="206" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Configuration Panel</text></svg>
📄 dashboard.dark.svg
<svg xmlns="http://www.w3.org/2000/svg" width="700" height="450"><rect width="700" height="450" fill="#1a1a2e" rx="8"/><text x="350" y="231" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Dashboard (Dark)</text></svg>
📄 dashboard.light.svg
<svg xmlns="http://www.w3.org/2000/svg" width="700" height="450"><rect width="700" height="450" fill="#f8f9fa" rx="8"/><text x="350" y="231" text-anchor="middle" fill="#333" font-size="16" font-family="sans-serif">Dashboard (Light)</text></svg>
📄 diagram-2400.svg
<svg xmlns="http://www.w3.org/2000/svg" width="2400" height="1500"><rect width="2400" height="1500" fill="#2c3e50" rx="8"/><text x="1200" y="756" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Diagram 2400w (Full Res)</text></svg>
📄 diagram.svg
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="500"><rect width="800" height="500" fill="#2c3e50" rx="8"/><text x="400" y="256" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Architecture Diagram</text></svg>
📄 full-page.svg
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="800"><rect width="1200" height="800" fill="#2c3e50" rx="8"/><text x="600" y="406" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Full Page Screenshot</text></svg>
📄 hero-gradient.dark.svg
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400"><defs><linearGradient id="g" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#2d1b69"/><stop offset="100%" stop-color="#1a0533"/></linearGradient></defs><rect width="800" height="400" fill="url(#g)" rx="8"/><text x="400" y="206" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Hero Section (Dark)</text></svg>
📄 hero-gradient.svg
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="400"><defs><linearGradient id="g" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#667eea"/><stop offset="100%" stop-color="#764ba2"/></linearGradient></defs><rect width="800" height="400" fill="url(#g)" rx="8"/><text x="400" y="206" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Hero Section</text></svg>
📄 icon-small.svg
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><rect width="24" height="24" fill="#666" rx="8"/><text x="12" y="18" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">•</text></svg>
📄 mosaic-a.svg
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="300"><rect width="400" height="300" fill="#1abc9c" rx="8"/><text x="200" y="156" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Gallery A</text></svg>
📄 mosaic-b.svg
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="500"><rect width="400" height="500" fill="#e67e22" rx="8"/><text x="200" y="256" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Gallery B (Tall)</text></svg>
📄 mosaic-c.svg
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="300"><rect width="600" height="300" fill="#9b59b6" rx="8"/><text x="300" y="156" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Gallery C (Wide)</text></svg>
📄 mosaic-d.svg
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400"><rect width="400" height="400" fill="#34495e" rx="8"/><text x="200" y="206" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Gallery D</text></svg>
📄 pipeline.svg
<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="300"><rect width="1000" height="300" fill="#2c3e50" rx="8"/><text x="500" y="156" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Data Pipeline: Ingest → Process → Store → Serve</text></svg>
📄 screenshot.svg
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400"><rect width="600" height="400" fill="#4a90d9" rx="8"/><text x="300" y="206" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">App Screenshot</text></svg>
📄 step1.svg
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="320"><rect width="500" height="320" fill="#e74c3c" rx="8"/><text x="250" y="166" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Step 1: Install</text></svg>
📄 step2.svg
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="320"><rect width="500" height="320" fill="#f39c12" rx="8"/><text x="250" y="166" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Step 2: Configure</text></svg>
📄 step3.svg
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="320"><rect width="500" height="320" fill="#27ae60" rx="8"/><text x="250" y="166" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Step 3: Build</text></svg>
📄 step4.svg
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="320"><rect width="500" height="320" fill="#3498db" rx="8"/><text x="250" y="166" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Step 4: Deploy</text></svg>
📄 ui-preview-night.svg
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="380"><rect width="600" height="380" fill="#16213e" rx="8"/><text x="300" y="196" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">UI Preview (Dark)</text></svg>
📄 ui-preview.svg
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="380"><rect width="600" height="380" fill="#ffffff" rx="8"/><text x="300" y="196" text-anchor="middle" fill="#333" font-size="16" font-family="sans-serif">UI Preview (Light)</text></svg>
📄 v1-sidebar.svg
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="500"><rect width="300" height="500" fill="#bdc3c7" rx="8"/><text x="150" y="256" text-anchor="middle" fill="#333" font-size="16" font-family="sans-serif">Sidebar v1</text></svg>
📄 v1-table.svg
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="350"><rect width="600" height="350" fill="#95a5a6" rx="8"/><text x="300" y="181" text-anchor="middle" fill="#fff" font-size="16" font-family="sans-serif">Table v1 — Plain</text></svg>
📄 v2-sidebar.svg
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="500"><defs><linearGradient id="g" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#2ecc71"/><stop offset="100%" stop-color="#27ae60"/></linearGradient></defs><rect width="300" height="500" fill="url(#g)" rx="8"/><text x="150" y="256" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Sidebar v2</text></svg>
📄 v2-table.svg
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="350"><defs><linearGradient id="g" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#3498db"/><stop offset="100%" stop-color="#2980b9"/></linearGradient></defs><rect width="600" height="350" fill="url(#g)" rx="8"/><text x="300" y="181" text-anchor="middle" fill="white" font-size="16" font-family="sans-serif">Table v2 — Styled</text></svg>
📄 01-basic-lightbox.qmd
---
title: "Basic Lightbox"
---

## Explicit Lightbox Class

Add `{.lightbox}` to any image to enable click-to-zoom:

![App Screenshot](images/screenshot.svg){.lightbox}

## With Caption and Credit

![Revenue Chart](images/chart.svg){.lightbox caption="Q4 2024 revenue growth across all segments" credit="Data Analytics Team"}

## No Lightbox (opt-out)

This image explicitly opts out with `{.nolightbox}`:

![Small diagram](images/diagram.svg){.nolightbox}

## Inline image (should not get lightbox in auto mode)

Here is an inline icon ![icon](images/icon-small.svg) within text.
📄 02-auto-mode.qmd
---
title: "Auto Mode"
lightbox: true
---

## Auto Lightbox Mode

When `lightbox: true` is set in the page YAML, all block-level images
automatically get lightbox treatment. No `{.lightbox}` class needed.

![Architecture Diagram](images/diagram.svg)

![Revenue Chart](images/chart.svg)

## Inline images are skipped

This inline icon ![icon](images/icon-small.svg) should not get
the lightbox treatment because it's inline with text.

## Explicit opt-out still works

![This image is excluded](images/screenshot.svg){.nolightbox}
📄 03-dark-mode.qmd
---
title: "Dark Mode Variants"
---

## Auto-Detected Dark Variants

Images using the `.light.ext` / `.dark.ext` naming convention are
automatically swapped when the user toggles dark mode:

![Dashboard](images/dashboard.light.svg){.lightbox}

Toggle between light and dark mode to see the image change.

## Explicit Dark Variant

Use the `dark="..."` attribute to specify a non-conventionally named
dark variant:

![UI Preview](images/ui-preview.svg){.lightbox dark="images/ui-preview-night.svg"}
📄 04-galleries.qmd
---
title: "Galleries"
---

## Grouped Gallery

Images with the same `group` attribute form a gallery. Click any image,
then use arrows or the filmstrip to navigate between them:

![Step 1: Install](images/step1.svg){.lightbox group="tutorial"}

![Step 2: Configure](images/step2.svg){.lightbox group="tutorial"}

![Step 3: Build](images/step3.svg){.lightbox group="tutorial"}

![Step 4: Deploy](images/step4.svg){.lightbox group="tutorial"}

## Separate Gallery (Different Group)

These images are in a different group and form their own gallery:

![Gallery A](images/mosaic-a.svg){.lightbox group="mosaic"}

![Gallery B](images/mosaic-b.svg){.lightbox group="mosaic"}

![Gallery C](images/mosaic-c.svg){.lightbox group="mosaic"}

![Gallery D](images/mosaic-d.svg){.lightbox group="mosaic"}

## Gallery with Loop Disabled

This gallery stops at the first and last image (no wrap-around):

![Step 1](images/step1.svg){.lightbox group="no-loop" loop="false"}

![Step 2](images/step2.svg){.lightbox group="no-loop" loop="false"}

![Step 3](images/step3.svg){.lightbox group="no-loop" loop="false"}

## Auto-Advancing Gallery

This gallery auto-advances every 3 seconds (with loop):

![Step 1](images/step1.svg){.lightbox group="autoplay" autoplay="3s"}

![Step 2](images/step2.svg){.lightbox group="autoplay" autoplay="3s"}

![Step 3](images/step3.svg){.lightbox group="autoplay" autoplay="3s"}

![Step 4](images/step4.svg){.lightbox group="autoplay" autoplay="3s"}

## Auto-Advancing Without Loop

Auto-advances every 2 seconds and stops at the last image:

![Gallery A](images/mosaic-a.svg){.lightbox group="autoplay-nol" autoplay="2s" loop="false"}

![Gallery B](images/mosaic-b.svg){.lightbox group="autoplay-nol" autoplay="2s" loop="false"}

![Gallery C](images/mosaic-c.svg){.lightbox group="autoplay-nol" autoplay="2s" loop="false"}

## Single Image (No Gallery)

A standalone lightbox image without a group:

![Full Page](images/full-page.svg){.lightbox}
📄 05-responsive-srcset.qmd
---
title: "Responsive Images"
---

## Responsive srcset

The thumbnail uses a responsive `srcset` so the browser picks the best
size for the viewport. When clicked, the lightbox loads the highest-
resolution source automatically.

![Revenue Chart](images/chart-400.svg){.lightbox srcset="images/chart-400.svg 400w, images/chart-800.svg 800w, images/chart-1600.svg 1600w" sizes="(max-width: 600px) 400px, 800px"}

## Explicit full-src Override

Use `full-src` to point the lightbox at a specific high-res file
regardless of what `srcset` contains:

![Architecture Diagram](images/diagram.svg){.lightbox full-src="images/diagram-2400.svg"}

## Srcset with Dark Mode

Responsive images can also combine with dark-mode variants. The lightbox
will prefer the dark variant when in dark mode:

![Dashboard](images/dashboard.light.svg){.lightbox srcset="images/dashboard.light.svg 700w" dark="images/dashboard.dark.svg"}
📄 06-comparison.qmd
---
title: "Image Comparison"
---

## Shortcode Syntax

Use the `{{< compare >}}` shortcode for a quick before/after slider:

{{< compare before="images/before.svg" after="images/after.svg" >}}

## Custom Labels

{{< compare before="images/before.svg" after="images/after.svg" label-before="v0.8" label-after="v0.9" >}}

## Custom Start Position

Start the divider at 30% (showing mostly the "after" image):

{{< compare before="images/before.svg" after="images/after.svg" start="30" >}}

## Vertical Split

{{< compare before="images/before.svg" after="images/after.svg" direction="vertical" >}}

## Fenced Div Syntax

The fenced div syntax offers more control:

::: {.lightbox-compare}
![Before](images/before.svg)
![After](images/after.svg)
:::

## Fenced Div with Options

::: {.lightbox-compare direction="vertical" start="70"}
![Old Design](images/mosaic-a.svg)
![New Design](images/mosaic-c.svg)
:::
📄 07-annotations.qmd
---
title: "Image Annotations"
---

## Basic Annotations

Numbered markers are positioned over the image using percentage
coordinates. Hover or click a marker to see its description:

![Architecture Diagram](images/full-page.svg){.lightbox annotations='[{"x": 15, "y": 20, "label": "1", "text": "Navigation sidebar with collapsible sections"}, {"x": 50, "y": 35, "label": "2", "text": "Main content area with rendered documentation"}, {"x": 85, "y": 50, "label": "3", "text": "Table of contents for the current page"}]'}

## Custom Labels

Annotations can use any short label text (letters, symbols):

![Dashboard](images/dashboard.light.svg){.lightbox annotations='[{"x": 25, "y": 30, "label": "A", "text": "Revenue metrics widget"}, {"x": 75, "y": 30, "label": "B", "text": "User growth chart"}, {"x": 50, "y": 70, "label": "C", "text": "Recent activity feed"}]'}

## Custom Marker Colors

Individual markers can have custom colors for categorization:

![Step Diagram](images/diagram.svg){.lightbox annotations='[{"x": 20, "y": 50, "label": "1", "text": "Input stage", "color": "#e74c3c"}, {"x": 50, "y": 50, "label": "2", "text": "Processing stage", "color": "#f39c12"}, {"x": 80, "y": 50, "label": "3", "text": "Output stage", "color": "#27ae60"}]'}

## Multi-Panel Layout Annotations

A complex UI with annotations pointing to specific panels:

![App Layout](images/app-layout.svg){.lightbox dark="images/app-layout.dark.svg" annotations='[{"x": 12, "y": 50, "label": "1", "text": "Sidebar navigation — collapsible tree of pages", "color": "#3498db"}, {"x": 38, "y": 30, "label": "2", "text": "Document body — rendered Markdown content", "color": "#2ecc71"}, {"x": 62, "y": 50, "label": "3", "text": "Code panel — interactive examples", "color": "#e67e22"}, {"x": 88, "y": 30, "label": "4", "text": "On This Page — auto-generated TOC", "color": "#9b59b6"}]'}

## Pipeline Diagram

Annotations along a horizontal data flow:

![Data Pipeline](images/pipeline.svg){.lightbox annotations='[{"x": 12, "y": 50, "label": "①", "text": "Ingest: raw data arrives via API or file upload"}, {"x": 37, "y": 50, "label": "②", "text": "Process: validation, transformation, enrichment"}, {"x": 62, "y": 50, "label": "③", "text": "Store: write to database and search index"}, {"x": 87, "y": 50, "label": "④", "text": "Serve: API and documentation site consume data"}]'}

## Annotations with Dark Mode

Annotations work with dark-mode variant images. The markers adjust
their appearance automatically:

![UI Preview](images/ui-preview.svg){.lightbox dark="images/ui-preview-night.svg" annotations='[{"x": 50, "y": 25, "label": "H", "text": "Header with navigation"}, {"x": 50, "y": 75, "label": "F", "text": "Footer with links"}]'}
📄 08-toolbar-links.qmd
---
title: "Toolbar & Deep Links"
---

## Toolbar Actions

When the lightbox is open, a toolbar provides quick actions. Hover over
the lightbox image to reveal it (auto-hides after 3 seconds).

### Copy to Clipboard

Click the **copy** button (clipboard icon) to copy the full-resolution
image directly to your clipboard — paste it into Slack, a bug report,
or a presentation:

![API Reference Page](images/api-reference.svg){.lightbox caption="Copy this image to share the API reference layout"}

### Download

Click the **download** button (arrow icon) to save the full-resolution
image with a meaningful filename derived from the alt text:

![Configuration Panel](images/config-panel.svg){.lightbox caption="Download this image for your slide deck"}

### Copy Link

Click the **link** button (chain icon) to copy a URL that opens this
page with the lightbox already open at this exact image:

![Full Application](images/full-page.svg){.lightbox caption="Share this deep link with your team"}

## Deep Linking

### How It Works

Each lightbox image gets a unique ID (e.g., `gd-lb-1`). The URL
fragment `#lightbox=gd-lb-N` opens the lightbox at that image on
page load.

Try these links (they point to images on this page):

- [Open the API Reference image](#lightbox=gd-lb-1)
- [Open the Configuration Panel](#lightbox=gd-lb-2)
- [Open the Full Application image](#lightbox=gd-lb-3)

### Gallery Deep Links

Deep links also work within galleries. Click the link below to open
the gallery at a specific image:

![Step 1](images/step1.svg){.lightbox group="deep-demo"}

![Step 2](images/step2.svg){.lightbox group="deep-demo"}

![Step 3](images/step3.svg){.lightbox group="deep-demo"}

![Step 4](images/step4.svg){.lightbox group="deep-demo"}

- [Open gallery at Step 3](#lightbox=gd-lb-7)
📄 09-showcase.qmd
---
title: "Full Showcase"
lightbox: true
---

## Complete Feature Showcase

This page demonstrates all gd-lightbox capabilities working together.
`lightbox: true` is set in the page YAML so all block images are
automatically enhanced.

---

### Auto Mode + Captions

All block-level images get lightbox treatment automatically. Captions
and credits appear in the lightbox overlay:

![Hero section with gradient background](images/hero-gradient.svg){caption="The hero section uses a vibrant gradient that adapts to dark mode" credit="Design Team"}

---

### Dark-Mode Variants in Auto Mode

These images swap automatically when the user toggles the theme:

![App Layout](images/app-layout.svg){dark="images/app-layout.dark.svg" caption="Multi-panel application interface"}

![Hero Gradient](images/hero-gradient.svg){dark="images/hero-gradient.dark.svg"}

---

### Gallery + Dark Variants + Autoplay

A gallery where each image has a dark variant, auto-advancing every
4 seconds:

![Dashboard](images/dashboard.light.svg){group="showcase-gallery" dark="images/dashboard.dark.svg" autoplay="4s" caption="Dashboard metrics"}

![App Layout](images/app-layout.svg){group="showcase-gallery" dark="images/app-layout.dark.svg" autoplay="4s" caption="Application layout"}

![Hero Section](images/hero-gradient.svg){group="showcase-gallery" dark="images/hero-gradient.dark.svg" autoplay="4s" caption="Landing page hero"}

---

### Gallery Stack (single cover)

A `.lightbox-gallery` collapses a set of images into one framed,
stacked cover that takes a fixed amount of space. Click it to page
through the whole gallery in the lightbox:

::: {.lightbox-gallery}
![Pipeline](images/pipeline.svg){caption="Build pipeline"}
![API reference](images/api-reference.svg){caption="API reference"}
![Config panel](images/config-panel.svg){caption="Configuration panel"}
:::

---

### Annotated Gallery

A gallery where each image also has annotations. Click any image,
then explore the markers:

![App Layout](images/app-layout.svg){group="annotated" annotations='[{"x": 12, "y": 50, "label": "1", "text": "Sidebar"}, {"x": 50, "y": 50, "label": "2", "text": "Content"}, {"x": 88, "y": 50, "label": "3", "text": "TOC"}]'}

![Pipeline](images/pipeline.svg){group="annotated" annotations='[{"x": 25, "y": 50, "label": "A", "text": "Input"}, {"x": 75, "y": 50, "label": "B", "text": "Output"}]'}

---

### Before/After Comparisons

#### Table Redesign

{{< compare before="images/v1-table.svg" after="images/v2-table.svg" label-before="v1 Plain" label-after="v2 Styled" >}}

#### Sidebar Update

{{< compare before="images/v1-sidebar.svg" after="images/v2-sidebar.svg" label-before="Old" label-after="New" direction="vertical" >}}

---

### Responsive Image + Annotations

High-res source loaded in the lightbox, with annotations visible
on the thumbnail:

![Revenue Chart](images/chart-400.svg){srcset="images/chart-400.svg 400w, images/chart-800.svg 800w, images/chart-1600.svg 1600w" sizes="(max-width: 600px) 400px, 800px" annotations='[{"x": 30, "y": 50, "label": "Q3", "text": "Revenue dipped in Q3 due to seasonal factors", "color": "#e74c3c"}, {"x": 70, "y": 30, "label": "Q4", "text": "Strong recovery in Q4 with 42% growth", "color": "#27ae60"}]'}

---

### Multiple Comparison Styles

::: {.lightbox-compare start="25"}
![Light App](images/app-layout.svg)
![Dark App](images/app-layout.dark.svg)
:::

---

### Deep Link Test

Navigate to this page with `#lightbox=gd-lb-1` appended to the URL
to auto-open the hero section image.

### Large Image with Annotations + Caption

![Full application screenshot](images/full-page.svg){caption="Complete application with all panels visible — use the annotation markers to explore each section" credit="Engineering Team" annotations='[{"x": 20, "y": 25, "label": "①", "text": "File tree and navigation", "color": "#3498db"}, {"x": 50, "y": 50, "label": "②", "text": "Main editing area", "color": "#e74c3c"}, {"x": 80, "y": 75, "label": "③", "text": "Terminal and output panel", "color": "#f39c12"}]'}
📄 README.md
# gdtest-lightbox

A synthetic package showcasing the **gd-lightbox** extension for Great Docs.

## Overview

This site demonstrates all lightbox features:

- Click-to-zoom with origin animation
- Dark-mode image variants
- Gallery with filmstrip navigation
- Copy/download toolbar
- Deep-linking

![App Screenshot](images/screenshot.svg){.lightbox}

## Architecture

![Architecture Diagram](images/diagram.svg){.lightbox caption="System architecture overview" credit="Engineering Team"}
📄 great-docs.yml
display_name: Lightbox Demo