A complete mess to show the platform and maybe get
This commit is contained in:
parent
912634b206
commit
01d981cf98
@ -2,4 +2,4 @@
|
||||
# https://curl.se/docs/http-cookies.html
|
||||
# This file was generated by libcurl! Edit at your own risk.
|
||||
|
||||
127.0.0.1 FALSE / TRUE 1796993740 csrftoken O0Vgh9DkmoXw8WCtMNdqOcunv8UiueAy
|
||||
127.0.0.1 FALSE / TRUE 1796996344 csrftoken IrGUUOXEZVrbozn4KFZ3mbjM6jSNDc6h
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -9,6 +9,7 @@
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Poppins:wght@600;700&display=swap" rel="stylesheet">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
||||
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v=1">
|
||||
|
||||
{% if project_description %}
|
||||
@ -26,6 +27,9 @@
|
||||
<body>
|
||||
<header class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
|
||||
<div class="container-fluid">
|
||||
{% if user.is_authenticated %}
|
||||
<button class="sidebar-toggle"><i class="fas fa-bars"></i></button>
|
||||
{% endif %}
|
||||
<a class="navbar-brand" href="/">MarketMatchr</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
@ -38,21 +42,37 @@
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'pricing' %}">Pricing</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{% url 'login' %}" class="btn btn-outline-primary me-2">Login</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{% url 'signup' %}" class="btn btn-primary">Join For Free</a>
|
||||
</li>
|
||||
{% if user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'logout' %}">Logout</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="nav-item">
|
||||
<a href="{% url 'login' %}" class="btn btn-outline-primary me-2">Login</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="{% url 'signup' %}" class="btn btn-primary">Join For Free</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
{% block content %}{% endblock %}
|
||||
{% if user.is_authenticated %}
|
||||
<div class="sidebar">
|
||||
<a href="{% url 'search' %}"><i class="fas fa-search"></i><span>Search</span></a>
|
||||
<a href="{% url 'campaign' %}"><i class="fas fa-bullhorn"></i><span>Campaign</span></a>
|
||||
<a href="{% url 'messages' %}"><i class="fas fa-envelope"></i><span>Messages</span></a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="content">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="{% static 'js/sidebar.js' %}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
5
core/templates/core/campaign.html
Normal file
5
core/templates/core/campaign.html
Normal file
@ -0,0 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Campaign Page</h1>
|
||||
{% endblock %}
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
{% block title %}Login - MarketMatchr{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block content_unauth %}
|
||||
<div class="container mt-5 pt-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
@ -18,5 +18,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock content_unauth %}
|
||||
|
||||
5
core/templates/core/messages.html
Normal file
5
core/templates/core/messages.html
Normal file
@ -0,0 +1,5 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Messages Page</h1>
|
||||
{% endblock %}
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
{% block title %}Pricing - MarketMatchr{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block content_unauth %}
|
||||
<div class="container mt-5 pt-5">
|
||||
<div class="row text-center mb-5">
|
||||
<div class="col">
|
||||
@ -64,4 +64,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock content_unauth %}
|
||||
6
core/templates/core/search.html
Normal file
6
core/templates/core/search.html
Normal file
@ -0,0 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Search Page</h1>
|
||||
<p>This is the default page for logged-in users.</p>
|
||||
{% endblock %}
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
{% block title %}Sign Up - MarketMatchr{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% block content_unauth %}
|
||||
<div class="container mt-5 pt-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-6">
|
||||
@ -51,4 +51,4 @@
|
||||
roleInput.value = 'company';
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
{% endblock content_unauth %}
|
||||
@ -1,11 +1,15 @@
|
||||
from django.urls import path
|
||||
from django.contrib.auth.views import LogoutView
|
||||
|
||||
from .views import index, pricing, login, signup, dashboard
|
||||
from .views import index, pricing, login, signup, search, campaign, messages
|
||||
|
||||
urlpatterns = [
|
||||
path("", index, name="index"),
|
||||
path("pricing/", pricing, name="pricing"),
|
||||
path("login/", login, name="login"),
|
||||
path("signup/", signup, name="signup"),
|
||||
path("dashboard/", dashboard, name="dashboard"),
|
||||
path("search/", search, name="search"),
|
||||
path("campaign/", campaign, name="campaign"),
|
||||
path("messages/", messages, name="messages"),
|
||||
path("logout/", LogoutView.as_view(), name="logout"),
|
||||
]
|
||||
|
||||
@ -3,6 +3,8 @@ from django.contrib.auth import login as auth_login, authenticate
|
||||
from .forms import CompanySignUpForm, InfluencerSignUpForm, LoginForm
|
||||
|
||||
def index(request):
|
||||
if request.user.is_authenticated:
|
||||
return redirect('search')
|
||||
return render(request, 'core/index.html')
|
||||
|
||||
def pricing(request):
|
||||
@ -17,7 +19,7 @@ def login(request):
|
||||
user = authenticate(username=username, password=password)
|
||||
if user is not None:
|
||||
auth_login(request, user)
|
||||
return redirect('dashboard')
|
||||
return redirect('search')
|
||||
else:
|
||||
form = LoginForm()
|
||||
return render(request, 'core/login.html', {'form': form})
|
||||
@ -31,10 +33,16 @@ def signup(request):
|
||||
if form.is_valid():
|
||||
user = form.save()
|
||||
auth_login(request, user)
|
||||
return redirect('dashboard')
|
||||
return redirect('search')
|
||||
else:
|
||||
form = InfluencerSignUpForm()
|
||||
return render(request, 'core/signup.html', {'form': form})
|
||||
|
||||
def dashboard(request):
|
||||
return render(request, 'core/dashboard.html')
|
||||
def search(request):
|
||||
return render(request, 'core/search.html')
|
||||
|
||||
def campaign(request):
|
||||
return render(request, 'core/campaign.html')
|
||||
|
||||
def messages(request):
|
||||
return render(request, 'core/messages.html')
|
||||
@ -1,8 +1,66 @@
|
||||
main {
|
||||
padding-top: 56px;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Lato', sans-serif;
|
||||
color: #333333;
|
||||
background-color: #F6F9FC;
|
||||
padding-top: 70px; /* For fixed top navbar */
|
||||
transition: margin-left .5s;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-left: 250px;
|
||||
padding: 20px;
|
||||
transition: margin-left .5s;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
height: 100%;
|
||||
width: 250px;
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #111;
|
||||
overflow-x: hidden;
|
||||
transition: 0.5s;
|
||||
}
|
||||
|
||||
.sidebar.collapsed {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.sidebar.collapsed a span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content.collapsed {
|
||||
margin-left: 80px;
|
||||
}
|
||||
|
||||
.sidebar a {
|
||||
padding: 10px 15px;
|
||||
text-decoration: none;
|
||||
font-size: 20px;
|
||||
color: #818181;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sidebar a:hover {
|
||||
color: #f1f1f1;
|
||||
}
|
||||
|
||||
.sidebar a span {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.sidebar-toggle {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #0A2540;
|
||||
font-size: 24px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
|
||||
12
static/js/sidebar.js
Normal file
12
static/js/sidebar.js
Normal file
@ -0,0 +1,12 @@
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const sidebar = document.querySelector(".sidebar");
|
||||
const content = document.querySelector(".content");
|
||||
const toggleBtn = document.querySelector(".sidebar-toggle");
|
||||
|
||||
if (toggleBtn) {
|
||||
toggleBtn.addEventListener("click", function() {
|
||||
sidebar.classList.toggle("collapsed");
|
||||
content.classList.toggle("collapsed");
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -1,8 +1,66 @@
|
||||
main {
|
||||
padding-top: 56px;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Lato', sans-serif;
|
||||
color: #333333;
|
||||
background-color: #F6F9FC;
|
||||
padding-top: 70px; /* For fixed top navbar */
|
||||
transition: margin-left .5s;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-left: 250px;
|
||||
padding: 20px;
|
||||
transition: margin-left .5s;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
height: 100%;
|
||||
width: 250px;
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #111;
|
||||
overflow-x: hidden;
|
||||
transition: 0.5s;
|
||||
}
|
||||
|
||||
.sidebar.collapsed {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.sidebar.collapsed a span {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.content.collapsed {
|
||||
margin-left: 80px;
|
||||
}
|
||||
|
||||
.sidebar a {
|
||||
padding: 10px 15px;
|
||||
text-decoration: none;
|
||||
font-size: 20px;
|
||||
color: #818181;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sidebar a:hover {
|
||||
color: #f1f1f1;
|
||||
}
|
||||
|
||||
.sidebar a span {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.sidebar-toggle {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #0A2540;
|
||||
font-size: 24px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
|
||||
12
staticfiles/js/sidebar.js
Normal file
12
staticfiles/js/sidebar.js
Normal file
@ -0,0 +1,12 @@
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const sidebar = document.querySelector(".sidebar");
|
||||
const content = document.querySelector(".content");
|
||||
const toggleBtn = document.querySelector(".sidebar-toggle");
|
||||
|
||||
if (toggleBtn) {
|
||||
toggleBtn.addEventListener("click", function() {
|
||||
sidebar.classList.toggle("collapsed");
|
||||
content.classList.toggle("collapsed");
|
||||
});
|
||||
}
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user