Feat: Add Note List & Detail Page
日记列表与详情页面,包括载入条和文章组件
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
.article {
|
||||
line-height: 1.7;
|
||||
|
||||
> * {
|
||||
margin-bottom: 1rem;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
pre {
|
||||
tab-size: 4;
|
||||
padding: 1em;
|
||||
color: #fff;
|
||||
overflow: auto;
|
||||
border-radius: .75rem;
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
ul {
|
||||
line-height: 2;
|
||||
list-style: disc;
|
||||
margin-left: 1.25rem;
|
||||
|
||||
::marker {
|
||||
color: rgb(244 114 182 / var(--tw-bg-opacity));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { clsn } from "~/utils";
|
||||
import styles from "./article.module.less";
|
||||
|
||||
interface ArticleProps {
|
||||
className?: string;
|
||||
html: string;
|
||||
}
|
||||
|
||||
function Article({ className, html }: ArticleProps) {
|
||||
return (
|
||||
<article className={clsn(styles.article, className)} dangerouslySetInnerHTML={{ __html: html }} />
|
||||
);
|
||||
}
|
||||
|
||||
export default Article;
|
||||
@@ -0,0 +1,9 @@
|
||||
import { useNavigation } from "@remix-run/react";
|
||||
|
||||
export default function SpinnerBar() {
|
||||
const navigation = useNavigation();
|
||||
|
||||
return navigation.state === "loading" ? (
|
||||
<div className="spinner animate-spinner-bar h-1 z-20 fixed top-0 left-0 right-0 bg-orange-200" />
|
||||
) : null;
|
||||
}
|
||||
Reference in New Issue
Block a user