Bring back the source link #473
-
here is one potential implementation which I think could fit the design -- add it to the edit-this-page component: ...
{%- elif has_source and sourcename %}
<div class="page-source">
<a class="muted-link" href="{{ pathto('_sources/' + sourcename, true) }}" title="{{ _("Page source") }}">
<svg xmlns=="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-file-earmark-code" viewBox="0 0 16 16">
<path d="M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5h-2z"/>
<path d="M8.646 6.646a.5.5 0 0 1 .708 0l2 2a.5.5 0 0 1 0 .708l-2 2a.5.5 0 0 1-.708-.708L10.293 9 8.646 7.354a.5.5 0 0 1 0-.708zm-1.292 0a.5.5 0 0 0-.708 0l-2 2a.5.5 0 0 0 0 .708l2 2a.5.5 0 0 0 .708-.708L5.707 9l1.647-1.646a.5.5 0 0 0 0-.708z"/>
</svg>
<span class="visually-hidden">{{ _("Page source") }}</span>
</a>
</div>
{%- endif -%}
of course it should be optional (disabled by default), I guess |
Beta Was this translation helpful? Give feedback.
Answered by
pradyunsg
Jul 10, 2022
Replies: 2 comments
-
This should be resolved once pradyunsg/sphinx-basic-ng#34 comes through and I add a link for viewing the sources beside the edit button. :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've filed #478 for tracking this. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
pradyunsg
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've filed #478 for tracking this.