Show currently playing album in page title
This commit is contained in:
parent
878e0b3aef
commit
e7cba4703c
2 changed files with 4 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
title= `⯈ ${item_title} | ${band_name} | BC Explorer`
|
||||||
#player
|
#player
|
||||||
.s-sidebarwidget(style="overflow: hidden")
|
.s-sidebarwidget(style="overflow: hidden")
|
||||||
div(style="margin: -1px; margin-bottom: -11px").ps-relative
|
div(style="margin: -1px; margin-bottom: -11px").ps-relative
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
const {sync, router} = require("../passthrough")
|
const {sync, router, select} = require("../passthrough")
|
||||||
const {defineEventHandler} = require("h3")
|
const {defineEventHandler} = require("h3")
|
||||||
const {getValidatedRouterParams} = require("h3")
|
const {getValidatedRouterParams} = require("h3")
|
||||||
|
|
||||||
|
@ -11,7 +11,8 @@ const pugSync = sync.require("../pug-sync")
|
||||||
const schema = sync.require("./schema")
|
const schema = sync.require("./schema")
|
||||||
|
|
||||||
const play = defineEventHandler(async event => {
|
const play = defineEventHandler(async event => {
|
||||||
const locals = await getValidatedRouterParams(event, schema.schema.play.parse)
|
const params = await getValidatedRouterParams(event, schema.schema.play.parse)
|
||||||
|
const locals = {...params, ...select("item", ["item_title", "band_name"], {item_id: params.item_id}).get()}
|
||||||
return pugSync.render(event, "player.pug", locals)
|
return pugSync.render(event, "player.pug", locals)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue