Implement shared footer and improve header design

- Convert inline CSS to external base.css for better maintainability
- Add comprehensive footer with company info, navigation, and privacy modal
- Update header and footer logos to use logo.png with consistent 60px height
- Add active page highlighting in header navigation
- Fix horizontal scrollbar issues with proper CSS box-sizing
- Update marketplace template to extend base template for consistent layout
- Add responsive design for mobile devices in footer

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude 2025-07-11 03:24:11 +05:30
parent f56708249d
commit f2590853ef
5 changed files with 962 additions and 112 deletions

468
static/css/base.css Normal file
View File

@ -0,0 +1,468 @@
/* Base Styles for NetCop Hub */
body {
font-family: 'Inter', Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f8fafc;
overflow-x: hidden;
box-sizing: border-box;
}
* {
box-sizing: border-box;
}
.header {
background: white;
border-bottom: 1px solid #e5e7eb;
width: 100%;
}
.header-container {
max-width: 1200px;
margin: 0 auto;
padding: 15px 20px;
display: flex;
align-items: center;
justify-content: space-between;
}
.header-left {
display: flex;
align-items: center;
}
.logo-section {
display: flex;
align-items: center;
text-decoration: none;
margin-right: 30px;
}
.logo-img {
width: auto;
height: 60px;
object-fit: contain;
}
.header-nav {
display: flex;
gap: 24px;
align-items: center;
}
.nav-link {
text-decoration: none;
color: #6b7280;
font-weight: 500;
font-size: 16px;
padding: 8px 12px;
border-radius: 6px;
transition: all 0.2s ease;
white-space: nowrap;
}
.nav-link:hover {
color: #3b82f6;
background: rgba(59, 130, 246, 0.05);
}
.nav-link.active {
color: #3b82f6;
background: rgba(59, 130, 246, 0.1);
font-weight: 600;
}
.user-info {
display: flex;
align-items: center;
gap: 16px;
}
.user-welcome {
color: #374151;
font-weight: 500;
margin: 0;
}
.balance {
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
color: white;
padding: 8px 16px;
border-radius: 20px;
font-weight: 600;
font-size: 14px;
text-decoration: none;
transition: transform 0.2s ease;
}
.balance:hover {
transform: translateY(-1px);
color: white;
}
.auth-links {
display: flex;
gap: 15px;
}
.auth-links a {
text-decoration: none;
color: #6b7280;
font-weight: 500;
padding: 8px 12px;
border-radius: 6px;
transition: all 0.2s ease;
}
.auth-links a:hover {
color: #3b82f6;
background: rgba(59, 130, 246, 0.05);
}
.main-container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
/* Footer Styles */
.footer {
padding: clamp(30px, 5vw, 40px) clamp(16px, 4vw, 24px) clamp(20px, 3vw, 30px);
background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
margin: 0;
width: 100%;
position: relative;
overflow-x: hidden;
box-sizing: border-box;
}
.footer-container {
max-width: 1280px;
margin: 0 auto;
width: 100%;
box-sizing: border-box;
padding: 0 clamp(16px, 4vw, 24px);
}
.footer-main {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: clamp(24px, 6vw, 64px);
margin-bottom: clamp(16px, 4vw, 24px);
flex-wrap: wrap;
width: 100%;
box-sizing: border-box;
}
.footer-company {
flex: 1;
min-width: 280px;
max-width: 100%;
box-sizing: border-box;
}
.footer-logo {
width: auto;
height: 60px;
display: flex;
align-items: center;
justify-content: flex-start;
margin-bottom: clamp(12px, 3vw, 16px);
}
.footer-logo-img {
width: auto;
height: 60px;
object-fit: contain;
border-radius: 8px;
filter: brightness(0) invert(1);
}
.footer-description {
color: #9ca3af;
font-size: clamp(12px, 3vw, 14px);
line-height: 1.6;
margin: 0 0 clamp(8px, 2vw, 12px) 0;
}
.footer-contact {
display: flex;
flex-direction: column;
gap: clamp(4px, 1vw, 8px);
}
.footer-contact-item {
color: #e5e7eb;
font-size: clamp(10px, 2.5vw, 12px);
text-decoration: none;
transition: color 0.2s ease;
}
.footer-contact-item:hover {
color: #40E0D0;
}
.footer-nav {
display: flex;
gap: clamp(24px, 6vw, 64px);
align-items: flex-start;
flex-wrap: wrap;
max-width: 100%;
box-sizing: border-box;
}
.footer-nav-section {
text-align: right;
}
.footer-nav-title {
font-size: clamp(14px, 3.5vw, 18px);
font-weight: 600;
color: white;
margin-bottom: clamp(8px, 2vw, 12px);
margin: 0 0 clamp(8px, 2vw, 12px) 0;
}
.footer-nav-links {
display: flex;
flex-direction: column;
gap: clamp(4px, 1vw, 8px);
}
.footer-nav-link {
color: #9ca3af;
text-decoration: none;
font-size: clamp(10px, 2.5vw, 12px);
transition: all 0.2s ease;
}
.footer-nav-link:hover {
color: #40E0D0;
transform: translateX(-2px);
}
.footer-bottom {
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid rgba(148, 163, 184, 0.2);
padding-top: clamp(16px, 4vw, 24px);
flex-wrap: wrap;
gap: clamp(12px, 3vw, 16px);
width: 100%;
box-sizing: border-box;
}
.footer-copyright {
color: #6b7280;
margin: 0;
font-size: clamp(10px, 2.5vw, 12px);
}
.footer-legal {
display: flex;
gap: clamp(16px, 4vw, 24px);
align-items: center;
flex-wrap: wrap;
}
.footer-legal-link {
color: #9ca3af;
text-decoration: none;
font-size: clamp(10px, 2.5vw, 12px);
transition: color 0.2s ease;
cursor: pointer;
background: none;
border: none;
padding: 0;
}
.footer-legal-link:hover {
color: #40E0D0;
}
/* Privacy Modal Styles */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
opacity: 0;
visibility: hidden;
transition: all 0.2s ease;
}
.modal-overlay.active {
opacity: 1;
visibility: visible;
}
.modal-content {
background: white;
border-radius: 16px;
padding: clamp(20px, 5vw, 32px);
width: 90%;
max-width: 600px;
max-height: 80vh;
overflow: auto;
position: relative;
transform: scale(0.98);
transition: transform 0.2s ease;
}
.modal-overlay.active .modal-content {
transform: scale(1);
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: clamp(16px, 4vw, 20px);
}
.modal-title {
font-size: clamp(18px, 4.5vw, 24px);
font-weight: 600;
color: #1f2937;
margin: 0;
}
.modal-close {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: #6b7280;
padding: 4px;
transition: color 0.2s ease;
}
.modal-close:hover {
color: #1f2937;
}
.modal-text {
color: #6b7280;
line-height: 1.6;
font-size: clamp(14px, 3.5vw, 16px);
}
/* Responsive Design */
@media (max-width: 768px) {
.header-container {
padding: 12px 16px;
}
.logo-section {
margin-right: 1.5rem;
}
.header-nav {
gap: 1rem;
}
.nav-link {
font-size: 14px;
padding: 0.4rem 0;
}
.logo-img {
height: 60px;
}
.user-info {
gap: 0.75rem;
}
.auth-links {
gap: 0.5rem;
}
.user-welcome {
display: none;
}
/* Footer responsive */
.footer-main {
flex-direction: column;
gap: clamp(20px, 5vw, 32px);
}
.footer-company {
min-width: auto;
width: 100%;
}
.footer-nav {
justify-content: space-between;
width: 100%;
gap: clamp(16px, 4vw, 32px);
}
.footer-nav-section {
text-align: left;
flex: 1;
}
.footer-bottom {
flex-direction: column;
text-align: center;
gap: clamp(8px, 2vw, 12px);
}
.footer-legal {
justify-content: center;
gap: clamp(12px, 3vw, 16px);
}
}
@media (max-width: 480px) {
.header-container {
padding: 8px 12px;
}
.logo-section {
margin-right: 1rem;
}
.header-nav {
gap: 0.75rem;
}
.nav-link {
padding: 0.3rem 0;
font-size: 13px;
}
.logo-img {
height: 60px;
}
.user-info {
gap: 0.5rem;
}
/* Footer mobile responsive */
.footer-nav {
flex-direction: column;
gap: clamp(16px, 4vw, 24px);
}
.footer-nav-section {
width: 100%;
}
.footer-legal {
flex-direction: column;
gap: clamp(8px, 2vw, 12px);
}
}

