mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-19 23:59:14 +08:00
format
This commit is contained in:
parent
7bdd0a57f4
commit
1d185df293
26 changed files with 43 additions and 39 deletions
|
@ -21,4 +21,4 @@
|
||||||
onDestroy(() => document.querySelectorAll('#disqus_config, #disqus_script').forEach(node => node.remove()))
|
onDestroy(() => document.querySelectorAll('#disqus_config, #disqus_script').forEach(node => node.remove()))
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="commento" class="-mb-2" />
|
<div id="commento" class="-mb-2" />
|
||||||
|
|
|
@ -37,4 +37,4 @@
|
||||||
<div id="giscus-container">
|
<div id="giscus-container">
|
||||||
<button id="giscus-loading" class="btn btn-lg flex mx-auto my-4 btn-ghost btn-circle loading" />
|
<button id="giscus-loading" class="btn btn-lg flex mx-auto my-4 btn-ghost btn-circle loading" />
|
||||||
<div id="giscus" class="giscus" />
|
<div id="giscus" class="giscus" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -30,4 +30,4 @@
|
||||||
<div id="utterances-container">
|
<div id="utterances-container">
|
||||||
<button id="utterances-loading" class="btn btn-lg flex mx-auto my-4 btn-ghost btn-circle loading" />
|
<button id="utterances-loading" class="btn btn-lg flex mx-auto my-4 btn-ghost btn-circle loading" />
|
||||||
<div id="utterances" class="utterances" />
|
<div id="utterances" class="utterances" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -32,7 +32,13 @@
|
||||||
'wm-private': boolean
|
'wm-private': boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
let [page, loaded, end, mentions, sortDirUp]: [number, boolean, boolean, WebmentionEntry[], boolean] = [0, false, false, [], config?.sortDir === 'up' ? true : false]
|
let [page, loaded, end, mentions, sortDirUp]: [number, boolean, boolean, WebmentionEntry[], boolean] = [
|
||||||
|
0,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
[],
|
||||||
|
config?.sortDir === 'up' ? true : false
|
||||||
|
]
|
||||||
|
|
||||||
const load = async () =>
|
const load = async () =>
|
||||||
await fetch(
|
await fetch(
|
||||||
|
@ -48,8 +54,7 @@
|
||||||
feed = {
|
feed = {
|
||||||
...feed,
|
...feed,
|
||||||
children: feed.children.filter(
|
children: feed.children.filter(
|
||||||
(entry: WebmentionEntry) =>
|
(entry: WebmentionEntry) => !config.blockList?.includes(new URL(entry['wm-source']).origin)
|
||||||
!config.blockList?.includes(new URL(entry['wm-source']).origin)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (feed.children.length > 0) mentions = [...mentions, ...feed.children]
|
if (feed.children.length > 0) mentions = [...mentions, ...feed.children]
|
||||||
|
@ -97,7 +102,8 @@
|
||||||
'mention-of': ['💬 mentioned', 'border-base-300/50', 'text-base-content', 'tooltip-base-content'],
|
'mention-of': ['💬 mentioned', 'border-base-300/50', 'text-base-content', 'tooltip-base-content'],
|
||||||
rsvp: [
|
rsvp: [
|
||||||
`📅 RSVPed ${
|
`📅 RSVPed ${
|
||||||
mention.rsvp && {
|
mention.rsvp &&
|
||||||
|
{
|
||||||
yes: '✅',
|
yes: '✅',
|
||||||
no: '❌',
|
no: '❌',
|
||||||
interested: '💡',
|
interested: '💡',
|
||||||
|
@ -196,4 +202,4 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -32,4 +32,4 @@
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -43,4 +43,4 @@
|
||||||
{/if}
|
{/if}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -36,4 +36,4 @@
|
||||||
{/if}
|
{/if}
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<OpenGraph {post} {page} />
|
<OpenGraph {post} {page} />
|
||||||
|
|
|
@ -47,4 +47,4 @@
|
||||||
<meta property="og:url" content={site.protocol + site.domain} />
|
<meta property="og:url" content={site.protocol + site.domain} />
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<header
|
<header
|
||||||
id="header"
|
id="header"
|
||||||
class:-translate-y-32={!pin && scrollY > 0}
|
class:-translate-y-32={!pin && scrollY > 0}
|
||||||
class="fixed z-50 w-screen transition-all duration-500 ease-in-out border-b-2 border-transparent max-h-[4.125rem] {scrollY >
|
class="fixed z-50 w-screen transition-all duration-500 ease-in-out border-b-2 border-transparent max-h-[4.125rem] {scrollY >
|
||||||
32 && 'backdrop-blur border-base-content/10 bg-base-100/30 md:bg-base-200/30'}">
|
32 && 'backdrop-blur border-base-content/10 bg-base-100/30 md:bg-base-200/30'}">
|
||||||
<div in:fly={{ x: -50, duration: 300, delay: 300 }} out:fly={{ x: -50, duration: 300 }} class="navbar">
|
<div in:fly={{ x: -50, duration: 300, delay: 300 }} out:fly={{ x: -50, duration: 300 }} class="navbar">
|
||||||
<div class="navbar-start">
|
<div class="navbar-start">
|
||||||
|
@ -122,10 +122,10 @@
|
||||||
class:opacity-100={scrollY}>
|
class:opacity-100={scrollY}>
|
||||||
<div
|
<div
|
||||||
class="radial-progress text-accent transition-all duration-500 ease-in-out group-hover:text-accent-focus col-start-1 row-start-1"
|
class="radial-progress text-accent transition-all duration-500 ease-in-out group-hover:text-accent-focus col-start-1 row-start-1"
|
||||||
style={`--size:4rem; --thickness: 0.25rem; --value:${percent};`} />
|
style={`--size:4rem; --thickness: 0.25rem; --value:${percent};`} />
|
||||||
<div
|
<div
|
||||||
class:border-transparent={percent > 95}
|
class:border-transparent={percent > 95}
|
||||||
class="border-4 border-base-content/10 group-hover:border-transparent col-start-1 row-start-1 rounded-full w-full h-full p-4 grid duration-500 ease-in-out">
|
class="border-4 border-base-content/10 group-hover:border-transparent col-start-1 row-start-1 rounded-full w-full h-full p-4 grid duration-500 ease-in-out">
|
||||||
<span class="i-heroicons-solid-chevron-up !w-6 !h-6" />
|
<span class="i-heroicons-solid-chevron-up !w-6 !h-6" />
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="justify-end flex-none w-32 h-32 my-auto ml-auto avatar">
|
<div class="justify-end flex-none w-32 h-32 my-auto ml-auto avatar">
|
||||||
<img
|
<img
|
||||||
class="rounded-full shadow-xl w-32 h-32 hover:rotate-[360deg] transition-transform duration-1000 ease-in-out"
|
class="rounded-full shadow-xl w-32 h-32 hover:rotate-[360deg] transition-transform duration-1000 ease-in-out"
|
||||||
src={site.author.avatar}
|
src={site.author.avatar}
|
||||||
alt={site.author.name} />
|
alt={site.author.name} />
|
||||||
{#if site.author.status}
|
{#if site.author.status}
|
||||||
<div class="heart absolute rounded-full w-10 h-10 bottom-0 right-0 bg-base-100 shadow-xl text-xl text-center py-1.5">
|
<div class="heart absolute rounded-full w-10 h-10 bottom-0 right-0 bg-base-100 shadow-xl text-xl text-center py-1.5">
|
||||||
|
@ -22,14 +22,15 @@
|
||||||
<h1 class="mt-0 mb-2 text-3xl font-bold p-name">{site.author.name}</h1>
|
<h1 class="mt-0 mb-2 text-3xl font-bold p-name">{site.author.name}</h1>
|
||||||
<p class="opacity-75 p-note">{@html site.author.bio}</p>
|
<p class="opacity-75 p-note">{@html site.author.bio}</p>
|
||||||
<p class="pt-3 space-x-3">
|
<p class="pt-3 space-x-3">
|
||||||
<a
|
<a
|
||||||
class="text-sm transition tooltip tooltip-secondary hover:text-secondary"
|
class="text-sm transition tooltip tooltip-secondary hover:text-secondary"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
data-tip="Bookmark"
|
data-tip="Bookmark"
|
||||||
aria-label="Bookmark"
|
aria-label="Bookmark"
|
||||||
href="https://airtable.com/shrpftxf6JgRomP2X">
|
href="https://airtable.com/shrpftxf6JgRomP2X">
|
||||||
<span class="i-ic-round-bookmark-border
|
<span
|
||||||
|
class="i-ic-round-bookmark-border
|
||||||
!w-8 !h-8 mr-1 fill-current inline-block hover:text-lime-500" />
|
!w-8 !h-8 mr-1 fill-current inline-block hover:text-lime-500" />
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
|
|
|
@ -9,4 +9,4 @@
|
||||||
<svelte:component this={action.default} {post} />
|
<svelte:component this={action.default} {post} />
|
||||||
{/each}
|
{/each}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -126,4 +126,4 @@
|
||||||
<Comment {post} config={postConfig.comment} />
|
<Comment {post} config={postConfig.comment} />
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</svelte:element>
|
</svelte:element>
|
||||||
|
|
|
@ -39,4 +39,4 @@
|
||||||
{/key}
|
{/key}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -43,4 +43,4 @@
|
||||||
</Card>
|
</Card>
|
||||||
<Footer sticky={true} />
|
<Footer sticky={true} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -29,4 +29,4 @@
|
||||||
|
|
||||||
<Container {post}>
|
<Container {post}>
|
||||||
<slot />
|
<slot />
|
||||||
</Container>
|
</Container>
|
||||||
|
|
|
@ -56,4 +56,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -27,4 +27,4 @@
|
||||||
{in_reply_to}
|
{in_reply_to}
|
||||||
</a>
|
</a>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -32,4 +32,4 @@
|
||||||
{stringUpdated}
|
{stringUpdated}
|
||||||
</time>
|
</time>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -65,4 +65,4 @@
|
||||||
{ depth: toc[0].depth - 1, children: [] }
|
{ depth: toc[0].depth - 1, children: [] }
|
||||||
)} />
|
)} />
|
||||||
</nav>
|
</nav>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
|
@ -30,4 +30,4 @@
|
||||||
</li>
|
</li>
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
export let decoding: 'async' | 'sync' | 'auto' = 'async'
|
export let decoding: 'async' | 'sync' | 'auto' = 'async'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<img {src} {alt} class={className ?? 'rounded-lg my-2'} {loading} {decoding} />
|
<img {src} {alt} class={className ?? 'rounded-lg my-2'} {loading} {decoding} />
|
||||||
|
|
|
@ -35,4 +35,4 @@
|
||||||
</article>
|
</article>
|
||||||
<Footer sticky={true} class="flex-1 md:flex-initial" />
|
<Footer sticky={true} class="flex-1 md:flex-initial" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -45,4 +45,4 @@
|
||||||
out:fly={{ y: -100, duration: 300 }}>
|
out:fly={{ y: -100, duration: 300 }}>
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
{/key}
|
{/key}
|
||||||
|
|
|
@ -123,4 +123,4 @@
|
||||||
</div>
|
</div>
|
||||||
{/key}
|
{/key}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,8 +24,7 @@ const defineConfig = (config: Config) => config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
content: ['./src/**/*.{html,md,js,svelte,ts}'],
|
content: ['./src/**/*.{html,md,js,svelte,ts}'],
|
||||||
theme: {
|
theme: {
|
||||||
extend: {
|
extend: {}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
plugins: [typography as TailwindPluginWithoutOptions, daisyui as TailwindPluginWithoutOptions],
|
plugins: [typography as TailwindPluginWithoutOptions, daisyui as TailwindPluginWithoutOptions],
|
||||||
daisyui: {
|
daisyui: {
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
|
<script lang="ts">
|
||||||
<script lang='ts'>
|
import { posts as storedPosts } from '$lib/stores/posts'
|
||||||
import { posts as storedPosts} from '$lib/stores/posts'
|
|
||||||
import Head from '$lib/components/head.svelte'
|
import Head from '$lib/components/head.svelte'
|
||||||
import Footer from '$lib/components/footer.svelte'
|
import Footer from '$lib/components/footer.svelte'
|
||||||
// let notes = storedPosts.filter((post)=> post.layout==='notes')
|
// let notes = storedPosts.filter((post)=> post.layout==='notes')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<Head />
|
<Head />
|
||||||
|
|
Loading…
Reference in a new issue