039 #20

Merged
cereci5049 merged 1 commit from ayushman into main 2024-08-10 22:53:56 +02:00
5 changed files with 74 additions and 79 deletions

View file

@ -10,7 +10,7 @@ proc signup*(ctx: Context): string=
if ctx.httpMethod == HttpGet:
var
user1 = ctx.cookies.getOrDefault("user1", "none")
user = to(parseJson(user1), User)
user = getUserFromCookie(user1)
compileTemplateFile(".." / "view" / "signup.nimja", baseDir = getScriptDir())
elif ctx.httpMethod == HttpPost:
var

View file

@ -4,7 +4,6 @@ import
strutils,
json,
strformat,
cookies,
./lib/[mics, htmx],
./db/users,
./model/[model, rand],
@ -16,57 +15,54 @@ import
"/" -> [get, post]:
var
user1 = ctx.cookies.getOrDefault("user1", """{"none": "none"}""")
echo user1
# var user = to(parseJson(user1), User)
user1 = ctx.cookies.getOrDefault("user1", "")
user = getUserFromCookie(user1)
echo user.firstName
compileTemplateFile("view" / "index.nimja", baseDir = getScriptDir())
"/shop" -> get:
# var user = ctx.getUserFromCookie(ctx.cookies.getOrDefault("user", ""))
# echo ctx.cookies.getOrDefault("user", "")
var
user1 = ctx.cookies.getOrDefault("user1", "none")
# user = to(parseJson(user1), User)
user = getUserFromCookie(user1)
compileTemplateFile("view" / "shop.nimja", baseDir = getScriptDir())
"/contact" -> get:
var
user1 = ctx.cookies.getOrDefault("user1", "none")
# user = to(parseJson(user1), User)
user = getUserFromCookie(user1)
compileTemplateFile("view" / "contact.nimja", baseDir = getScriptDir())
"/cart" -> get:
# var user = ctx.getUserFromCookie(ctx.cookies.getOrDefault("user", ""))
var
user1 = ctx.cookies.getOrDefault("user1", "none")
# user = to(parseJson(user1), User)
user = getUserFromCookie(user1)
compileTemplateFile("view" / "cart.nimja", baseDir = getScriptDir())
"/checkout" -> get:
var
user1 = ctx.cookies.getOrDefault("user1", "none")
user = to(parseJson(user1), User)
user = getUserFromCookie(user1)
compileTemplateFile("view" / "checkout.nimja", baseDir = getScriptDir())
"/shop/:id" -> get:
var
prodId = capitalizeAscii(ctx.pathParams["id"])
user1 = ctx.cookies.getOrDefault("user1", "none")
user = to(parseJson(user1), User)
user = getUserFromCookie(user1)
compileTemplateFile("view" / "shop-detail.nimja", baseDir = getScriptDir())
"/testimonial" -> get:
var
user1 = ctx.cookies.getOrDefault("user1", "none")
user = to(parseJson(user1), User)
user = getUserFromCookie(user1)
compileTemplateFile("view" / "testimonial.nimja", baseDir = getScriptDir())
# "/signup" -> [get, post]: ctx.signup()
"/signup" -> [get, post]: ctx.signup()
"/login" -> get:
var
user1 = ctx.cookies.getOrDefault("user1", "none")
# user = to(parseJson(user1), User)
user = getUserFromCookie(user1)
compileTemplateFile("view" / "login.nimja", baseDir = getScriptDir())
"/htmx/login" -> post:
var
@ -100,7 +96,6 @@ import
echo $(%* temp[1])
echo ctx.cookies
ctx.response.headers.add("HX-Redirect", "/")
# ctx.send("hello")
else:
for a, b in form:
val.name = b
@ -136,7 +131,7 @@ import
"/:path" -> get:
var
user1 = ctx.cookies.getOrDefault("user1", "none")
user = to(parseJson(user1), User)
user = getUserFromCookie(user1)
compileTemplateFile("view" / "404.nimja", baseDir = getScriptDir())
servePublic("src/public", "/static")

View file

@ -12,15 +12,15 @@ proc newTurso*(): Turso =
echo getEnv("DATABASE_URL")
result = connect(getEnv("DATABASE_URL"), getEnv("AUTH_TOKEN"))
# proc getUserFromCookie*(ctx: Context, user: string): User =
# if user == "":
# return User(
# firstName: "",
# lastName: "",
# email: "",
# phone: "",
# password: "",
# accessLevel: 0
# )
# else:
# return to(parseJson(user), User)
proc getUserFromCookie*(user: string): User =
if user == "":
return User(
firstName: "",
lastName: "",
email: "",
phone: "",
password: "",
accessLevel: 0
)
else:
return to(parseJson(user), User)

View file