206
static/css/header.css Normal file
View File

@ -0,0 +1,206 @@
/* Header Styles for NetCop Hub */
.header {
background: white;
padding: 12px 24px;
border-radius: 0;
margin-bottom: 0;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
border-bottom: 1px solid #e5e7eb;
}
.header-left {
display: flex;
align-items: center;
gap: 40px;
}
.logo-section {
display: flex;
align-items: center;
gap: 12px;
text-decoration: none;
color: inherit;
}
.logo-img {
width: auto;
height: 60px;
border-radius: 0;
object-fit: contain;
}
.logo-text {
display: flex;
flex-direction: column;
gap: 2px;
}
.logo-title {
font-size: 18px;
font-weight: 700;
color: #1e3a8a;
margin: 0;
line-height: 1.1;
letter-spacing: -0.025em;
}
.logo-subtitle {
font-size: 10px;
color: #6b7280;
margin: 0;
line-height: 1.2;
font-weight: 500;
letter-spacing: 0.05em;
}
.header-nav {
display: flex;
gap: 32px;
align-items: center;
}
.nav-link {
text-decoration: none;
color: #6b7280;
font-weight: 500;
font-size: 16px;
padding: 8px 0;
border-radius: 0;
transition: all 0.2s ease;
position: relative;
}
.nav-link:hover {
color: #3b82f6;
}
.nav-link:hover::after {
content: '';
position: absolute;
bottom: -2px;
left: 0;
right: 0;
height: 2px;
background: #3b82f6;
}
.user-info {
display: flex;
align-items: center;
gap: 15px;
flex-wrap: wrap;
}
.user-welcome {
color: #374151;
font-weight: 500;
margin: 0;
}
.balance {
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
color: white;
padding: 8px 16px;
border-radius: 20px;
font-weight: 600;
font-size: 14px;
box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
text-decoration: none;
display: inline-block;
transition: all 0.2s ease;
}
.balance:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
color: white;
}
.auth-links {
display: flex;
gap: 15px;
align-items: center;
}
.auth-links a {
text-decoration: none;
color: #6b7280;
font-weight: 500;
padding: 8px 12px;
border-radius: 6px;
transition: all 0.2s ease;
}
.auth-links a:hover {
color: #3b82f6;
background: rgba(59, 130, 246, 0.05);
}
.auth-links a[href*="logout"] {
color: #ef4444;
}
.auth-links a[href*="logout"]:hover {
color: #dc2626;
background: rgba(239, 68, 68, 0.05);
}
/* Responsive Design */
@media (max-width: 768px) {
.header {
flex-direction: column;
gap: 15px;
text-align: center;
}
.header-left {
justify-content: center;
}
.logo-subtitle {
display: none;
}
.header-nav {
flex-wrap: wrap;
justify-content: center;
}
.user-info {
justify-content: center;
}
.auth-links {
flex-wrap: wrap;
justify-content: center;
}
}
@media (max-width: 480px) {
.header-left {
flex-direction: column;
gap: 10px;
}
.logo-img {
width: auto;
height: 40px;
}
.logo-title {
font-size: 18px;
}
.header-nav {
gap: 10px;
}
.nav-link {
padding: 6px 10px;
font-size: 14px;
}
}

