Compare commits

...

6 Commits

Author SHA1 Message Date
8d7b59263d NO-ISSUE build: update frontend version
All checks were successful
Frontend CI / build (push) Successful in 1m6s
Deployment / deployment (release) Successful in 7m9s
PR Title Check / pr-title-check (pull_request) Successful in 16s
2025-07-28 00:22:39 +08:00
64ebfaa3e9 BLOG-87 Fix to unify post content title color (#88)
All checks were successful
Frontend CI / build (push) Successful in 1m5s
### Description

- Enhance typography and color consistency in PostPreview and PostContentPage
- Add tailwind configuration for custom typography styles

### Package Changes

_No response_

### Screenshots

_No response_

### Reference

Resolves #87

### Checklist

- [x] A milestone is set
- [x] The related issuse has been linked to this branch

Reviewed-on: #88
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
2025-07-28 00:21:09 +08:00
0896afe819 Merge branch 'main' into release/0.2
All checks were successful
PR Title Check / pr-title-check (pull_request) Successful in 17s
Frontend CI / build (push) Successful in 1m8s
2025-07-26 01:02:12 +08:00
462b1a6efb NO-ISSUE build: update frontend version
All checks were successful
PR Title Check / pr-title-check (pull_request) Successful in 17s
Frontend CI / build (push) Successful in 1m7s
Deployment / deployment (release) Successful in 5m38s
2025-07-26 00:34:48 +08:00
7770a5b569 BLOG-72 Fix img cannot be shown on content page (#74)
All checks were successful
Frontend CI / build (push) Successful in 1m7s
### Description

<https://www.npmjs.com/package/sanitize-html>

![image.png](/attachments/f35293b6-7c80-4a6f-917e-fa0d4cffa804)

### Package Changes

_No response_

### Screenshots

_No response_

### Reference

Resolves #72

### Checklist

- [x] A milestone is set
- [x] The related issuse has been linked to this branch

Reviewed-on: #74
Co-authored-by: SquidSpirit <squid@squidspirit.com>
Co-committed-by: SquidSpirit <squid@squidspirit.com>
2025-07-26 00:33:17 +08:00
d9b531f08d NO-ISSUE Merged from release/0.2 (#69)
All checks were successful
Frontend CI / build (push) Successful in 1m10s
Reviewed-on: #69
2025-07-25 10:33:47 +08:00
6 changed files with 25 additions and 4 deletions

View File

@ -1,7 +1,7 @@
{
"name": "squidspirit-blog",
"private": true,
"version": "0.2.0",
"version": "0.2.2",
"type": "module",
"scripts": {
"dev": "vite dev",

View File

@ -1,5 +1,6 @@
@import 'tailwindcss';
@plugin '@tailwindcss/typography';
@config "../tailwind.config.js";
@font-face {
font-family: 'HackNerdMono';

View File

@ -5,7 +5,9 @@
const { html }: { html: string } = $props();
const sanitizedHtml = $derived(sanitizeHtml(html));
const sanitizedHtml = $derived(
sanitizeHtml(html, { allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img']) })
);
</script>
{@html sanitizedHtml}

View File

@ -16,7 +16,7 @@
onMount(() => postBloc.dispatch({ event: PostEventType.PostLoadedEvent, id: id }));
</script>
<article class="container prose pb-10">
<article class="container prose pb-10 prose-gray">
{#if state.data}
<PostContentHeader postInfo={state.data.info} />
<div class="max-w-3xl">

View File

@ -34,7 +34,7 @@
</div>
<div class="flex flex-col gap-y-2.5">
<PostPreviewLabels labels={postInfo.labels} />
<span class="line-clamp-1 text-lg font-bold">{postInfo.title}</span>
<span class="line-clamp-1 text-lg font-bold text-gray-800">{postInfo.title}</span>
<span class="line-clamp-3 text-justify text-sm">{postInfo.description}</span>
<span class="text-sm text-gray-500">{postInfo.formattedPublishedTime}</span>
</div>

View File

@ -0,0 +1,18 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
theme: {
extend: {
typography: () => ({
gray: {
css: {
'--tw-prose-body': 'var(--color-gray-700)',
'--tw-prose-headings': 'var(--color-gray-800)',
'--tw-prose-links': 'var(--color-gray-800)',
'--tw-prose-bold': 'var(--color-gray-800)',
'--tw-prose-quotes': 'var(--color-gray-800)'
}
}
})
}
}
};