2020-08-04 11:21:23 +00:00
|
|
|
@extends("app.layout.base")
|
|
|
|
|
|
|
|
@section("title")
|
|
|
|
Vejledninger
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section("content")
|
|
|
|
<style>
|
2020-08-10 11:26:48 +00:00
|
|
|
div.card {
|
|
|
|
margin-top: 1rem;
|
|
|
|
margin-bottom: 30px;
|
|
|
|
width: auto;
|
|
|
|
heigt: auto;
|
|
|
|
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
|
2020-11-25 09:37:28 +00:00
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
border-radius: 10px;
|
2020-08-10 11:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
div.header {
|
|
|
|
background-color: #00788a;
|
|
|
|
color: white;
|
|
|
|
padding: 8px;
|
|
|
|
font-size: 10px;
|
|
|
|
text-align: center;
|
2020-11-25 09:37:28 +00:00
|
|
|
-webkit-box-flex: 0;
|
|
|
|
-ms-flex: 0 0 40%;
|
|
|
|
flex: 0 0 40%;
|
|
|
|
max-width: 40%;
|
|
|
|
border-radius: 10px 0px 0px 10px;
|
2020-08-10 11:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
div.container {
|
|
|
|
padding: 8px;
|
|
|
|
line-height: 1.5;
|
|
|
|
}
|
|
|
|
|
2020-11-24 12:22:44 +00:00
|
|
|
.select2-container--default .select2-results > .select2-results__options {
|
2020-09-22 08:45:27 +00:00
|
|
|
max-height: 120px !important;
|
|
|
|
}
|
2020-11-24 12:22:44 +00:00
|
|
|
|
|
|
|
.select2-results__option, .select2-search__field {
|
|
|
|
color: black;
|
|
|
|
}
|
2020-08-04 11:21:23 +00:00
|
|
|
</style>
|
2020-09-22 08:45:27 +00:00
|
|
|
<script src="{{ asset("/js/jquery-3.2.1.min.js") }}"></script>
|
|
|
|
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" />
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/js/select2.min.js"></script>
|
|
|
|
<script>
|
|
|
|
// In your Javascript (external .js resource or <script> tag)
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('.js-example-basic-single').select2();
|
|
|
|
});
|
|
|
|
</script>
|
2020-08-11 07:13:48 +00:00
|
|
|
<main style="min-height: calc(100% - 61.34px);">
|
2020-11-26 09:19:12 +00:00
|
|
|
<h1 class="text-center sde-blue mt-0 mb-2rem">{{__('msg.vejledning')}}</h1>
|
2020-08-05 07:23:57 +00:00
|
|
|
@if(!$guides->isEmpty())
|
2020-09-22 08:45:27 +00:00
|
|
|
@if (count(\App\GuidesCategory::query()->get()) > 1)
|
|
|
|
<h4 class="mt-0 mb-0">{{ __("msg.kategorier") }}</h4>
|
2020-11-26 09:19:12 +00:00
|
|
|
<select id="categorySelect" class="js-example-basic-single mb-2rem" name="state">
|
2020-09-22 08:45:27 +00:00
|
|
|
<option value="All" selected>{{ __("msg.allekategorier") }}</option>
|
|
|
|
@foreach (\App\GuidesCategory::query()->get() as $Category)
|
|
|
|
<option value="{{ $Category->id }}">{{ $Category->guidesCategoryName }}</option>
|
|
|
|
@endforeach
|
|
|
|
</select>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<div id="main">
|
|
|
|
@foreach($guides as $guide)
|
|
|
|
<div class="card">
|
|
|
|
@if($guide->resource_id !== null)
|
2020-11-26 09:19:12 +00:00
|
|
|
<div class="header bs-cover bp-center" style="background-image: url('{{ asset(\App\Resource::query()->where("id", "=", $guide->resource_id)->first()->filename) }}');">
|
2020-11-25 09:37:28 +00:00
|
|
|
</div>
|
2020-09-22 08:45:27 +00:00
|
|
|
@else
|
2020-11-25 09:37:28 +00:00
|
|
|
<div class="header d-flex justify-content-center">
|
2020-11-26 09:19:12 +00:00
|
|
|
<img alt="Image" src="{{ asset('/images/icons/image.svg') }}" style="width: calc(100% - 20px)">
|
2020-09-22 08:45:27 +00:00
|
|
|
</div>
|
|
|
|
@endif
|
2020-11-26 09:19:12 +00:00
|
|
|
<div class="container w-100">
|
|
|
|
<div class="row justify-content-center">
|
2020-11-25 09:37:28 +00:00
|
|
|
<h4>{{ $guide->name}}</h4>
|
|
|
|
</div>
|
2020-11-26 09:19:12 +00:00
|
|
|
<div class="row justify-content-center">
|
|
|
|
<a class="text-center m-none p-none bold sde-blue" href="{{route("guides.show", ["guide" => $guide->id ])}}">{{__('msg.læsmere')}}</a>
|
2020-09-22 08:45:27 +00:00
|
|
|
</div>
|
2020-08-12 13:17:48 +00:00
|
|
|
</div>
|
2020-08-10 11:26:48 +00:00
|
|
|
</div>
|
2020-09-22 08:45:27 +00:00
|
|
|
@endforeach
|
|
|
|
</div>
|
2020-08-05 07:23:57 +00:00
|
|
|
@else
|
2020-11-26 09:19:12 +00:00
|
|
|
<p class="mb-auto text-center">{{__('msg.dereringenvejledninger')}}.</p>
|
2020-08-05 05:51:30 +00:00
|
|
|
@endif
|
2020-08-04 11:21:23 +00:00
|
|
|
</main>
|
2020-09-22 08:45:27 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
$('#categorySelect').on('change', function () {
|
|
|
|
$value = $(this).val();
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
type: 'get',
|
|
|
|
url: '{{ route("guides.showCategory") }}',
|
|
|
|
data: { 'category':$value },
|
|
|
|
success:function (data) {
|
|
|
|
$('#main').html(data);
|
|
|
|
},
|
|
|
|
error:function (data) {
|
|
|
|
console.log(data);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
</script>
|
2020-08-04 11:21:23 +00:00
|
|
|
@endsection
|