flask web app (wip)
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
/* Add your custom styles here */
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
header {
|
||||
background-color: #4A90E2;
|
||||
color: white;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
nav ul li {
|
||||
display: inline;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
nav ul li a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
footer {
|
||||
background-color: #333;
|
||||
color: white;
|
||||
text-align: center;
|
||||
padding: 1rem;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
/* Add responsive styles for mobile devices */
|
||||
}
|
@@ -1,3 +1,4 @@
|
||||
|
||||
document.getElementById('connectWallet').addEventListener('click', async () => {
|
||||
try {
|
||||
const { solana } is window;
|
||||
@@ -26,3 +27,20 @@ document.getElementById('swapToken').addEventListener('click', () => {
|
||||
.then(response => response.json())
|
||||
.then(data => alert(data.message));
|
||||
});
|
||||
|
||||
|
||||
// Add your custom JavaScript here
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const generateApiKeyButton = document.getElementById('generate-api-key');
|
||||
const apiKeyDisplay = document.getElementById('api-key-display');
|
||||
|
||||
if (generateApiKeyButton) {
|
||||
generateApiKeyButton.addEventListener('click', async () => {
|
||||
const response = await fetch('/generate_api_key', { method: 'POST' });
|
||||
const data = await response.json();
|
||||
apiKeyDisplay.textContent = `Your API Key: ${data.api_key}`;
|
||||
});
|
||||
}
|
||||
|
||||
// Add more JavaScript for fetching and displaying wallet data, transactions, and holdings
|
||||
});
|
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "Crypto Portfolio Tracker",
|
||||
"short_name": "CryptoTracker",
|
||||
"start_url": "/",
|
||||
"display": "standalone",
|
||||
"background_color": "#ffffff",
|
||||
"theme_color": "#4A90E2",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/static/images/logo-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/static/images/logo-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
// Add service worker code for offline functionality and caching
|
||||
self.addEventListener('install', (event) => {
|
||||
// Perform install steps
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', (event) => {
|
||||
// Handle fetch events
|
||||
});
|
Reference in New Issue
Block a user