From e46b2fc0b0af8e25d6e66a1abf6a2c6902cc7da9 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Thu, 12 Feb 2026 16:53:09 +0000 Subject: [PATCH] Car auction v1.0 --- config/__pycache__/__init__.cpython-311.pyc | Bin 159 -> 159 bytes config/__pycache__/settings.cpython-311.pyc | Bin 5552 -> 5552 bytes config/__pycache__/urls.cpython-311.pyc | Bin 1557 -> 1557 bytes config/__pycache__/wsgi.cpython-311.pyc | Bin 679 -> 679 bytes core/__pycache__/__init__.cpython-311.pyc | Bin 157 -> 157 bytes core/__pycache__/admin.cpython-311.pyc | Bin 212 -> 1163 bytes core/__pycache__/apps.cpython-311.pyc | Bin 524 -> 524 bytes .../context_processors.cpython-311.pyc | Bin 763 -> 763 bytes core/__pycache__/models.cpython-311.pyc | Bin 209 -> 3743 bytes core/__pycache__/urls.cpython-311.pyc | Bin 347 -> 450 bytes core/__pycache__/views.cpython-311.pyc | Bin 1364 -> 1799 bytes core/admin.py | 12 +- core/migrations/0001_initial.py | 47 ++++ .../__pycache__/0001_initial.cpython-311.pyc | Bin 0 -> 2864 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 168 -> 168 bytes core/models.py | 45 +++- core/templates/base.html | 86 ++++++-- core/templates/core/auction_detail.html | 119 +++++++++++ core/templates/core/index.html | 202 ++++++------------ core/urls.py | 6 +- core/views.py | 42 ++-- static/css/custom.css | 156 +++++++++++++- staticfiles/css/custom.css | 161 ++++++++++++-- 23 files changed, 676 insertions(+), 200 deletions(-) create mode 100644 core/migrations/0001_initial.py create mode 100644 core/migrations/__pycache__/0001_initial.cpython-311.pyc create mode 100644 core/templates/core/auction_detail.html diff --git a/config/__pycache__/__init__.cpython-311.pyc b/config/__pycache__/__init__.cpython-311.pyc index 423a6362b2322713e75da67a35e209e76169dbae..5486eeaaf94da46b47e872eb431c4edf20a381fa 100644 GIT binary patch delta 19 ZcmbQwIG>SwIWI340}xm+_f6!U0strf1P}lK delta 19 ZcmbQwIG>SwIWI340}xbw%b&y+NCMIWI340}xm+_if}}DhdEKGz825 delta 20 acmdm>y+NCMIWI340}xbw%iqYoR1^R_83p11 diff --git a/config/__pycache__/urls.cpython-311.pyc b/config/__pycache__/urls.cpython-311.pyc index 0b85e94ece283a83ff1af1d71f1b265c943eb37a..b73e6cae6e601b05314b30d6b00e0404405bd2bd 100644 GIT binary patch delta 20 acmbQrGnI#XIWI340}xm+_ig0nVgmpxkpr#( delta 20 acmbQrGnI#XIWI340}xbw%iqY&#RdQ}b_B!# diff --git a/config/__pycache__/wsgi.cpython-311.pyc b/config/__pycache__/wsgi.cpython-311.pyc index 9c49e09df194d2dbcad4868349c9177db4b15571..f59fa441b9181cc0e7b7be1092d3fe2ba55b8d1c 100644 GIT binary patch delta 20 acmZ3^x}24JIWI340}xm+_if~!!vp{>VFXeD delta 20 acmZ3^x}24JIWI340}xbw%iqX7hY0{RMg?d9 diff --git a/core/__pycache__/__init__.cpython-311.pyc b/core/__pycache__/__init__.cpython-311.pyc index 74b111269bd81aac528770a53e2f849291524d56..af42e643b4afed0d8132d3b0ce04511afae7951e 100644 GIT binary patch delta 19 ZcmbQsIG2%oIWI340}xm+_f6!U1OO+s1PTBE delta 19 ZcmbQsIG2%oIWI340}xbw%b&>mG1t0(b diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index a5ed392d6714413db63120e4233d2e96cbadb5de..5b346ebdf50cf37a5f93bd52b54edb634b1da8eb 100644 GIT binary patch literal 1163 zcma)5Jx|;)7`Ef&F65xJaL^Ch(l1rYQ0@=3NVG!-3QM;vk%V&!+f{Cf`n+DPTixTn^CsnIm z2&X?l*d>Ap8j+ZKloDYG78x<~SZsPGB?ggn!>SHSwg+7MFb2&aZ;3FsiLgMcVkLVF zbYKkH9{l#J3GwRxFq%UcYrt6lZ$?|#?}CeD z*{x~Y_Y)pV-`9@sgQX%udDQnm6g;}v8I8g$_eGesBfg~@*Ll~QnCmR|ny)%b*wvj%e|W~HVS8A{A={?5p-_V~o4U>~s%I7%#8TsN3Jz;0 zP!f_Ve4e{h%>vu9YpGjkbOK=#p@}esa2ug?=`Kn$6=2RYT>m?mc?{-pXA%405b7_x zBl?Ee;K^D#7oenMr4~Bh5bi6aQ{cy)Qq%&PQ(>EBM@007WBfHbjPjKT5 t;e-+6{-wS{jGHA3JEYAnZT1a=KIxO|@VV%Y&z|7M83M9QUDq$O_ZxPz6086K delta 147 zcmeC?yuz5WoR^o20SKo5$j`I~(vLwL7+``jJ_`XE(-~42QW$d>av7r-85vTTf*CZK zUxE~9GTvfMOv%m6^V4Ly#g~$mn3tZfmzPO4oI Z2T+U=h>K+>A7GZ^zQCXWL`7^s5dfXlAK?H1 diff --git a/core/__pycache__/apps.cpython-311.pyc b/core/__pycache__/apps.cpython-311.pyc index 6f131d4873bc56e3763e4ed09960c6e3f34140e1..02a8211e42e0371ea5caa9a29064a2ad2e4dfc7a 100644 GIT binary patch delta 20 ZcmeBS>0#ks&dbZi00b7yeH*zMnE)vT1AhPj delta 20 acmeBS>0#ks&dbZi00dRv@;7obG64WD>I9Vl diff --git a/core/__pycache__/context_processors.cpython-311.pyc b/core/__pycache__/context_processors.cpython-311.pyc index 75bf2234fb21a6b62efc5cec11af9512dd0c9616..de5dcfa664d492bd80fd7ffc7a430feeab59690b 100644 GIT binary patch delta 20 acmey(`kR$|IWI340}xm+_ig0s%$f>1Bv?B>%^lO{I5mNOdOOfN)R@z#zTcYk_&G#%(=Er%v zbZkO4h$1N1z-V<4U;}9Y6>wb{=D`JeNP!-F^r0x0!5$V1^wg7XHsq5}oq0=AB4xLa zyR-9V=6z<~%)H@WqS255?TYmK{J;Ey@E`27o6KH-!=lrIG0r{cQWp7env2#?_PS~kd~0wAUS52+9do)!0B5Fg0tVo2c&nHl6 zU2gF}!-nqx@E^hJwXD)3Asv$N|6hp!m)N%fO#P_6fPglDJ@9it;)8B(m~$g-aUv6i zC=Gv)9iv<-){zPjwGn*agLUBbS~h-IhR+px0Qx`b*dUwW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8M)$U$^6LH{)Y=e604-Gg(xo zA-dYYA5_Ml2^}yXD(@q=7kG9=6XxLUw073o`xZ#At4pW?cQ6{AH(sTH%N?kryb1#k zoHwc-ly68ql|WC$fi(qG6cBX>s)gRVBhXNLZgr?Rpu!76?H1}88zW)3#p5Ibu^V-z zli;K>c&fqrVRspk;kClBSYdGl2>>hX2*57Ov@gj$9JOy5BCd*AiTGe{>7@#DPoJZv zUJXp?#WLJ|%W$86A7_0R0j3;REi*zHgbQ0lS{eaQtul^er=kB2ysg`=?b1&FTbnuUs5b!(l6U0s;SU`aGOO1a(->gxw%n z*GsGAX>!@S8IHF4Py(1Ne|Z{e#^992z_EfC#@RDa3_pWjd|MPeT z=k{6z>b@(#ROh^_=|}7WFfeqCzXNzCiK6HTLss|W2oqNK;|RyB?#B^^t?uWUJS0L^ jI}A1lwuYV~{lz|WE+nF%UJdKxcP5{6-iy~raMk_`+gVn! delta 150 zcmbO)dyz4HIWI340}xFAk)LS^q#uJgFu(+5d=>&SrZc24q%h_%Y=G)Yb5iY! aIDle|KwK<4`5vzn_XP$SASz-5iU0rz`yjRe diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 5a69659f6c6e0ae848e54157af197c543a09315f..90469271161dbb5079123b8887067abbb3389c7c 100644 GIT binary patch literal 450 zcmZurJx{|h5Ix6E=!Z%LbES@`5^4rERCOUU3rty1h)o-s#F67rVCvY3wfzMk1iyjb zkV+k@tW4c1b?by($^hc|&c4%ozIQLRS_Krw_$l~M@275lVC{;vtBMIwpeTe0xd;I@ zC=QJXyEq~)L0|wwlrT)qck3Agys7-gmf2&3mi{t5!!>F70$P=&mbOqq5>NJ*NH<17 z`aELAzL)tj;PDk@(hI@@gt^nkUc?>`cC_6IVtJYjy0*|;pSP@{N^iZm$J?0*Q=!)> z%)5XM)9rw*s;DYXSxP42^cB`h1Dj)8``X!c7R$_L_sq{E7xs{gL7I3zvwbcUt%kOf zhfS#yahip!E9&aA-aNfg*9s$q7SPCl#{!P>|6*l b%Z+KApPc2ynGt7BoRx{|#;B@~s41&2lreT- delta 253 zcmX@ae4D9$IWI340}xbw%g@XL(vLwL7+{4mKHC5p(-~42QW$d>av7r-85vTTQkZj? za+#x;85x)uQW;ZNQkhd&*RU;PW?)zi#1N3q7{!vp9?YQ0@e(AU$#{#UAh9IlB_ouR zA)23?dW)e5WD!U*FEKaOPm^`xExCz*ePj55q9B#UUO?glGb1D84F;JDsOSNM_ytt- nfsKKcv%#f9s3T+s+XWW+i!Ab2SmZx2Gx0MuaD!kG570OO4yHHb diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 2a36fd69370b38a98d8b01bf8eb9817c42f16ed6..eefb7bfddfbe0fcf4569448a9f5bb2688efff133 100644 GIT binary patch literal 1799 zcmb7F&2Jk;6rcUDy@?&?V*>)xs9RMCECm}v373i#N)=T=id;^Xh_m)gopsl{>Fk(% z$dP;i6rl*Xg#(9NNQ2S?N07?@u#OhR8VLyr^^lvTh)YkrS=);ZL4wif`OSO3d2i;u z->e^wjg2B0pDSNl4;6%d7mNOod&>DTDEkN_EZL|g6{MP6kZVdok%UdQ)mp3&16{$Y z9j_${iJDf>LSM`tsf`v!L63im3Q3#*nZnv#lo>e_!7~bvQ{rGk`DBH#qFbtxGW^iu zwO6lkjS_58Fk~dIF{?(lU5A`WVxP=MZ<_S&dYM_S!f7DbF(bm{SgBNE``o9 zSocu_Rr?-vFo=t+SULpzapc>P8WMe-sSyBGMZ9nv3|RX%gc=e{{n52NbLhqi_tzKa-!25Ib^1Zb&%st-PbK$;b?~ z#9Bi+glZf|6%lRSek~vN(_m}FuuTVBPQ~!bln}?*u-KY$kC?0ujWx_}^SmsV9zZ`Q zn8j>TELvsPVW#DHJOzP@*koX=00n3ovU9C(Ts{-Eg^gN25RW~m6S}oMUUn(TS-`5z z>>8`tnGvom-TH_tz%Z(bAc-!|JRZMi*^E#sLUF}$H@N0fU}LegMa8u;Do;=XVLe8t z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)3%R{J3tcsIUc)Vs* zi0&G;<#4rTBWyb5uAcW9=nh{09qfH0VK1JNg5*+2k#M*g#4KU;E&nq3hu3cvxfJze zW5EnkkkF1-dk<%1B%?5j?5Nve(1q7;>k8`eBoo05itfa=kJty9_&YMa?~zG-fJ~n! z(--*KhR*lFKmtGg9=|`BI>tZY@lOPN$SH~Boz&6w06Ql=x#XeTDKxNidRqZ+@cIp; z2H%mA5y*kPp<@`G@g!4$F36;hVKjVH=2+|_9{*%u1D~n}YcEy3niZVt>40Ay40>qv z?X}+-dpFxkVrTqlZr~|geNzpY|DzhRUX=d}xevi(;+N)oB-@XUW(KSF@h`QD&Z2Yg zK`(+nLFX&7A@58cMYf`phENW6_7soZ33l-ckI(6(&?t*7%@qR`x$@b3F3b~p!?m?C z!MckP@2wM~rjspg18?z|gNdP=#xu+lo0zQG4%RHahIzy_Todo_!Airi5wGb_H4|GE z_Yn`*^bNd^fWaf)slmfrSSP#}VW&)ty5~IxE-F}S5Ysq-9h(dB$eO8J8$=W;4_gh> zsi8ze3H3RL7>faZ|1}9TL!euaEYIRdDW5;)ojEdnpytmvS1Y539%7w`p&>&-i zj0=(m!sFdkHQj~S{p>CKiKZjOqu4?k0wB2RVAI5eM|B@D2ZD^*mImh_26lpAQ{d&p zp}020751P}*9~kUhlg$&h^ugQ zxUiH&9H4x_d7{_r`Wgr#T!);oRo)`vUf?GRt1Gv()#Ziz+MT8Oh1)!FC}9BBy>nij z+!6Ny5l1{v+%zf$sGy=qo5$uJ>BR3QKC@h0!QD}81wVCtMs)T5?XJkYzmoo_Zypd` zF>2T!#)|-nQL(;&LR3*zw<D|=OCXB4XRfe3SD0Vmal4MYch$e7*ASKT)9=XmYik%Fv0+-wm>f%P$M`{tBH~ZB4AQiB+0>;F+2gre=o(^1dMYDYRwzK*lx*;j&b K@E)!g)qeqt#O@pb literal 0 HcmV?d00001 diff --git a/core/migrations/__pycache__/__init__.cpython-311.pyc b/core/migrations/__pycache__/__init__.cpython-311.pyc index 9c833c8090679ee4c9ffd863c8f7abb0bb73a5db..b4a7897124e2e76986aacf59aeed60af607aaa51 100644 GIT binary patch delta 19 ZcmZ3%xPp;;IWI340}xm+_f6!U3jirh1S
0: + return f"{days}d {hours}h" + return f"{hours}h {minutes}m" + + def __str__(self): + return f"{self.year} {self.make} {self.model}" + +class Bid(models.Model): + auction = models.ForeignKey(CarAuction, on_delete=models.CASCADE, related_name='bids') + user = models.ForeignKey(User, on_delete=models.CASCADE) + amount = models.DecimalField(max_digits=10, decimal_places=2) + created_at = models.DateTimeField(auto_now_add=True) + + class Meta: + ordering = ['-amount'] + + def __str__(self): + return f"{self.user.username} - {self.amount} on {self.auction.title}" \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..5845dc1 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,25 +1,75 @@ +{% load static %} - - - {% block title %}Knowledge Base{% endblock %} - {% if project_description %} - - - - {% endif %} - {% if project_image_url %} - - - {% endif %} - {% load static %} - - {% block head %}{% endblock %} + + + {% block title %}AutoBid - Premium Car Auctions{% endblock %} + + + + + + + + + + + + + + + + {% block extra_css %}{% endblock %} - - {% block content %}{% endblock %} - + +
+ {% block content %}{% endblock %} +
+ +
+
+

