Fixing
This commit is contained in:
parent
244aed5848
commit
a3458427bb
|
@ -1,3 +0,0 @@
|
||||||
[submodule "instance/pleroma-mods/pleroma-mod-catify"]
|
|
||||||
path = instance/pleroma-mods/pleroma-mod-catify
|
|
||||||
url = https://git.pleroma.social/absturztaube/pleroma-mod-catify.git
|
|
|
@ -49,7 +49,6 @@
|
||||||
{{ $t("login.hint") }}
|
{{ $t("login.hint") }}
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
<banner />
|
|
||||||
<router-view />
|
<router-view />
|
||||||
</main>
|
</main>
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
const Banner = {
|
|
||||||
data: function () {
|
|
||||||
return {
|
|
||||||
url: 'https://neckbeard.xyz',
|
|
||||||
imageUrl: '/static/banner.png',
|
|
||||||
imageSrc: '/static/banner.png',
|
|
||||||
timer: ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created () {
|
|
||||||
this.updateBanner()
|
|
||||||
this.timer = setInterval(this.updateBanner, 300000)
|
|
||||||
},
|
|
||||||
beforeDestroy () {
|
|
||||||
clearInterval(this.timer)
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
updateBanner () {
|
|
||||||
const componentThis = this
|
|
||||||
const req = new XMLHttpRequest()
|
|
||||||
req.addEventListener('load', function () {
|
|
||||||
const json = JSON.parse(this.responseText)
|
|
||||||
componentThis.url = json.bannerUrl
|
|
||||||
console.log('new banner: ' + componentThis.url)
|
|
||||||
componentThis.imageSrc = componentThis.imageUrl + '?bustcache=' + (new Date()).getTime()
|
|
||||||
})
|
|
||||||
req.open('GET', '/static/config.json')
|
|
||||||
req.send()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Banner
|
|
|
@ -1,19 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div
|
|
||||||
id="banner"
|
|
||||||
class="panel-body"
|
|
||||||
>
|
|
||||||
<a
|
|
||||||
:href="url"
|
|
||||||
target="_blank"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
id="banner-img"
|
|
||||||
:src="imageSrc"
|
|
||||||
>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script src="./banner.js"/>
|
|
Loading…
Reference in New Issue