mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-09 21:49:48 -05:00
[docs] Generate OwnTone documentation with MkDocs
- Copy existing README*.md and INSTALL.md files to docs folder - Set up MkDocs to build documentation (mkdocs.yml) - Add new index.md with a quick overview of OwnTone
This commit is contained in:
32
docs/assets/extra.js
Normal file
32
docs/assets/extra.js
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Add click event handler for images with class="zoom"
|
||||
*/
|
||||
document.querySelectorAll('img.zoom').forEach(item => {
|
||||
const p = item.parentElement;
|
||||
if (!p.classList.contains('processed')) {
|
||||
p.classList.add('processed');
|
||||
if (p.querySelectorAll('img.zoom').length === p.children.length) {
|
||||
p.classList.add('zoom-wrapper');
|
||||
}
|
||||
}
|
||||
item.addEventListener('click', function () {
|
||||
const img = document.getElementById('fullscreen-image-img');
|
||||
img.setAttribute('src', this.getAttribute('src'));
|
||||
img.setAttribute('alt', this.getAttribute('alt'));
|
||||
|
||||
const div = document.getElementById('fullscreen-image');
|
||||
div.classList.replace('hidden', 'visible');
|
||||
})
|
||||
});
|
||||
|
||||
var div = document.createElement('div');
|
||||
div.classList.add('fullscreen-image-background', 'hidden');
|
||||
div.id = 'fullscreen-image';
|
||||
var img = document.createElement('img');
|
||||
img.id = 'fullscreen-image-img';
|
||||
div.appendChild(img);
|
||||
|
||||
div.addEventListener('click', function () {
|
||||
this.classList.replace('visible', 'hidden');
|
||||
});
|
||||
document.body.appendChild(div);
|
||||
Reference in New Issue
Block a user