Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/pay #3

Merged
merged 2 commits into from
Sep 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions apps/shop/templates/base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!DOCTYPE html>

<html lang="en">

{% load static %}

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="static/images/logo.png" type="image/x-icon" />
<title>Welcome to our Restaurant</title>

<!-- font awesome cdn link -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">

<link rel="stylesheet" href="https://unpkg.com/swiper@7/swiper-bundle.min.css" />

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lightgallery-js/1.4.0/css/lightgallery.min.css">

<link rel="stylesheet" href="{% static 'css/style.css' %}">
<!-- custom css file link -->

</head>

<body>
{% include 'sections/header.html' %}
{% block content %}

{% endblock %}
{% include 'sections/footer.html' %}


<script src="https://unpkg.com/swiper@7/swiper-bundle.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/lightgallery-js/1.4.0/js/lightgallery.min.js"></script>

<!-- custom js file link -->
<script src="static/js/script.js"></script>

<script>
lightGallery(document.querySelector('.gallery .gallery-container'));
</script>

</body>

</html>
7 changes: 7 additions & 0 deletions apps/shop/templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends "base.html" %}

{% block content %}
{% include 'sections/home.html' %}
{% include 'sections/about.html' %}
{% include 'sections/food.html' %}
{% endblock %}
33 changes: 33 additions & 0 deletions apps/shop/templates/sections/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!-- about section starts -->

<section class="about" id="about">

<div class="image">
<img src="static/images/about-img.png" alt="">
</div>

<div class="content">
<h3 class="title">welcome to our restaurant</h3>
<p>We have a very old family tradition: once a month we pay a visit to the restaurant for a family dinner. It is
a great chance to spend the evening out of our usual setting. What is more, it is a good chance to have fun
and get away from the routine we get tired of and enjoy some time with the family.</p>

<div class="icons-container">
<div class="icons">
<img src="static/images/about-icon-1.png" alt="">
<h3>quality food</h3>
</div>
<div class="icons">
<img src="static/images/about-icon-2.png" alt="">
<h3>food & drinks</h3>
</div>
<div class="icons">
<img src="static/images/about-icon-3.png" alt="">
<h3>expert chefs</h3>
</div>
</div>
</div>

</section>

<!-- about section ends -->
50 changes: 50 additions & 0 deletions apps/shop/templates/sections/food.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!-- food section starts -->
{% load static %}
<section class="food" id="food">

<div class="heading">
<span>popular dishes</span>
<h3>our delicious food</h3>
</div>

<div class="swiper food-slider">

<div class="swiper-wrapper">

<div class="swiper-slide slide" data-name="food-12">
<img src="{% static 'media/food-img-1.png' %}" alt="">
<h3>Barbecue</h3>
<div class="price">$49.990</div>
<a href="index.html#order" class="btn">buy now</a>
</div>

<div class="swiper-slide slide" data-name="food-13">
<img src="{% static 'media/food-img-2.png' %}" alt="">
<h3>Steak</h3>
<div class="price">$61.990</div>
<a href="index.html#order" class="btn">buy now</a>
</div>

<div class="swiper-slide slide" data-name="food-14">
<img src="{% static 'media/food-img-3.png' %}" alt="">
<h3>Crispy fried chicken</h3>
<div class="price">$30.000</div>
<a href="index.html#order" class="btn">buy now</a>
</div>

<div class="swiper-slide slide" data-name="food-15">
<img src="{% static 'media/food-img-5.png' %}" alt="">
<h3>Taco</h3>
<div class="price">$63.000</div>
<a href="index.html#order" class="btn">buy now</a>
</div>

</div>

<div class="swiper-pagination"></div>

</div>

</section>

<!-- food section ends -->
44 changes: 44 additions & 0 deletions apps/shop/templates/sections/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!-- footer section starts -->

<section class="footer">

<div class="icons-container">

<div class="icons">
<i class="fas fa-clock"></i>
<h3>opening hours</h3>
<p>24h</p>
</div>

<div class="icons">
<i class="fas fa-phone"></i>
<h3>phone</h3>
<p>+123-456-7890</p>
<p>+111-222-3333</p>
</div>

<div class="icons">
<i class="fas fa-envelope"></i>
<h3>email</h3>
<p>[email protected]</p>
<p>[email protected]</p>
</div>

<div class="icons">
<i class="fas fa-map"></i>
<h3>address</h3>
<p>Tashkent, Uzbekistan - 400104</p>
</div>

</div>

<div class="share">
<a href="https://t.me/JapanFoods" class="fab fa-telegram"></a>
<a href="https://twitter.com/foods_japan" class="fab fa-twitter"></a>
</div>

<div class="credit"> © 2022 Amazing Foods </div>

</section>

<!-- footer section ends -->
21 changes: 21 additions & 0 deletions apps/shop/templates/sections/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- header section starts -->

<section class="header">

<a href="index.html" class="logo"> <i class="fas fa-utensils"></i> food. </a>

<nav class="navbar">
<a href="index.html#home">home</a>
<a href="index.html#about">about</a>
<a href="index.html#food">food</a>
<a href="index.html#gallery">gallery</a>
<a href="index.html#menu">menu</a>
<a href="index.html#order">order</a>
<a href="index.html#blogs">blogs</a>
</nav>

<div id="menu-btn" class="fas fa-bars"></div>

</section>

<!-- header section ends -->
42 changes: 42 additions & 0 deletions apps/shop/templates/sections/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!-- home section starts -->

<section class="home" id="home">

<div class="swiper home-slider">

<div class="swiper-wrapper">

<div class="swiper-slide slide" style="background: url(static/images/home-slide-1.jpg) no-repeat;">
<div class="content">
<span>outstanding food</span>
<h3>delicious cooking</h3>
<a href="index.html#" class="btn">get started</a>
</div>
</div>

<div class="swiper-slide slide" style="background: url(static/images/home-slide-2.jpg) no-repeat;">
<div class="content">
<span>outstanding food</span>
<h3>morning moment</h3>
<a href="index.html#" class="btn">get started</a>
</div>
</div>

<div class="swiper-slide slide" style="background: url(static/images/home-slide-3.jpg) no-repeat;">
<div class="content">
<span>outstanding food</span>
<h3>authentic kitchen</h3>
<a href="index.html#" class="btn">get started</a>
</div>
</div>

</div>

<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>

</div>

</section>

<!-- home section ends -->
4 changes: 4 additions & 0 deletions apps/shop/views/home.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from django.shortcuts import render

def home_view(request):
return render(request, 'index.html')
3 changes: 3 additions & 0 deletions mysite/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,8 @@

STATIC_URL = '/static/'

STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'static')
]

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
2 changes: 2 additions & 0 deletions mysite/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

from docs.yasg.urls import urlpatterns as yasg_urls

from apps.shop.views.home import home_view
from apps.shop.views.call_back import PaymeCallBackAPIView


urlpatterns = [
path('', home_view, name='home'),
path('admin/', admin.site.urls),
path("shop/", include("shop.urls")),
path('payments/merchant/', PaymeCallBackAPIView.as_view()) # call back for merchant transactions
Expand Down
Loading
Loading