This commit is contained in:
parent
c43ced7615
commit
89c2b62dc1
@ -37,3 +37,20 @@ pre code {
|
||||
border: 1px solid #333; /* Тонкий контур */
|
||||
overflow-x: auto; /* Добавляем горизонтальный скроллинг */
|
||||
}
|
||||
|
||||
#back-to-top {
|
||||
position: fixed;
|
||||
bottom: 30px;
|
||||
right: 30px;
|
||||
display: none;
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
padding: 10px 15px;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#back-to-top:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
|
14
docs/stylesheets/extra.js
Normal file
14
docs/stylesheets/extra.js
Normal file
@ -0,0 +1,14 @@
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const btn = document.createElement('div');
|
||||
btn.id = 'back-to-top';
|
||||
btn.innerText = '↑ Наверх';
|
||||
document.body.appendChild(btn);
|
||||
|
||||
window.addEventListener('scroll', () => {
|
||||
btn.style.display = window.scrollY > 200 ? 'block' : 'none';
|
||||
});
|
||||
|
||||
btn.addEventListener('click', () => {
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' });
|
||||
});
|
||||
});
|
10
mkdocs.yml
10
mkdocs.yml
@ -67,5 +67,13 @@ markdown_extensions:
|
||||
extra_css:
|
||||
- stylesheets/extra.css
|
||||
|
||||
extra_javascript:
|
||||
- stylesheets/extra.js
|
||||
|
||||
plugins:
|
||||
- glightbox
|
||||
- glightbox
|
||||
|
||||
nav:
|
||||
- Linux:
|
||||
- Команды: Команды.md
|
||||
- Заметки: Заметки.md
|
||||
|
Loading…
x
Reference in New Issue
Block a user