Initial commit
This commit is contained in:
17
templates/about.html
Normal file
17
templates/about.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %} Арка | О нас {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1> О нас </h1>
|
||||
<p>
|
||||
На этой странице должен быть написан текст об этой компании.
|
||||
</p>
|
||||
|
||||
<h3>Контакты</h3>
|
||||
<ul>
|
||||
<li><a href="https://t.me/Vlad_ost_31">@Vlad_ost_31</a> - Владислав, разработчик сайта.</li>
|
||||
<li><a href="https://t.me/n3luna">@n3luna</a> - Георгий, разработчик мобильного приложения.</li>
|
||||
<li><a href="https://t.me/sergey_investing">@sergey_investing</a> - Сергей, дизайнер, верстальщик.</li>
|
||||
<li><a href="https://t.me/PavelIvanchenko">@PavelIvanchenko</a> - Павел, просто главный.</li>
|
||||
</ul>
|
||||
{% endblock %}
|
15
templates/account.html
Normal file
15
templates/account.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %} Аккаунт | вход {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1> Ваш аккаунт </h1>
|
||||
<h3>Регистрация</h3>
|
||||
<form action="" method="POST">{% csrf_token %}
|
||||
<table>
|
||||
<tbody>
|
||||
{{ form.as_table }}
|
||||
</tbody>
|
||||
</table>
|
||||
<button type="submit">Регистрация</button>
|
||||
</form>
|
||||
{% endblock %}
|
44
templates/base.html
Normal file
44
templates/base.html
Normal file
@@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title> {% block title %} Арка {% endblock %} </title>
|
||||
{% load static %}
|
||||
<link rel="icon" type="image/webp" href="{% static 'favicon.webp' %}">
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}">
|
||||
{% block styles %} {% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<div class="header-wrapper">
|
||||
<img alt="logo" src="{% static 'favicon.webp' %}">
|
||||
<div>
|
||||
<h3>Арка</h3>
|
||||
<h6>Сайт для анонимного ремонта</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
{% if user %}
|
||||
<h5 style="text-align: right">{{ user.user_name }}</h5>
|
||||
{% else %}
|
||||
<h5>Anonim</h5>
|
||||
{% endif %}
|
||||
</div>
|
||||
</header>
|
||||
<nav>
|
||||
<a href="{% url 'index' %}">На главную</a>
|
||||
<a href="{% url 'account' %}">Аккаунт</a>
|
||||
<a href="{% url 'dev_index' %}">Dev</a>
|
||||
<a href="{% url 'about' %}">О нас</a>
|
||||
{# <button id="theme-switcher">Переключить тему</button>#}
|
||||
</nav>
|
||||
<main id="content">
|
||||
{% block content %} тут должен быть контент {% endblock %}
|
||||
</main>
|
||||
|
||||
{# <footer> {% block footer %} {% endblock %} </footer>#}
|
||||
{# <script src="{% static 'js/main.js' %}"></script>#}
|
||||
</body>
|
||||
</html>
|
30
templates/cart.html
Normal file
30
templates/cart.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %} Корзина {% endblock %}
|
||||
|
||||
{% block styles %}
|
||||
{% load static %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/catalog-style.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1> Ваша корзина </h1>
|
||||
{% if user %}
|
||||
{% if cart_objects %}
|
||||
{% for ojb in cart_objects %}
|
||||
{# 'item_count', 'prod', 'prod__prod_name', 'prod__prod_price', 'prod__prod_available', 'prod__prod_photo', 'prod__category__cat_name' #}
|
||||
<a class="product" href="/catalog/{{ obj.1 }}/" style="text-decoration: none">
|
||||
<img src="/static/images/{% if obj.5 %}no-photo.webp{% else %}products/{{ obj.5 }}{% endif %}" alt="photo">
|
||||
<div>
|
||||
<div> {{ ojb.0 }}шт </div>
|
||||
<div><strong> {{ ojb.2 }} </strong>₽</div>
|
||||
<div> {{ ojb.3 }} доступно </div>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<h3 style="text-align: center">Корзина пуста!</h3>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
нужно войти...
|
||||
{% endif %}
|
||||
{% endblock %}
|
45
templates/catalog.html
Normal file
45
templates/catalog.html
Normal file
@@ -0,0 +1,45 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %} Каталог {% endblock %}
|
||||
|
||||
{% block styles %}
|
||||
{% load static %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/catalog-style.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
Каталог
|
||||
{% if cat_name %}
|
||||
/ {{ cat_name }}
|
||||
{% endif %}
|
||||
</h1>
|
||||
<div class="catalog-container">
|
||||
<div class="catalog-categories">
|
||||
<h4 style="text-align: center">Категории</h4>
|
||||
<ul>
|
||||
<li><a href="{% url 'catalog' %}">Все категории</a></li>
|
||||
{% for c in categories %}
|
||||
<li><a href="{% url 'catalog' %}?cat={{ c.id }}">{{ c.cat_name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% if products %}
|
||||
<div class="catalog-products">
|
||||
{% for p in products %}
|
||||
<a class="product" href="{% url 'product_view' p.id %}" style="text-decoration: none">
|
||||
<img src="{{ p.get_photo_url }}" alt="photo">
|
||||
<div>
|
||||
<div> {{ p.prod_name }} </div>
|
||||
<div><strong> {{ p.prod_price }} </strong>₽</div>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div style="display: flex; flex-wrap: wrap; align-content: center; flex-grow: 1;">
|
||||
<h3 style="text-align: center; width: 100%">Упс, тут нет доступных товаров...</h3>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
59
templates/dev.html
Normal file
59
templates/dev.html
Normal file
@@ -0,0 +1,59 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %} Арка | DevLog {% endblock %}
|
||||
|
||||
{% block styles %}
|
||||
<style>
|
||||
.event-type {
|
||||
background: #c447a1;
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.event-date {
|
||||
background: var(--bkg-color2);
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.event-wrapper {
|
||||
padding: 10px;
|
||||
margin-top: 20px;
|
||||
border-bottom: 2px solid var(--text-color);
|
||||
}
|
||||
|
||||
.event-wrapper:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
details div {
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
padding-left: 10px;
|
||||
border-left: 1px solid var(--text-color);
|
||||
}
|
||||
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1> DevLog </h1>
|
||||
|
||||
{% if events %}
|
||||
{% for e in events %}
|
||||
<div class="event-wrapper">
|
||||
<span class="event-type">{{ e.event_type }}</span>
|
||||
<span class="event-date">{{ e.event_time }}</span>
|
||||
<h2>{{ e.name }}</h2>
|
||||
<details>
|
||||
<summary>Описание</summary>
|
||||
<div>
|
||||
{{ e.description | safe }}
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<h2>Не передан объект <i>events</i> в шаблон</h2>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
21
templates/index.html
Normal file
21
templates/index.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %} Арка | Главная {% endblock %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<h1> Главная страница </h1>
|
||||
|
||||
Правила<br>
|
||||
|
||||
1) не скамить<br>
|
||||
2) скамим только мы<br>
|
||||
3) {криво,косо,жопо}руких не принимаем<br>
|
||||
|
||||
<div style="margin-top: 50px">
|
||||
<h3>Ну а пока тут нет нужного контента можно послушать музычку</h3>
|
||||
<audio controls preload="none">
|
||||
<source src="{% static 'm.mp3' %}" type="audio/mp3">
|
||||
Your browser does not support the audio element.
|
||||
</audio>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
26
templates/product-view.html
Normal file
26
templates/product-view.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %} Каталог {% endblock %}
|
||||
|
||||
{% block styles %}
|
||||
{% load static %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'css/product-view-style.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1> {{ product.prod_name }} </h1>
|
||||
{% if product %}
|
||||
<div class="product-container">
|
||||
<div id="product-photo-container">
|
||||
<img id="product-photo" src="{{ product.get_photo_url }}" alt="photo">
|
||||
</div>
|
||||
<div>
|
||||
<h3>Цена: <span id="price-banner">{{ product.prod_price }}</span></h3>
|
||||
<p id="product-description">{{ product.prod_description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div style="display: flex; flex-wrap: wrap; align-content: center; flex-grow: 1;">
|
||||
<h3 style="text-align: center; width: 100%">Упс, товар не найден...</h3>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
16
templates/registration/login.html
Normal file
16
templates/registration/login.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{% extends 'base.html' %}
|
||||
{% block title %} Аккаунт | вход {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1> Ваш аккаунт </h1>
|
||||
<h3>Вход</h3>
|
||||
<form action="{% url 'login' %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
<tbody>
|
||||
{{ form.as_table }}
|
||||
</tbody>
|
||||
</table>
|
||||
<button type="submit">Войти</button>
|
||||
</form>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user