© 2026 AutoBid Platform. All rights reserved.

+
+
+ + + + {% block extra_js %}{% endblock %} + diff --git a/core/templates/core/auction_detail.html b/core/templates/core/auction_detail.html new file mode 100644 index 0000000..7159415 --- /dev/null +++ b/core/templates/core/auction_detail.html @@ -0,0 +1,119 @@ +{% extends "base.html" %} +{% load static %} + +{% block title %}{{ auction.title }} | AutoBid{% endblock %} + +{% block content %} +
+
+ + +
+ +
+
+ {% if auction.image_url %} + {{ auction.title }} + {% else %} + Car Placeholder + {% endif %} +
+ +
+

Specifications

+
+
+
+ Make + {{ auction.make }} +
+
+
+
+ Model + {{ auction.model }} +
+
+
+
+ Year + {{ auction.year }} +
+
+
+
+ Bids + {{ bids.count }} +
+
+
+
+ +
+

Description

+

{{ auction.description|linebreaks }}

+
+
+ + +
+
+
+

{{ auction.title }}

+

Listed by {{ auction.seller.username }}

+ +
+
+ Current Bid + ${{ auction.current_bid|default:auction.starting_bid }} +
+
+ Ends In + {{ auction.time_left }} +
+
+ +
+ {% if user.is_authenticated %} +
+ {% csrf_token %} +
+ $ + +
+ +
+

