Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
414 commits
Select commit Hold shift + click to select a range
78bc757
Delete _config.yml
sslinkyy Jun 18, 2024
0750378
Delete about.md
sslinkyy Jun 18, 2024
c5e373b
Delete contact.md
sslinkyy Jun 18, 2024
82e8615
Delete gemfile
sslinkyy Jun 18, 2024
a142686
Delete gemfile.lock
sslinkyy Jun 18, 2024
080223b
Delete index.md
sslinkyy Jun 18, 2024
9b7a594
Delete login.md
sslinkyy Jun 18, 2024
2d65b2c
Delete profile.md
sslinkyy Jun 18, 2024
a041e02
Delete store.md
sslinkyy Jun 18, 2024
b3f6b66
Delete assets directory
sslinkyy Jun 18, 2024
d3eb890
Delete _posts directory
sslinkyy Jun 18, 2024
1c568f9
Delete _layouts directory
sslinkyy Jun 18, 2024
32a62ca
Delete _includes directory
sslinkyy Jun 18, 2024
61acb96
Create config.js
sslinkyy Jun 18, 2024
1fa07a6
Create scripts.js
sslinkyy Jun 18, 2024
a90385c
Create 1
sslinkyy Jun 18, 2024
75ec7ca
Add files via upload
sslinkyy Jun 18, 2024
068fff4
Delete .github/workflows/jekyll-gh-pages.yml
sslinkyy Jun 18, 2024
f9c5420
Delete .github/workflows/github-pages.yml
sslinkyy Jun 18, 2024
03bb5d2
Update all_users.html
sslinkyy Jun 18, 2024
3111ba2
Update cars.html
sslinkyy Jun 18, 2024
4ef0bb7
Update drivers.html
sslinkyy Jun 18, 2024
94015f4
Update index.html
sslinkyy Jun 18, 2024
24dfce3
Update login.html
sslinkyy Jun 18, 2024
3bee51b
Update mission.html
sslinkyy Jun 18, 2024
92ff060
Update profile.html
sslinkyy Jun 18, 2024
2b4daa5
Update public_profile.html
sslinkyy Jun 18, 2024
3c7ac48
Update store.html
sslinkyy Jun 18, 2024
8f1e63f
Update styles.css
sslinkyy Jun 18, 2024
f05b6c0
Update store.html
sslinkyy Jun 18, 2024
cd368e0
Update styles.css
sslinkyy Jun 18, 2024
9fbd0a8
Update login.html
sslinkyy Jun 18, 2024
8ae2b45
Update profile.html
sslinkyy Jun 18, 2024
c25b4c0
Update login.html
sslinkyy Jun 18, 2024
6140114
Update profile.html
sslinkyy Jun 18, 2024
d810bce
Update config.js
sslinkyy Jun 18, 2024
16aaf37
Update index.html
sslinkyy Jun 18, 2024
99b7155
Update profile.html
sslinkyy Jun 18, 2024
dc0be9c
Update styles.css
sslinkyy Jun 18, 2024
f26192b
Update profile.html
sslinkyy Jun 18, 2024
249c18b
Create profile.js
sslinkyy Jun 18, 2024
8760894
Update styles.css
sslinkyy Jun 18, 2024
86ea2e8
Update styles.css
sslinkyy Jun 18, 2024
decc572
Update profile.html
sslinkyy Jun 18, 2024
7b06eb6
Update store.html
sslinkyy Jun 18, 2024
e11e350
Update index.html
sslinkyy Jun 18, 2024
a59501e
Update styles.css
sslinkyy Jun 18, 2024
ea8ac59
Update profile.html
sslinkyy Jun 18, 2024
6e86b1a
Update styles.css
sslinkyy Jun 18, 2024
b944e7c
Update profile.html
sslinkyy Jun 18, 2024
a8685df
Update styles.css
sslinkyy Jun 18, 2024
a7a723e
Update profile.html
sslinkyy Jun 18, 2024
287bedd
Update styles.css
sslinkyy Jun 18, 2024
64587b3
Update profile.html
sslinkyy Jun 18, 2024
a35420e
Update profile.html
sslinkyy Jun 18, 2024
0546fd3
Update profile.html
sslinkyy Jun 18, 2024
6043985
Update and rename all_users.html to all_profiles.html
sslinkyy Jun 18, 2024
fe4893f
Update index.html
sslinkyy Jun 18, 2024
6645ff6
Update profile.html
sslinkyy Jun 18, 2024
72a72f7
Update profile.html
sslinkyy Jun 18, 2024
f279d46
Update all_profiles.html
sslinkyy Jun 18, 2024
229a0e5
Update profile.html
sslinkyy Jun 18, 2024
4d40dfb
Update styles.css
sslinkyy Jun 18, 2024
dacab88
Update all_profiles.html
sslinkyy Jun 18, 2024
b2eb76a
Create all_profiles.js
sslinkyy Jun 18, 2024
916c277
Update styles.css
sslinkyy Jun 18, 2024
a942d63
Update profile.html
sslinkyy Jun 18, 2024
d8590ab
Update profile.html
sslinkyy Jun 18, 2024
4bb2e33
Update profile.html
sslinkyy Jun 18, 2024
1c7ee63
Update profile.html
sslinkyy Jun 18, 2024
9eee603
Update profile.html
sslinkyy Jun 18, 2024
d902585
Update profile.html
sslinkyy Jun 18, 2024
4408a5e
Update profile.html
sslinkyy Jun 18, 2024
eda80d7
Update profile.html
sslinkyy Jun 18, 2024
999861d
Update profile.html
sslinkyy Jun 18, 2024
74f21b7
Update profile.html
sslinkyy Jun 18, 2024
fa10978
Update profile.html
sslinkyy Jun 18, 2024
2f2ad27
Update profile.html
sslinkyy Jun 19, 2024
53f08e3
Update all_profiles.js
sslinkyy Jun 19, 2024
4b26916
Create prof_editor.html
sslinkyy Jun 19, 2024
75e2d50
Update profile.html
sslinkyy Jun 19, 2024
a7e46b4
Update all_profiles.html
sslinkyy Jun 19, 2024
512e88e
Update profile.js
sslinkyy Jun 19, 2024
0be558b
Update and rename profile.js to prof_editor.js
sslinkyy Jun 19, 2024
b6d068d
Update prof_editor.html
sslinkyy Jun 19, 2024
c59ce77
Update profile.html
sslinkyy Jun 19, 2024
7e4f5c4
Update all_profiles.js
sslinkyy Jun 19, 2024
ebd64e3
Update profile.html
sslinkyy Jun 19, 2024
7e3764f
Update prof_editor.html
sslinkyy Jun 19, 2024
59e4ff9
Update profile.html
sslinkyy Jun 19, 2024
9a2373e
Create profile.js
sslinkyy Jun 19, 2024
ac87e38
Update profile.html
sslinkyy Jun 19, 2024
9b20807
Update all_profiles.html
sslinkyy Jun 19, 2024
f61f390
Update profile.html
sslinkyy Jun 19, 2024
268f9a3
Update all_profiles.html
sslinkyy Jun 19, 2024
3f86acc
Update profile.html
sslinkyy Jun 19, 2024
a925f90
Update prof_editor.html
sslinkyy Jun 19, 2024
3afd2d4
Update all_profiles.html
sslinkyy Jun 19, 2024
7afa278
Update profile.html
sslinkyy Jun 19, 2024
f49bf59
Update prof_editor.js
sslinkyy Jun 19, 2024
8b6ede9
Update all_profiles.html
sslinkyy Jun 19, 2024
c018a04
Update all_profiles.html
sslinkyy Jun 19, 2024
25d2c4d
Update prof_editor.html
sslinkyy Jun 19, 2024
7e133c0
Update prof_editor.html
sslinkyy Jun 19, 2024
d794708
Update prof_editor.html
sslinkyy Jun 19, 2024
2c89d9f
Update all_profiles.html
sslinkyy Jun 19, 2024
ab9573c
Delete .github/workflows/fetch_images.yml
sslinkyy Jun 19, 2024
d29adb6
Update all_profiles.html
sslinkyy Jun 19, 2024
a34eca7
Add files via upload
sslinkyy Jun 19, 2024
1739a8c
Add files via upload
sslinkyy Jun 19, 2024
70a2f46
Add files via upload
sslinkyy Jun 19, 2024
f1c00d6
Update all_profiles.js
sslinkyy Jun 19, 2024
3246195
Update prof_editor.html
sslinkyy Jun 19, 2024
b645581
Create Readme
sslinkyy Jun 19, 2024
05c624b
Update prof_editor.html
sslinkyy Jun 19, 2024
66f17a5
Update profile.html
sslinkyy Jun 19, 2024
ff321fd
Update all_profiles.html
sslinkyy Jun 19, 2024
7245bc2
Update styles.css
sslinkyy Jun 19, 2024
46cf67f
Update all_profiles.html
sslinkyy Jun 19, 2024
2500821
Update prof_editor.html
sslinkyy Jun 19, 2024
7ee7640
Update profile.html
sslinkyy Jun 19, 2024
e5b1847
Update store.html
sslinkyy Jun 19, 2024
61947b4
Update store.html
sslinkyy Jun 19, 2024
577f746
Update styles.css
sslinkyy Jun 19, 2024
54f37b1
Update store.html
sslinkyy Jun 19, 2024
d94df5b
Update styles.css
sslinkyy Jun 19, 2024
081a744
Update store.html
sslinkyy Jun 19, 2024
6a66120
Update styles.css
sslinkyy Jun 19, 2024
69b1167
Update styles.css
sslinkyy Jun 19, 2024
b3e37cf
Update styles.css
sslinkyy Jun 19, 2024
2152d3e
Update styles.css
sslinkyy Jun 19, 2024
e895484
Update styles.css
sslinkyy Jun 19, 2024
44d3345
Update store.html
sslinkyy Jun 19, 2024
a476227
Update store.html
sslinkyy Jun 19, 2024
225a7aa
Update styles.css
sslinkyy Jun 19, 2024
6b39885
Update profile.html
sslinkyy Jun 19, 2024
b21a4ba
Update styles.css
sslinkyy Jun 19, 2024
8b7a9f4
Update prof_editor.html
sslinkyy Jun 19, 2024
7d35c9f
Update styles.css
sslinkyy Jun 19, 2024
ad772a9
Update styles.css
sslinkyy Jun 19, 2024
b590ad7
Update prof_editor.html
sslinkyy Jun 19, 2024
2b4bd98
Update prof_editor.html
sslinkyy Jun 19, 2024
fc6aecf
Update all_profiles.html
sslinkyy Jun 19, 2024
229cafb
Update prof_editor.html
sslinkyy Jun 19, 2024
fb20016
Update profile.html
sslinkyy Jun 19, 2024
a4f1ad3
Update profile.html
sslinkyy Jun 19, 2024
858941a
Update prof_editor.html
sslinkyy Jun 19, 2024
251c381
Update styles.css
sslinkyy Jun 19, 2024
c11a1c9
Update prof_editor.html
sslinkyy Jun 19, 2024
4a84ca7
Update prof_editor.html
sslinkyy Jun 19, 2024
cc11f47
Update profile.html
sslinkyy Jun 19, 2024
5aeedee
Update profile.html
sslinkyy Jun 19, 2024
fd5ed14
Update profile.html
sslinkyy Jun 19, 2024
4985dd6
Update profile.html
sslinkyy Jun 19, 2024
9111d85
Update styles.css
sslinkyy Jun 19, 2024
767c5d8
Update profile.html
sslinkyy Jun 19, 2024
0bbf9dd
Update styles.css
sslinkyy Jun 19, 2024
ae6a7e2
Update profile.html
sslinkyy Jun 19, 2024
d4e842f
Update styles.css
sslinkyy Jun 19, 2024
d2326a0
Update profile.html
sslinkyy Jun 19, 2024
622dfcb
Update profile.html
sslinkyy Jun 19, 2024
7d13a57
Update prof_editor.html
sslinkyy Jun 19, 2024
3c13652
Update profile.html
sslinkyy Jun 19, 2024
72b4128
Update store.html
sslinkyy Jun 20, 2024
30855a1
Update store.html
sslinkyy Jun 20, 2024
04038a0
Create admin.html
sslinkyy Jun 20, 2024
fb08275
Update store.html
sslinkyy Jun 20, 2024
3603646
Update index.html
sslinkyy Jun 20, 2024
3f5840c
Update profile.html
sslinkyy Jun 20, 2024
1674f78
Update prof_editor.html
sslinkyy Jun 20, 2024
e03deb0
Update styles.css
sslinkyy Jun 20, 2024
3de45d8
Update admin.html
sslinkyy Jun 20, 2024
66856c7
Update store.html
sslinkyy Jun 20, 2024
827a01b
Update admin.html
sslinkyy Jun 20, 2024
6b8343a
Update store.html
sslinkyy Jun 20, 2024
95593d9
Update store.html
sslinkyy Jun 20, 2024
5ec7f4e
Update store.html
sslinkyy Jun 20, 2024
9a28912
Update store.html
sslinkyy Jun 20, 2024
792aa66
Update store.html
sslinkyy Jun 20, 2024
dd8967e
Update store.html
sslinkyy Jun 20, 2024
89f351b
Update store.html
sslinkyy Jun 20, 2024
9540bae
Update config.js
sslinkyy Jun 20, 2024
0db118e
Update admin.html
sslinkyy Jun 20, 2024
132aa8e
Update config.js
sslinkyy Jun 20, 2024
0477ea4
Update admin.html
sslinkyy Jun 20, 2024
2632024
Update config.js
sslinkyy Jun 20, 2024
f8c5f9e
Update config.js
sslinkyy Jun 20, 2024
f422f6a
Update store.html
sslinkyy Jun 20, 2024
05f3c11
Update admin.html
sslinkyy Jun 20, 2024
e21ab35
Update store.html
sslinkyy Jun 20, 2024
c92f955
Update store.html
sslinkyy Jun 20, 2024
0e6fdc8
Update store.html
sslinkyy Jun 20, 2024
5ec1676
Update store.html
sslinkyy Jun 20, 2024
fb7062a
Update store.html
sslinkyy Jun 20, 2024
db1730c
Update admin.html
sslinkyy Jun 20, 2024
e48c055
Update admin.html
sslinkyy Jun 20, 2024
2eef0dd
Update admin.html
sslinkyy Jun 20, 2024
29a605d
Update admin.html
sslinkyy Jun 20, 2024
8caac5f
Update admin.html
sslinkyy Jun 20, 2024
3f40f85
Update admin.html
sslinkyy Jun 20, 2024
2b1e0d1
Update admin.html
sslinkyy Jun 20, 2024
23d2332
Update admin.html
sslinkyy Jun 20, 2024
ba3fcc9
Update store.html
sslinkyy Jun 20, 2024
6650b2c
Update admin.html
sslinkyy Jun 20, 2024
c98e6ba
Update admin.html
sslinkyy Jun 20, 2024
8b396e8
Update store.html
sslinkyy Jun 20, 2024
d750aa7
Update admin.html
sslinkyy Jun 20, 2024
93cb92b
Update store.html
sslinkyy Jun 20, 2024
58afdbc
Update admin.html
sslinkyy Jun 20, 2024
d1ec95d
Update admin.html
sslinkyy Jun 20, 2024
adddc59
Update admin.html
sslinkyy Jun 20, 2024
64ea1df
Update config.js
sslinkyy Jun 20, 2024
7798942
Update config.js
sslinkyy Jun 20, 2024
5161e5c
Update admin.html
sslinkyy Jun 20, 2024
7b65529
Update admin.html
sslinkyy Jun 20, 2024
13aa489
Update admin.html
sslinkyy Jun 20, 2024
21d8613
Update admin.html
sslinkyy Jun 20, 2024
a4b584d
Update admin.html
sslinkyy Jun 20, 2024
1162320
Update store.html
sslinkyy Jun 20, 2024
282a3d5
Update store.html
sslinkyy Jun 20, 2024
19da1b4
Update admin.html
sslinkyy Jun 20, 2024
e965d09
Update store.html
sslinkyy Jun 20, 2024
60c37fc
Create SecretPage.html
sslinkyy Jun 20, 2024
dd9bfe6
Update admin.html
sslinkyy Jun 20, 2024
02d1dfd
Update store.html
sslinkyy Jun 20, 2024
cf68d97
Update store.html
sslinkyy Jun 25, 2024
793d35f
Update login.html
sslinkyy Jun 25, 2024
4d7c877
Merge pull request #17 from sslinkyy/sslinkyy-patch-11
sslinkyy Jun 25, 2024
359a527
Update store.html
sslinkyy Jun 25, 2024
b0dd411
Update store.html
sslinkyy Jun 25, 2024
8208bb8
Update store.html
sslinkyy Jun 25, 2024
eccd0fa
Update store.html
sslinkyy Jun 25, 2024
a5be5b3
Update store.html
sslinkyy Jun 25, 2024
3ae24aa
Update admin.html
sslinkyy Jun 25, 2024
454358c
Update admin.html
sslinkyy Jun 25, 2024
26fa54a
Update admin.html
sslinkyy Jun 25, 2024
46d4168
Update store.html
sslinkyy Jun 25, 2024
8def5d2
Update store.html
sslinkyy Jun 25, 2024
a19cb81
Update store.html
sslinkyy Jun 25, 2024
0258cd1
Update admin.html
sslinkyy Jun 25, 2024
af2fa08
Update store.html
sslinkyy Jun 25, 2024
687321a
Update store.html
sslinkyy Jun 25, 2024
fc47b96
Update store.html
sslinkyy Jun 25, 2024
43d1c23
Update store.html
sslinkyy Jun 25, 2024
99162e5
Update store.html
sslinkyy Jun 25, 2024
ec8b64f
Update store.html
sslinkyy Jun 25, 2024
ce2f83b
Update store.html
sslinkyy Jun 25, 2024
606a2e2
Update store.html
sslinkyy Jun 26, 2024
fe09453
Update admin.html
sslinkyy Jun 26, 2024
35fb9a7
Update store.html
sslinkyy Jun 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Readme
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Firebase
Netlify
Github Pages
google cloud services
squarespace domains
Disqus API
snipcart API
youtube API
52 changes: 52 additions & 0 deletions SecretPage.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>iMOB Racing Secrets</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<nav class="navbar">
<div class="navbar-container">
<a href="index.html" class="logo">iMOB Racing</a>
<ul class="main-nav" id="js-menu">
<li><a href="index.html" class="nav-links">Home</a></li>
<li><a href="drivers.html" class="nav-links">Drivers</a></li>
<li><a href="cars.html" class="nav-links">Cars</a></li>
<li><a href="mission.html" class="nav-links">Our Mission</a></li>
<li><a href="store.html" class="nav-links">Store</a></li>
<li><a href="index.html#contact" class="nav-links">Contact</a></li>
<li><a href="all_profiles.html" class="nav-links">Profiles</a></li>
<li><a href="prof_editor.html" class="nav-links">Edit Profile</a></li>
<li><a href="javascript:void(0)" class="nav-links" id="logout">Logout</a></li>
</ul>
</div>
</nav>
<section id="secrets-section">
<h2>Top Secret iMOB Racing Secrets</h2>
<ul>
<li><strong>Secret #1:</strong> Our lead driver once drove an entire race with a flat tire... and still won!</li>
<li><strong>Secret #2:</strong> The team's chief mechanic is convinced that talking to the car engines improves their performance. He's been caught singing lullabies to them more than once.</li>
<li><strong>Secret #3:</strong> Our race cars have a secret compartment filled with snacks for those long, grueling races. Who says you can't race and munch at the same time?</li>
<li><strong>Secret #4:</strong> The iMOB Racing team holds an annual go-kart race where the mechanics, drivers, and even the management compete in costume. Last year's winner? A mechanic dressed as a giant banana.</li>
<li><strong>Secret #5:</strong> We once had a driver who believed that wearing mismatched socks brought good luck. He never lost a race while wearing them!</li>
<li><strong>Secret #6:</strong> Our team mascot, a stuffed squirrel named "Speedy," has a tiny helmet and racing suit. He's been to every race and is considered our good luck charm.</li>
<li><strong>Secret #7:</strong> During testing, one of our drivers accidentally discovered that humming the theme song to "Mission Impossible" improved his lap times by 5%.</li>
<li><strong>Secret #8:</strong> Our fastest car, nicknamed "The Rocket," actually has a small rocket decal hidden under the hood. It's our little secret boost of confidence.</li>
<li><strong>Secret #9:</strong> The iMOB Racing team once built a race car entirely out of LEGO bricks for a charity event. It wasn't the fastest, but it was definitely the most fun.</li>
<li><strong>Secret #10:</strong> Before every race, our drivers perform a secret handshake ritual that involves high-fives, fist bumps, and a choreographed dance move. It's all about team spirit!</li>
</ul>
</section>
<script>
function logout() {
firebase.auth().signOut().then(() => {
window.location.href = 'index.html';
}).catch((error) => {
console.error('Error signing out: ', error);
});
}

