Skip to content

Commit 12d0b2b

Browse files
Archithclaude
andcommitted
Adding more magic
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 40055bb commit 12d0b2b

File tree

5 files changed

+20
-167
lines changed

5 files changed

+20
-167
lines changed

.env.example

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,8 @@ ADMIN_PASSWORD=YourSecurePassword123!
1414
PISTON_API_URL=https://emkc.org/api/v2/piston/execute
1515

1616
# Optional: Custom Branding
17-
APP_NAME=CollabCode
18-
APP_TAGLINE=Real-time Collaborative Coding Interviews
19-
20-
# Atomtickets API Configuration (for movie poster background)
21-
ATOMTICKETS_API_URL=https://clientproxyservice.atomtickets.com/api/v1/aggregation/web-gateway
17+
APP_NAME=OpenCollab
18+
APP_TAGLINE=Real-time Collaborative Coding Platform
2219

2320
# Slack Integration
2421
SLACK_WEBHOOK_URL=your_slack_webhook_url_here

api/auth/reset-password.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ module.exports = async (req, res) => {
6767

6868
const msg = {
6969
to: email,
70-
from: 'noreply@atomtickets.com', // Must be verified in SendGrid
70+
from: 'noreply@yourcompany.com', // Must be verified in SendGrid
7171
subject: 'Password Reset Request',
7272
text: `Click this link to reset your password: ${resetUrl}\n\nThis link expires in 1 hour.`,
7373
html: `

api/movies.js

Lines changed: 0 additions & 55 deletions
This file was deleted.

index.html

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="author" content="Bernie Perez">
77
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8-
<title>Collaborative Code Editor</title>
8+
<title>OpenCollab - Collaborative Code Editor</title>
99
<link rel="apple-touch-icon" sizes="57x57" href="/images/favicon/apple-touch-icon-57x57.png">
1010
<link rel="apple-touch-icon" sizes="60x60" href="/images/favicon/apple-touch-icon-60x60.png">
1111
<link rel="apple-touch-icon" sizes="72x72" href="/images/favicon/apple-touch-icon-72x72.png">
@@ -61,18 +61,16 @@
6161
<div id="landingModal" class="modal atom-landing">
6262
<div class="atom-background">
6363
<div class="atom-gradient"></div>
64-
<div class="movie-posters-grid" id="moviePostersGrid">
65-
<!-- Movie posters will be dynamically loaded here -->
66-
</div>
64+
<!-- Generic gradient background -->
6765
</div>
6866

6967
<div class="modal-content landing-content atom-card">
7068
<div class="atom-logo-section">
7169
<div class="atom-logo">
7270
<img src="/images/favicon/apple-touch-icon-120x120.png" alt="Atom Tickets" width="80" height="80" style="display: block; margin: 0 auto;">
7371
</div>
74-
<h1 class="atom-title">Code Interview Platform</h1>
75-
<p class="atom-subtitle">Powered by Atom Tickets Engineering</p>
72+
<h1 class="atom-title">OpenCollab Platform</h1>
73+
<p class="atom-subtitle">Real-time Collaborative Coding</p>
7674
</div>
7775

7876
<div class="role-selection atom-roles">
@@ -140,14 +138,14 @@ <h3>Login as Interviewer</h3>
140138
<div class="footer-content">
141139
<div style="display: flex; align-items: center; justify-content: center; margin-bottom: 10px;">
142140
<img src="/images/favicon/apple-touch-icon-60x60.png" alt="Atom Tickets" width="30" height="30" style="margin-right: 10px;">
143-
<p style="margin: 0;">Made with ❤️ at <a href="https://www.atomtickets.com" target="_blank" class="atom-link">Atom Tickets</a></p>
141+
<p style="margin: 0;">Made with ❤️ by the OpenCollab Community</p>
144142
</div>
145143
<div class="footer-links">
146-
<a href="https://www.atomtickets.com" target="_blank">Home</a>
144+
<a href="https://github.com/yourusername/OpenCollab" target="_blank">GitHub</a>
147145
<span class="footer-separator"></span>
148-
<a href="https://www.atomtickets.com/movies" target="_blank">Browse Movies</a>
146+
<a href="https://github.com/yourusername/OpenCollab/issues" target="_blank">Issues</a>
149147
<span class="footer-separator"></span>
150-
<a href="https://www.atomtickets.com/theaters" target="_blank">Find Theaters</a>
148+
<a href="https://github.com/yourusername/OpenCollab/wiki" target="_blank">Documentation</a>
151149
</div>
152150
</div>
153151
</footer>
@@ -191,8 +189,8 @@ <h2>Join Interview Session</h2>
191189
This data is used solely for interview assessment and is handled in accordance with our privacy policy.
192190
</span>
193191
<br>
194-
<a href="https://www.atomtickets.com/privacy" target="_blank" style="color: #42a5f5; text-decoration: none; margin-top: 8px; display: inline-block; font-size: 12px;">
195-
📄 View Atomtickets Privacy Policy →
192+
<a href="#" style="color: #42a5f5; text-decoration: none; margin-top: 8px; display: inline-block; font-size: 12px;">
193+
📄 View Privacy Policy →
196194
</a>
197195
</span>
198196
</label>

scripts/app.js

Lines changed: 7 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,104 +1728,17 @@
17281728
init();
17291729
}
17301730
}
1731-
// Load movie posters for landing page background
1732-
function loadMoviePosters() {
1733-
const postersGrid = document.getElementById('moviePostersGrid');
1734-
if (!postersGrid) return;
1735-
1736-
// Create a timeout promise to prevent hanging
1737-
const timeoutPromise = new Promise((_, reject) =>
1738-
setTimeout(() => reject(new Error('Request timeout')), 5000)
1739-
);
1740-
1741-
// Fetch movies from Atomtickets API with timeout
1742-
// Use a proxy endpoint to hide the actual API URL
1743-
const apiEndpoint = window.MOVIE_API_ENDPOINT || '/api/movies' || 'data:application/json,{"productions":[]}';
1744-
1745-
Promise.race([
1746-
fetch(apiEndpoint),
1747-
timeoutPromise
1748-
])
1749-
.then(response => {
1750-
if (!response.ok) throw new Error('API response not ok');
1751-
return response.json();
1752-
})
1753-
.then(data => {
1754-
if (!data?.productions || !Array.isArray(data.productions) || data.productions.length === 0) {
1755-
throw new Error('No productions data');
1756-
}
1757-
1758-
// Create poster tiles for first 30 movies
1759-
const movies = data.productions.slice(0, 30);
1760-
const postersHTML = movies.map((movie, index) => {
1761-
const posterUrl = movie.coverImages?.LARGE || movie.coverImages?.SMALL || '';
1762-
const title = movie.title || '';
1763-
const rating = movie.mpaaRating || 'NR';
1764-
const releaseDate = movie.releaseDate ? new Date(movie.releaseDate).getFullYear() : '';
1765-
const shareLink = movie.shareLink || '#';
1766-
1767-
// Skip if no poster image
1768-
if (!posterUrl) {
1769-
return `<div class="movie-poster-tile fallback" style="background: hsl(${index * 12}, 70%, 50%); animation-delay: ${(index % 10) * 0.1}s"></div>`;
1770-
}
1771-
1772-
// Add animation delay for staggered appearance
1773-
const delay = (index % 10) * 0.1;
1774-
1775-
return `
1776-
<a href="${shareLink}" target="_blank" rel="noopener" class="movie-poster-tile" style="animation-delay: ${delay}s">
1777-
<img src="${posterUrl}" alt="${title}" loading="lazy" onerror="this.parentElement.style.background='hsl(${index * 12}, 70%, 50%)'">
1778-
<div class="poster-overlay">
1779-
<div class="poster-title">${title}</div>
1780-
<div class="poster-meta">
1781-
<span class="poster-rating">${rating}</span>
1782-
<span class="poster-year">${releaseDate}</span>
1783-
</div>
1784-
</div>
1785-
</a>
1786-
`;
1787-
}).join('');
1788-
1789-
postersGrid.innerHTML = postersHTML;
1790-
1791-
// Clone for infinite scroll effect
1792-
postersGrid.innerHTML += postersHTML;
1793-
})
1794-
.catch(error => {
1795-
console.log('Using fallback movie poster grid:', error.message);
1796-
// Create a beautiful fallback gradient grid
1797-
const fallbackTiles = [
1798-
{ color: '#FF6B6B', title: 'Action' },
1799-
{ color: '#4ECDC4', title: 'Comedy' },
1800-
{ color: '#45B7D1', title: 'Drama' },
1801-
{ color: '#96CEB4', title: 'Thriller' },
1802-
{ color: '#FFEAA7', title: 'Romance' },
1803-
{ color: '#DDA0DD', title: 'Sci-Fi' },
1804-
{ color: '#98D8C8', title: 'Horror' },
1805-
{ color: '#FFD700', title: 'Adventure' },
1806-
{ color: '#FF69B4', title: 'Fantasy' },
1807-
{ color: '#00CED1', title: 'Mystery' }
1808-
];
1809-
1810-
const fallbackHTML = Array(30).fill(0).map((_, i) => {
1811-
const tile = fallbackTiles[i % fallbackTiles.length];
1812-
return `
1813-
<div class="movie-poster-tile fallback" style="background: linear-gradient(135deg, ${tile.color} 0%, ${tile.color}88 100%); animation-delay: ${(i % 10) * 0.1}s">
1814-
<div style="display: flex; align-items: center; justify-content: center; height: 100%; color: white; font-weight: 600; font-size: 14px; text-shadow: 0 2px 4px rgba(0,0,0,0.3);">
1815-
${tile.title}
1816-
</div>
1817-
</div>
1818-
`;
1819-
}).join('');
1820-
1821-
postersGrid.innerHTML = fallbackHTML + fallbackHTML;
1822-
});
1731+
// Initialize background gradient (removed movie poster functionality)
1732+
function initializeBackground() {
1733+
// Background is now handled by pure CSS gradient
1734+
// No external API calls needed
1735+
console.log('Background initialized');
18231736
}
18241737

18251738
// Call on page load
18261739
if (document.readyState === 'loading') {
1827-
document.addEventListener('DOMContentLoaded', loadMoviePosters);
1740+
document.addEventListener('DOMContentLoaded', initializeBackground);
18281741
} else {
1829-
loadMoviePosters();
1742+
initializeBackground();
18301743
}
18311744
})();

0 commit comments

Comments
 (0)