Skip to content

Commit

Permalink
Merge pull request #13 from hollow-leaf/feat/create_add_NFT_UI_page
Browse files Browse the repository at this point in the history
feat:create add NFT page UI
  • Loading branch information
LinXJ1204 authored Dec 12, 2023
2 parents 8a6a189 + 71a73a7 commit 42aa23b
Show file tree
Hide file tree
Showing 14 changed files with 324 additions and 110 deletions.
Binary file added apps/web3/public/image/decentralized-platform.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/web3/public/image/extension.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 0 additions & 8 deletions apps/web3/src/app/about.tsx

This file was deleted.

69 changes: 69 additions & 0 deletions apps/web3/src/app/about/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import React from 'react';
import { GlobeAltIcon, CurrencyDollarIcon, ShieldCheckIcon, UserGroupIcon } from '@heroicons/react/24/solid';

const About: React.FC = () => {
return (
<div className="py-12 px-4">
<div className="max-w-6xl mx-auto text-center">
<h1 className="text-4xl font-semibold text-blue-600 mb-4">About Psyduck</h1>
<p className="text-lg text-gray-600 mb-8">
Welcome to Psyduck, a pioneering decentralized livestreaming donation platform designed to transform how viewers support creators worldwide. Our innovative platform is not just a tool for transactions but a bridge connecting artists and audiences in a dynamic, interactive community.
</p>

<div className="space-y-8">
{/* Global Access for All */}
<div>
<div className="flex justify-center">
<GlobeAltIcon className="h-10 w-10 text-blue-600 inline-block mb-2" />
<h2 className="text-2xl font-semibold ml-2 mt-2">Global Access for All</h2>
</div>
<p className="text-lg text-gray-600">
We envision a world where geographical boundaries do not limit creativity and support. Our platform ensures that no matter where you are, you can access and support incredible creators across the globe, fostering a diverse cultural exchange and broadening the horizons of the creative landscape.
</p>
</div>

{/* Instant, Direct Support */}
<div>
<div className="flex justify-center">
<CurrencyDollarIcon className="h-10 w-10 text-blue-600 inline-block mb-2" />
<h2 className="text-2xl font-semibold ml-2 mt-2">Instant, Direct Support</h2>
</div>
<p className="text-lg text-gray-600">
In the fast-paced world of livestreaming, we understand the importance of immediacy. Our transaction process ensures that your donations reach creators instantly, empowering them to continue their creative journey without financial hindrance.
</p>
</div>

{/* Security and Transparency */}
<div>
<div className="flex justify-center">
<ShieldCheckIcon className="h-10 w-10 text-blue-600 inline-block mb-2" />
<h2 className="text-2xl font-semibold ml-2 mt-2">Security and Transparency</h2>
</div>
<p className="text-lg text-gray-600">
Leveraging the power of blockchain technology, Psyduck guarantees secure and transparent transactions, ensuring a safe and trustworthy environment. Every donation is recorded on a decentralized ledger, offering unmatched security and transparency.
</p>
</div>

{/* Fostering Community Engagement */}
<div>
<div className="flex justify-center">
<UserGroupIcon className="h-10 w-10 text-blue-600 inline-block mb-2" />
<h2 className="text-2xl font-semibold ml-2 mt-2">Fostering Community Engagement</h2>
</div>
<p className="text-lg text-gray-600">
Engage with creators and other supporters through direct interactions and feedback, and be part of a community that celebrates and uplifts each other. Our platform is more than just a donation site; it is a hub for collaboration, inspiration, and mutual growth.
</p>
</div>
<div>
<h2 className="text-2xl font-semibold ml-2 mt-2">Join Us</h2>
<p className="text-lg text-gray-600 ">
Join us on this exciting journey at Psyduck. Together, we are not just watching the future of digital interaction and creativity unfold; we are actively shaping it. Be a part of this revolutionary movement where every stream becomes a pathway to closer connections and shared success.
</p>
</div>
</div>
</div>
</div>
);
};

export default About;
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,43 @@ import { Typography, Card, CardBody } from "@material-tailwind/react";