BIN
static/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

181
templates/base.html Normal file
View File

@ -0,0 +1,181 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}NetCop Hub - AI Platform{% endblock %}</title>
<!-- Base Styles -->
<link rel="stylesheet" href="{% static 'css/base.css' %}">
{% block extra_css %}{% endblock %}
</head>
<body>
<!-- Header -->
<div class="header">
<div class="header-container">
<div class="header-left">
<a href="{% url 'core:homepage' %}" class="logo-section">
<img src="{% static 'img/logo.png' %}" alt="NetCop Hub" class="logo-img">
</a>
<nav class="header-nav">
<a href="{% url 'core:homepage' %}" class="nav-link {% if request.resolver_match.url_name == 'homepage' %}active{% endif %}">Home</a>
<a href="{% url 'core:marketplace' %}" class="nav-link {% if request.resolver_match.url_name == 'marketplace' %}active{% endif %}">AI Marketplace</a>
</nav>
</div>
<div class="user-info">
{% if user.is_authenticated %}
<p class="user-welcome">Welcome, {{ user.username }}!</p>
<a href="{% url 'core:wallet' %}" class="balance" data-wallet-balance>💰 {{ user.wallet_balance|floatformat:2 }} AED</a>
<div class="auth-links">
<a href="{% url 'core:wallet' %}">Wallet</a>
<a href="{% url 'authentication:logout' %}">Logout</a>
</div>
{% else %}
<div class="auth-links">
<a href="{% url 'authentication:login' %}">Login</a>
<a href="{% url 'authentication:register' %}">Register</a>
</div>
{% endif %}
</div>
</div>
</div>
<!-- Main Content -->
<div class="main-container">
{% block content %}{% endblock %}
</div>
<!-- Footer -->
<footer class="footer" id="footer">
<div class="footer-container">
<!-- Main Footer Content -->
<div class="footer-main">
<!-- Company Info -->
<div class="footer-company">
<div class="footer-logo">
<img src="{% static 'img/logo.png' %}" alt="NetCop Hub" class="footer-logo-img">
</div>
<p class="footer-description">
Leading cybersecurity consultancy providing comprehensive security solutions and AI-powered automation.
</p>
<div class="footer-contact">
<a href="mailto:contact@netcopconsultancy.com" class="footer-contact-item">
📧 contact@netcopconsultancy.com
</a>
<span class="footer-contact-item">
📍 Dubai, UAE
</span>
</div>
</div>
<!-- Navigation Sections -->
<div class="footer-nav">
<!-- Services -->
<div class="footer-nav-section">
<h4 class="footer-nav-title">Services</h4>
<div class="footer-nav-links">
<a href="#services" class="footer-nav-link">Cybersecurity Consulting</a>
<a href="#services" class="footer-nav-link">Risk Assessment</a>
<a href="#services" class="footer-nav-link">Compliance Audits</a>
<a href="#services" class="footer-nav-link">Security Training</a>
</div>
</div>
<!-- Company -->
<div class="footer-nav-section">
<h4 class="footer-nav-title">Company</h4>
<div class="footer-nav-links">
<a href="#company-profile" class="footer-nav-link">About Us</a>
<a href="#founder" class="footer-nav-link">Leadership</a>
<a href="#contact" class="footer-nav-link">Contact Us</a>
<a href="{% url 'core:marketplace' %}" class="footer-nav-link">AI Marketplace</a>
</div>
</div>
</div>
</div>
<!-- Bottom Section -->
<div class="footer-bottom">
<p class="footer-copyright">
© 2025 Netcop Consultancy. All rights reserved.
</p>
<div class="footer-legal">
<button class="footer-legal-link" onclick="showPrivacyModal()">
Privacy Policy
</button>
<a href="#terms" class="footer-legal-link">Terms of Service</a>
<a href="#security" class="footer-legal-link">Security</a>
</div>
</div>
</div>
</footer>
<!-- Privacy Policy Modal -->
<div class="modal-overlay" id="privacy-modal">
<div class="modal-content">
<div class="modal-header">
<h2 class="modal-title">Privacy Policy</h2>
<button class="modal-close" onclick="hidePrivacyModal()">&times;</button>
</div>
<div class="modal-text">
<p style="margin-bottom: 16px;">
<strong>NetCop Consultancy LLC FZ</strong> is committed to protecting your privacy and ensuring the security of your personal information.
</p>
<p style="margin-bottom: 16px;">
<strong>Information We Collect:</strong><br>
We collect information you provide directly to us, such as when you create an account, use our AI services, or contact us for support.
</p>
<p style="margin-bottom: 16px;">
<strong>How We Use Your Information:</strong><br>
We use the information we collect to provide, maintain, and improve our services, process transactions, and communicate with you.
</p>
<p style="margin-bottom: 16px;">
<strong>Data Security:</strong><br>
We implement appropriate technical and organizational security measures to protect your personal information against unauthorized access, alteration, disclosure, or destruction.
</p>
<p style="margin-bottom: 16px;">
<strong>Contact Us:</strong><br>
If you have any questions about this Privacy Policy, please contact us at contact@netcopconsultancy.com
</p>
<p style="margin: 0; font-size: 12px; color: #9ca3af;">
Last updated: January 2025
</p>
</div>
</div>
</div>
<script>
// Privacy modal functions
function showPrivacyModal() {
const modal = document.getElementById('privacy-modal');
modal.classList.add('active');
document.body.style.overflow = 'hidden';
}
function hidePrivacyModal() {
const modal = document.getElementById('privacy-modal');
modal.classList.remove('active');
document.body.style.overflow = 'auto';
}
// Close modal when clicking outside
document.getElementById('privacy-modal').addEventListener('click', function(e) {
if (e.target === this) {
hidePrivacyModal();
}
});
// Close modal with Escape key
document.addEventListener('keydown', function(e) {
if (e.key === 'Escape') {
hidePrivacyModal();
}
});
</script>
{% block extra_js %}{% endblock %}
</body>
</html>

