add: desktop command

This commit is contained in:
Franek 2024-05-08 20:44:13 +02:00
parent a8c5adaeea
commit 01c8eb3b27
No known key found for this signature in database
GPG Key ID: 0329F871B2079351
5 changed files with 33 additions and 0 deletions

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 134 KiB

View File

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

View File

@ -77,4 +77,17 @@ input {
#switch_theme { #switch_theme {
text-decoration: underline; text-decoration: underline;
cursor: pointer; cursor: pointer;
}
.image-grid {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 5px;
}
.image-grid > * {
max-width: 50%;
max-height: 50%;
} }

View File

@ -150,6 +150,26 @@ const COMMANDS = [
return '' return ''
} }
},
{
name: 'desktop',
description: 'Show some desktop screenshots',
usage: '',
usage_examples: [],
arguments: [],
output: () => {
let result = [];
for (let i = 0; i < 3;) {
result.push(`<img src="assets/desktop_screenshots/${++i}.png" alt="Desktop screenshot"/>`)
}
return `
<div class="image-grid">
${result.join('\n')}
</div>
`
}
} }
] ]