Skip to content

Commit

Permalink
修复了一些内容
Browse files Browse the repository at this point in the history
  • Loading branch information
zitons committed Mar 23, 2024
1 parent 053ba65 commit d5866ee
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 63 deletions.
4 changes: 2 additions & 2 deletions components/base/Node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* @Author: zitons
* @Date: 2024-02-22 21:10:24
* @LastEditors: Please set LastEditors
* @LastEditTime: 2024-03-16 20:26:09
* @LastEditTime: 2024-03-23 11:14:42
* @Description: 简介
*/
export async function getData(to) {

console.log(`run ${process.env.NEXT_PUBLIC_PROTOCOL + process.env.NEXT_PUBLIC_BLOG + "/" + to + "/"}`)
const data = await fetch(`${process.env.NEXT_PUBLIC_PROTOCOL + process.env.NEXT_PUBLIC_BLOG + "/" + to + "/"}`, {

cache: 'no-store'
}).then((res) => res.json());
return data;
// The return value is *not* serialized
Expand Down
32 changes: 19 additions & 13 deletions components/ui/Dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* @Author: vhko
* @Date: 2024-03-13 15:09:54
* @LastEditors: vhko
* @LastEditTime: 2024-03-17 15:33:33
* @LastEditors: Please set LastEditors
* @LastEditTime: 2024-03-23 11:47:57
* @FilePath: \NoDrogen\components\ui\Dropdown.tsx
*/
// import { useState, useRef, useEffect } from "react";
Expand All @@ -18,17 +18,23 @@ export default async function Dropdown(props) {
document.getElementById("menu").classList.add("aaa");
}
};
const typelist = props.type.map((type: string) => (
<div>
<a
href={"/type/" + type + "/1"}
className="block rounded-lg px-4 py-2 text-sm text-gray-500 hover:bg-gray-50 hover:text-gray-700"
role="menuitem"
>
{type}
</a>
</div>
));
let typelist;
if (props.type == undefined) {
console.log(null);
typelist = ["null"];
} else {
typelist = props.type.map((type: string) => (
<div>
<a
href={"/type/" + type + "/1"}
className="block rounded-lg px-4 py-2 text-sm text-gray-500 hover:bg-gray-50 hover:text-gray-700"
role="menuitem"
>
{type}
</a>
</div>
));
}
return (
<div className={`${style.test} relative`}>
<button onClick={aaa} className={style.type_btn}>
Expand Down
98 changes: 50 additions & 48 deletions components/ui/Pageinfo.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* @Author: zitons
* @Date: 2024-02-21 09:19:46
* @LastEditors: vhko
* @LastEditTime: 2024-03-17 16:20:03
* @LastEditors: Please set LastEditors
* @LastEditTime: 2024-03-23 11:43:09
* @Description: 简介
*/
import Image from "next/image";
Expand All @@ -11,53 +11,55 @@ import Head from "../Head";

import Style from "./ui.module.css";
const Pageinfo = (props) => {
return (
<>
{/* <Head /> */}
<div className={`${Style.pageinfo} container mt-6`}>
<div className={Style.cover}>
<Image
className={Style.img}
src={props.data?.cover}
alt="cover"
fill={true}
/>
</div>
<div className="z-10">
<div style={{ marginLeft: "-5px" }}>
{props.data.tags.map((item) => (
<span
className={`tags rounded-md leading-8 m-1 notion-${item.color}_background`}
>
{item.name}
</span>
))}
<span>&#35;{props.data?.type}</span>
</div>
<div className={Style.title}>
<p>
{props.data?.icon}
{props.title}&nbsp;
</p>
<span>&#35;{props.data?.type}</span>
</div>
return (
<>
{/* <Head /> */}
<div className={`${Style.pageinfo} container mt-6`}>
<div className={Style.cover}>
<Image
className={Style.img}
src={props.data?.cover}
alt="cover"
fill={true}
/>
</div>
<div className="z-10">
<div style={{ marginLeft: "-5px" }}>
{props.data.tags == undefined
? console.log(null)
: props.data.tags.map((item) => (
<span
className={`tags rounded-md leading-8 m-1 notion-${item.color}_background`}
>
{item.name}
</span>
))}
<span>&#35;{props.data?.type}</span>
</div>
<div className={Style.title}>
<p>
{props.data?.icon}
{props.title}&nbsp;
</p>
<span>&#35;{props.data?.type}</span>
</div>

<div>
<p>{props.data?.summary}</p>
<div className="flex gap-4">
<p className={Style.meta}>
<HiMiniUserCircle />
{props.data?.Person?.[0]?.name}
</p>
<p className={Style.meta}>
<HiMiniClock />
{props.data.date?.["start_date"]}
</p>
</div>
</div>
<div>
<p>{props.data?.summary}</p>
<div className="flex gap-4">
<p className={Style.meta}>
<HiMiniUserCircle />
{props.data?.Person?.[0]?.name}
</p>
<p className={Style.meta}>
<HiMiniClock />
{props.data.date?.["start_date"]}
</p>
</div>
</div>
</>
);
</div>
</div>
</div>
</>
);
};
export default Pageinfo;

0 comments on commit d5866ee

Please sign in to comment.