refactor template

This commit is contained in:
Mobina 2022-10-24 17:38:57 -07:00
parent 7819172dd6
commit 3b0a38e43c
15 changed files with 147 additions and 133 deletions

View file

@ -45,8 +45,8 @@ require_once(BASE_PATH . "/template/admin/layouts/head-tag.php");
<div class="card-body">
<!-- <h5 class="card-title">Info card title</h5>-->
<section class="d-flex justify-content-between align-items-center font-12">
<span class=""><i class="far fa-eye-slash"></i> Unseen <span class="badge badge-pill mx-1"><?= $commentsUnseenCount['COUNT(*)']; ?></span></span>
<span class=""><i class="far fa-check-circle"></i> Approved <span class="badge badge-pill mx-1"><?= $commentsApprovedCount['COUNT(*)']; ?></span></span>
<span class=""><i class="fa fa-eye-slash"></i> Unseen <span class="badge badge-pill mx-1"><?= $commentsUnseenCount['COUNT(*)']; ?></span></span>
<span class=""><i class="fa fa-check-circle"></i> Approved <span class="badge badge-pill mx-1"><?= $commentsApprovedCount['COUNT(*)']; ?></span></span>
</section>
</div>
</div>
@ -71,10 +71,10 @@ require_once(BASE_PATH . "/template/admin/layouts/head-tag.php");
</tr>
</thead>
<tbody>
<?php foreach($postsWithView as $post) {?>
<?php foreach($postsWithView as $key => $post) {?>
<tr>
<td><a class="text-primary" href="<?= url('admin/post/show/' . $post['id']) ?>"><?= $post['id'] ?></a></td>
<td><?= $post['title'] ?></td>
<td><a class="text-primary" href="<?= url('admin/post') ?>"><?= $key += 1 ?></a></td>
<td><a class="text-dark" href="<?= url('admin/post') ?>"><?= $post['title'] ?></a></td>
<td><span class="badge badge-secondary"><?= $post['view'] ?></span></td>
</tr>
<?php }?>
@ -98,10 +98,10 @@ require_once(BASE_PATH . "/template/admin/layouts/head-tag.php");
</tr>
</thead>
<tbody>
<?php foreach($postsComments as $post) {?>
<?php foreach($postsComments as $key => $post) {?>
<tr>
<td><a class="text-primary" href="<?= url('admin/post/show/' . $post['id']) ?>"><?= $post['id'] ?></a></td>
<td><?= $post['title'] ?></td>
<td><a class="text-primary" href="<?= url('admin/post') ?>"><?= $key +=1 ?></a></td>
<td><a class="text-dark" href="<?= url('admin/post') ?>"><?= $post['title'] ?></a></td>
<td><span class="badge badge-success"><?= $post['comment_count'] ?></span></td>
</tr>
<?php }?>
@ -125,12 +125,12 @@ require_once(BASE_PATH . "/template/admin/layouts/head-tag.php");
</tr>
</thead>
<tbody>
<?php foreach($lastComments as $comment) {?>
<?php foreach($lastComments as $key => $comment) {?>
<tr>
<td><a class="text-primary" href="<?= url('admin/comment/show/' . $comment['id']) ?>"><?= $comment['id'] ?></a></td>
<td><?= $comment['username'] ?></td>
<td><?= $comment['comment'] ?></td>
<tr >
<td><a class="text-primary" href="<?= url('admin/comment') ?>"><?= $key +=1 ?></a></td>
<td><a class="text-dark" href="<?= url('admin/comment') ?>"><?= $comment['username'] ?></a></td>
<td><a class="text-dark" href="<?= url('admin/comment') ?>"><?= $comment['comment'] ?></a></td>
<td><span class="badge badge-warning"><?= $comment['status'] ?></span></td>
</tr>
<?php }?>

View file

@ -32,7 +32,7 @@
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="<?= url('logout') ?>">logout</a>
<a class="dropdown-item" href="<?= url('logout') ?>">Logout</a>
</div>
</span>
</span>

View file

@ -26,7 +26,7 @@ require_once BASE_PATH . '/template/admin/layouts/head-tag.php';
<label for="parent_id">parent ID</label>
<select name="parent_id" id="parent_id" class="form-control" autofocus>
<option value="">منوی اصلی</option>
<option value="">main menu</option>
<?php foreach($menus as $menu) { ?>
<option value="<?= $menu['id'] ?>">

View file

@ -26,7 +26,7 @@ require_once BASE_PATH . '/template/admin/layouts/head-tag.php';
<label for="parent_id">parent ID</label>
<select name="parent_id" id="parent_id" class="form-control" autofocus>
<option value="" <?php if($menu['parent_id'] == '') echo 'selected' ?>>root</option>
<option value="" <?php if($menu['parent_id'] == '') echo 'selected' ?>>main menu</option>
<?php foreach($menus as $selectMenu) { ?>
<?php if ($menu['id'] != $selectMenu['id']) { ?>

View file

@ -37,7 +37,7 @@
<?= $menu['url'] ?>
</td>
<td>
<?= $menu['parent_id'] == null ? 'منوی اصلی' : $menu['parent_name'] ?>
<?= $menu['parent_id'] == null ? 'main menu' : $menu['parent_name'] ?>
</td>
<td>
<a role="button" class="btn btn-sm btn-primary text-white" href="<?= url('admin/menu/edit/'.$menu['id']) ?>">edit</a>

View file

@ -23,7 +23,7 @@
</a>
<ul class="meta">
<li><a href="#" style="color: black;"><span class="lnr lnr-user" style="color: black;"></span><?= $topSelectedPosts[0]['username'] ?></a></li>
<li><a href="#" style="color: black;"><?= jalaliDate($topSelectedPosts[0]['created_at']) ?><span class="lnr lnr-calendar-full" style="color: black;"></span></a></li>
<li><a href="#" style="color: black;"><?= $topSelectedPosts[0]['created_at'] ?><span class="lnr lnr-calendar-full" style="color: black;"></span></a></li>
<li><a href="#" style="color: black;"><?= $topSelectedPosts[0]['comments_count'] ?><span class="lnr lnr-bubble" style="color: black;"></span></a></li>
</ul>
</div>
@ -39,14 +39,14 @@
</div>
<div class="top-post-details">
<ul class="tags">
<li><a href="#"><?= $topSelectedPosts[1]['category'] ?></a></li>
<li><a href="<?= url('show-category/' . $topSelectedPosts[1]['cat_id']) ?>"><?= $topSelectedPosts[1]['category'] ?></a></li>
</ul>
<a href="<?= url('show-post/' . $topSelectedPosts[1]['id']) ?>">
<h4><?= $topSelectedPosts[1]['title'] ?></h4>
</a>
<ul class="meta">
<li><a href="#"><span class="lnr lnr-user"></span><?= $topSelectedPosts[1]['username'] ?></a></li>
<li><a href="#"><?= jalaliDate($topSelectedPosts[1]['created_at']) ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $topSelectedPosts[1]['created_at'] ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $topSelectedPosts[1]['comments_count'] ?><span class="lnr lnr-bubble"></span></a></li>
</ul>
</div>
@ -60,14 +60,14 @@
</div>
<div class="top-post-details">
<ul class="tags">
<li><a href="#"><?= $topSelectedPosts[2]['category'] ?></a></li>
<li><a href="<?= url('show-category/' . $topSelectedPosts[2]['cat_id']) ?>"><?= $topSelectedPosts[2]['category'] ?></a></li>
</ul>
<a href="<?= url('show-post/' . $topSelectedPosts[2]['id']) ?>">
<h4><?= $topSelectedPosts[2]['title'] ?></h4>
</a>
<ul class="meta">
<li><a href="#"><span class="lnr lnr-user"></span><?= $topSelectedPosts[2]['username'] ?></a></li>
<li><a href="#"><?= jalaliDate($topSelectedPosts[2]['created_at']) ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $topSelectedPosts[2]['created_at'] ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $topSelectedPosts[2]['comments_count'] ?><span class="lnr lnr-bubble"></span></a></li>
</ul>
</div>
@ -77,8 +77,8 @@
<?php if(!empty($breakingNews)) { ?>
<div class="col-lg-12">
<div class="news-tracker-wrap">
<h6><span>خبر فوری:</span> <a href="<?= url('show-post/' . $breakingNews['id']) ?>"><?= $breakingNews['title'] ?></a></h6>
<div class="news-tracker-wrap text-left">
<h6><span> Breaking News :</span> <a href="<?= url('show-post/' . $breakingNews['id']) ?>"><?= $breakingNews['title'] ?></a></h6>
</div>
</div>
<?php } ?>
@ -93,7 +93,7 @@
<div class="col-lg-8 post-list">
<!-- Start latest-post Area -->
<div class="latest-post-wrap">
<h4 class="cat-title">آخرین اخبار</h4>
<h4 class="cat-title post-left text-left">Latest News</h4>
<?php foreach ($lastPosts as $lastPost) { ?>
<div class="single-latest-post row align-items-center">
<div class="col-lg-5 post-left">
@ -102,20 +102,21 @@
<img class="img-fluid" src="<?= asset($lastPost['image']) ?>" alt="">
</div>
<ul class="tags">
<li><a href="#"><?= $lastPost['category'] ?></a></li>
<li><a href="<?= url('show-category/' . $lastPost['cat_id']) ?>"><?= $lastPost['category'] ?></a></li>
</ul>
</div>
<div class="col-lg-7 post-right">
<div class="col-lg-7 post-left text-left">
<a href="<?= url('show-post/' . $lastPost['id']) ?>">
<h4><?= $lastPost['title'] ?></h4>
</a>
<ul class="meta">
<li><a href="#"><span class="lnr lnr-user"></span><?= $lastPost['username'] ?></a></li>
<li><a href="#"><?= jalaliDate($lastPost['created_at']) ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $lastPost['created_at'] ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $lastPost['comments_count'] ?><span class="lnr lnr-bubble"></span></a></li>
</ul>
<p class="excert">
خلاصه متن خبر
<p class="excert text-left">
<?= $lastPost['summary'] ?>
</p>
</div>
</div>
@ -138,23 +139,23 @@
<!-- End banner-ads Area -->
<!-- Start popular-post Area -->
<div class="popular-post-wrap">
<h4 class="title">اخبار پربازدید</h4>
<h4 class="title post-left text-left">Popular News</h4>
<?php if(isset($popularPosts[0])) { ?>
<div class="feature-post relative">
<div class="feature-post relative post-left text-left">
<div class="feature-img relative">
<div class="overlay overlay-bg"></div>
<img class="img-fluid" src="<?= asset($popularPosts[0]['image']) ?>" alt="">
</div>
<div class="details">
<div class="details post-left text-left">
<ul class="tags">
<li><a href="#"><?= $popularPosts[0]['category'] ?></a></li>
<li><a href="<?= url('show-category/' . $popularPosts[0]['cat_id']) ?>"><?= $popularPosts[0]['category'] ?></a></li>
</ul>
<a href="<?= url('show-post/' . $popularPosts[0]['id']) ?>">
<h3><?= $popularPosts[0]['title'] ?></h3>
</a>
<ul class="meta">
<li><a href="#"><span class="lnr lnr-user"></span><?= $popularPosts[0]['username'] ?></a></li>
<li><a href="#"><?= jalaliDate($popularPosts[0]['created_at']) ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $popularPosts[0]['created_at'] ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $popularPosts[0]['comments_count'] ?><span class="lnr lnr-bubble"></span></a></li>
</ul>
</div>
@ -169,20 +170,20 @@
<img class="img-fluid" src="<?= asset($popularPosts[1]['image']) ?>" alt="">
</div>
<ul class="tags">
<li><a href="#"><?= $popularPosts[1]['category'] ?></a></li>
<li><a href="<?= url('show-category/' . $popularPosts[1]['cat_id']) ?>"><?= $popularPosts[1]['category'] ?></a></li>
</ul>
</div>
<div class="details">
<div class="details post-left text-left">
<a href="<?= url('show-post/' . $popularPosts[1]['id']) ?>">
<h4><?= $popularPosts[1]['title'] ?></h4>
</a>
<ul class="meta">
<li><a href="#"><span class="lnr lnr-user"></span><?= $popularPosts[1]['username'] ?></a></li>
<li><a href="#"><?= jalaliDate($popularPosts[1]['created_at']) ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $popularPosts[1]['created_at'] ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $popularPosts[1]['comments_count'] ?><span class="lnr lnr-bubble"></span></a></li>
</ul>
<p class="excert">
خلاصه متن خبر
<p class="excert post-left text-left">
<?= $popularPosts[1]['summary'] ?>
</p>
</div>
</div>
@ -195,21 +196,22 @@
<div class="overlay overlay-bg"></div>
<img class="img-fluid" src="<?= asset($popularPosts[2]['image']) ?>" alt="">
</div>
<ul class="tags">
<li><a href="#"><?= $popularPosts[2]['category'] ?></a></li>
<ul class="tags post-left text-left">
<li><a href="<?= url('show-category/' . $popularPosts[2]['cat_id']) ?>"><?= $popularPosts[2]['category'] ?></a></li>
</ul>
</div>
<div class="details">
<div class="details post-left text-left">
<a href="<?= url('show-post/' . $popularPosts[2]['id']) ?>">
<h4><?= $popularPosts[2]['title'] ?></h4>
</a>
<ul class="meta">
<li><a href="#"><span class="lnr lnr-user"></span><?= $popularPosts[2]['username'] ?></a></li>
<li><a href="#"><?= jalaliDate($popularPosts[2]['created_at']) ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $popularPosts[2]['created_at'] ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $popularPosts[2]['comments_count'] ?><span class="lnr lnr-bubble"></span></a></li>
</ul>
<p class="excert">
خلاصه متن خبر
<p class="excert post-left text-left">
<?= $popularPosts[2]['summary'] ?>
</p>
</div>
</div>
<?php

View file

@ -2,22 +2,29 @@
<footer class="footer-area section-gap">
<div class="container">
<div class="row">
<div class="col-lg-6 col-md-6 single-footer-widget">
<h4>اخبار پربازدید</h4>
<div class="col-lg-4 col-md-4 single-footer-widget text-left">
<h4>Popular News</h4>
<ul>
<?php foreach ($popularPosts as $popularPost) { ?>
<li><a href="<?= url('show-post/' . $popularPost['id']) ?>"><?= $popularPost['title'] ?></a></li>
<?php } ?>
</ul>
</div>
<div class="col-lg-6 col-md-6 single-footer-widget">
<h4>لینک سریع</h4>
<div class="col-lg-4 col-md-4 single-footer-widget text-left">
<h4>quick link</h4>
<ul>
<?php foreach ($menus as $menu) { ?>
<li><a href="<?= $menu['url'] ?>"><?= $menu['name'] ?></a></li>
<?php } ?>
</ul>
</div>
<div class="col-lg-4 col-md-4 single-footer-widget text-left">
<h4>Contact us</h4>
<ul>
<li><a href=""><span class="lnr lnr-phone-handset"></span><span> 0903 958 2466</span></a></li>
<li><a href=""><span class="lnr lnr-envelope"></span><span> nimobina99@gmail.com</span></a></li>
</ul>
</div>
</div>
<div class="footer-bottom row align-items-center">
<p class="footer-text m-0 col-lg-8 col-md-12">

View file

@ -5,50 +5,51 @@
<!-- Mobile Specific Meta -->
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Favicon-->
<link rel="shortcut icon" href="<?= asset($setting['icon']) ?>">
<link rel="shortcut icon" href="<?=asset($setting['icon'])?>">
<!-- Meta Description -->
<meta name="description" content="<?= $setting['description'] ?>">
<meta name="description" content="<?=$setting['description']?>">
<!-- Meta Keyword -->
<meta name="keywords" content="<?= $setting['keywords'] ?>">
<meta name="keywords" content="<?=$setting['keywords']?>">
<!-- meta character set -->
<meta charset="UTF-8">
<!-- Site Title -->
<title><?= $setting['title'] ?></title>
<title><?=$setting['title']?></title>
<link href="https://fonts.googleapis.com/css?family=Poppins:100,200,400,300,500,600,700" rel="stylesheet">
<!--
CSS
============================================= -->
<link rel="stylesheet" href="<?= asset('public/app/css/linearicons.css') ?>">
<link rel="stylesheet" href="<?= asset('public/app/css/font-awesome.min.css') ?>">
<link rel="stylesheet" href="<?= asset('public/app/css/bootstrap.css') ?>">
<link rel="stylesheet" href="<?= asset('public/app/css/magnific-popup.css') ?>">
<link rel="stylesheet" href="<?= asset('public/app/css/nice-select.css') ?>">
<link rel="stylesheet" href="<?= asset('public/app/css/animate.min.css') ?>">
<link rel="stylesheet" href="<?= asset('public/app/css/owl.carousel.css') ?>">
<link rel="stylesheet" href="<?= asset('public/app/css/jquery-ui.css') ?>">
<link rel="stylesheet" href="<?= asset('public/app/css/main.css') ?>">
<link rel="stylesheet" href="<?=asset('public/app/css/linearicons.css')?>">
<link rel="stylesheet" href="<?=asset('public/app/css/font-awesome.min.css')?>">
<link rel="stylesheet" href="<?=asset('public/app/css/bootstrap.css')?>">
<link rel="stylesheet" href="<?=asset('public/app/css/magnific-popup.css')?>">
<link rel="stylesheet" href="<?=asset('public/app/css/nice-select.css')?>">
<link rel="stylesheet" href="<?=asset('public/app/css/animate.min.css')?>">
<link rel="stylesheet" href="<?=asset('public/app/css/owl.carousel.css')?>">
<link rel="stylesheet" href="<?=asset('public/app/css/jquery-ui.css')?>">
<link rel="stylesheet" href="<?=asset('public/app/css/main.css')?>">
</head>
<body>
<header>
<div class="header-top">
<div class="header-top" style="padding-bottom:30px;">
<div class="container">
<div class="row">
<!-- <div class="col-lg-6 col-md-6 col-sm-6 col-6 header-top-left no-padding">
<div class="row text-left float-left mb-10">
<div class="header-top-left no-padding ">
<ul>
<li><a href="#"><i class="fa fa-facebook"></i></a></li>
<li><a href="#"><i class="fa fa-twitter"></i></a></li>
<li><a href="#"><i class="fa fa-dribbble"></i></a></li>
<li><a href="#"><i class="fa fa-behance"></i></a></li>
</ul>
</div> -->
<div class="col-lg-6 col-md-6 col-sm-6 col-6 header-top-left no-padding">
<ul>
<li><a href=""><span class="lnr lnr-phone-handset"></span><span> 0903 958 2466</span></a></li>
<li><a href=""><span class="lnr lnr-envelope"></span><span> nimobina99@gmail.com</span></a></li>
<li><a href="<?= url('login') ?>"><span class="lnr lnr-enter-down"></span><span style="font-size:15px;"> Login</span></a></li>
<li><a href="<?= url('register') ?>"><span class="lnr lnr-user"></span><span style="font-size:15px;"> Register</span></a></li>
</ul>
</div>
<div class="header-top-left no-padding text-dark">
<ul>
<li><span>ONLINE NEWS</span></li>
</ul>
</div>
</div>
</div>
</div>
@ -57,31 +58,20 @@
<div class="row justify-content-between align-items-center">
<div class="col-lg-4 col-md-4 col-sm-12 logo-left no-padding">
<a href="http://localhost/NewsProject/">
<img class="img-fluid" src="<?= asset($setting['logo']) ?>" alt="">
<img class="img-fluid" src="<?=asset($setting['logo'])?>" alt="">
</a>
</div>
<div class="col-lg-8 col-md-8 col-sm-12 logo-right no-padding ads-banner">
<img class="img-fluid" src="<?= asset($bodyBanner['image']) ?>" alt="">
<img class="img-fluid" src="<?=asset($bodyBanner['image'])?>" alt="">
</div>
</div>
</div>
</div>
<div class="container main-menu" id="main-menu">
<div class="row align-items-center justify-content-between">
<nav id="nav-menu-container">
<ul class="nav-menu">
<?php foreach ($menus as $menu) { ?>
<li class="menu-active">
<a href="<?= $menu['url'] ?>">
<?= $menu['name'] ?>
</a></li>
<?php } ?>
</ul>
</nav>
<!-- #nav-menu-container -->
<div class="navbar-right">
<div class="navbar-right">
<form class="Search">
<input type="text" class="form-control Search-box" name="Search-box" id="Search-box" placeholder="جستجو">
<input type="text" class="form-control Search-box text-left" name="Search-box" id="Search-box" placeholder="Search">
<label for="Search-box" class="Search-box-label">
<span class="lnr lnr-magnifier"></span>
</label>
@ -90,6 +80,21 @@
</span>
</form>
</div>
<nav id="nav-menu-container">
<ul class="nav-menu">
<?php foreach ($menus as $menu) {?>
<li class="menu-active">
<a href="<?=$menu['url']?>">
<?=$menu['name']?>
</a></li>
<?php }?>
</ul>
</nav>
<!-- #nav-menu-container -->
</div>
</div>
</header>

View file

@ -1,7 +1,7 @@
<div class="col-lg-4">
<div class="sidebars-area">
<div class="single-sidebar-widget editors-pick-widget">
<h6 class="title">انتخاب سردبیر</h6>
<h6 class="title text-left">Editor's Choice</h6>
<div class="editors-pick-post">
<?php if(isset($topSelectedPosts[0])) { ?>
<div class="feature-img-wrap relative">
@ -10,16 +10,16 @@
<img class="img-fluid" src="<?= asset($topSelectedPosts[0]['image']) ?>" alt="">
</div>
<ul class="tags">
<li><a href="#"><?= $topSelectedPosts[0]['category'] ?></a></li>
<li><a href="<?= url('show-category/' . $topSelectedPosts[0]['cat_id']) ?>"><?= $topSelectedPosts[0]['category'] ?></a></li>
</ul>
</div>
<div class="details">
<div class="details text-left">
<a href="<?= url('show-post/' . $topSelectedPosts[0]['id']) ?>">
<h4 class="mt-20"><?= $topSelectedPosts[0]['title'] ?></h4>
</a>
<ul class="meta">
<li><a href="#"><span class="lnr lnr-user"></span><?= $topSelectedPosts[0]['username'] ?></a></li>
<li><a href="#"><?= jalaliDate($topSelectedPosts[0]['created_at']) ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $topSelectedPosts[0]['created_at'] ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $topSelectedPosts[0]['comments_count'] ?><span class="lnr lnr-bubble"></span></a></li>
</ul>
@ -37,19 +37,19 @@
<?php } ?>
<div class="single-sidebar-widget most-popular-widget">
<h6 class="title">پر بحث ترین ها</h6>
<h6 class="title text-left">The most controversial</h6>
<?php foreach($mostCommentsPosts as $mostCommentsPost) { ?>
<div class="single-list flex-row d-flex">
<div class="thumb">
<img src="<?= asset($mostCommentsPost['image']) ?>" alt="" width="150" height="100">
</div>
<div class="details">
<div class="details text-left">
<a href="<?= url('show-post/' . $mostCommentsPost['id']) ?>">
<h6><?= $mostCommentsPost['title'] ?></h6>
</a>
<ul class="meta">
<li><a href="#"><?= jalaliDate($mostCommentsPost['created_at']) ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $mostCommentsPost['created_at'] ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $mostCommentsPost['comments_count'] ?><span class="lnr lnr-bubble"></span></a></li>
</ul>
</div>

View file

@ -1,6 +1,6 @@
<?php
require_once(BASE_PATH . "/template/app/layouts/header.php");
?>
<?php
require_once(BASE_PATH . '/template/app/layouts/header.php');
?>
<div class="site-main-container">
<!-- Start top-post Area -->
@ -9,14 +9,14 @@ require_once(BASE_PATH . "/template/app/layouts/header.php");
<div class="row">
<div class="col-lg-12">
<div class="hero-nav-area">
<h1 class="text-white">اخبار دسته بندی <?= $category['name'] ?></h1>
<h1 class="text-white"><?= $category['name'] ?> News</h1>
</div>
</div>
<?php if(!empty($breakingNews)) { ?>
<div class="col-lg-12">
<div class="news-tracker-wrap">
<h6><span>خبر فوری:</span> <a href="<?= url('show-post/' . $breakingNews['id']) ?>"><?= $breakingNews['title'] ?></a></h6>
<div class="news-tracker-wrap text-left">
<h6><span>Breaking News:</span> <a href="<?= url('show-post/' . $breakingNews['id']) ?>"><?= $breakingNews['title'] ?></a></h6>
</div>
</div>
<?php } ?>
@ -30,8 +30,8 @@ require_once(BASE_PATH . "/template/app/layouts/header.php");
<div class="row">
<div class="col-lg-8 post-list">
<!-- Start latest-post Area -->
<div class="latest-post-wrap">
<h4 class="cat-title">آخرین اخبار</h4>
<div class="latest-post-wrap post-left text-left">
<h4 class="cat-title">Latest Post</h4>
<?php foreach ($categoryPosts as $categoryPost) { ?>
<div class="single-latest-post row align-items-center">
@ -44,13 +44,13 @@ require_once(BASE_PATH . "/template/app/layouts/header.php");
<li><a href="<?= url('show-category/' . $categoryPost['cat_id']) ?>"><?= $categoryPost['category'] ?></a></li>
</ul>
</div>
<div class="col-lg-7 post-right">
<div class="col-lg-7 post-left text-left">
<a href="<?= url('show-post/' . $categoryPost['id']) ?>">
<h4><?= $categoryPost['title'] ?></h4>
</a>
<ul class="meta">
<li><a href="#"><span class="lnr lnr-user"></span><?= $categoryPost['username'] ?></a></li>
<li><a href="#"><?= jalaliDate($categoryPost['created_at']) ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $categoryPost['created_at'] ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"> <?= $categoryPost['comments_count'] ?><span class="lnr lnr-bubble"></span></a></li>
</ul>
<p class="excert">
@ -72,8 +72,8 @@ require_once(BASE_PATH . "/template/app/layouts/header.php");
<?php } ?>
<!-- End banner-ads Area -->
<!-- Start popular-post Area -->
<div class="popular-post-wrap">
<h4 class="title">اخبار پربازدید</h4>
<div class="popular-post-wrap post-left text-left">
<h4 class="title">Popular Post</h4>
<?php if (isset($popularPosts[0])) { ?>
<div class="feature-post relative">
@ -81,7 +81,7 @@ require_once(BASE_PATH . "/template/app/layouts/header.php");
<div class="overlay overlay-bg"></div>
<img class="img-fluid" src="<?= asset($popularPosts[0]['image']) ?>" alt="">
</div>
<div class="details">
<div class="details post-left text-left"">
<ul class="tags">
<li><a href="<?= url('show-category/' . $popularPosts[0]['cat_id']) ?>"><?= $popularPosts[0]['category'] ?></a></li>
</ul>
@ -109,13 +109,13 @@ require_once(BASE_PATH . "/template/app/layouts/header.php");
<li><a href="<?= url('show-category/' . $popularPosts[1]['cat_id']) ?>"><?= $popularPosts[1]['category'] ?></a></li>
</ul>
</div>
<div class="details">
<div class="details post-left text-left"">
<a href="<?= url('show-post/' . $popularPosts[1]['id']) ?>">
<h4><?= $popularPosts[1]['title'] ?></h4>
</a>
<ul class="meta">
<li><a href="#"><span class="lnr lnr-user"></span><?= $popularPosts[1]['username'] ?></a></li>
<li><a href="#"><?= jalaliDate($popularPosts[1]['created_at']) ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $popularPosts[1]['created_at'] ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"> <?= $popularPosts[1]['comments_count'] ?><span class="lnr lnr-bubble"></span></a></li>
</ul>
<p class="excert">
@ -135,13 +135,13 @@ require_once(BASE_PATH . "/template/app/layouts/header.php");
<li><a href="<?= url('show-category/' . $popularPosts[2]['cat_id']) ?>"><?= $popularPosts[2]['category'] ?></a></li>
</ul>
</div>
<div class="details">
<div class="details post-left text-left"">
<a href="<?= url('show-post/' . $popularPosts[2]['id']) ?>">
<h4><?= $popularPosts[2]['title'] ?></h4>
</a>
<ul class="meta">
<li><a href="#"><span class="lnr lnr-user"></span><?= $popularPosts[2]['username'] ?></a></li>
<li><a href="#"><?= jalaliDate($popularPosts[2]['created_at']) ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $popularPosts[2]['created_at'] ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $popularPosts[2]['comments_count'] ?><span class="lnr lnr-bubble"></span></a></li>
</ul>
<p class="excert">

View file

@ -15,16 +15,16 @@
<div class="overlay overlay-bg"></div>
<img class="img-fluid" src="<?= asset($post['image']) ?>" alt="">
</div>
<div class="content-wrap">
<div class="content-wrap post-left text-left"">
<ul class="tags mt-10">
<li><a href="#"><?= $post['category'] ?></a></li>
<li><a href="<?= url('show-category/' . $post['cat_id']) ?>"><?= $post['category'] ?></a></li>
</ul>
<a href="#">
<h3><?= $post['title'] ?></h3>
</a>
<ul class="meta pb-20">
<li><a href="#"><span class="lnr lnr-user"></span><?= $post['username'] ?></a></li>
<li><a href="#"><?= jalaliDate($post['created_at']) ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $post['created_at'] ?><span class="lnr lnr-calendar-full"></span></a></li>
<li><a href="#"><?= $post['comments_count'] ?><span class="lnr lnr-bubble"></span></a></li>
</ul>
<p>
@ -34,16 +34,16 @@
<div class="comment-sec-area">
<div class="container">
<div class="row flex-column">
<h6>نظرات</h6>
<h6>Comment</h6>
<?php foreach ($comments as $comment) { ?>
<div class="comment-list">
<div class="single-comment justify-content-between d-flex">
<div class="user justify-content-between d-flex">
<div class="comment-list float-left post-left text-left"">
<div class="single-comment justify-content-between ">
<div class="user justify-content-between ">
<div class="desc">
<div class="desc post-left text-left"">
<h5><a href="#"><?= $comment['username'] ?></a></h5>
<p class="date mt-3"><?= jalaliDate($comment['created_at']) ?></p>
<p class="comment">
<p class="date mt-3"><?= $comment['created_at'] ?></p>
<p class="comment ml-10">
<?= $comment['comment'] ?>
</p>
</div>
@ -58,13 +58,13 @@
</div>
<?php if(isset($_SESSION['user'])) { ?>
<div class="comment-form">
<h4>درج نظر جدید</h4>
<h4>Add new comment</h4>
<form action="<?= url('comment-store') ?>" method="post">
<div class="form-group">
<input type="text" value="<?= $id ?>" name="post_id" class="d-none">
<textarea class="form-control mb-10" rows="5" name="comment" placeholder="متن نظر" onfocus="this.placeholder = ''" onblur="this.placeholder = 'متن نظر'" required=""></textarea>
<textarea class="form-control mb-10 text-left" rows="5" name="comment" placeholder="text" onfocus="this.placeholder = ''" onblur="this.placeholder = 'text'" required=""></textarea>
</div>
<button type="submit" class="primary-btn text-uppercase">ارسال</button>
<button type="submit" class="primary-btn text-uppercase">Send</button>
</form>
</div>
<?php } ?>

View file

@ -61,7 +61,7 @@
<div class="text-center p-t-136">
<a class="txt2" href="#">
<a class="txt2" href="<?= url('register') ?>">
Create your Account
<i class="fa fa-long-arrow-right m-l-5" aria-hidden="true"></i>
</a>

View file

@ -77,7 +77,7 @@
</div>
<div class="text-center p-t-136">
<a class="txt2" href="#">
<a class="txt2" href="<?= url('register') ?>">
Create your Account
<i class="fa fa-long-arrow-right m-l-5" aria-hidden="true"></i>
</a>

View file

@ -81,7 +81,7 @@
<span class="txt1">
Forgot
</span>
<a class="txt2" href="#">
<a class="txt2" href="<?= url('forgot') ?>">
Username / Password?
</a>
</div>

View file

@ -61,13 +61,13 @@
<span class="txt1">
Forgot
</span>
<a class="txt2" href="#">
<a class="txt2" href="<?= url('forgot') ?>">
Username / Password?
</a>
</div>
<div class="text-center p-t-136">
<a class="txt2" href="#">
<a class="txt2" href="<?= url('login') ?>">
Login your Account
<i class="fa fa-long-arrow-right m-l-5" aria-hidden="true"></i>
</a>