const OPTIONS = [
{
title: "100",
description: "Learning Courses",
title: "Decentralized",
description: "Secure and transparent transactions",
},
{
title: "500+",
description: "Expert Instructors",
title: "Direct Support",
description: "Donations go directly to creators",
},
{
title: "24/7",
description: "Support",
title: "Global Access",
description: "Support creators from anywhere, anytime",
},
{
title: "5/5",
description: "Review Stars",
title: "Low Fees",
description: "Enjoy minimal transaction costs",
},
];

export function MobileConvenience() {
export function DecentralizedDonationAdvantages() {
return (
<section className="py-20 px-8">
<div className="grid grid-cols-1 lg:grid-cols-2 gap-12 max-w-6xl mx-auto items-center">
<Image
width={256}
height={256}
src="/image/iphone.png"
src="/image/decentralized-platform.png" // Update with an appropriate image
className="col-span-1 w-1/2 mx-auto lg:w-10/12"
alt="iphone-photo"
alt="decentralized-platform-photo"
/>
<div className="col-span-1 mx-auto max-w-lg px-4 lg:px-0">
<Typography variant="h2" color="blue-gray" className="mb-4">
Mobile Convenience
Empowering Creators
</Typography>
<Typography
variant="lead"
className="mb-5 px-4 text-left text-xl !text-gray-500 lg:px-0 "
className="mb-5 px-4 text-left text-xl !text-gray-500 lg:px-0"
>
Access your learning materials on the go.
Experience the new era of live streaming with decentralized donations.
</Typography>

<div className="col-span-2 grid gap-5 grid-cols-2 ">
Expand All @@ -58,4 +58,4 @@ export function MobileConvenience() {
</section>
);
}
export default MobileConvenience;
export default DecentralizedDonationAdvantages;
132 changes: 132 additions & 0 deletions apps/web3/src/app/donations/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
"use client";
import React, { useState } from "react";
import { Typography } from "@material-tailwind/react";
type NFT = {
mintPrice: number,
maxSupply: number,
metadataURI: string | null,
name: string
};

const nftTemplate: NFT = {
mintPrice: 0,
maxSupply: 0,
metadataURI: 'hahaha',
name: ''
};

export default function Donations() {
const [nft, setNft] = useState<NFT>(nftTemplate);
const [name, setName] = useState<string>('');
const handleSubmitName = async (e: React.FormEvent) => {
e.preventDefault();
let data = { name };
console.log(data);
};

const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
let data = { ...nft };
for (let key in nft) {
if (nft[key as keyof NFT] === undefined || nft[key as keyof NFT] === null || nft[key as keyof NFT] === '' || Number.isNaN(nft[key as keyof NFT])) {
alert("Please fill all the fields");
return;
}
// Additional logic for handling file upload and other functionalities
}
console.log(data);
};

return (
<div className="py-12 px-4">
<div className="max-w-6xl mx-auto">
<div className="container mx-auto mb-20 text-center">
<Typography color="blue-gray" className="mb-2 font-bold uppercase">
Stream & Reward
</Typography>
<Typography variant="h1" color="blue-gray" className="mb-4">
Empower Live Streaming
</Typography>
<Typography
variant="lead"
className="mx-auto w-full px-4 !text-gray-500 lg:w-11/12 lg:px-8 "
>
Unlock the potential of livestreaming with our decentralized donation platform.
Empower creators and participate in a new era of digital interaction, ensuring a secure, transparent
, and inclusive experience.
</Typography>
</div>
<div className="flex flex-wrap mx-4 ">
{/* Left Column: Create Contract */}
<div className="w-[80%] md:w-1/2 px-4 py-4 border border-blue-500 rounded-xl">
<h2 className="text-2xl font-bold mb-4 text-center">Create Contract</h2>
<form onSubmit={handleSubmitName} className="text-left">
{/* Form elements for creating contract */}
<label>Get Started : </label><br />
<input
type="text"
placeholder="Donantion Name"
onChange={(e) => setName(e.target.value)}
className="my-4 text-center"
/>
<br />

<button
type="submit"
className="mt-4 bg-blue-500 text-white border border-blue-700 hover:bg-blue-600 px-4 py-2 rounded"
>
Create Contract
</button>
</form>
</div>

{/* Right Column: Add NFT */}
<div className="w-[80%] md:w-1/2 px-4 py-4 border border-blue-500 rounded-xl">
<h2 className="text-2xl font-bold mb-4 text-center">Add New NFT</h2>
<form onSubmit={handleSubmit} className="text-left">
<label>MintPrice : </label>
<input
type="number"
placeholder="MintPrice"
onChange={(e) => setNft({ ...nft, mintPrice: parseInt(e.target.value) })}
/>
<br />

<label>MaxSupply : </label>
<input
type="number"
placeholder="MaxSupply"
onChange={(e) => setNft({ ...nft, maxSupply: parseInt(e.target.value) })}
className="my-4"
/>
<br />

<input
type="file"
onChange={(e) => setNft({ ...nft, metadataURI: 'haha' })}
className="my-4"
/>
<br />

<label>NFT Name : </label>
<input
type="text"
placeholder="NFT Name"
onChange={(e) => setNft({ ...nft, name: e.target.value })}
className="my-4"
/>
<br />

<button
type="submit"
className="mt-4 bg-blue-500 text-white border border-blue-700 hover:bg-blue-600 px-4 py-2 rounded"
>
Add New NFT
</button>
</form>
</div>
</div>
</div>
</div>
);
}
42 changes: 21 additions & 21 deletions apps/web3/src/app/feature.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,38 @@ import React from "react";
import { Typography } from "@material-tailwind/react";

import {
CursorArrowRaysIcon,
HeartIcon,
LightBulbIcon,
LockClosedIcon,
GlobeAltIcon,
CurrencyDollarIcon,
ShieldCheckIcon,
UserGroupIcon,
} from "@heroicons/react/24/solid";

import FeatureCard from "../components/feature-card";

const FEATURES = [
{
icon: CursorArrowRaysIcon,
title: "Expert Instructors",
icon: GlobeAltIcon,
title: "Global Access",
children:
"Learn from the best. Our instructors are industry experts, academics, and seasoned professionals dedicated to helping you.",
"Support your favorite creators from anywhere in the world. Our platform breaks down geographical barriers to connect you directly.",
},
{
icon: HeartIcon,
title: "Interactive Learning",
icon: CurrencyDollarIcon,
title: "Low Transaction Fees",
children:
"Engage with interactive quizzes, hands-on exercises, and discussion forums to reinforce your understanding and connect.",
"Enjoy the benefits of blockchain technology with minimal transaction fees, ensuring that more of your support goes directly to the creators.",
},
{
icon: LockClosedIcon,
title: "Achievement Unlocked",
icon: ShieldCheckIcon,
title: "Secure Transactions",
children:
"Earn certificates and badges as you complete courses, showcasing your newfound skills to the world.",
"Experience the peace of mind that comes with blockchain's secure and transparent transaction process for each donation.",
},
{
icon: LightBulbIcon,
title: "Personalized Progress Tracking",
icon: UserGroupIcon,
title: "Empower Creators",
children:
"Stay on top of your learning journey with progress tracking and personalized recommendations to keep you motivated.",
"Directly impact the livelihood of content creators. Your support helps them continue to produce the content you love.",
},
];

Expand All @@ -44,18 +44,18 @@ export function Features() {
<section className="py-28 px-4">
<div className="container mx-auto mb-20 text-center">
<Typography color="blue-gray" className="mb-2 font-bold uppercase">
Your Learning App
Stream & Reward
</Typography>
<Typography variant="h1" color="blue-gray" className="mb-4">
Diverse Learning Resources
Empower Live Streaming
</Typography>
<Typography
variant="lead"
className="mx-auto w-full px-4 !text-gray-500 lg:w-11/12 lg:px-8 "
>
Access your learning materials on the go. Whether you&apos;re
commuting, waiting for a friend, or just have a few minutes to spare,
our app fits seamlessly into your busy life.
Unlock the potential of livestreaming with our decentralized donation platform.
Empower creators and participate in a new era of digital interaction, ensuring a secure, transparent
, and inclusive experience.
</Typography>
</div>
<div className="container mx-auto grid max-w-6xl grid-cols-1 gap-4 gap-y-12 md:grid-cols-2">
Expand Down
Loading

0 comments on commit 42aa23b

Please sign in to comment.