zulip/web/templates/code_buttons_container.hbs
Sayam Samal e0d685ce92 message: Improve the copy codeblock and playground buttons.
This commit improves the copy codeblock button and playground button
in the codeblocks to improve their visibility, particularly when on
top of some code.

Previously, the text under these buttons was difficult to select, as the
buttons would block the selection. This commit now hides these buttons
when a user clicks on any part of the codeblock, allowing to view the
code without any distractions, as well as, allowing the user to select
any part of the code.
2024-10-09 17:37:08 -07:00

12 lines
538 B
Handlebars

<div class="code-buttons-container">
<span class="copy_codeblock copy-btn copy-btn-square" data-tippy-content="{{t 'Copy code' }}" aria-label="{{t 'Copy code' }}" role="button">
<i class="zulip-icon zulip-icon-copy" aria-hidden="true"></i>
</span>
{{~#if show_playground_button~}}
{{! Display the "view code in playground" option for code blocks}}
<span class="code_external_link">
<i class="zulip-icon zulip-icon-external-link playground-links-popover-container"></i>
</span>
{{~/if~}}
</div>