The page about the project has been revived.

This commit is contained in:
2024-04-18 19:41:31 +05:00
parent 63ea5dac92
commit 24e0cf0eea
42 changed files with 1126 additions and 6 deletions

View File

@@ -0,0 +1,26 @@
<div id="language">
<div class="language__block">
<button class="language__button" type="button" aria-label="{{ __('site.Choose language') }}">
<svg width="16" height="16" data-slot="icon" fill="none" stroke-width="1.5" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="m10.5 21 5.25-11.25L21 21m-9-3h7.5M3 5.621a48.474 48.474 0 0 1 6-.371m0 0c1.12 0 2.233.038 3.334.114M9 5.25V3m3.334 2.364C11.176 10.658 7.69 15.08 3 17.502m9.334-12.138c.896.061 1.785.147 2.666.257m-4.589 8.495a18.023 18.023 0 0 1-3.827-5.802"></path>
</svg>
{{ $language->title }}
<svg width="16" height="16" class="language__button__str" data-slot="icon" fill="none" stroke-width="1.5" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5"></path>
</svg>
</button>
<ul class="language__list">
@foreach($languages as $lang)
@php
$code = '';
if ($lang->is_default !== true) {
$code = '/language/' . $lang->code;
} else if($link === '') {
$code = '/';
}
@endphp
<li><a href="{{ $link . $code }}">{{ $lang->title }}</a></li>
@endforeach
</ul>
</div>
</div>

View File

@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>@yield('meta_title', '')</title>
<meta name="keywords" content="@yield('meta_keywords', '')" />
<meta name="description" content="@yield('meta_description', '')" />
@vite('resources/home/scss/app.scss')
</head>
<body>
{{ $slot }}
</body>
</html>

View File

@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="{{ $language->code }}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>@yield('meta_title', '')</title>
<meta name="keywords" content="@yield('meta_keywords', '')" />
<meta name="description" content="@yield('meta_description', '')" />
@vite('resources/site/scss/app.scss')
</head>
<body>
<div class="wrapper">
<header class="header">
<div class="header_logo">
<a href="{{ \App\Enums\Site\ProjectSection::Home->url($project, $language) }}">
@if($logo)
<img src="{{ $logo->url }}" alt="{{ $project->name }}">
@else
<strong>{{ $project->name }}</strong>
@endif
</a>
</div>
<button id="mobile-menu" type="button" aria-label="{{ __('site.Menu') }}">
<svg class="open" width="45" height="45" data-slot="icon" fill="none" stroke-width="1.5" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"></path>
</svg>
<svg class="close" width="45" height="45" data-slot="icon" fill="none" stroke-width="1.5" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"></path>
</svg>
</button>
<x-site.choose-language :language="$language" :languages="$project->languages" />
</header>
<div class="main-container">
<nav id="menu">
<div class="menu__title">{{ __('site.Menu') }}</div>
<ul>
<li><a href="{{ \App\Enums\Site\ProjectSection::Home->url($project, $language) }}" @class(['active' => request()->route()->named(['home', 'language.home'])])>{{ __('site.About project') }}</a></li>
</ul>
</nav>
<div class="section-container">
<div class="content">
<h1>@yield('h1', '')</h1>
{{ $slot }}
</div>
<footer class="footer">
<a href="https://git.kor-elf.net/kor-elf/my-projects-website" target="_blank">{{ __('site.Powered by service') }}</a>
</footer>
</div>
</div>
</div>
@vite('resources/site/js/app.js')
</body>
</html>

View File

@@ -0,0 +1,5 @@
@section('h1', __('site.Page without translation'))
<x-site.layout :project="$project" :language="$language">
</x-site.layout>

View File

@@ -0,0 +1,6 @@
@section('meta_title', __('site.Project') . ': ' . $content->title)
@section('h1', $content->title)
<x-site.layout :project="$project" :language="$language">
{!! $content->description !!}
</x-site.layout>

View File

@@ -0,0 +1,18 @@
@section('meta_title', __('site.Projects'))
<x-home-layout>
<h1>{{ __('site.Projects') }}</h1>
<ul class="projects-list">
@foreach($projects as $project)
@php
$logo = $project->getStorageOne(\App\Enums\StorageType::Logo);
@endphp
<li>
<a href="{{ \App\Enums\Site\ProjectSection::Home->url($project) }}">
<span class="projects-list__img">@if($logo)<img src="{{ $logo->url }}" alt="{{ $project->name }}">@endif</span>
<span class="projects-list__title">{{ $project->name }}</span>
</a>
</li>
@endforeach
</ul>
</x-home-layout>