mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-04-30 04:29:30 +08:00
merge with upsteam 455fcd5941
This commit is contained in:
parent
ffd76f5d56
commit
6583df822e
4 changed files with 9 additions and 9 deletions
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts">
|
||||
import { site } from '$lib/config/site'
|
||||
import Image from '$lib/components/prose/img.svelte'
|
||||
// import Image from '$lib/components/prose/img.svelte'
|
||||
</script>
|
||||
|
||||
<div class="sticky flex flex-col gap-4 top-24 xl:ml-auto xl:mr-8 xl:max-w-xs">
|
||||
|
@ -8,7 +8,7 @@
|
|||
<a href={site.protocol + site.domain} class="hidden u-url u-uid">{site.author.name}</a>
|
||||
<figure class="relative mx-auto group">
|
||||
{#if site.author.avatar}
|
||||
<Image
|
||||
<img
|
||||
class="u-photo rounded-full shadow-xl w-32 h-32 hover:rotate-[360deg] transition-transform duration-1000 ease-in-out"
|
||||
src={site.author.avatar}
|
||||
alt={site.author.name} />
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<script lang="ts">
|
||||
/* @see {@link https://github.com/sveltejs/kit/issues/241#issuecomment-1363621896} */
|
||||
|
||||
const images = import.meta.glob('/static/**/*.{jpg,jpeg,png,webp,avif}', {
|
||||
const images = import.meta.glob(['/static/**/*.{jpg,jpeg,png,webp,avif}', '!/static/assets'], {
|
||||
import: 'default',
|
||||
eager: true
|
||||
})
|
||||
|
||||
const sources = import.meta.glob('/static/**/*.{jpg,jpeg,png,webp,avif}', {
|
||||
const sources = import.meta.glob(['/static/**/*.{jpg,jpeg,png,webp,avif}', '!/static/assets'], {
|
||||
query: {
|
||||
format: 'avif',
|
||||
width: '384;768',
|
||||
quality: '80',
|
||||
width: '736',
|
||||
source: ''
|
||||
},
|
||||
import: 'default',
|
||||
|
@ -35,5 +35,5 @@
|
|||
|
||||
<picture>
|
||||
<source srcset={source.map(({ src, w }) => `${src} ${w}w`).join(', ')} type="image/avif" />
|
||||
<img src={image.src} width={image.w} height={image.h} {alt} class={className ?? 'rounded-lg my-2'} {loading} {decoding} />
|
||||
<img src={image.src} {alt} class={className ?? 'rounded-lg my-2'} {loading} {decoding} />
|
||||
</picture>
|
|
@ -16,7 +16,7 @@ export default defineConfig({
|
|||
extensions: ['.svelte', ...(mdsvexConfig.extensions as string[])],
|
||||
preprocess: [mdsvex(mdsvexConfig), importAssets(), vitePreprocess()],
|
||||
kit: {
|
||||
adapter: Object.keys(process.env).some(key => ['VERCEL', 'CF_PAGES', 'NETLIFY'].includes(key))
|
||||
adapter: Object.keys(process.env).some(key => ['VERCEL', 'NETLIFY'].includes(key))
|
||||
? adapterAuto()
|
||||
: process.env.ADAPTER === 'node'
|
||||
? adapterNode({ out: 'build' })
|
||||
|
|
2
urara.ts
2
urara.ts
|
@ -102,7 +102,7 @@ const clean = () => {
|
|||
switch (process.argv[2]) {
|
||||
case 'watch':
|
||||
{
|
||||
let watcher = chokidar.watch('urara', {
|
||||
const watcher = chokidar.watch('urara', {
|
||||
ignored: (file: string) => path.basename(file).startsWith('.')
|
||||
})
|
||||
watcher
|
||||
|
|
Loading…
Reference in a new issue