@@ -484,7 +484,7 @@ def indent( # pending: post-3.0 refactor # why would indent come after the tex
484
484
return new .getvalue ()
485
485
486
486
# 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"
488
488
#COPY_BUTTON_RAW = (DOC_ROOT / "_static/icons/tabler/copy.svg").read_text().strip() + "\n"
489
489
490
490
@@ -496,13 +496,15 @@ def html_copyable(
496
496
if string_quote_char :
497
497
value = f"{ string_quote_char } { value } { string_quote_char } "
498
498
escaped = html .escape (value )
499
+ # src = src_kludge(COPY_BUTTON_PATH)
500
+ src = FMT_URL_REF_EMBED .format (COPY_BUTTON_PATH )
499
501
raw = (
500
502
f"<span class=\" resource-handle\" >\n "
501
503
f" <code class=\" docutils literal notranslate\" >\n "
502
504
f" <span class=\" pre\" >{ escaped } </span>\n "
503
505
f" </code>\n "
504
506
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 "
506
508
# + indent(" " * 2, COPY_BUTTON_RAW) + # pending: post-3.0 cleanup
507
509
f" </button>\n "
508
510
f"</span>\n "
@@ -718,9 +720,9 @@ def start():
718
720
config = MEDIA_EMBED [suffix ]
719
721
kind = config .get ('media_kind' )
720
722
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)}")
724
726
out .write (f" { start ()} - .. raw:: html\n \n " )
725
727
out .write (indent (
726
728
" " , resource_copyable ))
@@ -729,6 +731,7 @@ def start():
729
731
out .write (indent (" " ,
730
732
# Using preload="none" is gentler on GitHub and readthedocs
731
733
f"<{ kind } class=\" resource-thumb\" controls preload=\" none\" >\n "
734
+ f" <source src=\" { file_path } \" type=\" { kind } /{ mime_suffix } \" >\n "
732
735
f" <source src=\" { src_kludge (file_path )} \" type=\" { kind } /{ mime_suffix } \" >\n "
733
736
f"</{ kind } >\n \n " ))
734
737
0 commit comments