зеркало из https://github.com/github/docs.git
A couple of tweaks to release notes page (#16934)
* Add link * Allow multiple print buttons * Fix scrolling for tall sidebar Co-authored-by: Chiedo John <2156688+chiedo@users.noreply.github.com>
This commit is contained in:
Родитель
5ae479356d
Коммит
f8074874be
|
@ -28,3 +28,5 @@ versions:
|
|||
{% link_with_intro /packages %}
|
||||
|
||||
{% link_with_intro /enterprise-support %}
|
||||
|
||||
{% link_with_intro /release-notes %}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import { sendEvent } from './events'
|
||||
|
||||
export default function () {
|
||||
const printButton = document.querySelector('.js-print')
|
||||
const printButtons = document.querySelectorAll('.js-print')
|
||||
|
||||
if (printButton) {
|
||||
Array.from(printButtons).forEach(btn => {
|
||||
// Open the print dialog when the button is clicked
|
||||
printButton.addEventListener('click', () => {
|
||||
btn.addEventListener('click', () => {
|
||||
window.print()
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
// Track print events
|
||||
window.onbeforeprint = function () {
|
||||
|
|
|
@ -95,8 +95,11 @@
|
|||
</div>
|
||||
</article>
|
||||
|
||||
<aside class="markdown-body d-none d-md-block border-left no-print bg-white flex-shrink-0" style="width: 300px">
|
||||
<nav class="position-sticky top-0">
|
||||
<aside
|
||||
class="markdown-body position-sticky top-0 d-none d-md-block border-left no-print bg-white flex-shrink-0"
|
||||
style="width: 300px; height: 100vh;"
|
||||
>
|
||||
<nav class="height-full overflow-auto">
|
||||
<ul class="list-style-none pl-0 text-bold">
|
||||
{% for release in releases %}
|
||||
<li class="border-bottom">
|
||||
|
|
Загрузка…
Ссылка в новой задаче