refactor app struct

This commit is contained in:
DefectingCat
2023-08-17 17:15:46 +08:00
parent e409e0afd6
commit 2cb80a42ae
31 changed files with 31 additions and 29 deletions

View File

@ -1,5 +1,5 @@
import PostCard from 'app/blog/post-card';
import PostCardLoading from 'app/blog/post-card-loading';
import PostCard from 'components/pages/blog/post-card';
import PostCardLoading from 'components/pages/blog/post-card-loading';
import Pagination from 'components/rua/rua-pagination';
import { getPostListPath, postLists, PostPerPage } from 'lib/posts';
import { notFound } from 'next/navigation';

View File

@ -1,4 +1,4 @@
import PostCardLoading from './post-card-loading';
import PostCardLoading from 'components/pages/blog/post-card-loading';
const Loading = () => {
const num = Array(4).fill(1);

View File

@ -1,8 +1,8 @@
import PostCard from './post-card';
import PostCardLoading from './post-card-loading';
import PostCard from 'components/pages/blog/post-card';
import PostCardLoading from 'components/pages/blog/post-card-loading';
import Pagination from 'components/rua/rua-pagination';
import { PostPerPage, postLists } from 'lib/posts';
import { Fragment, Suspense } from 'react';
import Pagination from 'components/rua/rua-pagination';
export default async function Page() {
const allPosts = await postLists();

View File

@ -1,6 +1,5 @@
import GistsCode from 'app/gists/gists-code';
import clsx from 'clsx';
import LinkAnchor from 'components/mdx/link-anchor';
import GistsCode from 'components/pages/gists/gists-code';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import { getSignalGist } from 'lib/fetcher';
@ -8,7 +7,6 @@ import Image from 'next/image';
import Link from 'next/link';
import { notFound } from 'next/navigation';
import avatar from 'public/images/img/avatar.svg';
import GistsCodeSkeleton from 'app/gists/gists-code-skeleton';
export const revalidate = 600;

View File

@ -1,4 +1,4 @@
import GistsCodeSkeleton from 'app/gists/gists-code-skeleton';
import GistsCodeSkeleton from 'components/pages/gists/gists-code-skeleton';
import clsx from 'clsx';
const loading = () => {

View File

@ -1,7 +1,7 @@
import FileContent from 'components/pages/gists/file-content';
import Pagination from 'components/rua/rua-pagination';
import { getGists } from 'lib/fetcher';
import { notFound } from 'next/navigation';
import FileContent from '../file-content';
import Pagination from 'components/rua/rua-pagination';
export const revalidate = 600;

View File

@ -1,7 +1,7 @@
import UserInfo from 'components/pages/gists/user-info';
import UserInfoLoading from 'components/pages/gists/user-info-skeleton';
import { Metadata } from 'next';
import { ReactNode, Suspense } from 'react';
import UserInfo from './user-info';
import UserInfoLoading from './user-info-skeleton';
export const revalidate = 600;
export const metadata: Metadata = {

View File

@ -1,4 +1,4 @@
import FileContentLoading from './file-content-skeleton';
import FileContentLoading from 'components/pages/gists/file-content-skeleton';
export default function Loading() {
const num = Array(3).fill(null);

View File

@ -1,7 +1,7 @@
import FileContent from 'components/pages/gists/file-content';
import Pagination from 'components/rua/rua-pagination';
import { getGists } from 'lib/fetcher';
import { notFound } from 'next/navigation';
import Pagination from 'components/rua/rua-pagination';
import FileContent from './file-content';
export const revalidate = 600;

View File

@ -1,15 +1,15 @@
import '@docsearch/css/dist/style.css';
import clsx from 'clsx';
import BackToTop from 'components/common/back-to-top';
import Footer from 'components/pages/footer';
import HeadBar from 'components/pages/nav-bar';
import RUAThemeProvider from 'components/pages/theme-provider';
import fonts from 'lib/fonts';
import { Metadata } from 'next';
import 'styles/globals.css';
import 'styles/prism-one-dark.css';
import 'styles/prism-one-light.css';
import 'styles/rua.css';
import Footer from './footer';
import HeadBar from './nav-bar';
import RUAThemeProvider from './theme-provider';
export const metadata: Metadata = {
title: 'RUA',

View File

@ -1,7 +1,7 @@
import clsx from 'clsx';
import dynamic from 'next/dynamic';
import Image from 'next/image';
import styles from 'styles/index/index.module.css';
import dynamic from 'next/dynamic';
const HomeModel = dynamic(() => import('../components/models/home-model'));

View File

@ -1,7 +1,7 @@
import clsx from 'clsx';
import { projects, selfHosts } from 'components/pages/projects/content';
import PojectCardSkeleton from 'components/pages/projects/project-card-skeleton';
import { Metadata } from 'next';
import { projects, selfHosts } from './content';
import PojectCardSkeleton from './project-card-skeleton';
export const metadata: Metadata = {
title: 'RUA - Projects',

View File

@ -1,7 +1,11 @@
import clsx from 'clsx';
import ProjectCard from './project-card';
import {
iconMap,
projects,
selfHosts,
} from 'components/pages/projects/content';
import ProjectCard from 'components/pages/projects/project-card';
import { Metadata } from 'next';
import { projects, iconMap, selfHosts } from './content';
export const metadata: Metadata = {
title: 'RUA - Projects',

View File

@ -1,10 +1,10 @@
import { useThree, useLoader, useFrame } from '@react-three/fiber';
import { useFrame, useLoader, useThree } from '@react-three/fiber';
import { getMousePosition } from 'lib/utils';
import { useRef, useEffect } from 'react';
import { useEffect, useRef } from 'react';
import useStore from 'store';
import * as THREE from 'three';
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader';
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
import useStore from 'store';
import { rotationX, rotationY } from './home-model';
const CatModel = () => {

View File

@ -3,8 +3,8 @@ import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import Link from 'next/link';
import { memo } from 'react';
import GistsCode from './gists-code';
import { GistData } from 'types';
import GistsCode from './gists-code';
dayjs.extend(relativeTime);