ifnews2/resources/views/welcome.blade.php

48 lines
1.9 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ИЛ вики</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
</head>
<body class="container">
@if (!empty($error))
<div class="alert alert-danger" role="alert">
{{$error}}
</div>
@endif
<section class="row">
<div class="col">
<form class="form" method="POST">
@csrf
<div class="mb-3">
<label for="search">Введите название игры для поиска:</label>
<input id="search" class="form-control" type="text" name="term" placeholder="Название игры" value="{{ $term }}">
</div>
<div class="mb-3">
<button type="submit" class="btn btn-primary">Искать</button>
</div>
@if (empty($options))
@elseif ($options->count() === 0)
Мы не нашли ничего с таким названием.
@elseif ($options->count() > 0)
<p class="mb-3">Мы нашли несколько подходящих игр, выберите одну:</p>
<ul>
@foreach($options as $option)
<li><a href="/?id={{ $option->id }}">{{ $option->title }}</a></li>
@endforeach
</ul>
@endif
@if (!empty($response))
<textarea class="form-control" rows=6 readonly>{{ $response }}</textarea>
@endif
</form>
</div>
</section>
</body>
</html>