document.getElementById('logout').addEventListener('click', logout);
</script>
</body>
</html>
121 changes: 121 additions & 0 deletions admin.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Admin Panel - IMOB Racing</title>
<link rel="stylesheet" href="styles.css">
<script src="https://www.gstatic.com/firebasejs/8.2.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.2.1/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.2.1/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.2.1/firebase-storage.js"></script>
<script src="config.js"></script>
</head>
<body>
<h1>Admin Panel</h1>

<form id="addProductForm">
<h2>Add New Product</h2>
<input type="text" id="productName" placeholder="Product Name" required>
<input type="text" id="productDescription" placeholder="Product Description" required>
<input type="number" id="productPrice" placeholder="Product Price" required>
<input type="text" id="productImageUrl" placeholder="Product Image URL (optional)">
<input type="file" id="productImageFile" accept="image/*">
<button type="submit">Add Product</button>
</form>

<div id="admin-grid" class="admin-grid">
<!-- Products will be dynamically added here -->
</div>

<script>
document.addEventListener('DOMContentLoaded', function () {
firebase.initializeApp(CONFIG.FIREBASE_CONFIG);
const db = firebase.firestore();
const storage = firebase.storage();

async function loadProducts() {
try {
const productsSnapshot = await db.collection('store-items').get();
const adminGrid = document.getElementById('admin-grid');
adminGrid.innerHTML = '';

productsSnapshot.forEach((doc) => {
const product = doc.data();
adminGrid.innerHTML += `
<div class="admin-item">
<h3>${product.name}</h3>
<p>${product.description}</p>
<p>Price: ${product.price}</p>
<img src="${product.imageUrl}" alt="${product.name}" style="width: 100px; height: auto;">
<button class="delete-button" data-product-id="${doc.id}">Delete</button>
</div>
`;
});

document.querySelectorAll('.delete-button').forEach(button => {
button.addEventListener('click', function () {
const productId = this.dataset.productId;
deleteProduct(productId);
});
});
} catch (error) {
console.error('Error loading products:', error);
}
}

async function deleteProduct(productId) {
try {
await db.collection('store-items').doc(productId).delete();
console.log('Product deleted successfully');
alert('Product deleted successfully');
loadProducts(); // Refresh the product list
} catch (error) {
console.error('Error deleting product:', error);
alert('Error deleting product: ' + error.message);
}
}

document.getElementById('addProductForm').addEventListener('submit', async function (e) {
e.preventDefault();
const name = document.getElementById('productName').value;
const description = document.getElementById('productDescription').value;
const price = document.getElementById('productPrice').value;
const imageUrlInput = document.getElementById('productImageUrl').value;
const imageFile = document.getElementById('productImageFile').files[0];

let imageUrl = imageUrlInput;

if (imageFile) {
const storageRef = storage.ref();
const fileRef = storageRef.child(`store-images/${imageFile.name}`);
await fileRef.put(imageFile);
imageUrl = await fileRef.getDownloadURL();
}

try {
await db.collection('store-items').add({
name,
description,
price: parseFloat(price),
imageUrl
});
alert('Product added successfully');
loadProducts();
} catch (error) {
console.error('Error adding product:', error);
alert('Error adding product: ' + error.message);
}
});

firebase.auth().onAuthStateChanged((user) => {
if (user) {
loadProducts();
} else {
// User is signed out
window.location.href = 'login.html';
}
});
});
</script>
</body>
</html>
62 changes: 62 additions & 0 deletions all_profiles.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>All Profiles</title>
<link rel="stylesheet" href="styles.css">
<script src="https://www.gstatic.com/firebasejs/8.2.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.2.1/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.2.1/firebase-firestore.js"></script>
<script src="config.js"></script>
</head>
<body>
<nav class="navbar">
<div class="navbar-container">
<a href="index.html" class="logo">iMOB Racing</a>
<ul class="main-nav" id="js-menu">
<li><a href="index.html" class="nav-links">Home</a></li>
<li><a href="drivers.html" class="nav-links">Drivers</a></li>
<li><a href="cars.html" class="nav-links">Cars</a></li>
<li><a href="mission.html" class="nav-links">Our Mission</a></li>
<li><a href="index.html#contact" class="nav-links">Contact</a></li>
<li><a href="all_profiles.html" class="nav-links">All Profiles</a></li>
<li><a href="profile.html" class="nav-links">Profile</a></li>
<li><a href="prof_editor.html" class="nav-links">Edit Profile</a></li>
</ul>
</div>
</nav>
<h1>All Profiles</h1>
<div id="profiles-container"></div>
<script>
if (!firebase.apps.length) {
firebase.initializeApp(CONFIG.FIREBASE_CONFIG);
}

