Small commit: help for Sergey with html

This commit is contained in:
vlados31 2022-09-27 13:44:19 +03:00
parent c2d0dc7b27
commit 7b19ac39c1
12 changed files with 152 additions and 99 deletions

View File

@ -5,4 +5,5 @@ from .models import *
@admin.register(SiteUser)
class DevEventAdmin(admin.ModelAdmin):
# fields = ['name', 'surname', 'phone', 'email', 'register_datetime']
list_display = ['name', 'surname', 'phone', 'email', 'register_datetime']
readonly_fields = ['register_datetime']

View File

@ -1,6 +1,10 @@
from django.db import models
class City(models.Model):
name = models.CharField(max_length=50)
class Order(models.Model):
# основные поля: название и описание
name = models.CharField(max_length=200)
@ -9,8 +13,7 @@ class Order(models.Model):
# площадь в квадратных метрах
square = models.DecimalField(max_digits=5, decimal_places=2, blank=False)
# TODO время работы, мы пока не определились как его хранить
# но было предложение от Паши хранить просто строкой, как на виксе
work_time = models.CharField(max_length=100, blank=True)
# дальше вид дома, тип ремонта, тип квартиры, требуется дизайн проект, закуп материала, тип исполнителя

View File

@ -30,8 +30,8 @@ body {
background: var(--bkg-color);
}
h1, p {
color: var(--text-color);
.deprecated-page-header {
text-align: center;
}
/* ========== MAIN STYLES ========== */
@ -133,7 +133,3 @@ header > * {
}
}
h1 {
text-align: center;
}

View File

@ -2,7 +2,7 @@
{% block title %} Аккаунт | вход {% endblock %}
{% block content %}
<h1> Список методов API </h1>
<h1 class=deprecated-page-header"> Список методов API </h1>
{% for method in api_methods %}
<div>

View File

@ -36,7 +36,7 @@
{% block content %}
<h1> DevLog </h1>
<h1 class=deprecated-page-header"> DevLog </h1>
{% if user.is_staff %}
{% if events %}

View File

@ -4,78 +4,131 @@
{% block styles %}
<style>
/* TODO
1) не понятно зачем ссылке был присвоен класс,
если селектором можно отобрать ссылки
(и не только ссылки, если вдруг захочется)
2) флекс внутри ссылки не нужен: дочерних же элементов нет
3) избавься от размеров в пикселях: это касается всех правил
и это необходимо сделать если ты хочешь чтобы страничка нормально отображалась и на мобилках
4) пропиши все цвета как переменные css (их можно посмотреть в /static/css/style.css).
например: color: var(--brand-color); (для заголовка, остальное сам подумай)*/
main > h1{
font-style: normal;
main {
width: 90%;
margin-left: 8%;
font-size: 30px;
font-weight: 900;
font-size: 58px;
line-height: 79px;
color: #231765;
width: 80%;
display: flex;
justify-content: left;
margin-left: 10%;
margin-top: 192px;
}
.button-to > .button{
display: inline-block;
background: #231765;
color: #fff;
main > h1{
margin-top: 7%;
margin-left: 10%;
width: 60%;
}
#intro-wrapper {
display: flex;
position: absolute;
z-index:-1;
top: 0;
left: 0;
right: 0;
justify-content: right;
}
flex-direction: row;
padding-left:40px;
padding-top: 20px;
padding-right: 40px;
#intro-wrapper > img{
width: 40%;
}
border-radius: 12px;
gap: 10px;
margin-top: 286px;
.buttons {
/* вот тут был display: inline */
display: flex;
flex-direction: row ;
width: 40%;
height: 10%;
margin-left: 5%;
margin-top: 5%;
text-align: center;
}
width: 260px;
height: 70px;
.buttons > a {
color: #eee;
background: var(--brand-color);
padding: 3% 5%;
margin-left: 5%;
text-decoration: none;
font-size: 20px;
border-radius: 12px;
}
.button-to{
margin-left: 187px;
.slogo {
box-sizing: border-box;
display: flex;
margin-left: 10%;
margin-bottom: 10%;
width: 35%;
height: 10%;
}
.slogo > h3 {
background: rgba(175, 162, 255, 0.06);
backdrop-filter: blur(5px);
color: var(--brand-color);
font-weight: 800;
font-size: 20px;
line-height: 27px;
border-radius: 24px;
padding: 5% 8%;
font-style: normal;
}
#slogo-cube, #slogo-arc {
z-index: -1;
position: absolute;
}
#slogo-cube {
width: 59px;
height: 66px;
left: 15%;
top: 539px;
transform: rotate(18.48deg);
}
#slogo-arc {
width: 53px;
height: 49px;
left: 47%;
top: 423px;
transform: rotate(5.86deg);
}
</style>
{% endblock %}
{% block content %}
<h1>Создай обьявление и получи
ремонт с гарантией качества</h1>
<div class="button-to">
<a class="button" href="#">Создать заказ</a>
<a class="button" href="#">Стать исполнителем</a>
<div id="intro-wrapper">
<img src="{% static 'images/intro.webp' %}" alt="">
</div>
<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>
<h1>Создай объявление и получи ремонт с гарантией качества</h1>
<div class="slogo">
<img id="slogo-cube" src="{% static 'images/cube.png' %}" alt="">
<h3>Здесь вы найдёте проверенного исполнителя или заказчика под любую вашу задачу и профиль</h3>
<img id="slogo-arc" src="{% static 'images/arc.png' %}" alt="">
</div>
<div class="buttons">
<a href="{% url 'index' %}">Создать заказ</a>
<a href="{% url 'index' %}">Стать исполнителем</a>
</div>
<a href="{% url 'user-agreement' %}">Пользовательское соглашение</a>

View File

@ -2,7 +2,7 @@
{% block title %} Аккаунт | вход {% endblock %}
{% block content %}
<h1> Создать заказ </h1>
<h1 class=deprecated-page-header"> Создать заказ </h1>
<h3>тут должна быть форма создания заказа</h3>

View File

@ -2,7 +2,7 @@
{% block title %} Аккаунт | вход {% endblock %}
{% block content %}
<h1> Список заказов </h1>
<h1 class=deprecated-page-header"> Список заказов </h1>
{% if user.is_authenticated %}
тут должен быть список заказов...
{% else %}

View File

@ -2,7 +2,7 @@
{% block title %} Аккаунт | вход {% endblock %}
{% block content %}
<h1> Ваш аккаунт </h1>
<h1 class=deprecated-page-header"> Ваш аккаунт </h1>
{% if user.is_authenticated %}
Ваше имя: {{ user.name }}<br>
Ваша фамилия: {{ user.surname }}<br>

View File

@ -10,7 +10,7 @@
{% endblock %}
{% block content %}
<h1> Ваш аккаунт </h1>
<h1 class=deprecated-page-header"> Ваш аккаунт </h1>
<h3>Вход</h3>
<form action="{% url 'login' %}" method="POST">
{% csrf_token %}

View File

@ -16,7 +16,7 @@
{% endblock %}
{% block content %}
<h1> Страница для выполнения лабы </h1>
<h1 class=deprecated-page-header"> Страница для выполнения лабы </h1>
<div id="example-content">
<span id="c">Тут будет текст из JS</span>

View File

@ -2,7 +2,7 @@
{% block title %} Аккаунт | пользовательское соглашение {% endblock %}
{% block content %}
<h1> Пользовательское соглашение </h1>
<h1 class=deprecated-page-header"> Пользовательское соглашение </h1>
<div id="user-agreement-container">