* Better video titles

* Clickable images in categories pages
This commit is contained in:
shockrah
2021-10-22 23:24:59 -07:00
parent 46f9000358
commit 65ea393b7e
2 changed files with 13 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ class VideoMeta {
return container
}
thumbnail_div() : HTMLImageElement {
thumbnail_div() : HTMLAnchorElement {
let nail = document.createElement('img')
nail.className = 'pure-img'
@@ -41,8 +41,15 @@ class VideoMeta {
} else{
nail.setAttribute('src', '/cantfindshit.gif')
}
let link = document.createElement('a')
if(this.name) {
link.href = `/category/${this.name}`
} else {
link.href = '#'
}
link.appendChild(nail)
return nail
return link
}
public as_div() {