mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
Add Play Asia footer
This commit is contained in:
parent
181cc33dd1
commit
2db1dd640d
2 changed files with 50 additions and 1 deletions
48
src/components/Footer.astro
Normal file
48
src/components/Footer.astro
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
const { permissions } = Astro.locals
|
||||
const show = !permissions.includes('SKIP_ADS')
|
||||
---
|
||||
|
||||
{ show ? (
|
||||
<>
|
||||
<footer class='bg-dark p-2'>
|
||||
<iframe
|
||||
id='id01_62693'
|
||||
title='id01_62693'
|
||||
src='https://www.play-asia.com/38/190%2C000000%2Cnone%2C0%2C0%2C0%2C0%2CFFFFFF%2C000000%2Cleft%2C0%2C0-391-76a-707gw6-062-782i-29466-901vq93-33iframe_banner-401-4450'
|
||||
style={{
|
||||
borderStyle: 'none',
|
||||
borderWidth: 0,
|
||||
borderColor: '#FFFFFF',
|
||||
padding: 0,
|
||||
height: '220px',
|
||||
width: '100%'
|
||||
}}
|
||||
scrolling='no'></iframe>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
document.addEventListener('astro:before-preparation', () => {
|
||||
//@ts-ignore
|
||||
window.tyche = {
|
||||
mode: 'tyche',
|
||||
config: '//config.playwire.com/1023181/v2/websites/71145/banner.json'
|
||||
}
|
||||
})
|
||||
|
||||
document.addEventListener('astro:after-preparation', () => {
|
||||
let t = ''
|
||||
t += window.location
|
||||
t = t
|
||||
.replace(/#.*$/g, '')
|
||||
.replace(/^.*:\/*/i, '')
|
||||
.replace(/\./g, '[dot]')
|
||||
.replace(/\//g, '[obs]')
|
||||
.replace(/-/g, '[dash]')
|
||||
t = encodeURIComponent(encodeURIComponent(t))
|
||||
|
||||
document.querySelector('#id01_62693')?.setAttribute('src', t)
|
||||
})
|
||||
</script>
|
||||
</>
|
||||
) : null}
|
||||
|
|
@ -3,6 +3,7 @@ import { Toaster } from 'react-hot-toast'
|
|||
|
||||
import { languageTag } from '../paraglide/runtime'
|
||||
import Header from 'components/Header.astro'
|
||||
import Footer from 'components/Footer.astro'
|
||||
|
||||
import 'styles/global.css'
|
||||
---
|
||||
|
|
@ -29,6 +30,6 @@ import 'styles/global.css'
|
|||
<Toaster client:only='react' toastOptions={{ duration: 6000 }} />
|
||||
<slot />
|
||||
</main>
|
||||
<footer class='bg-soc-green'>This is the footer</footer>
|
||||
<Footer />
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue