mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
[docs] add edit link on narrow screens (mobile) (#11014)
This commit is contained in:
parent
bf66693a85
commit
452ad9bf2e
@ -7,6 +7,7 @@ function onResize() {
|
||||
$('body').attr('data-offset', window_height.toString());
|
||||
var sidebar = $('#sidebar');
|
||||
var languages = $('#languages-dropdown')
|
||||
var edit = $('#edit-link');
|
||||
var single_page_switch = $('#single-page-switch');
|
||||
if ((sidebar.width() - single_page_switch.width() - sidebar.find('.dropdown-toggle').width()) >= 36) {
|
||||
single_page_switch.addClass('float-right');
|
||||
@ -15,10 +16,13 @@ function onResize() {
|
||||
}
|
||||
if (is_wide) {
|
||||
sidebar.removeClass('collapse');
|
||||
edit.detach().appendTo($('#edit-wrapper'));
|
||||
languages.detach().appendTo($('#languages-wrapper'));
|
||||
} else {
|
||||
sidebar.addClass('collapse');
|
||||
languages.detach().insertBefore(single_page_switch);
|
||||
edit.detach().insertBefore(single_page_switch);
|
||||
edit.addClass('float-right');
|
||||
languages.detach().insertBefore(edit);
|
||||
languages.addClass('float-right');
|
||||
single_page_switch.removeClass('float-right');
|
||||
}
|
||||
|
@ -23,8 +23,8 @@
|
||||
{% set edit_url = page.edit_url %}
|
||||
{% endif %}
|
||||
{% if edit_url %}
|
||||
<li class="nav-item">
|
||||
<a href="{{ edit_url }}" title="Edit this article" class="nav-link" rel="external nofollow noreferrer" target="_blank"><img src="/images/mkdocs/edit.svg" alt="Edit this article" class="mt-1" height="22" /></a>
|
||||
<li id="edit-wrapper" class="nav-item">
|
||||
<a id="edit-link" href="{{ edit_url }}" title="Edit this article" class="nav-link" rel="external nofollow noreferrer" target="_blank"><img src="/images/mkdocs/edit.svg" alt="Edit this article" class="mt-1" height="22" /></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li class="nav-item">
|
||||
|
Loading…
Reference in New Issue
Block a user