View File

@ -1,36 +1,33 @@
<!DOCTYPE html> {% extends 'base.html' %}
<html lang="en">
<head> {% block title %}Marketplace - NetCop Hub{% endblock %}
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> {% block extra_css %}
<title>Marketplace - NetCop Hub</title>
<style> <style>
body { font-family: Arial, sans-serif; margin: 0; padding: 20px; background-color: #f5f5f5; } .marketplace-header { background: white; padding: 20px; border-radius: 8px; margin-bottom: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.container { max-width: 1200px; margin: 0 auto; } .marketplace-user-info { float: right; }
.header { background: white; padding: 20px; border-radius: 8px; margin-bottom: 20px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); } .marketplace-balance { background: #e8f5e8; padding: 5px 15px; border-radius: 20px; color: #2d5a2d; }
.user-info { float: right; } .marketplace-content-section { background: white; padding: 40px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); text-align: center; }
.balance { background: #e8f5e8; padding: 5px 15px; border-radius: 20px; color: #2d5a2d; } .marketplace-auth-links { margin-top: 10px; }
.content-section { background: white; padding: 40px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); text-align: center; } .marketplace-auth-links a { margin-right: 15px; text-decoration: none; color: #007bff; }
.auth-links { margin-top: 10px; } .marketplace-message { background: #e8f4fd; padding: 20px; border-radius: 8px; margin: 20px 0; border-left: 4px solid #007bff; }
.auth-links a { margin-right: 15px; text-decoration: none; color: #007bff; }
.message { background: #e8f4fd; padding: 20px; border-radius: 8px; margin: 20px 0; border-left: 4px solid #007bff; }
</style> </style>
</head> {% endblock %}
<body>
<div class="container"> {% block content %}
<div class="header"> <div class="marketplace-header">
<h1>Marketplace - NetCop Hub</h1> <h1>Marketplace - NetCop Hub</h1>
<div class="user-info"> <div class="marketplace-user-info">
{% if user.is_authenticated %} {% if user.is_authenticated %}
<p>Welcome, {{ user.username }}!</p> <p>Welcome, {{ user.username }}!</p>
<div class="balance">Balance: {{ user_balance }} AED</div> <div class="marketplace-balance">Balance: {{ user_balance }} AED</div>
<div class="auth-links"> <div class="marketplace-auth-links">
<a href="{% url 'core:homepage' %}">Homepage</a> <a href="{% url 'core:homepage' %}">Homepage</a>
<a href="{% url 'core:wallet' %}">Wallet</a> <a href="{% url 'core:wallet' %}">Wallet</a>
<a href="{% url 'authentication:logout' %}">Logout</a> <a href="{% url 'authentication:logout' %}">Logout</a>
</div> </div>
{% else %} {% else %}
<div class="auth-links"> <div class="marketplace-auth-links">
<a href="{% url 'core:homepage' %}">Homepage</a> <a href="{% url 'core:homepage' %}">Homepage</a>
<a href="{% url 'authentication:login' %}">Login</a> <a href="{% url 'authentication:login' %}">Login</a>
<a href="{% url 'authentication:register' %}">Register</a> <a href="{% url 'authentication:register' %}">Register</a>
@ -40,7 +37,7 @@
<div style="clear: both;"></div> <div style="clear: both;"></div>
</div> </div>
<div class="content-section"> <div class="marketplace-content-section">
<h2>Marketplace</h2> <h2>Marketplace</h2>
<p>Browse and discover AI-powered agents for your tasks.</p> <p>Browse and discover AI-powered agents for your tasks.</p>
@ -107,12 +104,10 @@
{% endfor %} {% endfor %}
</div> </div>
{% else %} {% else %}
<div class="message"> <div class="marketplace-message">
<h3>🤖 No Agents Available</h3> <h3>🤖 No Agents Available</h3>
<p>No agents are currently available{% if selected_category %} in the {{ selected_category }} category{% endif %}. Check back later!</p> <p>No agents are currently available{% if selected_category %} in the {{ selected_category }} category{% endif %}. Check back later!</p>
</div> </div>
{% endif %} {% endif %}
</div> </div>
</div> {% endblock %}
</body>
</html>