diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..e2869f6 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,23 @@ +name: Sync to Remote Repository + +on: + push: + branches: + - main # 或者你的默认分支名称 + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout source repository + uses: actions/checkout@v2 + + - name: Push to remote repository + uses: ad-m/github-push-action@master # 把 `main` 改成 `master` 或具体的版本号 + with: + github_token: ${{ secrets.GIT_TOKEN }} + github_url: ${{ secrets.GIT_REPO_URL}} + repository: yonote # 你的远程仓库URL + branch: main + force: true # 使用 "true" 强制推送(当你想要你的变化覆盖远程仓库时) + tags: true # 也推送tags diff --git a/public/images/dialog/Close-small.png b/public/images/dialog/Close-small.png new file mode 100644 index 0000000..9778cbd Binary files /dev/null and b/public/images/dialog/Close-small.png differ diff --git a/public/images/dialog/check.png b/public/images/dialog/check.png new file mode 100644 index 0000000..41c0222 Binary files /dev/null and b/public/images/dialog/check.png differ diff --git a/public/images/dialog/haibao.png b/public/images/dialog/haibao.png new file mode 100644 index 0000000..100068b Binary files /dev/null and b/public/images/dialog/haibao.png differ diff --git a/public/images/dialog/link.png b/public/images/dialog/link.png new file mode 100644 index 0000000..2986f80 Binary files /dev/null and b/public/images/dialog/link.png differ diff --git a/public/images/dialog/pay.png b/public/images/dialog/pay.png new file mode 100644 index 0000000..9f64d11 Binary files /dev/null and b/public/images/dialog/pay.png differ diff --git a/public/images/nav/book.svg b/public/images/nav/book.svg new file mode 100644 index 0000000..71fc331 --- /dev/null +++ b/public/images/nav/book.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/images/nav/book_active.svg b/public/images/nav/book_active.svg new file mode 100644 index 0000000..6e1d42e --- /dev/null +++ b/public/images/nav/book_active.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/nav/find.svg b/public/images/nav/find.svg new file mode 100644 index 0000000..3c95c3c --- /dev/null +++ b/public/images/nav/find.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/public/images/nav/find_active.svg b/public/images/nav/find_active.svg new file mode 100644 index 0000000..678960a --- /dev/null +++ b/public/images/nav/find_active.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/public/images/nav/user.svg b/public/images/nav/user.svg new file mode 100644 index 0000000..7483ca9 --- /dev/null +++ b/public/images/nav/user.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/public/images/nav/user_active.svg b/public/images/nav/user_active.svg new file mode 100644 index 0000000..4573d24 --- /dev/null +++ b/public/images/nav/user_active.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/subscribe/cover.png b/public/images/subscribe/cover.png new file mode 100644 index 0000000..db62035 Binary files /dev/null and b/public/images/subscribe/cover.png differ diff --git a/public/images/subscribe/like.svg b/public/images/subscribe/like.svg new file mode 100644 index 0000000..849b2cf --- /dev/null +++ b/public/images/subscribe/like.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/images/subscribe/manage.svg b/public/images/subscribe/manage.svg new file mode 100644 index 0000000..e7dc213 --- /dev/null +++ b/public/images/subscribe/manage.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/images/subscribe/search.png b/public/images/subscribe/search.png new file mode 100644 index 0000000..ba9e9e5 Binary files /dev/null and b/public/images/subscribe/search.png differ diff --git a/public/images/subscribe/see.svg b/public/images/subscribe/see.svg new file mode 100644 index 0000000..15576b7 --- /dev/null +++ b/public/images/subscribe/see.svg @@ -0,0 +1,4 @@ + + + + diff --git a/public/images/subscribe/user1.png b/public/images/subscribe/user1.png new file mode 100644 index 0000000..b6f7ba3 Binary files /dev/null and b/public/images/subscribe/user1.png differ diff --git a/public/images/subscribe/user2.png b/public/images/subscribe/user2.png new file mode 100644 index 0000000..ee26e9e Binary files /dev/null and b/public/images/subscribe/user2.png differ diff --git a/public/images/subscribe/vip.svg b/public/images/subscribe/vip.svg new file mode 100644 index 0000000..ac38d55 --- /dev/null +++ b/public/images/subscribe/vip.svg @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/images/wallet/bg.png b/public/images/wallet/bg.png new file mode 100644 index 0000000..7ad3014 Binary files /dev/null and b/public/images/wallet/bg.png differ diff --git a/public/images/wallet/detail.png b/public/images/wallet/detail.png new file mode 100644 index 0000000..fbdfd42 Binary files /dev/null and b/public/images/wallet/detail.png differ diff --git a/src/app/_components/common/Navbar.jsx b/src/app/_components/common/Navbar.jsx deleted file mode 100644 index a0c1d95..0000000 --- a/src/app/_components/common/Navbar.jsx +++ /dev/null @@ -1,28 +0,0 @@ -import React from 'react'; -import Link from 'next/link'; - -const Navbar = () => { - return ( - - ); -}; - -export default Navbar; \ No newline at end of file diff --git a/src/app/_components/common/Navbar.tsx b/src/app/_components/common/Navbar.tsx new file mode 100644 index 0000000..3d00d96 --- /dev/null +++ b/src/app/_components/common/Navbar.tsx @@ -0,0 +1,42 @@ +"use client"; +'use strict'; +import React from 'react'; +import Link from 'next/link'; + +const Navbar = () => { + const [currentNaver, setCurrentNaver] = React.useState(1); + const Page1 = () => { + const [c, setC] = React.useState(undefined); + return ( +
+ 1 +
) + }; + const Page2 = () => { + const [c, setC] = React.useState(undefined); + return ( +
+ 2 +
) + }; + return ( + + ); +}; + +export default Navbar; \ No newline at end of file diff --git a/src/app/_components/dialog/dialog.tsx b/src/app/_components/dialog/dialog.tsx new file mode 100644 index 0000000..94f7324 --- /dev/null +++ b/src/app/_components/dialog/dialog.tsx @@ -0,0 +1,33 @@ +import React from 'react'; // 引入 React + +// 定义 GeneralModal 组件,接收 isOpen 和 children 作为 props +const GeneralModal = ({ isOpen, onClick, children }: { isOpen: boolean, onClick: () => void | null, children: React.ReactNode }) => { + // 如果 isOpen 是 false,则不显示模态框,直接返回 null + if (!isOpen) { + return null; + } + + // 定义 modalClass 函数,返回模态框的样式类名字符串 + const modalClass = (): string => { + // 返回样式类名字符串 + return "w-80 h-80"; + } + + // 渲染模态框 + return ( +
+ {/* 模态框 */} +
+ {/* 返回按钮 */} + + {/* 模态框的内容 */} + {children} +
+ +
+
+
+ ); +}; + +export default GeneralModal; // 导出 GeneralModal 组件 \ No newline at end of file diff --git a/src/app/_components/subscribe/Navscribr.tsx b/src/app/_components/subscribe/Navscribr.tsx new file mode 100644 index 0000000..190d453 --- /dev/null +++ b/src/app/_components/subscribe/Navscribr.tsx @@ -0,0 +1,72 @@ +"use client"; +'use strict'; +import React from 'react'; +import SubscribeColumn from './SubscribeColumn'; +import SubscribeRenew from './SubscribeRenew'; +import Image from 'next/image'; + + +const Page = () => { + const [currentPage, setCurrentPage] = React.useState(1); + + const Page1 = () => { + const [c, setC] = React.useState(undefined); + return ( +
+ + +
) + }; + const Page2 = () => { + const [c, setC] = React.useState(undefined); + return ( +
+ + +
+ + ) + }; + const Page3 = () => { + const [c, setC] = React.useState(undefined); + return ( +
+ + + +
+ ); + } + const renderContent = (): React.ReactNode => { + switch (currentPage) { + case 1: + return ; + case 2: + return ; + case 3: + return ; + } + }; + + return ( +
+
+
+
setCurrentPage(1)} className=''>更新
+
setCurrentPage(2)} className=''>专栏
+
setCurrentPage(3)} className=''>小课
+
+
+
订阅管理
+ manage +
+
+ {renderContent()} +
+ ); +}; + +export default Page; + + + diff --git a/src/app/_components/subscribe/SubscribeColumn.tsx b/src/app/_components/subscribe/SubscribeColumn.tsx new file mode 100644 index 0000000..126c6e3 --- /dev/null +++ b/src/app/_components/subscribe/SubscribeColumn.tsx @@ -0,0 +1,30 @@ +import Image from "next/image"; +import Link from "next/link"; + +const SubscribeColumn = () => { + return ( + +
+
+ user_image +
+ vip +
+
芋圆
+
+
+
3.02 12:30发布
+
+
+
「心智与阅读」
+
情绪价值,上上签,愤怒,变化,偏执,创造
+
+ cover +
+
+
+ + + ) +} +export default SubscribeColumn; \ No newline at end of file diff --git a/src/app/_components/subscribe/SubscribeRenew.tsx b/src/app/_components/subscribe/SubscribeRenew.tsx new file mode 100644 index 0000000..e2d7cf9 --- /dev/null +++ b/src/app/_components/subscribe/SubscribeRenew.tsx @@ -0,0 +1,36 @@ +import Image from "next/image"; +import Link from "next/link"; + +const SubscribeRenew = () => { + return ( + +
+
+ cover +
+
「开播的第3年,P人沉浸于J人的世界」
+
情绪价值波动,上上签,愤怒,变化,偏执,创造
+
+
+
+ user_image +
+
+
芋圆
+ cover +
+
03-01发布
+
+
+ leke +
1.2k
+ leke +
1.2k
+
+
+
+ + + ) +} +export default SubscribeRenew; \ No newline at end of file diff --git a/src/app/dashboard/subscribe/page.jsx b/src/app/dashboard/subscribe/page.jsx index a6635f8..338c997 100644 --- a/src/app/dashboard/subscribe/page.jsx +++ b/src/app/dashboard/subscribe/page.jsx @@ -1,8 +1,36 @@ -import React from "react"; +import Navbar from "../../_components/common/Navbar" +import Image from "next/image"; +import Link from "next/link"; +import Page from "../../_components/subscribe/Navscribr"; -function Subscribe() { + +const Subscribe = () => { return ( -
subscribe
+
+
+
+ search + +
+ +
+ cover +
+
「显示不够的话开播的第3年,P人沉...」
+
显示多少然后开始了...
+
+ 继续阅读 +
+ +
+ +
+
+ +
+ +
+
) } export default Subscribe; \ No newline at end of file diff --git a/src/app/dialog/book-dialog/page.tsx b/src/app/dialog/book-dialog/page.tsx new file mode 100644 index 0000000..eda27bd --- /dev/null +++ b/src/app/dialog/book-dialog/page.tsx @@ -0,0 +1,54 @@ +"use client"; + +import React, { useState } from "react"; +import Image from "next/image"; + +const Reserved = () => { + const [selectedButton, setSelectedButton] = useState(null); // 追踪选中的按钮 + + const handleButtonClick = (button:number) => { + if (selectedButton === button) { + // 如果点击的是当前选中的按钮,则取消选中状态 + setSelectedButton(null); + } else { + // 否则设置点击的按钮为选中状态 + setSelectedButton(button); + } + }; + + return ( +
+
「心智与阅读系列」
+
+ + +
+
*内容为第三方个人创建,购买前请知晓内容,服务及相关风险,购买后 24 小时内可申请退款
+
+ +
+
+ ); +} + +export default Reserved; \ No newline at end of file diff --git a/src/app/dialog/layout.tsx b/src/app/dialog/layout.tsx new file mode 100644 index 0000000..e81d281 --- /dev/null +++ b/src/app/dialog/layout.tsx @@ -0,0 +1,36 @@ +"use client"; + + +import Image from "next/image"; +import React from "react"; +import { useRouter } from "next/navigation"; +import { TRPCReactProvider } from "@/trpc/react"; + + +const dialogLayout=({children}:{children:React.ReactNode})=>{ + const router = useRouter(); + + const closeModal = () => { + router.back(); + } + + return( + + + + +
+
+ + {children} +
+
+ + + ); + +} + +export default dialogLayout; diff --git a/src/app/dialog/shareing/join/page.tsx b/src/app/dialog/shareing/join/page.tsx new file mode 100644 index 0000000..15bba65 --- /dev/null +++ b/src/app/dialog/shareing/join/page.tsx @@ -0,0 +1,33 @@ + + + + +import React from "react"; +import Image from "next/image"; +import { Span } from "next/dist/trace"; + +const Shareing =()=>{ + let discount = "20%" + return( +
+
+ 分享 +
+
+ 【专栏名称】已加入-加速计划 +
+
+ 购买后生成分享海报,成交后可获得专栏金额的 {discount}收益作为奖励 +
+ + + +
+ ); +} + +export default Shareing; \ No newline at end of file diff --git a/src/app/dialog/shareing/open/page.tsx b/src/app/dialog/shareing/open/page.tsx new file mode 100644 index 0000000..111f65c --- /dev/null +++ b/src/app/dialog/shareing/open/page.tsx @@ -0,0 +1,31 @@ + + +import React from "react"; +import Image from "next/image"; +import { Span } from "next/dist/trace"; + +const Shareing =()=>{ + let discount = "20%" + return( +
+
+ 分享 +
+
+ 【专栏名称】已开启-加速计划 +
+
+ 分享海报与链接助力创作者,成交后您可以获得当前作品价格的 {discount}作为加速激励 +
+ + + +
+ ); +} + +export default Shareing; \ No newline at end of file diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index c383b48..0aca813 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -1,21 +1,35 @@ "use client"; + import React, { useState } from "react"; import Image from "next/image"; +import GeneralModal from "../_components/dialog/dialog"; // 引入GeneralModal组件 +import { useRouter } from "next/navigation"; const Login = () => { const [checked, setChecked] = useState(false); const [modalVisible, setModalVisible] = useState(false); // 用于管理模态框可见性的状态 + const router = useRouter(); - const handleWechatLogin = () => { - // 处理微信登录按钮点击的函数 - setModalVisible(true); // 当点击微信登录按钮时显示模态框 - }; const handleCancel = () => { // 处理模态框取消/关闭的函数 setModalVisible(false); // 当取消时隐藏模态框 + router.back(); }; + // 定义关闭模态框的函数 + const closeModal = () => { + setModalVisible(false); + }; + + + const handleLogin = () => { + if (checked) { + setModalVisible(true); + } else { + alert("请先勾选同意!"); + } + }; // const [scanning, setScanning] = useState(false); // const handleScanLogin = () => { @@ -34,31 +48,34 @@ const Login = () => { // }, 3000); // 模拟3秒钟后扫码登录完成 // } - return (
-
+
{"logo"}
-
+
有记
-
+
YoNote
-
- - -
- setChecked(e.target.checked)} className="w-8 h-8"/> -
我已阅读并同意《用户协议》和《隐私协议》
+
+ + +
+ setChecked(e.target.checked) } className="w-5 h-5" /> +
我已阅读并同意《用户协议》和《隐私协议》
- +
+ + {/* 这里放入模态框内部的内容 */} +
此处放入微信二维码
+
+
); } -export default Login; - +export default Login; \ No newline at end of file diff --git a/src/app/wallet/page.tsx b/src/app/wallet/page.tsx new file mode 100644 index 0000000..949cb7a --- /dev/null +++ b/src/app/wallet/page.tsx @@ -0,0 +1,67 @@ +"use client"; + +import Image from "next/image" +import React, {useState} from "react" + +const wallet = () => { + let count = 1234.01; + let frozen = 1234.22; + let cashable = 1234.78; + + + const [selectedButton, setSelectedButton] = useState(1); // 追踪选中的按钮 + + const handleButtonClick = (button:number) => { + if (selectedButton !== button) { + // 如果点击的是当前选中的按钮,则取消选中状态 + setSelectedButton(button); + } + }; + + return ( +
+
+ {"bg"} +
+
+
+ 账户余额 +
+
+ ¥{count} +
+
+
+ 冻结中 ¥{frozen} +
+
+ 可提现 ¥{cashable} +
+
+
+ +
+
+
+
+ +
+
收支明细
+
+
+
+ + +
+
+
+
+
+ ); +} + +export default wallet; \ No newline at end of file