mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-03 17:44:30 +00:00
docs: Fix copying code blocks (#11617)
This PR fixes copying code blocks in the docs. The problem was that some of the elements we removed from the base mdBook template were causing errors in the script, which prevented the right event listeners from being registered for the copy button. To remedy this, the elements have been restored, but are using `display: none` so that they don't appear in the UI. Resolves #11592. Release Notes: - N/A
This commit is contained in:
parent
981a143e9b
commit
5fe4070501
1 changed files with 13 additions and 0 deletions
13
docs/theme/index.hbs
vendored
13
docs/theme/index.hbs
vendored
|
@ -91,6 +91,9 @@
|
||||||
<div class="sidebar-scrollbox">
|
<div class="sidebar-scrollbox">
|
||||||
{{#toc}}{{/toc}}
|
{{#toc}}{{/toc}}
|
||||||
</div>
|
</div>
|
||||||
|
<div style="display: none;" id="sidebar-resize-handle" class="sidebar-resize-handle">
|
||||||
|
<div class="sidebar-resize-indicator"></div>
|
||||||
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<!-- Track and set sidebar scroll position -->
|
<!-- Track and set sidebar scroll position -->
|
||||||
|
@ -125,6 +128,16 @@
|
||||||
<label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
<label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
|
||||||
<i class="fa fa-bars"></i>
|
<i class="fa fa-bars"></i>
|
||||||
</label>
|
</label>
|
||||||
|
<button style="display: none;" id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
|
||||||
|
<i class="fa fa-paint-brush"></i>
|
||||||
|
</button>
|
||||||
|
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
|
||||||
|
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
|
||||||
|
</ul>
|
||||||
{{#if search_enabled}}
|
{{#if search_enabled}}
|
||||||
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
|
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
|
||||||
<i class="fa fa-search"></i>
|
<i class="fa fa-search"></i>
|
||||||
|
|
Loading…
Reference in a new issue