Changes
This commit is contained in:
@@ -2,15 +2,14 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Resources\ClientContactWidgetResource;
|
||||
use App\Http\Resources\ClientPageReferenceListResource;
|
||||
use App\Models\ContactWidget;
|
||||
use App\Models\PageReferenceList;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ClientWidgetContactController extends Controller
|
||||
{
|
||||
public function show(string $slug)
|
||||
{
|
||||
return new ClientPageReferenceListResource(ContactWidget::query()->where('slug', $slug)->first());
|
||||
return new ClientContactWidgetResource(ContactWidget::query()->where('slug', $slug)->first());
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="mb-[50px] space-y-3">
|
||||
<div class="space-y-3">
|
||||
<h2 class="font-semibold text-[#1A5AAF] text-lg">{{ title }}</h2>
|
||||
<div v-for="(item, index) in items" :key="index">
|
||||
<h3 class="font-semibold mb-4">{{ item.header }}</h3>
|
||||
<h3 class="font-semibold md:mb-2 mb-1">{{ item.header }}</h3>
|
||||
<div class="font-light">
|
||||
<p v-for="(detail, idx) in item.details" :key="idx">
|
||||
<span v-if="detail.url">
|
||||
|
||||
+19
-56
@@ -1,22 +1,23 @@
|
||||
<template>
|
||||
<!-- <div v-if="loading" class="flex flex-col space-y-4">-->
|
||||
<!-- <div class="group block rounded-xl overflow-hidden animate-pulse">-->
|
||||
<!-- <div class="flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-5">-->
|
||||
<!-- <div class="shrink-0 relative rounded-xl overflow-hidden w-full sm:w-56 h-44">-->
|
||||
<!-- <div class="w-full h-full bg-gray-200"></div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<section class="bg-[#F5F5F5] w-full py-10">
|
||||
<div class="max-w-screen-xl md:flex justify-around w-full mx-auto px-4 py-[50px] flex-wrap">
|
||||
<ContactGroup v-for="contact in contacts.data.content"
|
||||
:title="contact.title"
|
||||
:items="contact.items"
|
||||
/>
|
||||
|
||||
<div v-if="loading" class="flex flex-col space-y-4">
|
||||
<div class="group block rounded-xl overflow-hidden animate-pulse">
|
||||
<div class="flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-5">
|
||||
<div class="shrink-0 relative rounded-xl overflow-hidden w-full sm:w-56 h-44">
|
||||
<div class="w-full h-full bg-gray-200"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div v-else>
|
||||
<section class="bg-[#F5F5F5] w-full py-10">
|
||||
<div class="max-w-screen-xl md:flex justify-around w-full mx-auto px-4 md:py-[50px] flex-wrap space-y-7 md:space-y-0">
|
||||
<ContactGroup v-for="contact in contacts.data.content"
|
||||
:title="contact.title"
|
||||
:items="contact.items"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -29,46 +30,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
loading: true,
|
||||
contacts: null,
|
||||
contactItems: [
|
||||
{
|
||||
header: 'Главный корпус',
|
||||
details: [
|
||||
{text: '622031, Нижний Тагил, Красногвардейская 57', url: null},
|
||||
],
|
||||
},
|
||||
{
|
||||
header: 'Свяжитесь с нами',
|
||||
details: [
|
||||
{text: '(3435) 25-48-00', url: null},
|
||||
{text: 'office@ntspi.ru', url: 'mailto:office@ntspi.ru'},
|
||||
],
|
||||
},
|
||||
],
|
||||
admissionItems: [
|
||||
{
|
||||
header: 'Расписание',
|
||||
details: [
|
||||
{text: 'Понедельник - Пятница с 08.30 до 17.00', url: null},
|
||||
],
|
||||
},
|
||||
{
|
||||
header: 'Ответственный секретарь приемной комиссии',
|
||||
details: [
|
||||
{text: '+7(906)-802-55-59', url: null},
|
||||
{text: 'ntgspi@yandex.ru', url: 'mailto:ntgspi@yandex.ru'},
|
||||
]
|
||||
}
|
||||
],
|
||||
usefulItems: [
|
||||
{
|
||||
header: 'Полезное',
|
||||
details: [
|
||||
{text: 'Виртуальный тур', url: 'https://ntspi.ru/panorama/tour.html'},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
|
||||
|
||||
<!-- Card Blog -->
|
||||
<div v-if="resource.data.length !== 0" class="px-0 py-10 sm:px-2 lg:py-14 mx-auto">
|
||||
<!-- Title -->
|
||||
@@ -40,7 +38,7 @@
|
||||
<div class="flex overflow-x-auto space-x-6 mb-10 lg:mb-14 p-4">
|
||||
<!-- Card -->
|
||||
|
||||
<a v-for="item in resource.data.content" class="group flex-shrink-0 w-64 flex flex-col bg-white border shadow-sm rounded-xl hover:shadow-md focus:outline-none focus:shadow-md transition" :href="item.link">
|
||||
<Link v-for="item in resource.data.content" class="group flex-shrink-0 w-64 flex flex-col bg-white border shadow-sm rounded-xl hover:shadow-md focus:outline-none focus:shadow-md transition" :href="item.link">
|
||||
<div class="aspect-w-16 aspect-h-9">
|
||||
<img v-if="item.image" class="w-full backdrop-blur-xl object-cover rounded-t-xl h-[150px]" :src="'/storage/' + item.image" alt="Blog Image">
|
||||
<div v-else :class="randomBgClass()" class="w-full object-cover rounded-t-xl h-[150px] bg-gradient-to-tr" />
|
||||
@@ -50,7 +48,7 @@
|
||||
<h3 class="mt-2 text-lg font-medium text-gray-800 group-hover:text-blue-600">{{ item.title }}</h3>
|
||||
<p class="mt-2 text-xs text-gray-600">{{ item.link_text }}</p>
|
||||
</div>
|
||||
</a>
|
||||
</Link>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
<nav class="max-w-screen-xl w-full mx-auto px-4 py-3" aria-label="Global">
|
||||
<div class="relative lg:flex md:items-center md:justify-between">
|
||||
<div class="flex items-center justify-between">
|
||||
<a class="flex-none text-xl font-semibold dark:text-white dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600"
|
||||
href="/" aria-label="Brand">
|
||||
<Link class="flex-none text-xl font-semibold dark:text-white dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-gray-600"
|
||||
:href="route('index')" aria-label="NTSPI">
|
||||
<img class="max-w-[300px] duration-300" :src="currentLogo" alt="Логотип">
|
||||
</a>
|
||||
</Link>
|
||||
<div class="lg:hidden">
|
||||
<button :class="underSliderHeader ? 'text-black' : 'text-white'"
|
||||
type="button"
|
||||
|
||||
Reference in New Issue
Block a user