From 01d981cf983820a98b7035c72002f366ab694cb2 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Fri, 12 Dec 2025 13:43:25 +0000 Subject: [PATCH] A complete mess to show the platform and maybe get --- cookies.txt | 2 +- core/__pycache__/urls.cpython-311.pyc | Bin 686 -> 1040 bytes core/__pycache__/views.cpython-311.pyc | Bin 2602 -> 3049 bytes core/templates/base.html | 34 +++++++++++--- core/templates/core/campaign.html | 5 +++ core/templates/core/login.html | 5 +-- core/templates/core/messages.html | 5 +++ core/templates/core/pricing.html | 4 +- core/templates/core/search.html | 6 +++ core/templates/core/signup.html | 4 +- core/urls.py | 8 +++- core/views.py | 16 +++++-- static/css/custom.css | 60 ++++++++++++++++++++++++- static/js/sidebar.js | 12 +++++ staticfiles/css/custom.css | 60 ++++++++++++++++++++++++- staticfiles/js/sidebar.js | 12 +++++ 16 files changed, 210 insertions(+), 23 deletions(-) create mode 100644 core/templates/core/campaign.html create mode 100644 core/templates/core/messages.html create mode 100644 core/templates/core/search.html create mode 100644 static/js/sidebar.js create mode 100644 staticfiles/js/sidebar.js diff --git a/cookies.txt b/cookies.txt index 34ed13f..0800a77 100644 --- a/cookies.txt +++ b/cookies.txt @@ -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 diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index fd44fb3cbe19a471cefff0a75344b523a8c8bbed..56fe35a702e8752149a512f7511a85e195c299fd 100644 GIT binary patch literal 1040 zcmb7BzfasS7Nak%} z7TgXc0KNhQkmLg*S&}5;nqMPztIp#(f<7d&B@@L`h-#@svoxYxI%!x9VpxU*Y5+?} z#xhcVsuy(tF8L^1!Dv`PdL`4qDl#gW1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* LF`P4}4k7LjE2PxT delta 615 zcmZvZ&ubG=5Xbi=yUqS+vQ5)8O;Su+EXitYjS7O4UOb9kdN3Zh$F)SL(LnSi^%4xNqEL0&j&5o6g&D$o1xvB^ zZJ4EhNU|yjWw41+q7Q!4@9hFRb^IDz7HPcH@~1yyBe9Sp5ti6zwA`@06S&aAL$xBZ zc&2VWO!0Anabr{mp$8#1FY}UJfVUDB*0m?%9(J^bX-#sqX|6V&tKqq}D$=Ky+M&p1 z$r`B;bi63h47z={_ZISalvwn*kz+!UYq1M%F?5E(SSCbj=vjPWn8>JvFcN+K340Hro$JGji1cNqJ-bf(jy+A9Ep6DtZ=MI rpA7VuzS#|0gO0Zacge}~3`bbB8nzJY7s@qe@T0X+c)-fPkj4H0J|Bhn diff --git a/core/templates/base.html b/core/templates/base.html index da53ecd..af40219 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -9,6 +9,7 @@ + {% if project_description %} @@ -26,6 +27,9 @@
- {% block content %}{% endblock %} + {% if user.is_authenticated %} + + {% endif %} +
+ {% block content %}{% endblock %} +
+ diff --git a/core/templates/core/campaign.html b/core/templates/core/campaign.html new file mode 100644 index 0000000..7b4ae79 --- /dev/null +++ b/core/templates/core/campaign.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block content %} +

Campaign Page

+{% endblock %} \ No newline at end of file diff --git a/core/templates/core/login.html b/core/templates/core/login.html index d96d7f1..246d7df 100644 --- a/core/templates/core/login.html +++ b/core/templates/core/login.html @@ -2,7 +2,7 @@ {% block title %}Login - MarketMatchr{% endblock %} -{% block content %} +{% block content_unauth %}
@@ -18,5 +18,4 @@
- -{% endblock %} +{% endblock content_unauth %} diff --git a/core/templates/core/messages.html b/core/templates/core/messages.html new file mode 100644 index 0000000..87392b5 --- /dev/null +++ b/core/templates/core/messages.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} + +{% block content %} +

Messages Page

+{% endblock %} \ No newline at end of file diff --git a/core/templates/core/pricing.html b/core/templates/core/pricing.html index 7801d31..427cdef 100644 --- a/core/templates/core/pricing.html +++ b/core/templates/core/pricing.html @@ -2,7 +2,7 @@ {% block title %}Pricing - MarketMatchr{% endblock %} -{% block content %} +{% block content_unauth %}
@@ -64,4 +64,4 @@
-{% endblock %} \ No newline at end of file +{% endblock content_unauth %} \ No newline at end of file diff --git a/core/templates/core/search.html b/core/templates/core/search.html new file mode 100644 index 0000000..de22c24 --- /dev/null +++ b/core/templates/core/search.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block content %} +

Search Page

+

This is the default page for logged-in users.

+{% endblock %} \ No newline at end of file diff --git a/core/templates/core/signup.html b/core/templates/core/signup.html index d2af04c..74c4a94 100644 --- a/core/templates/core/signup.html +++ b/core/templates/core/signup.html @@ -2,7 +2,7 @@ {% block title %}Sign Up - MarketMatchr{% endblock %} -{% block content %} +{% block content_unauth %}
@@ -51,4 +51,4 @@ roleInput.value = 'company'; }); -{% endblock %} \ No newline at end of file +{% endblock content_unauth %} \ No newline at end of file diff --git a/core/urls.py b/core/urls.py index f891ab5..1fecc0b 100644 --- a/core/urls.py +++ b/core/urls.py @@ -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"), ] diff --git a/core/views.py b/core/views.py index e450b28..80df44f 100644 --- a/core/views.py +++ b/core/views.py @@ -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') \ No newline at end of file +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') \ No newline at end of file diff --git a/static/css/custom.css b/static/css/custom.css index 73ab997..16b6f40 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -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 { diff --git a/static/js/sidebar.js b/static/js/sidebar.js new file mode 100644 index 0000000..15cecd0 --- /dev/null +++ b/static/js/sidebar.js @@ -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"); + }); + } +}); \ No newline at end of file diff --git a/staticfiles/css/custom.css b/staticfiles/css/custom.css index 73ab997..16b6f40 100644 --- a/staticfiles/css/custom.css +++ b/staticfiles/css/custom.css @@ -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 { diff --git a/staticfiles/js/sidebar.js b/staticfiles/js/sidebar.js new file mode 100644 index 0000000..15cecd0 --- /dev/null +++ b/staticfiles/js/sidebar.js @@ -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"); + }); + } +}); \ No newline at end of file