This commit is contained in:
cupcakearmy 2020-11-02 16:02:03 +01:00
parent 14e9772122
commit 95fb377cc8
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9
2 changed files with 7 additions and 7 deletions

View File

@ -27,9 +27,7 @@
const cl = Cloudinary.new({ cloud_name: 'cupcakearmy' })
const cleaned = src.replace('https://api.nicco.io', '/nicco')
const all = { ...defaultOptions, ...options }
console.log(all)
attrs = cl.imageTag(cleaned, all).attributes()
console.log(attrs)
})
</script>

View File

@ -1,18 +1,20 @@
<script context="module">
export async function preload(page) {
return {
...(await this.fetch('/api/posts.json').then((res) => res.json())),
redirected: page.query.old !== undefined,
}
return this.fetch('/api/posts.json').then((res) => res.json())
}
</script>
<script>
import { onMount } from 'svelte'
import SimplePage from '../../components/SimplePage.svelte'
import PostPreview from '../../components/PostPreview.svelte'
export let data
export let redirected
export let redirected = false
onMount(() => {
redirected = new URL(location.href).searchParams.has('old')
})
</script>
<style>