@ -20,11 +20,11 @@
<div id="carouselId" class="carousel slide position-relative" data-bs-ride="carousel">
<div class="carousel-inner" role="listbox">
<div class="carousel-item active rounded">
<img src="img/hero-img-1.png" class="img-fluid w-100 h-100 bg-secondary rounded" alt="First slide">
<img src="/static/img/hero-img-1.png" class="img-fluid w-100 h-100 bg-secondary rounded" alt="First slide">
<a href="#" class="btn px-4 py-2 text-white rounded">Fruites</a>
</div>
<div class="carousel-item rounded">
<img src="img/hero-img-2.jpg" class="img-fluid w-100 h-100 rounded" alt="Second slide">
<img src="/static/img/hero-img-2.jpg" class="img-fluid w-100 h-100 rounded" alt="Second slide">
<a href="#" class="btn px-4 py-2 text-white rounded">Vesitables</a>
</div>
</div>
@ -144,7 +144,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-5.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-5.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -160,7 +160,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-5.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-5.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -176,7 +176,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-2.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-2.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -192,7 +192,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-4.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-4.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -208,7 +208,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-3.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-3.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -224,7 +224,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-1.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-1.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -240,7 +240,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-2.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-2.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -256,7 +256,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-5.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-5.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -280,7 +280,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-5.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-5.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -296,7 +296,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-2.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-2.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -320,7 +320,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-1.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-1.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -336,7 +336,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-6.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-6.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -360,7 +360,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-5.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-5.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -376,7 +376,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-4.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-4.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -400,7 +400,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-3.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-3.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -416,7 +416,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-2.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-2.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -432,7 +432,7 @@
<div class="col-md-6 col-lg-4 col-xl-3">
<div class="rounded position-relative fruite-item">
<div class="fruite-img">
<img src="img/fruite-item-1.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/fruite-item-1.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-secondary px-3 py-1 rounded position-absolute" style="top: 10px; left: 10px;">Fruits</div>
<div class="p-4 border border-secondary border-top-0 rounded-bottom">
@ -463,7 +463,7 @@
<div class="col-md-6 col-lg-4">
<a href="#">
<div class="service-item bg-secondary rounded border border-secondary">
<img src="img/featur-1.jpg" class="img-fluid rounded-top w-100" alt="">
<img src="/static/img/featur-1.jpg" class="img-fluid rounded-top w-100" alt="">
<div class="px-4 rounded-bottom">
<div class="service-content bg-primary text-center p-4 rounded">
<h5 class="text-white">Fresh Apples</h5>
@ -476,7 +476,7 @@
<div class="col-md-6 col-lg-4">
<a href="#">
<div class="service-item bg-dark rounded border border-dark">
<img src="img/featur-2.jpg" class="img-fluid rounded-top w-100" alt="">
<img src="/static/img/featur-2.jpg" class="img-fluid rounded-top w-100" alt="">
<div class="px-4 rounded-bottom">
<div class="service-content bg-light text-center p-4 rounded">
<h5 class="text-primary">Tasty Fruits</h5>
@ -489,7 +489,7 @@
<div class="col-md-6 col-lg-4">
<a href="#">
<div class="service-item bg-primary rounded border border-primary">
<img src="img/featur-3.jpg" class="img-fluid rounded-top w-100" alt="">
<img src="/static/img/featur-3.jpg" class="img-fluid rounded-top w-100" alt="">
<div class="px-4 rounded-bottom">
<div class="service-content bg-secondary text-center p-4 rounded">
<h5 class="text-white">Exotic Vegitable</h5>
@ -512,7 +512,7 @@
<div class="owl-carousel vegetable-carousel justify-content-center">
<div class="border border-primary rounded position-relative vesitable-item">
<div class="vesitable-img">
<img src="img/vegetable-item-6.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/vegetable-item-6.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-primary px-3 py-1 rounded position-absolute" style="top: 10px; right: 10px;">Vegetable</div>
<div class="p-4 rounded-bottom">
@ -526,7 +526,7 @@
</div>
<div class="border border-primary rounded position-relative vesitable-item">
<div class="vesitable-img">
<img src="img/vegetable-item-1.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/vegetable-item-1.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-primary px-3 py-1 rounded position-absolute" style="top: 10px; right: 10px;">Vegetable</div>
<div class="p-4 rounded-bottom">
@ -540,7 +540,7 @@
</div>
<div class="border border-primary rounded position-relative vesitable-item">
<div class="vesitable-img">
<img src="img/vegetable-item-3.png" class="img-fluid w-100 rounded-top bg-light" alt="">
<img src="/static/img/vegetable-item-3.png" class="img-fluid w-100 rounded-top bg-light" alt="">
</div>
<div class="text-white bg-primary px-3 py-1 rounded position-absolute" style="top: 10px; right: 10px;">Vegetable</div>
<div class="p-4 rounded-bottom">
@ -554,7 +554,7 @@
</div>
<div class="border border-primary rounded position-relative vesitable-item">
<div class="vesitable-img">
<img src="img/vegetable-item-4.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/vegetable-item-4.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-primary px-3 py-1 rounded position-absolute" style="top: 10px; right: 10px;">Vegetable</div>
<div class="p-4 rounded-bottom">
@ -568,7 +568,7 @@
</div>
<div class="border border-primary rounded position-relative vesitable-item">
<div class="vesitable-img">
<img src="img/vegetable-item-5.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/vegetable-item-5.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-primary px-3 py-1 rounded position-absolute" style="top: 10px; right: 10px;">Vegetable</div>
<div class="p-4 rounded-bottom">
@ -582,7 +582,7 @@
</div>
<div class="border border-primary rounded position-relative vesitable-item">
<div class="vesitable-img">
<img src="img/vegetable-item-6.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/vegetable-item-6.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-primary px-3 py-1 rounded position-absolute" style="top: 10px; right: 10px;">Vegetable</div>
<div class="p-4 rounded-bottom">
@ -596,7 +596,7 @@
</div>
<div class="border border-primary rounded position-relative vesitable-item">
<div class="vesitable-img">
<img src="img/vegetable-item-5.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/vegetable-item-5.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-primary px-3 py-1 rounded position-absolute" style="top: 10px; right: 10px;">Vegetable</div>
<div class="p-4 rounded-bottom">
@ -610,7 +610,7 @@
</div>
<div class="border border-primary rounded position-relative vesitable-item">
<div class="vesitable-img">
<img src="img/vegetable-item-6.jpg" class="img-fluid w-100 rounded-top" alt="">
<img src="/static/img/vegetable-item-6.jpg" class="img-fluid w-100 rounded-top" alt="">
</div>
<div class="text-white bg-primary px-3 py-1 rounded position-absolute" style="top: 10px; right: 10px;">Vegetable</div>
<div class="p-4 rounded-bottom">
@ -642,7 +642,7 @@
</div>
<div class="col-lg-6">
<div class="position-relative">
<img src="img/baner-1.png" class="img-fluid w-100 rounded" alt="">
<img src="/static/img/baner-1.png" class="img-fluid w-100 rounded" alt="">
<div class="d-flex align-items-center justify-content-center bg-white rounded-circle position-absolute" style="width: 140px; height: 140px; top: 0; left: 0;">
<h1 style="font-size: 100px;">1</h1>
<div class="d-flex flex-column">
@ -670,7 +670,7 @@
<div class="p-4 rounded bg-light">
<div class="row align-items-center">
<div class="col-6">
<img src="img/best-product-1.jpg" class="img-fluid rounded-circle w-100" alt="">
<img src="/static/img/best-product-1.jpg" class="img-fluid rounded-circle w-100" alt="">
</div>
<div class="col-6">
<a href="#" class="h5">Organic Tomato</a>
@ -691,7 +691,7 @@
<div class="p-4 rounded bg-light">
<div class="row align-items-center">
<div class="col-6">
<img src="img/best-product-2.jpg" class="img-fluid rounded-circle w-100" alt="">
<img src="/static/img/best-product-2.jpg" class="img-fluid rounded-circle w-100" alt="">
</div>
<div class="col-6">
<a href="#" class="h5">Organic Tomato</a>
@ -712,7 +712,7 @@
<div class="p-4 rounded bg-light">
<div class="row align-items-center">
<div class="col-6">
<img src="img/best-product-3.jpg" class="img-fluid rounded-circle w-100" alt="">
<img src="/static/img/best-product-3.jpg" class="img-fluid rounded-circle w-100" alt="">
</div>
<div class="col-6">
<a href="#" class="h5">Organic Tomato</a>
@ -733,7 +733,7 @@
<div class="p-4 rounded bg-light">
<div class="row align-items-center">
<div class="col-6">
<img src="img/best-product-4.jpg" class="img-fluid rounded-circle w-100" alt="">
<img src="/static/img/best-product-4.jpg" class="img-fluid rounded-circle w-100" alt="">
</div>
<div class="col-6">
<a href="#" class="h5">Organic Tomato</a>
@ -754,7 +754,7 @@
<div class="p-4 rounded bg-light">
<div class="row align-items-center">
<div class="col-6">
<img src="img/best-product-5.jpg" class="img-fluid rounded-circle w-100" alt="">
<img src="/static/img/best-product-5.jpg" class="img-fluid rounded-circle w-100" alt="">
</div>
<div class="col-6">
<a href="#" class="h5">Organic Tomato</a>
@ -775,7 +775,7 @@
<div class="p-4 rounded bg-light">
<div class="row align-items-center">
<div class="col-6">
<img src="img/best-product-6.jpg" class="img-fluid rounded-circle w-100" alt="">
<img src="/static/img/best-product-6.jpg" class="img-fluid rounded-circle w-100" alt="">
</div>
<div class="col-6">
<a href="#" class="h5">Organic Tomato</a>
@ -794,7 +794,7 @@
</div>
<div class="col-md-6 col-lg-6 col-xl-3">
<div class="text-center">
<img src="img/fruite-item-1.jpg" class="img-fluid rounded" alt="">
<img src="/static/img/fruite-item-1.jpg" class="img-fluid rounded" alt="">
<div class="py-4">
<a href="#" class="h5">Organic Tomato</a>
<div class="d-flex my-3 justify-content-center">
@ -811,7 +811,7 @@
</div>
<div class="col-md-6 col-lg-6 col-xl-3">
<div class="text-center">
<img src="img/fruite-item-2.jpg" class="img-fluid rounded" alt="">
<img src="/static/img/fruite-item-2.jpg" class="img-fluid rounded" alt="">
<div class="py-4">
<a href="#" class="h5">Organic Tomato</a>
<div class="d-flex my-3 justify-content-center">
@ -828,7 +828,7 @@
</div>
<div class="col-md-6 col-lg-6 col-xl-3">
<div class="text-center">
<img src="img/fruite-item-3.jpg" class="img-fluid rounded" alt="">
<img src="/static/img/fruite-item-3.jpg" class="img-fluid rounded" alt="">
<div class="py-4">
<a href="#" class="h5">Organic Tomato</a>
<div class="d-flex my-3 justify-content-center">
@ -845,7 +845,7 @@
</div>
<div class="col-md-6 col-lg-6 col-xl-3">
<div class="text-center">
<img src="img/fruite-item-4.jpg" class="img-fluid rounded" alt="">
<img src="/static/img/fruite-item-4.jpg" class="img-fluid rounded" alt="">
<div class="py-2">
<a href="#" class="h5">Organic Tomato</a>
<div class="d-flex my-3 justify-content-center">
@ -923,7 +923,7 @@
</div>
<div class="d-flex align-items-center flex-nowrap">
<div class="bg-secondary rounded">
<img src="img/testimonial-1.jpg" class="img-fluid rounded" style="width: 100px; height: 100px;" alt="">
<img src="/static/img/testimonial-1.jpg" class="img-fluid rounded" style="width: 100px; height: 100px;" alt="">
</div>
<div class="ms-4 d-block">
<h4 class="text-dark">Client Name</h4>
@ -948,7 +948,7 @@
</div>
<div class="d-flex align-items-center flex-nowrap">
<div class="bg-secondary rounded">
<img src="img/testimonial-1.jpg" class="img-fluid rounded" style="width: 100px; height: 100px;" alt="">
<img src="/static/img/testimonial-1.jpg" class="img-fluid rounded" style="width: 100px; height: 100px;" alt="">
</div>
<div class="ms-4 d-block">
<h4 class="text-dark">Client Name</h4>
@ -973,7 +973,7 @@
</div>
<div class="d-flex align-items-center flex-nowrap">
<div class="bg-secondary rounded">
<img src="img/testimonial-1.jpg" class="img-fluid rounded" style="width: 100px; height: 100px;" alt="">
<img src="/static/img/testimonial-1.jpg" class="img-fluid rounded" style="width: 100px; height: 100px;" alt="">
</div>
<div class="ms-4 d-block">
<h4 class="text-dark">Client Name</h4>

