заливка

This commit is contained in:
iriska-gri committed 2023-11-22 13:17:39 +03:00
1 parent 1ed6ee0c6a
commit 542af6ee64
14 files changed
+227

No files matched your search

BIN
View File
Binary file not shown.
Binary file not shown.
@@ -427,6 +427,11 @@ export default {
name: 'Об инспекции',
ico: 'mdi-city',
path: "/inspection"
},
{
name: 'К празднику',
ico: 'mdi-cake-variant',
path: "/fnshol"
}
]
+9
View File
@@ -106,6 +106,15 @@ const routes = [
ico: "mdi-account"
}
},
{
path: '/fnshol',
name: 'FnsHol.vue',
component: () => import('@/views/FnsHol.vue'),
meta:{
title:"К празднику",
ico: "mdi-city"
}
},
],
},
]
+132
View File
@@ -0,0 +1,132 @@
<template>
<!-- -->
<v-carousel
cover
:height="carushi"
hide-delimiters
hide-delimiter-background
show-arrows="hover"
color="white"
>
<v-carousel-item
v-for="(x, i) in carous" :key="i"
:src="`${burl}${x.link}`"
cover
eager
>
<v-container
fill-height
fluid
pa-0 ma-0 pb-3
class="flex-column h-100 d-flex"
>
<v-card class="bgCard h-100 d-flex flex-column">
<v-card-title class="ma-2 text-h3 text-uppercase titles text-text_carous py-5 flex-column">
<v-row>
<v-col class="pa-0 pl-1 align-self-center">{{x.title}}
</v-col>
<v-col class="flex-grow-0 pa-0 pr-1">
<v-img
width="50"
:aspect-ratio="1"
:src="`${burl}${x.sender}`"
cover
/>
</v-col>
</v-row>
</v-card-title>
<v-card-text class="ml-2 mb-0 mb-2 w-50 flex-grow-0 pb-3 text-h6 bgText overflow-auto ">
<v-textarea
class="text-text_carous mt-n3 text-black textareas pt-2 font-weight-medium"
:model-value=x.text
variant='plain'
readonly
auto-grow
rows="1"
hide-details
/>
</v-card-text>
</v-card>
</v-container>
</v-carousel-item>
</v-carousel>
</template>
<script>
import { ref, computed } from 'vue'
import {getfromserver} from '@/utils/universal_functions'
import { baseURL } from '@/utils/axios-api'
export default {
setup() {
const burl = baseURL.slice(0,-1)
const carous=ref([{link: ""}])
getfromserver("api/navigation/carousels/", carous)
const carushi = computed(()=> {
console.log(window.innerHeight, window.innerHeight-50);
return window.innerHeight-50
})
return { burl, carous, carushi}
}
}
</script>
<style>
.bgCard {
/* #ffffff6b #ffffff8c*/
background: #ffffff38 ;
}
.bgText {
background: #ffffffb0;
line-height: 2.1rem!important;
}
.titles {
font-family: cursive !important;
background: #ffffff8c;
}
.textareas .v-field__input {
font-size: 1.3em!important;
}
</style>
View File
Whitespace-only changes.
+35
View File
@@ -0,0 +1,35 @@
from django.contrib import admin
from .models import *
# Register your models here.
class MultiDBModelAdmin(admin.ModelAdmin):
# A handy constant for the name of the alternate database.
using = "add_base"
def save_model(self, request, obj, form, change):
# Tell Django to save objects to the 'other' database.
obj.save(using=self.using)
def delete_model(self, request, obj):
# Tell Django to delete objects from the 'other' database
obj.delete(using=self.using)
def get_queryset(self, request):
# Tell Django to look for objects on the 'other' database.
return super().get_queryset(request).using(self.using)
def formfield_for_foreignkey(self, db_field, request, **kwargs):
# Tell Django to populate ForeignKey widgets using a query
# on the 'other' database.
return super().formfield_for_foreignkey(
db_field, request, using=self.using, **kwargs
)
def formfield_for_manytomany(self, db_field, request, **kwargs):
# Tell Django to populate ManyToMany widgets using a query
# on the 'other' database.
return super().formfield_for_manytomany(
db_field, request, using=self.using, **kwargs
)
# admin.site.register(Carousels, MultiDBModelAdmin)
+6
View File
@@ -0,0 +1,6 @@
from django.apps import AppConfig
class GarbageConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'garbage'
+18
View File
@@ -0,0 +1,18 @@
# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# * Make sure each ForeignKey and OneToOneField has `on_delete` set to the desired behavior
# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
# Feel free to rename the models, but don't rename db_table values or field names.
from django.db import models
# class Carousels(models.Model):
# title = models.CharField(max_length=255)
# text = models.TextField(blank=True, null=True)
# link = models.ImageField(upload_to='fns/%Y/%m/%d', null=True, verbose_name='Изображение', db_comment = 'Картинка к новости')
# class Meta:
# managed = False
# db_table = 'carousels'
+3
View File
@@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.
+16
View File
@@ -0,0 +1,16 @@
from django.urls import include, path
from rest_framework.routers import DefaultRouter
from .views import *
from rest_framework_simplejwt.views import (
TokenObtainPairView,
TokenRefreshView,TokenVerifyView
)
urlpatterns = [
# path('links/', CaorusAPIView.as_view(), name='LinkAPIView'),
]
+3
View File
@@ -0,0 +1,3 @@
from django.shortcuts import render
# class CaorusAPIView(CarouselsAPIView(ListAPIView):)
Binary file not shown.

After

Width:  |  Height:  |  Size: 414 KiB

Binary file not shown.