Skip to content

Commit a69e1dc

Browse files
committed
2 parents 5592abb + 6c2c48c commit a69e1dc

File tree

2 files changed

+171
-0
lines changed

2 files changed

+171
-0
lines changed

Project crypto/index.html

+169
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Crypto Currency Wallet</title>
7+
<link rel="stylesheet" href="crypto.css">
8+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
9+
<link rel="icon" href="wallet.png">
10+
<link rel="preconnect" href="https://fonts.googleapis.com">
11+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
12+
<link href="https://fonts.googleapis.com/css2?family=Nunito&display=swap" rel="stylesheet">
13+
</head>
14+
<body>
15+
<div id="nav" class="sticky">
16+
<div id="navItems"><a href="#" style="text-decoration: none;"><h4 class="navEle">home</h4></a></div>
17+
<div id="navItems"><a href="about.html" style="text-decoration: none;"><h4 class="navEle"> about</h4></a></div>
18+
<div id="navItems"><a href="https://www.coinbase.com/en-gb/learn/crypto-basics/what-is-cryptocurrency" style="text-decoration: none;"><h4 class="navEle"> Learn More</h4></a></div>
19+
<div id="navItems"><a href="" style="text-decoration: none;" id="signout"><h4 class="navEle">logout</h4></a></div>
20+
</div>
21+
<div class="hd" >
22+
<h1>welcome to <em>crypto Wallet</em>
23+
<span class="material-symbols-outlined" id ="bit">
24+
wallet
25+
</span>
26+
27+
</h1>
28+
</div>
29+
<div class="profile" id="names">
30+
<h2 id="">
31+
Hello, user
32+
</h2>
33+
34+
</div>
35+
<div id="name">
36+
<h3 >
37+
action center
38+
</h3>
39+
</div>
40+
41+
<div class="actCenter" >
42+
<div class="action" onclick="showTransferForm()" >
43+
<span class="material-symbols-outlined">
44+
compare_arrows
45+
</span>
46+
</div>
47+
<div class="action" onclick="showBalance()">
48+
<span class="material-symbols-outlined" >
49+
account_balance
50+
</span>
51+
</div>
52+
<div class="action" onclick="showTransactionHistory()">
53+
<span class="material-symbols-outlined">
54+
history
55+
</span>
56+
</div>
57+
<div>transfer</div>
58+
<div>balance</div>
59+
<div>history</div>
60+
</div>
61+
<div>
62+
63+
<div id="transferForm" class="popup" style="display: none;">
64+
<span onclick="closePopup('transferForm')" style=" position: absolute;
65+
top: 7px;
66+
right: 12px;
67+
font-size: 20px;
68+
cursor: pointer;">&times;</span>
69+
<h2>Transfer</h2>
70+
<label for="transferAmount">Enter Amount:</label><br>
71+
<span id="auto"><input type="number" id="transferAmount" placeholder="Amount"></span><br><br>
72+
<div id="transferbtn"><button id="transfer">Transfer</button></div>
73+
</div>
74+
75+
76+
77+
<div id="transactionHistory" style="display: none;" class="popup">
78+
<span onclick="closePopup('transactionHistory')" style=" position: absolute;
79+
top: 7px;
80+
right: 12px;
81+
font-size: 20px;
82+
cursor: pointer;">&times;</span>
83+
<h3>Transaction History</h3>
84+
<span> Transactions &UpArrowDownArrow;&ensp;&ensp;
85+
&ensp;&ensp;date&ensp;&ensp;&ensp;
86+
&ensp;&ensp;&ensp;time</span>
87+
<ul id="transactionList">
88+
</ul>
89+
</div>
90+
<div id="Balance" class="popup">
91+
<span onclick="closePopup('Balance')" style=" position: absolute;
92+
top: 7px;
93+
right: 12px;
94+
font-size: 20px;
95+
cursor:pointer;">&times;</span>
96+
<h2>Balance</h2>
97+
<p class="balanceIcon"><img src="icons8-coins-64.png" alt=""><span id="balance"> 1000</span> BTC</p>
98+
99+
<script src="app.js">
100+
</script>
101+
<script>
102+
var username =localStorage.getItem('username');
103+
//document.getElementById('names').textContent=username;
104+
document.getElementById('names').innerHTML = `<h2 style="grid-area: 1/1/span 2/ 1;" id="hello ">
105+
Hello, ${username}
106+
</h2>
107+
<span class="material-symbols-outlined" id="acc">
108+
account_circle
109+
</span>
110+
<span id="caption">
111+
${username}
112+
</span> `
113+
</script>
114+
115+
</body>
116+
<script type="module">
117+
// Import the functions you need from the SDKs you need
118+
import { initializeApp } from "https://www.gstatic.com/firebasejs/10.7.1/firebase-app.js";
119+
import { getDatabase } from "https://www.gstatic.com/firebasejs/10.7.1/firebase-database.js";
120+
import { getAuth, onAuthStateChanged, signOut } from "https://www.gstatic.com/firebasejs/10.7.1/firebase-auth.js";
121+
122+
// TODO: Add SDKs for Firebase products that you want to use
123+
// https://firebase.google.com/docs/web/setup#available-libraries
124+
125+
// Your web app's Firebase configuration
126+
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
127+
const firebaseConfig = {
128+
apiKey: "AIzaSyCDhDLSwdwXKwzVrQjJ6KbHJXm0SprybZk",
129+
authDomain: "crypto-wallet-ad568.firebaseapp.com",
130+
projectId: "crypto-wallet-ad568",
131+
storageBucket: "crypto-wallet-ad568.appspot.com",
132+
messagingSenderId: "672606049478",
133+
appId: "1:672606049478:web:5f5c2364a13b436a99f3c7",
134+
measurementId: "G-L631TGFELZ"
135+
};
136+
137+
// Initialize Firebase
138+
const app = initializeApp(firebaseConfig);
139+
const database =getDatabase(app);
140+
const auth = getAuth();
141+
const user =auth.currentUser
142+
onAuthStateChanged(auth, (user) => {
143+
if (user) {
144+
// User is signed in, see docs for a list of available properties
145+
// https://firebase.google.com/docs/reference/js/auth.user
146+
const uid = user.uid;
147+
// ...
148+
} else {
149+
// User is signed out
150+
// ...
151+
152+
}
153+
});
154+
signout.addEventListener('click',(e)=>{
155+
const auth = getAuth();
156+
signOut(auth).then(() => {
157+
// Sign-out successful.
158+
alert('logged out!')
159+
window.location.href='login.html'
160+
}).catch((error) => {
161+
// An error happened.
162+
const errorCode = error.code;
163+
const errorMessage = error.message;
164+
alert(errorMessage);
165+
});
166+
})
167+
168+
</script>
169+
</html>

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<h1>Crypto Wallet</h1>
2+
it is a crypto currency wallet

0 commit comments

Comments
 (0)