-
Notifications
You must be signed in to change notification settings - Fork 0
/
m9.html
155 lines (145 loc) · 6.91 KB
/
m9.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>NFT Museum</title>
<link rel="stylesheet" href="anftsyle.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
</head>
<body>
<div class="one">
<header id="main-header">
<h1>NFT Museum</h1>
</header>
<nav id="navbar">
<ul>
<div class="rest">
<li><a href="ahome.html">Home</a></li>
<li><a href="aaboutus.html">About Us</a></li>
<li><a href="aexplore.html">Explore</a></li>
<li><a href="acontactus.html">Contact Us</a></li>
</div>
<div class="login">
<li><a href="upload.html">Upload NFT</a></li>
</div>
<div class="icon">
<i class="fa-regular fa-user" onclick="toggleMenu()"></i>
</div>
</ul>
<div class="sub-menu-wrap" id="subMenu">
<div class="sub-menu">
<a href="settings.html" class="sub-menu-link">
<img src="images/setting.jpg">
<h4>Settings</h4>
</a>
<a href="index.html" class="sub-menu-link" onclick="mine()">
<img src="images/logout.jpg">
<h4>Logout</h4>
</a>
</div>
</div>
</nav>
</div>
<section id="showcase">
<div class="container">
<div class="description-container">
<div class="img">
<img src="images/marvel9.jpg" alt="pic" width="400px" height="400px">
</div>
<div class="text">
<h2>LOKI LAUFEYSON</h2>
<div class="description-box">
<h3>Description</h3>
<hr>
<p>About: Loki Laufeyson, also known by adoption as Loki Odinson and by his title as the God of Mischief, is depicted as Thor's adoptive brother and nemesis, a master of Asgardian magic and sorcery, and a supervillain who regularly returns from apparent death.</p>
<p>Artist: marvelouslad</p>
</div>
<h4>Price: 0.25 ETH</h4>
<div class="button-1">
<button id="payButton">Buy Now</button>
</div>
</div>
</div>
</div>
</section>
<footer id="main-footer">
<div class="container">
<div class="container-2">
<div class="box-3">
<h2>NFT Museum</h2>
<p>India's largest digital marketplace for crypto collectibles and non-fungible tokens (NFTs). Buy, sell, and discover exclusive digital items.</p>
</div>
<div class="box-4">
<h3>Marketplace</h3>
<p><a href="aexplore.html">Anime</a> <br> <a href="aexplore.html">Marvel</a> <br> <a href="aexplore.html">Gaming</a></p>
</div>
<div class="box-5">
<h3>My Account</h3>
<p><a href="profile.html">Profile</a> <br> <a href="settings.html">Settings</a></p>
</div>
<div class="box-6">
<h3>Company</h3>
<p><a href="aaboutus.html">About</a> <br> <a href="#">Careers</a> <br> <a href="#">Partners</a></p>
</div>
<div class="box-7">
<h3>Learn</h3>
<p><a href="https://www.forbes.com/advisor/in/investing/cryptocurrency/what-is-an-nft-how-do-nfts-work/" target="_blank">What is an NFT?</a> <br> <a href="https://www.forbes.com/advisor/in/investing/cryptocurrency/how-to-buy-nfts/" target="_blank">How to buy an NFT?</a> <br> <a href="https://www.forbes.com/advisor/in/investing/cryptocurrency/what-is-cryptocurrency-and-how-does-it-work/" target="_blank">What is cryptocurrency?</a> <br> <a href="https://www.coinbase.com/learn/crypto-basics/what-is-a-crypto-wallet" target="_blank">What is a crypto wallet?</a> <br> <a href="https://resources.cyberlabs.club/blockchain" target="_blank">What is blockchain?</a> <br> <a href="https://www.forbes.com/advisor/investing/cryptocurrency/what-is-web-3-0/" target="_blank">What is web3.0?</a> <br> <a href="https://pontem.network/posts/9-tips-to-stay-safe-in-web3" target="_blank">How to stay protected on web3.0?</a></p>
</div>
</div>
<hr>
<p>Copyright © 2024, NFT Museum</p>
</div>
</footer>
<script>
let subMenu = document.getElementById("subMenu");
function toggleMenu(){
subMenu.classList.toggle("open-menu");
}
function mine(){
let text = 'You have successfully logged out'
alert(text)
}
</script>
<script>
document.addEventListener('DOMContentLoaded', async function () {
// Check if MetaMask is installed
if (typeof window.ethereum !== 'undefined') {
// Create a button element
const payButton = document.getElementById('payButton');
// Attach a click event listener to the button
payButton.addEventListener('click', async () => {
try {
// Request account access if needed
const accounts = await window.ethereum.request({ method: 'eth_requestAccounts' });
if (accounts.length > 0) {
// Get the selected address
const fromAddress = accounts[0];
const recipientAddress = '0xB1CF0995EF5a8346DE208C17fD55991f54140925'; // Replace with the recipient's MetaMask wallet address
// Send a payment transaction
const transactionHash = await window.ethereum.request({
method: 'eth_sendTransaction',
params: [
{
from: fromAddress,
to: recipientAddress,
value: '380000000000000', // Amount in Wei (replace with the desired amount)
},
],
});
// Log the transaction hash
console.log('Transaction Hash:', transactionHash);
} else {
console.error('No accounts found.');
}
} catch (error) {
console.error('Error:', error);
}
});
} else {
console.error('MetaMask not installed');
}
});
</script>
</body>
</html>