<!doctype html>
<html lang="en"  class="w-[640px]">
   <head>
      <?php echo view('user/layout/head');?>
      <link href="https://cdn.datatables.net/2.0.8/css/dataTables.dataTables.css">
   </head>
   <style>
      .dt-paging 
      {
      text-align:center;
      margin-top:15px;
      }
      .dt-paging-button
      {
      font-size:20px;
      color:#fff;
      padding:0px 10px 0px 10px;
      }
      .dt-paging .current
      {
      border : 1px solid #0d6efd !important;
      /* border-radius : 20px !important; */
      background : #0d6efd !important;
      }
      .img
      {
      width : 50px;
      height:50px;
      border:none;
      border-radius:23px;
      }
   </style>
   <body class="section-overflow">
      <!--banner start -->
      <section class="banner-bg overall-bg ">
         <div class="container">
            <?php echo view('user/layout/header');?>
         </div>
         <section class="dash-wrap coin-wrap">
            <div class="container">
               <div class="row">
                  <div class="col-12">
                   
                  <div class="table-responsive trans asset-trans position-relative mb-5">
                                   
                                    <table class="payment-info"  id="example1" style="width:100%">
                                    <thead style="display:none">
                                      <td></td>
                                      <td></td>
                                    </thead>
                                       <tbody>
                                       <?php if($news) 
                                        { 
                                 
                                          foreach($news as $row)
                                          {
                                          
                                            $date = date('M d, Y',strtotime($row->news_date));
                                          ?>
                                          <tr>
                                             <td>
                                                <div class="asset-trans-content d-flex align-items-center justify-content-between">
                                                   <div class="asset-trans-left text-start">
                                                      <h6 class="aleo text-white mb-0"><?php echo ucfirst(substr($row->news_content, 0, 50).'...');?></h6>
                                                      <small class="text-primary fs-6 py-2 fw-bold lato"><?php echo $date;?></small>
                                                      
                                                   </div>
                                                   
                                                </div>
                                             </td>
                                             <td>
                                             <a href="<?php echo base_url();?>/news_details/<?php echo $row->news_id;?>">
                                              <i class="fa-solid fa-greater-than"></i>
                                              </a>
                                            </td>
                                          </tr>
                                          <?php } } ?>
                                       </tbody>
                                 
                                    </table>
                                 </div>
                  </div>
               </div>
            </div>
         </section>
         <!--footer start -->
         <?php echo view('user/layout/footer');?>
         <!--footer end -->
      </section>
      <?php echo view('user/layout/footer-script');?>
      <script>
         AOS.init({
         });
      </script>
      <script src="https://cdn.datatables.net/2.0.8/js/dataTables.js"></script>
      <script>
         $(document).ready(function() {
           $('#example1').DataTable({
             pagingType: 'full_numbers',
             searching: false,
             info:false,
             lengthChange: false,
             pageLength : 5
             
             
           });
         });
      </script>
   </body>
</html>
