Skip to content

Commit

Permalink
[style] Refer sphinx-design octicon role
Browse files Browse the repository at this point in the history
  • Loading branch information
ftnext committed Jun 28, 2024
1 parent 5dbe501 commit 9e86ad2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/sphinx_new_tab_link/extras.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
def external_link_icon_html() -> str:
# https://primer.style/foundations/icons/link-external-16/
return (
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">'
# https://github.com/executablebooks/sphinx-design/blob/v0.6.0/sphinx_design/icons.py#L21-L26
'<svg version="1.1" width="1.0em" height="1.0em" viewBox="0 0 16 16" aria-hidden="true" style="display: inline-block; vertical-align: middle; fill: currentColor;">'
'<path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path>'
"</svg>"
)

0 comments on commit 9e86ad2

Please sign in to comment.