@@ -484,7 +484,7 @@ def indent( # pending: post-3.0 refactor # why would indent come after the tex
484484 return new .getvalue ()
485485
486486# pending: post-3.0 cleanup, I don't have time to make this CSS nice right now.
487- COPY_BUTTON_PATH = "_static/icons/tabler/copy.svg"
487+ COPY_BUTTON_PATH = "https://raw.githubusercontent.com/pythonarcade/arcade/refs/heads/development/doc/ _static/icons/tabler/copy.svg"
488488#COPY_BUTTON_RAW = (DOC_ROOT / "_static/icons/tabler/copy.svg").read_text().strip() + "\n"
489489
490490
@@ -496,13 +496,15 @@ def html_copyable(
496496 if string_quote_char :
497497 value = f"{ string_quote_char } { value } { string_quote_char } "
498498 escaped = html .escape (value )
499+ # src = src_kludge(COPY_BUTTON_PATH)
500+ src = FMT_URL_REF_EMBED .format (COPY_BUTTON_PATH )
499501 raw = (
500502 f"<span class=\" resource-handle\" >\n "
501503 f" <code class=\" docutils literal notranslate\" >\n "
502504 f" <span class=\" pre\" >{ escaped } </span>\n "
503505 f" </code>\n "
504506 f" <button class=\" arcade-ezcopy\" data-clipboard-text=\" { resource_handle } \" >\n "
505- f" <img src=\" / { src_kludge ( COPY_BUTTON_PATH ) } \" />\n "
507+ f" <img src=\" { COPY_BUTTON_PATH } \" />\n "
506508 # + indent(" " * 2, COPY_BUTTON_RAW) + # pending: post-3.0 cleanup
507509 f" </button>\n "
508510 f"</span>\n "
@@ -718,9 +720,9 @@ def start():
718720 config = MEDIA_EMBED [suffix ]
719721 kind = config .get ('media_kind' )
720722 mime_suffix = config .get ('mime_suffix' )
721- # file_path = FMT_URL_REF_EMBED.format(resource_path)
722- rel = path .relative_to (RESOURCE_DIR )
723- file_path = f"/_static/{ str (rel )} "
723+ file_path = FMT_URL_REF_EMBED .format (resource_path )
724+ # rel = path.relative_to(RESOURCE_DIR)
725+ # file_path = src_kludge( f"/_static/{str(rel)}")
724726 out .write (f" { start ()} - .. raw:: html\n \n " )
725727 out .write (indent (
726728 " " , resource_copyable ))
@@ -729,6 +731,7 @@ def start():
729731 out .write (indent (" " ,
730732 # Using preload="none" is gentler on GitHub and readthedocs
731733 f"<{ kind } class=\" resource-thumb\" controls preload=\" none\" >\n "
734+ f" <source src=\" { file_path } \" type=\" { kind } /{ mime_suffix } \" >\n "
732735 f" <source src=\" { src_kludge (file_path )} \" type=\" { kind } /{ mime_suffix } \" >\n "
733736 f"</{ kind } >\n \n " ))
734737
0 commit comments