turkmentv/resources/views/web/newsList.blade.php

86 lines
4.2 KiB
PHP

@extends('web.layouts.app')
@section('after_styles')
<link rel="stylesheet" href="https://turkmentv.gov.tm/assets/css/news.css">
<link rel="stylesheet" href="https://turkmentv.gov.tm/assets/css/calendar.css">
@endsection
@section('content')
<div class="container wrapper mahabat" style="overflow-x:hidden!important;margin-top: 5%">
<div class="row" style="padding-top: 0">
<div class="pages-tree">
<ol class="breadcrumb" style="background: none">
<li><a href="#" class='fontRegular'>Baş Sahypa</a></li>
<li class="active"><span class='fontRegular'>Habarlar</span></li>
</ol>
</div>
<div class="tpl-block-list tpl-component-mainnews tpl-template-196" id="nc-block-8345a5754a2d44dad9b34f680de9a83d">
<div class="col-lg-8 col-md-8 col-sm-12 col-xs-12 text-center" style="padding-right: 10px; padding-top: 50px;">
<a href="{{route('getNews', $main->id)}}">
@if(stristr($main->img_url, 'images/') != false)
<img src="https://turkmentv.gov.tm//uploads/{{ $main->img_url }}" style="width: 100%;">
@else
<img src="https://turkmentv.gov.tm/{{ $main->img_url }}" style="width: 100%;">
@endif
</a>
<h4 style="color: #05559a; margin-top: 10px;"><a href="{{route('getNews', $main->id)}}" class='fontSemiBold'>
{{ $main->name }}</a></h4>
<p style="margin-top: 20px;margin-bottom: 10px; font-size: 18px;" class='fontRegular'>
<p style="text-align: justify;"><span style="font-size:18px;">
{{ str_limit(strip_tags($main->description), $limit = 180, $end = '...') }}
</span></p>
<h4 style=" font-weight: bold; line-height: 30px" class='fontRegular'>{{
$main->datet }}</h4>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12 text-center" style="padding-left: 10px">
<h4 style="font-weight: bold; color: #05559a; margin-bottom: 20px; text-align: left; width: 90%; margin: auto; margin-bottom: 30px"
class='fontSemiBold'>Senenama</h4>
<div style="width: 90%; height: 5px; background-color: #05559a; margin: auto; margin-bottom: 20px"></div>
<div class='fontRegular' id="calendar" style="width: 100%;">
<input type="text" id="txtTest" style="display: none;">
</div>
</div>
</div>
<div id="novosti"></div>
<style>
.paddinglr1 {
padding-left: 7px !important;
padding-right: 7px !important;
padding-bottom: 25px !important;
}
.paddinglr1 a img {
width: 100%;
}
</style>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="margin-top: 40px; display: flex; flex-wrap: wrap;">
@foreach($news as $new)
<div class="paddinglr1 news-item col-lg-4 col-md-4 text-center" style=''>
<a href="{{route('getNews', $new->id)}}">
@if(stristr($main->img_url, 'images/') != false)
<img src="https://turkmentv.gov.tm//uploads/{{ $new->img_url }}">
@else
<img src='https://turkmentv.gov.tm/{{ $new->img_url }}'/>
@endif
</a>
<h5 style="color: #05559a; font-weight: bold; margin-top: 10px"><a href="{{route('getNews', $new->id)}}" style="padding: 10px;" class='fontSemiBold'>{{
$new->name }}</a></h5>
<h5 style="font-weight: bold; line-height: 28px" class='fontRegular'>{{ $new -> datet }}</h5>
</div>
@endforeach
</div>
@if(!empty($news))
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style=" text-align: center;">
{{ $news->links('vendor.pagination.simple-default') }}
</div>
@endif
</div>
@endsection
@section('after_scripts')
<script src="https://turkmentv.gov.tm/assets/js/pureJSCalendar.js"></script>
<script>
$(document).ready(function () {
pureJSCalendar.open('dd.MM.yyyy', 0, 0, 1, '2018-5-5', '2019-8-20', 'txtTest', 20)
});
</script>
@endsection