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
|
# https://curl.se/docs/http-cookies.html
|
||||||
# This file was generated by libcurl! Edit at your own risk.
|
# 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 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://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 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">
|
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v=1">
|
||||||
|
|
||||||
{% if project_description %}
|
{% if project_description %}
|
||||||
@ -26,6 +27,9 @@
|
|||||||
<body>
|
<body>
|
||||||
<header class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
|
<header class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
|
||||||
<div class="container-fluid">
|
<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>
|
<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">
|
<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>
|
<span class="navbar-toggler-icon"></span>
|
||||||
@ -38,21 +42,37 @@
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'pricing' %}">Pricing</a>
|
<a class="nav-link" href="{% url 'pricing' %}">Pricing</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
{% if user.is_authenticated %}
|
||||||
<a href="{% url 'login' %}" class="btn btn-outline-primary me-2">Login</a>
|
<li class="nav-item">
|
||||||
</li>
|
<a class="nav-link" href="{% url 'logout' %}">Logout</a>
|
||||||
<li class="nav-item">
|
</li>
|
||||||
<a href="{% url 'signup' %}" class="btn btn-primary">Join For Free</a>
|
{% else %}
|
||||||
</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>
|
||||||
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<main>
|
<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>
|
</main>
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
<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>
|
</body>
|
||||||
</html>
|
</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 title %}Login - MarketMatchr{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content_unauth %}
|
||||||
<div class="container mt-5 pt-5">
|
<div class="container mt-5 pt-5">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@ -18,5 +18,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endblock content_unauth %}
|
||||||
{% endblock %}
|
|
||||||
|
|||||||
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 title %}Pricing - MarketMatchr{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content_unauth %}
|
||||||
<div class="container mt-5 pt-5">
|
<div class="container mt-5 pt-5">
|
||||||
<div class="row text-center mb-5">
|
<div class="row text-center mb-5">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
@ -64,4 +64,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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 title %}Sign Up - MarketMatchr{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content_unauth %}
|
||||||
<div class="container mt-5 pt-5">
|
<div class="container mt-5 pt-5">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
@ -51,4 +51,4 @@
|
|||||||
roleInput.value = 'company';
|
roleInput.value = 'company';
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock content_unauth %}
|
||||||
@ -1,11 +1,15 @@
|
|||||||
from django.urls import path
|
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 = [
|
urlpatterns = [
|
||||||
path("", index, name="index"),
|
path("", index, name="index"),
|
||||||
path("pricing/", pricing, name="pricing"),
|
path("pricing/", pricing, name="pricing"),
|
||||||
path("login/", login, name="login"),
|
path("login/", login, name="login"),
|
||||||
path("signup/", signup, name="signup"),
|
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
|
from .forms import CompanySignUpForm, InfluencerSignUpForm, LoginForm
|
||||||
|
|
||||||
def index(request):
|
def index(request):
|
||||||
|
if request.user.is_authenticated:
|
||||||
|
return redirect('search')
|
||||||
return render(request, 'core/index.html')
|
return render(request, 'core/index.html')
|
||||||
|
|
||||||
def pricing(request):
|
def pricing(request):
|
||||||
@ -17,7 +19,7 @@ def login(request):
|
|||||||
user = authenticate(username=username, password=password)
|
user = authenticate(username=username, password=password)
|
||||||
if user is not None:
|
if user is not None:
|
||||||
auth_login(request, user)
|
auth_login(request, user)
|
||||||
return redirect('dashboard')
|
return redirect('search')
|
||||||
else:
|
else:
|
||||||
form = LoginForm()
|
form = LoginForm()
|
||||||
return render(request, 'core/login.html', {'form': form})
|
return render(request, 'core/login.html', {'form': form})
|
||||||
@ -31,10 +33,16 @@ def signup(request):
|
|||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
user = form.save()
|
user = form.save()
|
||||||
auth_login(request, user)
|
auth_login(request, user)
|
||||||
return redirect('dashboard')
|
return redirect('search')
|
||||||
else:
|
else:
|
||||||
form = InfluencerSignUpForm()
|
form = InfluencerSignUpForm()
|
||||||
return render(request, 'core/signup.html', {'form': form})
|
return render(request, 'core/signup.html', {'form': form})
|
||||||
|
|
||||||
def dashboard(request):
|
def search(request):
|
||||||
return render(request, 'core/dashboard.html')
|
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 {
|
body {
|
||||||
font-family: 'Lato', sans-serif;
|
font-family: 'Lato', sans-serif;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
background-color: #F6F9FC;
|
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 {
|
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 {
|
body {
|
||||||
font-family: 'Lato', sans-serif;
|
font-family: 'Lato', sans-serif;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
background-color: #F6F9FC;
|
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 {
|
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