0.0.32 video links and change font
This commit is contained in:
@@ -27,8 +27,9 @@ class Admin_Inline_WidgetForBlock(SuperInlineModelAdmin, Admin_Trans_BaseIconSta
|
||||
(
|
||||
# 'title',
|
||||
'name', 'description', 'text',
|
||||
'picture'
|
||||
'picture',
|
||||
),
|
||||
'video_url',
|
||||
('bg_color', ),
|
||||
('but_title', 'but_color', 'but_icon'),
|
||||
('url', 'order'),
|
||||
@@ -53,11 +54,17 @@ class Admin_StackedInline_Block(Admin_Trans_GenericBaseIconStackedInline, SuperI
|
||||
'fields': [
|
||||
('block_type',
|
||||
# 'title',
|
||||
'name', 'description', 'picture'),
|
||||
('bg_color', 'bg_image'),
|
||||
'name', 'description'),
|
||||
('picture', ),
|
||||
('video_url',),
|
||||
('bg_color', 'bg_image',),
|
||||
# ('bg_video_url',),
|
||||
('but_title', 'but_color', 'but_icon'),
|
||||
('url',),
|
||||
('child_in_row_count', 'order'),
|
||||
(
|
||||
# 'child_in_row_count',
|
||||
'order',
|
||||
),
|
||||
]
|
||||
})
|
||||
]
|
||||
@@ -125,11 +132,15 @@ class Admin_Block(Admin_Trans_BaseModelViewPage):
|
||||
'fields': [
|
||||
('block_type',
|
||||
# 'title',
|
||||
'name', 'description', 'picture'),
|
||||
('bg_color', 'bg_image'),
|
||||
'name', 'description'),
|
||||
('picture', 'video_url'),
|
||||
('bg_color', 'bg_image', 'bg_video_url'),
|
||||
('but_title', 'but_color', 'but_icon'),
|
||||
('url',),
|
||||
('child_in_row_count', 'order'),
|
||||
(
|
||||
# 'child_in_row_count',
|
||||
'order',
|
||||
),
|
||||
]
|
||||
})
|
||||
]
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 4.2.7 on 2023-12-06 13:20
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('GeneralApp', '0016_alter_block_block_type'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='block',
|
||||
name='bg_video_url',
|
||||
field=models.TextField(blank=True, null=True, verbose_name='Ссылка на фоновое видео'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='block',
|
||||
name='video_url',
|
||||
field=models.TextField(blank=True, null=True, verbose_name='Ссылка на видео'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='widgetforblock',
|
||||
name='video_url',
|
||||
field=models.TextField(blank=True, null=True, verbose_name='Ссылка на видео'),
|
||||
),
|
||||
]
|
||||
@@ -53,11 +53,14 @@ class Block(Block_Abstract):
|
||||
|
||||
url = models.TextField(verbose_name=_('URL привязанной страницы'), null=True, blank=True)
|
||||
|
||||
video_url = models.TextField(verbose_name=_('Ссылка на видео'), null=True, blank=True)
|
||||
|
||||
bg_color = ColorField(verbose_name=_('Цвет фона'), default=None, null=True, blank=True)
|
||||
bg_image = models.FileField(
|
||||
upload_to='uploads/', verbose_name=_('Фоновое изображение блока'), null=True, blank=True,
|
||||
validators=[validate_file_extension]
|
||||
)
|
||||
bg_video_url = models.TextField(verbose_name=_('Ссылка на фоновое видео'), null=True, blank=True)
|
||||
|
||||
but_title = models.CharField(max_length=100, verbose_name=_('Текст на кнопке'), null=True, blank=True)
|
||||
but_color = ColorField(verbose_name=_('Цвет кнопки'), default='#000000')
|
||||
@@ -79,9 +82,9 @@ class Block(Block_Abstract):
|
||||
verbose_name_plural = _('Блоки на странице')
|
||||
|
||||
|
||||
def preSave_Block(sender, instance, **kwargs):
|
||||
instance.url = get_unique_url_for_new_instance(instance, sender)
|
||||
pre_save.connect(preSave_Block, sender=Block, dispatch_uid='pre_save_connect')
|
||||
# def preSave_Block(sender, instance, **kwargs):
|
||||
# instance.url = get_unique_url_for_new_instance(instance, sender)
|
||||
# pre_save.connect(preSave_Block, sender=Block, dispatch_uid='pre_save_connect')
|
||||
|
||||
|
||||
|
||||
@@ -100,6 +103,8 @@ class WidgetForBlock(BaseModel):
|
||||
picture = models.FileField(upload_to='uploads/', verbose_name=_('Картинка'), null=True, blank=True,
|
||||
validators=[validate_file_extension])
|
||||
|
||||
video_url = models.TextField(verbose_name=_('Ссылка на видео'), null=True, blank=True)
|
||||
|
||||
# block_type = models.CharField(max_length=100, choices=block_type_choices, verbose_name=_('Тип блока'), default='photo_n_text')
|
||||
|
||||
url = models.TextField(verbose_name=_('URL привязанной страницы'), null=True, blank=True)
|
||||
|
||||
@@ -6,6 +6,7 @@ from django.contrib.auth.decorators import login_required
|
||||
from .models import *
|
||||
from django.conf import settings
|
||||
from .funcs import get_inter_http_respose
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
def test_code(request):
|
||||
|
||||
@@ -20,7 +21,13 @@ def MainPage(request):
|
||||
from .init_options import init_options
|
||||
init_options()
|
||||
|
||||
page = StaticPage.objects.get(url='main')
|
||||
try:
|
||||
page = StaticPage.objects.get(url='main')
|
||||
except StaticPage.DoesNotExist:
|
||||
page = StaticPage.objects.create(
|
||||
url='main',
|
||||
name_ru = _('Главная')
|
||||
)
|
||||
|
||||
# from ArticlesApp.models import ArticleModel
|
||||
# arts = ArticleModel.objects.filter(enable=True).order_by('-createDT')[:4]
|
||||
|
||||
@@ -14,8 +14,10 @@ from django.forms import widgets
|
||||
def sets_for_formfield_for_dbfield(field, db_field):
|
||||
if db_field.name in ['url', 'name', 'title', 'name_plural']:
|
||||
field.widget = widgets.TextInput(attrs={'style': 'width: 30%; height: 20px;'})
|
||||
if db_field.name in ['description', 'text']:
|
||||
if db_field.name in ['description', 'text', 'video_url', 'bg_video_url']:
|
||||
field.widget = widgets.Textarea(attrs={'style': 'width: 30%; height: 100px;'})
|
||||
if db_field.name in ['video_url', 'bg_video_url']:
|
||||
field.widget = widgets.TextInput(attrs={'style': 'width: 90%; '})
|
||||
return field
|
||||
|
||||
|
||||
|
||||
@@ -2,23 +2,24 @@
|
||||
body,html{
|
||||
margin: 0;
|
||||
background: #ffffff;
|
||||
font-family:
|
||||
-apple-system,
|
||||
'Raleway-Black' ,
|
||||
'Raleway-BlackItalic',
|
||||
'Raleway-Bold' ,
|
||||
'Raleway-BoldItalic' ,
|
||||
'Raleway-ExtraBold' ,
|
||||
'Raleway-ExtraBoldItalic' ,
|
||||
'Raleway-ExtraLight' ,
|
||||
'Raleway-ExtraLightItalic' ,
|
||||
'Raleway-Medium' ,
|
||||
'Raleway-MediumItalic' ,
|
||||
'Raleway-SemiBold' ,
|
||||
'Raleway-SemiBoldItalic' ,
|
||||
'Raleway-Thin' ,
|
||||
'Raleway-ThinItalic' ,
|
||||
'sans-serif';
|
||||
font-family: -apple-system, 'Roboto', sans-serif;
|
||||
/*font-family:*/
|
||||
/* -apple-system,*/
|
||||
/* 'Raleway-Black' ,*/
|
||||
/* 'Raleway-BlackItalic',*/
|
||||
/* 'Raleway-Bold' ,*/
|
||||
/* 'Raleway-BoldItalic' ,*/
|
||||
/* 'Raleway-ExtraBold' ,*/
|
||||
/* 'Raleway-ExtraBoldItalic' ,*/
|
||||
/* 'Raleway-ExtraLight' ,*/
|
||||
/* 'Raleway-ExtraLightItalic' ,*/
|
||||
/* 'Raleway-Medium' ,*/
|
||||
/* 'Raleway-MediumItalic' ,*/
|
||||
/* 'Raleway-SemiBold' ,*/
|
||||
/* 'Raleway-SemiBoldItalic' ,*/
|
||||
/* 'Raleway-Thin' ,*/
|
||||
/* 'Raleway-ThinItalic' ,*/
|
||||
/* 'sans-serif';*/
|
||||
}
|
||||
|
||||
body.n_scroll{
|
||||
@@ -91,7 +92,8 @@ body.n_scroll{
|
||||
.standart_txt{
|
||||
color: #ffffff;
|
||||
/*font-family: Spline Sans;*/
|
||||
font-family: -apple-system, 'Raleway-Regular', sans-serif;
|
||||
/*font-family: -apple-system, 'Raleway-Regular', sans-serif;*/
|
||||
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: normal;
|
||||
@@ -105,7 +107,7 @@ body.n_scroll{
|
||||
.standart_semi_bold_txt{
|
||||
color: #000000;
|
||||
/*font-family: Spline Sans;*/
|
||||
font-family: -apple-system, 'Raleway-Regular', sans-serif;
|
||||
/*font-family: -apple-system, 'Raleway-Regular', sans-serif;*/
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
line-height: normal;
|
||||
@@ -113,7 +115,7 @@ body.n_scroll{
|
||||
|
||||
.large_txt{
|
||||
color: #000000;
|
||||
font-family: -apple-system, 'Raleway-Regular', sans-serif;
|
||||
/*font-family: -apple-system, 'Raleway-Regular', sans-serif;*/
|
||||
font-size: 36px;
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
@@ -122,7 +124,7 @@ body.n_scroll{
|
||||
|
||||
.semi_large_light{
|
||||
color: #000000;
|
||||
font-family: -apple-system, 'Raleway-Regular', sans-serif;
|
||||
/*font-family: -apple-system, 'Raleway-Regular', sans-serif;*/
|
||||
font-size: 18px;
|
||||
font-style: normal;
|
||||
font-weight: 300;
|
||||
@@ -131,7 +133,7 @@ body.n_scroll{
|
||||
|
||||
.semi_large_semi_light{
|
||||
color: #000000;
|
||||
font-family: -apple-system, 'Raleway-Regular', sans-serif;
|
||||
/*font-family: -apple-system, 'Raleway-Regular', sans-serif;*/
|
||||
font-size: 18px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
@@ -140,7 +142,7 @@ body.n_scroll{
|
||||
|
||||
.medium_txt{
|
||||
color: #000000;
|
||||
font-family: -apple-system, 'Raleway-Regular', sans-serif;
|
||||
/*font-family: -apple-system, 'Raleway-Regular', sans-serif;*/
|
||||
font-size: 24px;
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
@@ -149,7 +151,7 @@ body.n_scroll{
|
||||
|
||||
.medium_small_bold_txt{
|
||||
color: #000000;
|
||||
font-family: -apple-system, 'Raleway-Regular', sans-serif;
|
||||
/*font-family: -apple-system, 'Raleway-Regular', sans-serif;*/
|
||||
font-size: 20px;
|
||||
font-style: normal;
|
||||
font-weight: 800;
|
||||
@@ -483,7 +485,7 @@ body.n_scroll{
|
||||
border-bottom: 1px solid #E3E3E3;
|
||||
width: calc(100% - 20px);
|
||||
color: #10212B;
|
||||
font-family: -apple-system, 'Raleway-Regular', sans-serif;
|
||||
/*font-family: -apple-system, 'Raleway-Regular', sans-serif;*/
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
outline: none;
|
||||
|
||||
BIN
static/fonts/Roboto-Black.ttf
Normal file
BIN
static/fonts/Roboto-Black.ttf
Normal file
Binary file not shown.
BIN
static/fonts/Roboto-BlackItalic.ttf
Normal file
BIN
static/fonts/Roboto-BlackItalic.ttf
Normal file
Binary file not shown.
BIN
static/fonts/Roboto-Bold.ttf
Normal file
BIN
static/fonts/Roboto-Bold.ttf
Normal file
Binary file not shown.
BIN
static/fonts/Roboto-BoldItalic.ttf
Normal file
BIN
static/fonts/Roboto-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
static/fonts/Roboto-Italic.ttf
Normal file
BIN
static/fonts/Roboto-Italic.ttf
Normal file
Binary file not shown.
BIN
static/fonts/Roboto-Light.ttf
Normal file
BIN
static/fonts/Roboto-Light.ttf
Normal file
Binary file not shown.
BIN
static/fonts/Roboto-LightItalic.ttf
Normal file
BIN
static/fonts/Roboto-LightItalic.ttf
Normal file
Binary file not shown.
BIN
static/fonts/Roboto-Medium.ttf
Normal file
BIN
static/fonts/Roboto-Medium.ttf
Normal file
Binary file not shown.
BIN
static/fonts/Roboto-MediumItalic.ttf
Normal file
BIN
static/fonts/Roboto-MediumItalic.ttf
Normal file
Binary file not shown.
BIN
static/fonts/Roboto-Regular.ttf
Normal file
BIN
static/fonts/Roboto-Regular.ttf
Normal file
Binary file not shown.
BIN
static/fonts/Roboto-Thin.ttf
Normal file
BIN
static/fonts/Roboto-Thin.ttf
Normal file
Binary file not shown.
BIN
static/fonts/Roboto-ThinItalic.ttf
Normal file
BIN
static/fonts/Roboto-ThinItalic.ttf
Normal file
Binary file not shown.
@@ -1,19 +1,19 @@
|
||||
{% load static %}
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-Black.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-BlackItalic.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-Bold.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-BoldItalic.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-ExtraBold.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-ExtraBoldItalic.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-ExtraLight.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-ExtraLightItalic.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-Italic.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-Light.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-LightItalic.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-Medium.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-MediumItalic.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-Regular.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-SemiBold.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-SemiBoldItalic.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-Thin.ttf" %}">
|
||||
<link rel="stylesheet" href="{% static "fonts/Raleway-ThinItalic.ttf" %}">
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-Black.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-BlackItalic.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-Bold.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-BoldItalic.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-ExtraBold.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-ExtraBoldItalic.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-ExtraLight.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-ExtraLightItalic.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-Italic.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-Light.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-LightItalic.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-Medium.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-MediumItalic.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-Regular.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-SemiBold.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-SemiBoldItalic.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-Thin.ttf" %}">#}
|
||||
{#<link rel="stylesheet" href="{% static "fonts/Raleway-ThinItalic.ttf" %}">#}
|
||||
@@ -6,7 +6,12 @@
|
||||
<meta charset="UTF-8">
|
||||
<title>AerBim</title>
|
||||
{% include 'head_includes/fonts_include.html' %}
|
||||
<link rel="stylesheet" href="{% static "fonts/fonts.css" %}">
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
|
||||
{# <link rel="stylesheet" href="{% static "fonts/fonts.css" %}">#}
|
||||
|
||||
<link rel="stylesheet" href="{% static "aerbimCSS.css" %}">
|
||||
<link rel="stylesheet" href="{% static "aerbimCSSMOBILE.css" %}">
|
||||
<script src="{% static "jquery_v3_6_4.js" %}"></script>
|
||||
|
||||
Reference in New Issue
Block a user