View file

@ -76,8 +76,8 @@
</div>
<div class="d-flex m-3 me-0">
<button class="btn-search btn border border-secondary btn-md-square rounded-circle bg-white me-4" data-bs-toggle="modal" data-bs-target="#searchModal"><i class="fas fa-search text-primary"></i></button>
{# {% if user.firstName != "" %}
<div class="nav-item dropdown">
{% if user1 != "" %}
<div class="me-4 my-auto nav-item dropdown">
<a href="#" class="fas fa-user fa-2x" data-bs-toggle="dropdown"></a>
<div class="dropdown-menu m-0 bg-secondary rounded-0">
<a href="/cart" class="dropdown-item">Cart</a>
@ -86,11 +86,11 @@
<a href="404.html" class="dropdown-item">404 Page</a>
</div>
</div>
{% else %} #}
{% else %}
<a href="/login" class="me-4 my-auto">
<i class="fas fa-user fa-2x"></i>
</a>
{# {% endif %} #}
{% endif %}
<a href="/cart" class="position-relative my-auto">
<i class="fa fa-shopping-bag fa-2x"></i>
@ -201,7 +201,7 @@
<p>Email: Example@gmail.com</p>
<p>Phone: +0123 4567 8910</p>
<p>Payment Accepted</p>
<img src="img/payment.png" class="img-fluid" alt="">
<img src="/static/img/payment.png" class="img-fluid" alt="">
</div>
</div>
</div>