document.addEventListener('DOMContentLoaded', () => {
loadProfiles();
});

async function loadProfiles() {
try {
const db = firebase.firestore();
const profilesSnapshot = await db.collection('profiles').get();
const profilesContainer = document.getElementById('profiles-container');
profilesSnapshot.forEach(doc => {
const profile = doc.data();
const profileCard = document.createElement('div');
profileCard.classList.add('profile-card');
profileCard.innerHTML = `
<h3>${profile.username}</h3>
<img src="${profile.profileImageUrl}" alt="Profile Image" class="thumbnail">
<p>${profile.email}</p>
<a href="profile.html?userId=${doc.id}" class="view-profile-button">View Profile</a>
`;
profilesContainer.appendChild(profileCard);
});
} catch (error) {
console.error('Error loading profiles: ', error);
}
}
</script>
</body>
</html>
39 changes: 39 additions & 0 deletions all_profiles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
document.addEventListener('DOMContentLoaded', function() {
loadAllProfiles();
});

function loadAllProfiles() {
const db = firebase.firestore();
const profilesContainer = document.getElementById('profiles-container');
profilesContainer.innerHTML = ''; // Clear any existing content

db.collection('profiles').get().then(querySnapshot => {
querySnapshot.forEach(doc => {
const profile = doc.data();
const profileDiv = document.createElement('div');
profileDiv.className = 'profile-card';

const profileImage = document.createElement('img');
profileImage.src = profile.profileImageUrl || 'default-profile.webp';
profileImage.alt = profile.username || 'No username';
profileImage.style.maxWidth = '100px';
profileImage.style.maxHeight = '100px';

const profileUsername = document.createElement('h2');
profileUsername.textContent = profile.username || 'No username';

const profileEmail = document.createElement('p');
profileEmail.textContent = profile.email || 'No email';

profileDiv.appendChild(profileImage);
profileDiv.appendChild(profileUsername);
profileDiv.appendChild(profileEmail);

profileDiv.addEventListener('click', function() {
window.location.href = `profile.html?uid=${doc.id}`;
});

profilesContainer.appendChild(profileDiv);
});
}).catch(error => console.error('Error loading profiles: ', error));
}
14 changes: 12 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
// config.js
const CONFIG = {
YOUTUBE_API_KEY: 'AIzaSyDaCJQhs3fz-k7hg-j0NQWj0S1r7ZEvThs',
YOUTUBE_API_KEY: 'AIzaSyABU-pv8sgjMtMx9Dv9ySsi2XGtUEGZhg',
YOUTUBE_CHANNEL_ID: 'UCbvXNK-13KBK_yZuZ5YeLZw',
FACEBOOK_PAGE_URL: 'https://www.facebook.com/imobracing',
GOOGLE_FORM_URL: 'https://docs.google.com/forms/d/e/1FAIpQLSfZqtnqgL2im8K7Ih6hCjqLrEZ-frZzTMMlJLbMCMg4u8MxaA/viewform?usp=sf_link',
DISQUS_SHORTNAME: 'imobracing',
DISQUS_PAGE_URL: 'https://imobracingonline.com',
DISQUS_PAGE_IDENTIFIER: 'imobracing-forums',
GOOGLE_CALENDAR_ID: 'imobracing%40gmail.com',
FIREBASE_CONFIG: {
apiKey: "AIzaSyA0U-py8sgjtMkX0vD9ySsi2XGtUUEGZhg",
authDomain: "imob-racing-website.firebaseapp.com",
projectId: "imob-racing-website",
storageBucket: "imob-racing-website.appspot.com",
messagingSenderId: "580908835958",
appId: "1:580908835958:web:a7bb3f6a4b52d8f8c28c1a"
},
GOOGLE_CLIENT_ID: '580908835958-labitokmi7ivmvm0ha1muth5a45smnni.apps.googleusercontent.com',
SNIPCART_API_KEY: 'NDFkZGNlNDktMjE2YS00MmUyLTk4ZmYtMjY5YWE2OWYwOTI2NjM4NTQxODI3NjYwMTI3MDQ5',
SNIPCART_SECRET_KEY: 'ST_ZWIwYzA1ZDgtNzEwNS00YTc5LTk4YjUtMzQ2YmQyOGUxODhiNjM4NTQ0NDU5MzE2NzIyODc3',
};
Binary file added default-profile.jpg
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 default-profile.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 default-profile.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

File renamed without changes
Loading