mirror of
https://github.com/cupcakearmy/nicco.io.git
synced 2024-12-22 08:06:29 +00:00
fixes
This commit is contained in:
parent
14e9772122
commit
95fb377cc8
@ -27,9 +27,7 @@
|
|||||||
const cl = Cloudinary.new({ cloud_name: 'cupcakearmy' })
|
const cl = Cloudinary.new({ cloud_name: 'cupcakearmy' })
|
||||||
const cleaned = src.replace('https://api.nicco.io', '/nicco')
|
const cleaned = src.replace('https://api.nicco.io', '/nicco')
|
||||||
const all = { ...defaultOptions, ...options }
|
const all = { ...defaultOptions, ...options }
|
||||||
console.log(all)
|
|
||||||
attrs = cl.imageTag(cleaned, all).attributes()
|
attrs = cl.imageTag(cleaned, all).attributes()
|
||||||
console.log(attrs)
|
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,18 +1,20 @@
|
|||||||
<script context="module">
|
<script context="module">
|
||||||
export async function preload(page) {
|
export async function preload(page) {
|
||||||
return {
|
return this.fetch('/api/posts.json').then((res) => res.json())
|
||||||
...(await this.fetch('/api/posts.json').then((res) => res.json())),
|
|
||||||
redirected: page.query.old !== undefined,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { onMount } from 'svelte'
|
||||||
import SimplePage from '../../components/SimplePage.svelte'
|
import SimplePage from '../../components/SimplePage.svelte'
|
||||||
import PostPreview from '../../components/PostPreview.svelte'
|
import PostPreview from '../../components/PostPreview.svelte'
|
||||||
|
|
||||||
export let data
|
export let data
|
||||||
export let redirected
|
export let redirected = false
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
redirected = new URL(location.href).searchParams.has('old')
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
Loading…
Reference in New Issue
Block a user