option to show user in mobile view

This commit is contained in:
j 2024-08-08 14:37:14 +02:00
parent b8de041316
commit 4748930460
3 changed files with 10 additions and 2 deletions

View file

@ -139,6 +139,10 @@ video, .poster {
border: 1px solid blueviolet; border: 1px solid blueviolet;
margin-bottom: 4px; margin-bottom: 4px;
} }
.annotation .user {
opacity: 0.75;
}
@media(max-width:768px) { @media(max-width:768px) {
.annotation a img { .annotation a img {
width: 100%; width: 100%;

View file

@ -137,9 +137,13 @@ async function loadData(id, args) {
/href="\//g, `href="${pandora.url.origin}/` /href="\//g, `href="${pandora.url.origin}/`
) )
} }
let content = annotation.value
if (!layerData.isSubtitles && layerData.type == "text" && args.show && args.show.includes("user")) {
content += `\n<div class="user">— ${annotation.user}</div>`
}
html.push(` html.push(`
<div class="annotation ${layerData.type}" data-in="${annotation.in}" data-out="${annotation.out}"> <div class="annotation ${layerData.type}" data-in="${annotation.in}" data-out="${annotation.out}">
${annotation.value} ${content}
</div> </div>
`) `)
}) })

View file

@ -14,7 +14,7 @@ function parseURL() {
var kv = arg.split('=') var kv = arg.split('=')
k = kv.shift() k = kv.shift()
v = kv.join('=') v = kv.join('=')
if (['users', 'layers'].includes(k)) { if (['users', 'layers', 'show'].includes(k)) {
v = v.split(',') v = v.split(',')
} }
return [k, v] return [k, v]