radiocampus/assets: remove cruft

This commit is contained in:
Chris Tactic 2024-11-13 10:13:50 +01:00
parent ccc6ed26fd
commit 9a58fba0fd
2 changed files with 0 additions and 28 deletions

View File

@ -1,27 +0,0 @@
// Enable styling body background while using vue hotreload
// Tags with side effect (<script> and <style>) are ignored in client component templates.
const backgrounds = new Map();
backgrounds.set('default', "linear-gradient(#738ef2, white)");
backgrounds.set('/', "url(/static/radiocampus/backgrounds/photo-04-20.jpg) no-repeat center center fixed");
export default class BackgroundLoad {
constructor () {
let url = new URL(document.location)
this.path = url.pathname
this.update()
document.addEventListener("pageLoaded", this.handlePageLoad.bind(this), false)
}
handlePageLoad (e) {
this.path = e.detail
this.update()
}
update () {
let background = backgrounds.get(this.path) || backgrounds.get("default")
document.body.style.background = background;
document.body.style.backgroundSize = "cover";
}
}

View File

@ -1,7 +1,6 @@
import {createApp} from 'vue' import {createApp} from 'vue'
import PageLoad from './pageLoad' import PageLoad from './pageLoad'
import BackgroundLoad from './backgroundLoad'
/** /**