mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
💄 Format styles
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
import { GistsFile } from 'types';
|
||||
import { unified } from 'unified';
|
||||
import remarkParse from 'remark-parse';
|
||||
import remarkRehype from 'remark-rehype';
|
||||
import rehypePrism from '@mapbox/rehype-prism';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
import classNames from 'classnames';
|
||||
import { createElement, Fragment } from 'react';
|
||||
import rehypeReact from 'rehype-react';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
import remarkParse from 'remark-parse';
|
||||
import remarkRehype from 'remark-rehype';
|
||||
import { GistsFile } from 'types';
|
||||
import { unified } from 'unified';
|
||||
import styles from './styles.module.css';
|
||||
import classNames from 'classnames';
|
||||
|
||||
interface Props {
|
||||
file: GistsFile;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Gist, GithubUser, SignalGist } from 'types';
|
||||
import { Base64 } from 'js-base64';
|
||||
import { Gist, GithubUser, SignalGist } from 'types';
|
||||
|
||||
const baseUrl = 'https://api.github.com';
|
||||
const username = 'DefectingCat';
|
||||
@ -12,7 +12,7 @@ headers.set(
|
||||
);
|
||||
|
||||
/**
|
||||
* Get all gists
|
||||
* Get all gists.
|
||||
* @returns
|
||||
*/
|
||||
export const getGists = async (page = 1, perPage = 10) => {
|
||||
@ -31,6 +31,11 @@ export const getUser = async () => {
|
||||
)) as GithubUser;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get one gist.
|
||||
* @param id
|
||||
* @returns
|
||||
*/
|
||||
export const getSignalGist = async (id: string) => {
|
||||
return (await fetch(`${baseUrl}/gists/${id}`, { headers }).then((res) =>
|
||||
res.json()
|
||||
|
@ -1,6 +1,6 @@
|
||||
import classNames from 'classnames';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { NextPageWithLayout } from 'types';
|
||||
import classNames from 'classnames';
|
||||
|
||||
const MainLayout = dynamic(() => import('layouts/MainLayout'));
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { InferGetStaticPropsType } from 'next';
|
||||
import { ReactElement } from 'react';
|
||||
import { postLists } from 'lib/posts';
|
||||
import cn from 'classnames';
|
||||
import dynamic from 'next/dynamic';
|
||||
import PostCardLoading from 'components/RUA/loading/PostCardLoading';
|
||||
import { postLists } from 'lib/posts';
|
||||
import { InferGetStaticPropsType } from 'next';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { ReactElement } from 'react';
|
||||
|
||||
const PostCard = dynamic(() => import('components/PostCard'), {
|
||||
loading: () => <PostCardLoading />,
|
||||
|
@ -19,7 +19,7 @@ const Gist = ({ gist }: InferGetStaticPropsType<typeof getStaticProps>) => {
|
||||
return (
|
||||
<>
|
||||
<main className="max-w-5xl px-4 mx-auto lg:px-0">
|
||||
<div className={'pb-4 text-sm'}>
|
||||
<div className="pb-4 text-sm">
|
||||
<div className="flex items-center py-1 ">
|
||||
<Image
|
||||
src={avatar}
|
||||
@ -30,7 +30,7 @@ const Gist = ({ gist }: InferGetStaticPropsType<typeof getStaticProps>) => {
|
||||
className="rounded-full "
|
||||
/>
|
||||
<h1 className="ml-2 overflow-hidden text-xl whitespace-nowrap overflow-ellipsis">
|
||||
<Link href={`/gists`} passHref>
|
||||
<Link href="/gists" passHref>
|
||||
<Anchor external={false}>{gist.owner.login}</Anchor>
|
||||
</Link>
|
||||
/{Object.keys(gist.files)[0]}
|
||||
|
@ -21,7 +21,6 @@ const Gists = ({
|
||||
<main className="max-w-5xl px-4 mx-auto lg:px-0">
|
||||
<div className="md:flex">
|
||||
<UserInfo user={user} />
|
||||
|
||||
<FileContent gists={gists} />
|
||||
</div>
|
||||
</main>
|
||||
|
@ -21,7 +21,6 @@ const Gists = ({
|
||||
<main className="max-w-5xl px-4 mx-auto lg:px-0">
|
||||
<div className="md:flex">
|
||||
<UserInfo user={user} />
|
||||
|
||||
<FileContent gists={gists} />
|
||||
</div>
|
||||
</main>
|
||||
|
@ -1,9 +1,9 @@
|
||||
import cn from 'classnames';
|
||||
import dynamic from 'next/dynamic';
|
||||
import Head from 'next/head';
|
||||
import { useState } from 'react';
|
||||
import type { NextPageWithLayout } from 'types';
|
||||
import style from 'styles/index/index.module.css';
|
||||
import dynamic from 'next/dynamic';
|
||||
import type { NextPageWithLayout } from 'types';
|
||||
|
||||
const MainLayout = dynamic(() => import('layouts/MainLayout'));
|
||||
|
||||
|
Reference in New Issue
Block a user