feat(frontend/blog) font, lighthouse improve

This commit is contained in:
lumither committed 2024-05-09 22:35:01 +08:00
1 parent 7e0b015cbc
commit fd4bdb4a6f
4 files changed
+13 -6

No files matched your search

+1 -3
View File
@@ -29,14 +29,12 @@ function BlogPostCard({ post }: Props) {
>
{ pic_url !== '' && <div className={ `w-full overflow-visible` }>
<Image
// as={NextImage}
isZoomed
isBlurred
alt={ 'cover picture' }
src={ pic_url }
className={ `h-80 w-full object-cover` }
width={ `100%` }
// removeWrapper
></Image>
</div> }
@@ -44,7 +42,7 @@ function BlogPostCard({ post }: Props) {
<div className={ `flex flex-row justify-between` }>
<div className={ `mx-2 mt-2` }>
<Chip className={ `mb-2` } radius={ `sm` } color={ `secondary` }
variant={ `flat` }>{ category }</Chip>
variant={ `solid` }>{ category }</Chip>
<p className={ `text-4xl font-bold` }> { title }</p>
<p className={ `text-xl` }> { sub_title }</p>
</div>
+10
View File
@@ -1,3 +1,13 @@
@import "lxgw-wenkai-webfont";
@tailwind base;
@tailwind components;
@tailwind utilities;
body {
font-family: "LXGW WenKai", sans-serif;
}
pre, code {
font-family: "LXGW WenKai Mono", sans-serif;
}
+1 -3
View File
@@ -1,11 +1,9 @@
import type { Metadata } from 'next';
import { Inter } from 'next/font/google';
import './globals.css';
import React from 'react';
import { ThemeProvider as NextThemesProvider } from 'next-themes';
import Navbar from '@/components/Navbar';
const inter = Inter({ subsets: [ 'latin' ] });
export const metadata: Metadata = {
title: 'Lumither\'s site',
@@ -19,7 +17,7 @@ export default function RootLayout({
}>) {
return (
<html lang="en" suppressHydrationWarning>
<body className={ inter.className }>
<body>
<NextThemesProvider attribute="class" defaultTheme="dark">
<Navbar />
{ children }