class_docstr: Gallery Image
class_docstr_tok: ["Gallery","Image"]
code: def __str__(self):
      # card, card-header, card-body create bootstrap components
      # https://getbootstrap.com/docs/5.3/components/card/
      #
      # For a responsive layout, use bootstrap grid classes that select
      # for different screen sizes
      # https://getbootstrap.com/docs/5.3/layout/grid/#grid-options
      out_cls = "card g-col-12 g-col-sm-6 g-col-md-4"
      in_cls = "card-header"
      res = Div(
          [
              Div(self.title, Attr(None, in_cls.split())),
              Div(
                  Link(Image(src=self.thumbnail), target=self.target),
                  Attr(None, ["card-body"]),
              ),
          ],
          Attr(None, out_cls.split()),
      )
      return str(res)
  
imports: import base64
  import io
  import itertools
  import re
  from dataclasses import dataclass
  from pathlib import Path
  from typing import Generator, Sequence
  import nbformat
  import PIL.Image
  from nbformat.notebooknode import NotebookNode
  from quartodoc.pandoc.blocks import Div
  from quartodoc.pandoc.components import Attr
  from quartodoc.pandoc.inlines import Image, Link
label_desc: Use image node_id 1 for calling the GalleryImage obj's underlying member method code with example usage: obj.__str__() and returns: str