husseinelsaadi's picture
style updated
4991915
raw
history blame
24.7 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}Codingo - AI-Powered Recruitment Platform{% endblock %}</title>
<style>
:root {
--primary: #4361ee;
--secondary: #3a0ca3;
--accent: #4cc9f0;
--light: #f8f9fa;
--dark: #212529;
--success: #2ecc71;
--warning: #f39c12;
--danger: #e74c3c;
--info: #3498db;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: var(--light);
color: var(--dark);
line-height: 1.6;
perspective: 1000px;
overflow-x: hidden;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* Header Styles */
header {
background: linear-gradient(135deg, var(--primary), var(--secondary));
color: white;
padding: 1rem;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 1rem;
}
.nav-container {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}
/* Logo Styles */
.logo {
display: flex;
align-items: center;
font-size: 2rem;
font-weight: bold;
color: white;
text-decoration: none;
transition: transform 0.3s ease;
}
.logo:hover {
transform: scale(1.05);
}
.logo-part1 {
color: white;
}
.logo-part2 {
color: #FF8C42;
font-style: italic;
text-shadow: 0px 0px 10px rgba(255, 140, 66, 0.7);
animation: glow 2s ease-in-out infinite alternate;
}
@keyframes glow {
from {
text-shadow: 0 0 5px rgba(255, 140, 66, 0.7);
}
to {
text-shadow: 0 0 15px rgba(255, 140, 66, 1), 0 0 20px rgba(255, 140, 66, 0.8);
}
}
.logo-part3 {
color: var(--accent);
}
/* Navigation Buttons */
.login-buttons {
display: flex;
align-items: center;
gap: 0.75rem;
flex-wrap: wrap;
}
/* Mobile Menu Toggle */
.mobile-menu-toggle {
display: none;
background: transparent;
border: 2px solid var(--accent);
color: var(--accent);
padding: 0.5rem;
border-radius: 5px;
cursor: pointer;
font-size: 1.5rem;
}
/* Welcome Message */
.welcome-message {
color: white;
font-weight: 500;
display: flex;
align-items: center;
background-color: rgba(255, 255, 255, 0.1);
padding: 0.5rem 1rem;
border-radius: 5px;
transition: all 0.3s ease;
white-space: nowrap;
}
.welcome-message:before {
content: '👋 ';
margin-right: 0.5rem;
}
/* Button Styles */
.btn {
padding: 0.5rem 1.5rem;
border-radius: 5px;
border: none;
cursor: pointer;
font-weight: 500;
transition: all 0.3s ease;
text-decoration: none;
position: relative;
overflow: hidden;
z-index: 1;
display: inline-block;
white-space: nowrap;
}
.btn::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 0%;
height: 100%;
background-color: rgba(255, 255, 255, 0.1);
transition: all 0.3s ease;
z-index: -1;
}
.btn:hover::before {
width: 100%;
}
.btn-primary {
background-color: var(--accent);
color: var(--dark);
box-shadow: 0 4px 8px rgba(76, 201, 240, 0.3);
}
.btn-outline {
background-color: transparent;
border: 2px solid white;
color: white;
}
.btn-logout {
background-color: transparent;
border: 2px solid var(--accent);
color: var(--accent);
font-weight: 600;
}
.btn-logout:hover {
background-color: var(--accent);
color: var(--dark);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(76, 201, 240, 0.3);
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
/* Flash Messages */
.flash-messages {
margin: 1rem 0;
}
.alert {
padding: 1rem 1.5rem;
border-radius: 8px;
margin-bottom: 1rem;
font-weight: 500;
position: relative;
animation: slideIn 0.3s ease-out;
display: flex;
align-items: center;
gap: 0.75rem;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
@keyframes slideIn {
from {
transform: translateY(-20px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.alert::before {
font-size: 1.2rem;
}
.alert-success {
background-color: #d4edda;
color: #155724;
border: 1px solid #c3e6cb;
}
.alert-success::before {
content: '✓';
}
.alert-danger, .alert-error {
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
}
.alert-danger::before, .alert-error::before {
content: '⚠';
}
.alert-warning {
background-color: #fff3cd;
color: #856404;
border: 1px solid #ffeaa7;
}
.alert-warning::before {
content: '!';
}
.alert-info {
background-color: #d1ecf1;
color: #0c5460;
border: 1px solid #bee5eb;
}
.alert-info::before {
content: 'ℹ';
}
/* Hero Section */
.hero {
background: linear-gradient(rgba(67, 97, 238, 0.8), rgba(58, 12, 163, 0.9)), url("/api/placeholder/1200/600") no-repeat center center/cover;
color: white;
text-align: center;
padding: 5rem 1rem;
position: relative;
overflow: hidden;
}
.hero::before {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 60%);
animation: rotate 30s linear infinite;
z-index: 1;
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.hero-content {
display: flex;
flex-direction: column;
align-items: center;
transform-style: preserve-3d;
transition: transform 0.3s ease;
position: relative;
z-index: 2;
}
.hero h1 {
font-size: 3rem;
margin-bottom: 1.5rem;
font-weight: 700;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
transform: translateZ(20px);
animation: fadeIn 1s ease-out;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px) translateZ(20px);
}
to {
opacity: 1;
transform: translateY(0) translateZ(20px);
}
}
.hero p {
font-size: 1.2rem;
max-width: 800px;
margin: 0 auto 2rem;
transform: translateZ(10px);
animation: fadeIn 1s ease-out 0.3s both;
}
/* Main Content */
main {
flex: 1;
padding: 2rem 0;
}
/* Breadcrumbs */
.breadcrumbs {
list-style: none;
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 2rem;
padding: 0.75rem 1rem;
background-color: white;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
flex-wrap: wrap;
}
.breadcrumbs li {
display: flex;
align-items: center;
}
.breadcrumbs li:not(:last-child)::after {
content: '›';
margin-left: 0.5rem;
color: #999;
}
.breadcrumbs a {
color: var(--primary);
text-decoration: none;
transition: color 0.3s ease;
}
.breadcrumbs a:hover {
color: var(--secondary);
}
/* Content Section */
.content-section {
padding: 3rem 1rem;
background-color: white;
min-height: 50vh;
}
/* Cards */
.card {
background-color: white;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
transition: all 0.5s ease;
margin-bottom: 2rem;
}
.card:hover {
transform: translateY(-5px);
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}
.card-header {
background: linear-gradient(135deg, var(--primary), var(--secondary));
color: white;
padding: 1.5rem;
}
.card-body {
padding: 1.5rem;
}
/* Form Styles */
.form-group {
margin-bottom: 1.5rem;
}
.form-group label {
font-weight: 600;
color: var(--primary);
margin-bottom: 0.5rem;
display: block;
}
.form-control {
width: 100%;
padding: 0.75rem;
font-size: 1rem;
border-radius: 6px;
border: 1px solid #ddd;
transition: all 0.3s ease;
}
.form-control:focus {
outline: none;
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}
/* Footer */
footer {
background-color: var(--dark);
color: white;
padding: 3rem 1rem;
margin-top: auto;
}
.footer-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 2rem;
}
.footer-col h3 {
font-size: 1.2rem;
margin-bottom: 1.5rem;
color: var(--accent);
position: relative;
display: inline-block;
}
.footer-col h3::after {
content: '';
position: absolute;
bottom: -8px;
left: 0;
width: 30px;
height: 2px;
background: var(--accent);
}
.social-links {
display: flex;
gap: 1rem;
margin-top: 1rem;
}
.social-links a {
color: white;
background-color: rgba(255, 255, 255, 0.1);
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
transition: all 0.3s ease;
}
.social-links a:hover {
background-color: var(--accent);
color: var(--dark);
transform: translateY(-3px);
}
.copyright {
margin-top: 2rem;
border-top: 1px solid rgba(255, 255, 255, 0.1);
padding-top: 1.5rem;
text-align: center;
color: #aaa;
}
/* Chatbot Styles */
#chatbot-toggle {
position: fixed;
bottom: 2rem;
right: 2rem;
width: 3.5rem;
height: 3.5rem;
background: linear-gradient(135deg, var(--primary), var(--secondary));
color: white;
border-radius: 50%;
cursor: pointer;
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
transition: all 0.3s ease;
}
#chatbot-toggle:hover {
transform: scale(1.1);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.chat-nav-icon {
display: none;
font-size: 1.5rem;
color: var(--accent);
cursor: pointer;
}
#chatbot-box {
position: fixed;
bottom: 6rem;
right: 2rem;
width: 350px;
height: 500px;
background: white;
border-radius: 15px;
display: none;
flex-direction: column;
z-index: 1000;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
overflow: hidden;
}
#chat-header {
background: linear-gradient(135deg, var(--primary), var(--secondary));
color: white;
padding: 1rem;
text-align: center;
font-weight: bold;
font-size: 1.2rem;
}
#chat-messages {
flex: 1;
padding: 1rem;
overflow-y: auto;
background-color: #f9f9f9;
}
#chat-messages .user-message {
display: flex;
justify-content: flex-end;
margin-bottom: 1rem;
}
#chat-messages .bot-message {
display: flex;
justify-content: flex-start;
margin-bottom: 1rem;
}
#chat-messages .user-bubble {
background: linear-gradient(135deg, var(--primary), var(--secondary));
color: white;
padding: 0.75rem 1rem;
border-radius: 18px 18px 4px 18px;
max-width: 80%;
word-wrap: break-word;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
#chat-messages .bot-bubble {
background-color: white;
color: var(--dark);
padding: 0.75rem 1rem;
border-radius: 18px 18px 18px 4px;
max-width: 80%;
word-wrap: break-word;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
border: 1px solid #eee;
}
#chat-input {
border: none;
border-top: 1px solid #eee;
padding: 1rem;
width: 100%;
box-sizing: border-box;
font-size: 1rem;
transition: all 0.3s ease;
}
#chat-input:focus {
outline: none;
background-color: #f9f9f9;
}
/* Responsive Styles */
@media (max-width: 768px) {
.nav-container {
padding: 0.5rem 0;
}
.logo {
font-size: 1.5rem;
}
.mobile-menu-toggle {
display: block;
}
.login-buttons {
width: 100%;
order: 3;
justify-content: center;
padding: 1rem 0;
background-color: rgba(0, 0, 0, 0.1);
margin: 0 -1rem;
border-radius: 8px;
display: none;
}
.login-buttons.show {
display: flex;
}
.welcome-message {
font-size: 0.9rem;
padding: 0.4rem 0.8rem;
}
.btn {
padding: 0.4rem 1rem;
font-size: 0.9rem;
}
.hero h1 {
font-size: 2rem;
}
.hero p {
font-size: 1rem;
}
#chatbot-toggle {
display: none !important;
}
.chat-nav-icon {
display: block;
}
#chatbot-box {
width: 90vw;
height: 70vh;
bottom: 1rem;
right: 5vw;
max-width: 400px;
}
.card {
margin-bottom: 1rem;
}
.content-section {
padding: 2rem 1rem;
}
.footer-grid {
grid-template-columns: 1fr;
text-align: center;
}
.social-links {
justify-content: center;
}
}
@media (max-width: 480px) {
.hero h1 {
font-size: 1.75rem;
}
.btn {
width: 100%;
margin-bottom: 0.5rem;
}
.login-buttons {
flex-direction: column;
gap: 0.5rem;
}
.breadcrumbs {
font-size: 0.9rem;
}
}
/* Utility Classes */
.text-center {
text-align: center;
}
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
</style>
</head>
<body>
<header>
<div class="container nav-container">
<a href="{{ url_for('index') }}" class="logo">
<span class="logo-part1">Cod</span><span class="logo-part2">in</span><span class="logo-part3">go</span>
</a>
<button class="mobile-menu-toggle" onclick="toggleMobileMenu()"></button>
<div class="login-buttons" id="nav-menu">
{% if current_user.is_authenticated %}
{% if current_user.role == 'unemployed' %}
<a href="{{ url_for('jobs') }}" class="btn btn-outline">Jobs</a>
<a href="{{ url_for('my_applications') }}" class="btn btn-outline">My Applications</a>
{% elif current_user.role in ('recruiter', 'admin') %}
<a href="{{ url_for('post_job') }}" class="btn btn-outline">Add Job</a>
<a href="{{ url_for('jobs') }}" class="btn btn-outline">View Jobs</a>
<a href="{{ url_for('dashboard') }}" class="btn btn-outline">Dashboard</a>
{% endif %}
<span class="welcome-message">Welcome, {{ current_user.username }}</span>
<a href="{{ url_for('auth.logout') }}" class="btn btn-logout">Logout</a>
{% else %}
<a href="{{ url_for('auth.login') }}" class="btn btn-outline">Log In</a>
<a href="{{ url_for('auth.signup') }}" class="btn btn-primary">Sign Up</a>
{% endif %}
</div>
<div class="chat-nav-icon" onclick="toggleChatbot()">💬</div>
</div>
</header>
{% block hero %}{% endblock %}
<main>
<div class="container">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
<div class="flash-messages">
{% for category, message in messages %}
<div class="alert alert-{{ category }}">{{ message }}</div>
{% endfor %}
</div>
{% endif %}
{% endwith %}
{% block content %}{% endblock %}
</div>
<!-- Chatbot Toggle Button -->
<div id="chatbot-toggle" onclick="toggleChatbot()">💬</div>
<!-- Chatbox Popup -->
<div id="chatbot-box">
<div id="chat-header">LUNA AI Assistant</div>
<div id="chat-messages"></div>
<input id="chat-input" type="text" placeholder="Ask me anything..." onkeydown="sendChat(event)">
</div>
</main>
<footer>
<div class="container">
<div class="footer-grid">
<div class="footer-col">
<h3>Codingo</h3>
<p>AI-powered recruitment platform that revolutionizes how companies hire technical talent.</p>
<div class="social-links">
<a href="#" aria-label="Facebook"><span>f</span></a>
<a href="#" aria-label="Twitter"><span>t</span></a>
<a href="#" aria-label="LinkedIn"><span>in</span></a>
</div>
</div>
</div>
<div class="copyright">
<p>&copy; 2025 Codingo. All rights reserved.</p>
</div>
</div>
</footer>
<script type="text/javascript">
// Mobile menu toggle
function toggleMobileMenu() {
const menu = document.getElementById('nav-menu');
menu.classList.toggle('show');
}
// Chatbot functionality
function toggleChatbot() {
const box = document.getElementById('chatbot-box');
if (!box) return;
box.style.display = (box.style.display === 'flex') ? 'none' : 'flex';
}
function sendChat(event) {
if (event.key === 'Enter') {
event.preventDefault();
const input = document.getElementById('chat-input');
const message = input.value.trim();
if (!message) return;
appendChatMessage(message, 'user');
input.value = '';
// Show typing indicator
const typingIndicator = appendChatMessage('...', 'bot');
fetch("{{ url_for('chatbot_endpoint') }}", {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ message: message })
})
.then(response => response.json())
.then(data => {
// Remove typing indicator
typingIndicator.remove();
if (data.response) {
appendChatMessage(data.response, 'bot');
} else {
appendChatMessage(data.error || 'Error occurred.', 'bot');
}
})
.catch(() => {
typingIndicator.remove();
appendChatMessage('Network error. Please try again.', 'bot');
});
}
}
function appendChatMessage(text, sender) {
const container = document.getElementById('chat-messages');
if (!container) return;
const wrapper = document.createElement('div');
wrapper.className = sender === 'user' ? 'user-message' : 'bot-message';
const bubble = document.createElement('div');
bubble.className = sender === 'user' ? 'user-bubble' : 'bot-bubble';
bubble.textContent = text;
wrapper.appendChild(bubble);
container.appendChild(wrapper);
container.scrollTop = container.scrollHeight;
return wrapper;
}
// Close mobile menu when clicking outside
document.addEventListener('click', function(event) {
const menu = document.getElementById('nav-menu');
const toggle = document.querySelector('.mobile-menu-toggle');
if (!menu.contains(event.target) && !toggle.contains(event.target)) {
menu.classList.remove('show');
}
});
</script>
</body>
</html>