@extends('backend.home.index')
@push('title', $halaman->nama)
@push('header', $halaman->nama)
@push('tombol')
<a href="#tambah" class="btn btn-sm btn-primary tambah">
	Tambah  <i class="fa fa-plus-circle"></i>
</a>
@endpush
@section('content')
<div class="panel-container show container-fluid col">
	
	<div class="panel-content">


</div>
</div>

  <!-- Format Baru -->

  <style>
@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif
}

.container {
    padding: 20px
}

img {
    height: 170px;
    width: 100%;
    object-fit: cover
}

.bg-org {
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 3px;
    background-color: #eca726;
    color: white;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 20px
}

.bg-org:hover {
    background-color: #eec67c
}

.bg-blue {
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 3px;
    background-color: #414df0;
    color: white;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 20px
}

.bg-blue:hover {
    background-color: #abb0f5
}

.bg-vio {
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 3px;
    background-color: #b005ff;
    color: white;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 20px
}

.bg-vio:hover {
    background-color: #ce89ee
}

.bg-green {
    background-color: #27e727;
    border-radius: 10%;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px 4px
}

.bg-orgn {
    background-color: #eca726;
    border-radius: 10%;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px 4px
}

.bg-blu {
    background-color: #414df0;
    border-radius: 10%;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px 4px
}

.bg-violet {
    background-color: #b005ff;
    border-radius: 10%;
    color: white;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px 4px
}

.text-muted {
    font-size: 14px
}

.fs5 {
    line-height: 20px;
    font-size: 16px
}

.items {
    font-size: 15px;
    background-color: black;
    color: white;
    margin: 3px 3px;
    padding: 4px 10px;
    text-decoration: none;
    border: 1px solid #ddd
}

.items:hover {
    background-color: #fcf7f7;
    color: black;
    transition: background-color .8s
}
    </style>


  <div class="container">
    <div class="row">
   @foreach($frontend as $frontall)
 <div class="col-lg-12 order-lg-0 order-2">
            <div class="row">
                 <div class="col-md-2 mb-2"> <img class="" src="https://images.pexels.com/photos/3184611/pexels-photo-3184611.jpeg?auto=compress&cs=tinysrgb&dpr=2&w=500" alt=""> </div>
                <div class="col-md-8 mb-4">
                    <div class="d-flex align-items-center"> <a href="{{ URL::asset($halaman->kode .'/geteoffice')}}" class="bg-org">Frontend</a> <span class="text-muted ps-4"> &nbsp; {!! $frontall->created_at !!}</span> </div>
                    <div>
                        <p class="text-capitalize fs5 my-3 fw-bolder">{!! $frontall->judul !!}</p>
                        <p class="text-muted">{!! Str::limit($frontall->konten, 100,'') !!}
                                
                                @if  (strlen($frontall->konten) > 100) 
                                    <span id="dots">...</span>
                                    <span id="more">{!! substr($frontall->konten, 100)!!} </span>
                                @endif
</p>
                                <button class="btn btn-xs btn-info" onclick="myFunction()" id="myBtn">Readmore</button>
                    </div>
                </div>
</div>
</div>
            @endforeach
</div>
</div>




</section>
</div>	
	</div>
	
</div>

@endsection
<script>
  var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip]'))
  var tooltipList = tooltipTriggerList.map(function(tooltipTriggerEl){

  })
  </script>
@push('js')
@include('backend.home.datatable-js')
<script type="text/javascript" src="{{ URL::asset('ojisatriani/'. $halaman->kode .'/jquery.js') }}"></script>
<script type="text/javascript" src="{{ URL::asset('ojisatriani/'. $halaman->kode .'/datatables.js') }}"></script>
<script>
    function myFunction() {
    var dots = document.getElementById("dots");
    var moreText = document.getElementById("more");
    var btnText = document.getElementById("myBtn");

    if (dots.style.display === "none") {
        dots.style.display = "inline";
        btnText.innerHTML = "Read more";
        moreText.style.display = "none";
    } else {
        dots.style.display = "none";
        btnText.innerHTML = "Read less";
        moreText.style.display = "inline";
    }
}
    </script>

@endpush
@push('css')
@include('backend.home.datatable-css')

@endpush