Enter at least ${{ auction.current_bid|default:auction.starting_bid|add:100 }}

+ {% else %} +
+

Log in to place a bid on this car.

+ Login to Bid +
+ {% endif %} +
+ +
+ +
+
Recent Bids
+ {% for bid in bids|slice:":5" %} +
+ {{ bid.user.username }} + ${{ bid.amount }} +
+ {% empty %} +

No bids yet. Be the first!

+ {% endfor %} +
+
+
+
+
+
+
+{% endblock %} diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..7c5c599 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,65 @@ {% extends "base.html" %} - -{% block title %}{{ project_name }}{% endblock %} - -{% block head %} - - - - -{% endblock %} +{% load static %} {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… + +
+
+

Find Your Next Masterpiece

+

Exclusive car auctions. Real-time bidding. Trusted sellers.

+ +
+
+ + +
+
-

AppWizzy AI is collecting your requirements and applying the first changes.

-

This page will refresh automatically as the plan is implemented.

-

- Runtime: Django {{ django_version }} · Python {{ python_version }} - — UTC {{ current_time|date:"Y-m-d H:i:s" }} -

-
-
-
- Page updated: {{ current_time|date:"Y-m-d H:i:s" }} (UTC) -
-{% endblock %} \ No newline at end of file + + + +
+
+
+
+

Featured Auctions

+

Discover top deals closing soon.

+
+ View All +
+ +
+ {% for auction in auctions %} +
+
+
+ {% if auction.image_url %} + {{ auction.title }} + {% else %} + Car Placeholder + {% endif %} + ${{ auction.current_bid|default:auction.starting_bid }} + {{ auction.time_left }} +
+
+
{{ auction.title }}
+

{{ auction.make }} • {{ auction.year }} • {{ auction.model }}

+ +
+
+
+ {% empty %} +
+
+ +
+

No active auctions found

+

Try searching for something else or check back later.

+
+ {% endfor %} +
+
+
+{% endblock %} diff --git a/core/urls.py b/core/urls.py index 6299e3d..f1bc50e 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,7 +1,7 @@ from django.urls import path - -from .views import home +from .views import home, auction_detail urlpatterns = [ path("", home, name="home"), -] + path("auction//", auction_detail, name="auction_detail"), +] \ No newline at end of file diff --git a/core/views.py b/core/views.py index c9aed12..fa2e223 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,29 @@ -import os -import platform - -from django import get_version as django_version -from django.shortcuts import render +from django.shortcuts import render, get_object_or_404, redirect from django.utils import timezone - +from .models import CarAuction, Bid +from django.db.models import Max def home(request): - """Render the landing screen with loader and environment details.""" - host_name = request.get_host().lower() - agent_brand = "AppWizzy" if host_name == "appwizzy.com" else "Flatlogic" - now = timezone.now() - + """Render the landing screen with featured auctions.""" + query = request.GET.get('q') + if query: + auctions = CarAuction.objects.filter(title__icontains=query, end_date__gt=timezone.now()) + else: + auctions = CarAuction.objects.filter(end_date__gt=timezone.now()).order_by('end_date')[:6] + context = { - "project_name": "New Style", - "agent_brand": agent_brand, - "django_version": django_version(), - "python_version": platform.python_version(), - "current_time": now, - "host_name": host_name, - "project_description": os.getenv("PROJECT_DESCRIPTION", ""), - "project_image_url": os.getenv("PROJECT_IMAGE_URL", ""), + "auctions": auctions, + "query": query, } return render(request, "core/index.html", context) + +def auction_detail(request, pk): + """Render the auction detail page.""" + auction = get_object_or_404(CarAuction, pk=pk) + bids = auction.bids.all() + + context = { + "auction": auction, + "bids": bids, + } + return render(request, "core/auction_detail.html", context) \ No newline at end of file diff --git a/static/css/custom.css b/static/css/custom.css index 925f6ed..fa1d3c5 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1,4 +1,154 @@ -/* Custom styles for the application */ -body { - font-family: system-ui, -apple-system, sans-serif; +:root { + --primary-dark: #121212; + --accent-red: #D90429; + --accent-red-hover: #EF233C; + --text-silver: #8D99AE; + --bg-light: #EDF2F4; + --white: #ffffff; } + +body { + font-family: 'Inter', sans-serif; + background-color: var(--bg-light); + color: var(--primary-dark); + line-height: 1.6; +} + +h1, h2, h3, h4, .navbar-brand { + font-family: 'Montserrat', sans-serif; + font-weight: 800; +} + +/* Navbar */ +.navbar { + background-color: var(--primary-dark); + padding: 1rem 0; + box-shadow: 0 4px 12px rgba(0,0,0,0.1); +} + +.navbar-brand { + font-size: 1.5rem; + letter-spacing: -1px; +} + +.brand-auto { color: var(--white); } +.brand-bid { color: var(--accent-red); } + +/* Hero Section */ +.hero { + background: linear-gradient(135deg, var(--primary-dark) 0%, #2b2d42 100%); + padding: 100px 0; + color: var(--white); + position: relative; + overflow: hidden; +} + +.hero::after { + content: ''; + position: absolute; + top: -50%; + right: -10%; + width: 600px; + height: 600px; + background: radial-gradient(circle, rgba(217, 4, 41, 0.15) 0%, transparent 70%); + z-index: 0; +} + +.hero-content { + position: relative; + z-index: 1; +} + +/* Cards & Glassmorphism */ +.auction-card { + border: none; + border-radius: 16px; + overflow: hidden; + transition: transform 0.3s ease, box-shadow 0.3s ease; + background: var(--white); + box-shadow: 0 10px 30px rgba(0,0,0,0.05); +} + +.auction-card:hover { + transform: translateY(-8px); + box-shadow: 0 20px 40px rgba(0,0,0,0.1); +} + +.card-img-container { + height: 200px; + overflow: hidden; + position: relative; +} + +.card-img-top { + width: 100%; + height: 100%; + object-fit: cover; +} + +.badge-bid { + position: absolute; + top: 15px; + right: 15px; + background: rgba(217, 4, 41, 0.9); + backdrop-filter: blur(4px); + color: white; + padding: 6px 12px; + border-radius: 8px; + font-weight: 600; + font-size: 0.85rem; +} + +.badge-time { + position: absolute; + bottom: 15px; + left: 15px; + background: rgba(18, 18, 18, 0.7); + backdrop-filter: blur(4px); + color: white; + padding: 4px 10px; + border-radius: 6px; + font-size: 0.75rem; +} + +/* Buttons */ +.btn-primary { + background-color: var(--accent-red); + border-color: var(--accent-red); + font-weight: 600; + border-radius: 8px; + padding: 10px 24px; +} + +.btn-primary:hover { + background-color: var(--accent-red-hover); + border-color: var(--accent-red-hover); +} + +/* Search Bar */ +.search-container { + background: rgba(255, 255, 255, 0.05); + backdrop-filter: blur(10px); + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 12px; + padding: 8px; + max-width: 600px; +} + +.search-input { + background: transparent; + border: none; + color: white; + padding-left: 15px; +} + +.search-input:focus { + background: transparent; + color: white; + box-shadow: none; +} + +footer { + background-color: var(--primary-dark); + color: var(--text-silver); +} \ No newline at end of file diff --git a/staticfiles/css/custom.css b/staticfiles/css/custom.css index 108056f..fa1d3c5 100644 --- a/staticfiles/css/custom.css +++ b/staticfiles/css/custom.css @@ -1,21 +1,154 @@ - :root { - --bg-color-start: #6a11cb; - --bg-color-end: #2575fc; - --text-color: #ffffff; - --card-bg-color: rgba(255, 255, 255, 0.01); - --card-border-color: rgba(255, 255, 255, 0.1); + --primary-dark: #121212; + --accent-red: #D90429; + --accent-red-hover: #EF233C; + --text-silver: #8D99AE; + --bg-light: #EDF2F4; + --white: #ffffff; } + body { - margin: 0; font-family: 'Inter', sans-serif; - background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end)); - color: var(--text-color); - display: flex; - justify-content: center; - align-items: center; - min-height: 100vh; - text-align: center; + background-color: var(--bg-light); + color: var(--primary-dark); + line-height: 1.6; +} + +h1, h2, h3, h4, .navbar-brand { + font-family: 'Montserrat', sans-serif; + font-weight: 800; +} + +/* Navbar */ +.navbar { + background-color: var(--primary-dark); + padding: 1rem 0; + box-shadow: 0 4px 12px rgba(0,0,0,0.1); +} + +.navbar-brand { + font-size: 1.5rem; + letter-spacing: -1px; +} + +.brand-auto { color: var(--white); } +.brand-bid { color: var(--accent-red); } + +/* Hero Section */ +.hero { + background: linear-gradient(135deg, var(--primary-dark) 0%, #2b2d42 100%); + padding: 100px 0; + color: var(--white); + position: relative; + overflow: hidden; +} + +.hero::after { + content: ''; + position: absolute; + top: -50%; + right: -10%; + width: 600px; + height: 600px; + background: radial-gradient(circle, rgba(217, 4, 41, 0.15) 0%, transparent 70%); + z-index: 0; +} + +.hero-content { + position: relative; + z-index: 1; +} + +/* Cards & Glassmorphism */ +.auction-card { + border: none; + border-radius: 16px; + overflow: hidden; + transition: transform 0.3s ease, box-shadow 0.3s ease; + background: var(--white); + box-shadow: 0 10px 30px rgba(0,0,0,0.05); +} + +.auction-card:hover { + transform: translateY(-8px); + box-shadow: 0 20px 40px rgba(0,0,0,0.1); +} + +.card-img-container { + height: 200px; overflow: hidden; position: relative; } + +.card-img-top { + width: 100%; + height: 100%; + object-fit: cover; +} + +.badge-bid { + position: absolute; + top: 15px; + right: 15px; + background: rgba(217, 4, 41, 0.9); + backdrop-filter: blur(4px); + color: white; + padding: 6px 12px; + border-radius: 8px; + font-weight: 600; + font-size: 0.85rem; +} + +.badge-time { + position: absolute; + bottom: 15px; + left: 15px; + background: rgba(18, 18, 18, 0.7); + backdrop-filter: blur(4px); + color: white; + padding: 4px 10px; + border-radius: 6px; + font-size: 0.75rem; +} + +/* Buttons */ +.btn-primary { + background-color: var(--accent-red); + border-color: var(--accent-red); + font-weight: 600; + border-radius: 8px; + padding: 10px 24px; +} + +.btn-primary:hover { + background-color: var(--accent-red-hover); + border-color: var(--accent-red-hover); +} + +/* Search Bar */ +.search-container { + background: rgba(255, 255, 255, 0.05); + backdrop-filter: blur(10px); + border: 1px solid rgba(255, 255, 255, 0.1); + border-radius: 12px; + padding: 8px; + max-width: 600px; +} + +.search-input { + background: transparent; + border: none; + color: white; + padding-left: 15px; +} + +.search-input:focus { + background: transparent; + color: white; + box-shadow: none; +} + +footer { + background-color: var(--primary-dark); + color: var(--text-silver); +} \ No newline at end of file