Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
icekylin committed Feb 7, 2024
1 parent 0c26faf commit 4d5db65
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 17 deletions.
File renamed without changes.
File renamed without changes
43 changes: 43 additions & 0 deletions src/assets/images/agda.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/neom.avif
Binary file not shown.
2 changes: 1 addition & 1 deletion src/lib/component/PointerDiv.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</script>

<div
class="h-fit w-fit"
{...$$props}
on:mouseenter={handleMouseEnter}
on:mouseleave={handleMouseLeave}
role="presentation"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/component/layout.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { color as c, isMainColor } from '$lib/store/color';
import Footer from '$lib/component/footer.svelte';
import { onDestroy } from 'svelte';
import Footer from '$lib/component/footer.svelte';
import clsx from 'clsx';
export let cover: boolean = false;
Expand Down
12 changes: 8 additions & 4 deletions src/lib/component/nav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import cardsPlayingOutline from '@mdi/svg/svg/cards-playing-outline.svg?raw';
import clsx from 'clsx';
import PointerDiv from '$lib/component/PointerDiv.svelte';
import { isClose } from '$lib/store/header';
const links = [
{
Expand Down Expand Up @@ -58,8 +59,8 @@
)}
>
{#each links as link}
<PointerDiv>
<li class="mt-6">
<li class="mt-6">
<PointerDiv>
<a
href={link.href}
class={clsx(
Expand All @@ -68,6 +69,9 @@
? 'after:border-onPrimary md:after:border-outlineVariant'
: 'after:border-white'
)}
on:click={() => {
isClose.set(true);
}}
>
<div class="hidden w-max md:block">
<Icon
Expand All @@ -87,8 +91,8 @@
>{link.text}</span
>
</a>
</li>
</PointerDiv>
</PointerDiv>
</li>
{/each}
</ul>
</nav>
8 changes: 5 additions & 3 deletions src/lib/config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { dev } from '$app/environment';

import springFestival2024 from '../assets/images/spring-festival-2024.jpg?enhanced';
import bird from '../assets/images/bird.webp?enhanced';
import springFestival2024 from '../assets/covers/spring-festival-2024.jpg?enhanced';
import bird from '../assets/covers/bird.webp?enhanced';
import ucl from '../assets/images/ucl.jpg?enhanced';
import neom from '../assets/images/neom.avif?enhanced';

// 基本设置
export const title: string = "ICEKYLIN'S BLOG";
Expand Down Expand Up @@ -37,7 +38,8 @@ export const url: string = dev
export const images = {
springFestival2024,
bird,
ucl
ucl,
neom
};

// 首页设置
Expand Down
12 changes: 5 additions & 7 deletions src/lib/home/Post.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@
<li
class={clsx(
'w-full border-b border-dotted border-b-outlineVariant py-3',
wide
? 'md:flex-[5_0_calc(100%_/_2_+_6%)]'
: 'md:flex-[1_0_calc(100%_/_3_+_1%)]'
wide ? 'md:flex-[1_0_calc(100%_/_2)]' : 'md:flex-[1_0_calc(100%_/_3)]'
)}
>
<div
class="flex h-full gap-2 border-l border-dotted border-l-outlineVariant px-6"
class="flex h-full gap-2 border-l border-dotted border-l-outlineVariant px-6 lg:gap-3"
>
<div class="flex h-full shrink flex-col gap-2">
<a class="font-bold" href={post.slug}>{post.title}</a>
<p class="line-clamp-3 text-xs text-onSurfaceVariant">
<p class="line-clamp-5 text-xs text-onSurfaceVariant">
{post.description}
</p>
<div
Expand All @@ -39,10 +37,10 @@
</div>
</div>
{#if post.img}
<div class="h-16 w-16 shrink-0 md:h-32 md:w-32">
<div class="h-32 w-32 shrink-0">
<enhanced:img
alt={title}
class="h-16 w-16 object-cover md:h-32 md:w-32"
class="h-32 w-32 object-cover"
src={config.images[post.img]}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/home/Posts.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ul class="relative -left-6 right-6 flex w-[calc(100%+48px)] flex-wrap">
<slot />
</ul>
<PointerDiv>
<PointerDiv class="w-fit">
<a href="/">
<div
class="flex items-center gap-3 bg-onBackground px-3 py-2 text-xs font-bold text-background"
Expand Down
1 change: 1 addition & 0 deletions src/posts/hello.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: 这是迁移到 SvelteKit 的第一篇文章。测试了 Tailwind C
date: '2024-2-5'
categories: [学术]
tags: [SvelteKit, Svelte, Tailwind]
img: 'neom'
published: true
---

Expand Down

0 comments on commit 4d5db65

Please sign in to comment.