Commit 4a8a71a2 by KyrieCettyara

memperbaiki fungsi dan tampilan user

parent 22a77470
...@@ -47,14 +47,18 @@ $routes->group("user", ["filter" => "auth"], function ($routes) { ...@@ -47,14 +47,18 @@ $routes->group("user", ["filter" => "auth"], function ($routes) {
$routes->get('logout', ' UserController::logout'); $routes->get('logout', ' UserController::logout');
$routes->get('bookmark', "UserController::listBookmark");
$routes->get('tambah-bookmark', "ArtikelController::bookmark");
$routes->get('list-kuliner', "ArtikelController::listKuliner"); $routes->get('list-kuliner', "ArtikelController::listKuliner");
$routes->get('list-pariwisata', "ArtikelController::listPariwisata"); $routes->get('list-pariwisata', "ArtikelController::listPariwisata");
$routes->get('list-travel', "ArtikelController::listTravel"); $routes->get('list-travel', "ArtikelController::listTravel");
$routes->get('list-oleh-oleh', "ArtikelController::listOleh"); $routes->get('list-oleh-oleh', "ArtikelController::listOleh");
$routes->get("artikel/(:num)", "ArtikelController::artikelById/$1"); $routes->get("artikel/(:num)", "ArtikelController::artikelById/$1");
$routes->get("bookmark/(:num)", "UserController::bookmarkById/$1");
$routes->match(["get", "post"], "add-artikel", "ArtikelController::addArtikel"); $routes->match(["get", "post"], "add-artikel", "ArtikelController::addArtikel");
$routes->match(["get", "post"], "edit-artikel/(:num)", "ArtikelController::editArtikel/$1"); $routes->match(["get", "post"], "edit-artikel/(:num)", "ArtikelController::editArtikel/$1");
$routes->get("delete-artikel/(:num)", "ArtikelController::deleteArtikel/$1"); $routes->get("delete-artikel/(:num)", "ArtikelController::deleteArtikel/$1");
$routes->get("delete-bookmark/(:num)", "UserController::deleteBookmark/$1");
/* /*
* -------------------------------------------------------------------- * --------------------------------------------------------------------
* Additional Routing * Additional Routing
......
...@@ -59,7 +59,7 @@ class ArtikelController extends BaseController ...@@ -59,7 +59,7 @@ class ArtikelController extends BaseController
$data['title'] = 'Sistem Informasi Tapanuli Utara'; $data['title'] = 'Sistem Informasi Tapanuli Utara';
$kulinerModel = new ArtikelModel(); $kulinerModel = new ArtikelModel();
$allValue = $kulinerModel->where('id_jenis_artikel', 3)->findAll(); $allValue = $kulinerModel->where('id_jenis_artikel', 4)->findAll();
return view('list', [ return view('list', [
"allValue" => $allValue, "allValue" => $allValue,
...@@ -69,6 +69,7 @@ class ArtikelController extends BaseController ...@@ -69,6 +69,7 @@ class ArtikelController extends BaseController
public function artikelById($key = null) public function artikelById($key = null)
{ {
$data['title'] = 'Sistem Informasi Tapanuli Utara';
$artikelModel = new ArtikelModel(); $artikelModel = new ArtikelModel();
$value = $artikelModel->where('id_artikel', $key)->first(); $value = $artikelModel->where('id_artikel', $key)->first();
...@@ -82,11 +83,12 @@ class ArtikelController extends BaseController ...@@ -82,11 +83,12 @@ class ArtikelController extends BaseController
return view('byId', [ return view('byId', [
"value" => $value, "value" => $value,
"data" => $data,
]); ]);
} }
} }
private function setArtikelSession($value) public function setArtikelSession($value)
{ {
$data = [ $data = [
'id_user' => 13, 'id_user' => 13,
...@@ -101,17 +103,18 @@ class ArtikelController extends BaseController ...@@ -101,17 +103,18 @@ class ArtikelController extends BaseController
public function bookmark() public function bookmark()
{ {
$data['title'] = 'Sistem Informasi Tapanuli Utara';
$bookmarkModel = new BookmarkModel(); $bookmarkModel = new BookmarkModel();
$data = [ $allValue = [
'title' => 'Sistem Informasi Tapanuli Utara', 'title' => 'Sistem Informasi Tapanuli Utara',
'id_user' => session()->get('id_user'), 'id_user' => session()->get('id_user'),
'id_artikel' => session()->get('id_artikel'), 'id_artikel' => session()->get('id_artikel'),
]; ];
$bookmarkModel->save($data); $bookmarkModel->save($allValue);
session()->destroy();
return view('landing_page', $data); return redirect()->to(base_url('bookmark'));
} }
public function addArtikel() public function addArtikel()
......
...@@ -78,9 +78,7 @@ class AuthController extends BaseController ...@@ -78,9 +78,7 @@ class AuthController extends BaseController
$session->remove('isLoggedIn'); $session->remove('isLoggedIn');
$session->destroy(); $session->destroy();
return view('landing_page', [ return redirect()->to(base_url('/'));
"data" => $data,
]);
} }
......
...@@ -6,17 +6,22 @@ use App\Models\ArtikelModel; ...@@ -6,17 +6,22 @@ use App\Models\ArtikelModel;
class Home extends BaseController class Home extends BaseController
{ {
public function __construct()
{
helper('text');
}
public function index() public function index()
{ {
$data['title'] = 'Sistem Informasi Tapanuli Utara'; $data['title'] = 'Sistem Informasi Tapanuli Utara';
return view('landing_page', [ return view('landing_page', [
"data" => $data, "data" => $data
]); ]);
} }
public function search() public function search()
{ {
$data['title'] = 'Sistem Informasi Tapanuli Utara';
$pager = \Config\Services::pager(); $pager = \Config\Services::pager();
$model = new ArtikelModel(); $model = new ArtikelModel();
$keyword = $this->request->getVar('cari'); $keyword = $this->request->getVar('cari');
...@@ -30,6 +35,8 @@ class Home extends BaseController ...@@ -30,6 +35,8 @@ class Home extends BaseController
$data['artikel'] = $query->paginate(10); $data['artikel'] = $query->paginate(10);
$data['pager'] = $model->pager; $data['pager'] = $model->pager;
$data['page'] = $this->request->getVar('page') ? $this->request->getVar('page') : 1; $data['page'] = $this->request->getVar('page') ? $this->request->getVar('page') : 1;
$data['title'] = 'Sistem Informasi Tapanuli Utara';
return view('list_search', $data); return view('list_search', $data);
} }
......
...@@ -4,32 +4,82 @@ namespace App\Controllers; ...@@ -4,32 +4,82 @@ namespace App\Controllers;
use App\Controllers\BaseController; use App\Controllers\BaseController;
use App\Models\BookmarkModel; use App\Models\BookmarkModel;
use App\Models\ArtikelModel;
use App\Controllers\ArtikelController;
class UserController extends BaseController class UserController extends BaseController
{ {
public function __construct() public function __construct()
{ {
if (session()->get('role_id') != 2) { if (session()->get('role_id') != 2) {
echo 'Access denied'; $session = session()->get('role_id');
echo $session;
exit; exit;
} }
helper('text');
} }
public function index() public function index()
{ {
return view('Home/index'); return view('Home/index');
} }
public function listBookmark($) public function bookmark()
{
$bookmarkModel = new BookmarkModel();
$data = [
'title' => 'Sistem Informasi Tapanuli Utara',
'id_user' => session()->get('id_user'),
'id_artikel' => session()->get('id_artikel'),
];
$bookmarkModel->save($data);
return view('landing_page', $data);
}
public function listBookmark()
{ {
$key['key'] = session()->get('id');
$data['title'] = 'Sistem Informasi Tapanuli Utara'; $data['title'] = 'Sistem Informasi Tapanuli Utara';
$model = new BookmarkModel(); $model = new BookmarkModel();
$allValue = $model->where('id_user', $key)->findAll();
return view('list', [ $allValue = $model->getBookmark($key);
return view('listBookmark', [
"allValue" => $allValue, "allValue" => $allValue,
"data" => $data, "data" => $data,
]); ]);
} }
public function bookmarkById($key = null)
{
$data['title'] = 'Sistem Informasi Tapanuli Utara';
$model = new BookmarkModel();
$allValue = $model->getBookmarkDetail($key);
return view('bookmarkDetail', [
"allValue" => $allValue,
"data" => $data,
]);
}
public function deleteBookmark($id)
{
$model = new BookmarkModel();;
$artikel = $model->delete($id);
$session = session();
$session->setFlashdata("success", "Artikel Berhasil Dihapus");
return redirect()->to(base_url('bookmark'));
}
} }
...@@ -42,10 +42,19 @@ class BookmarkModel extends Model ...@@ -42,10 +42,19 @@ class BookmarkModel extends Model
protected $beforeDelete = []; protected $beforeDelete = [];
protected $afterDelete = []; protected $afterDelete = [];
public function getBookmark() public function getBookmark($key)
{ {
return $this->db->table('bookmark') return $this->db->table('bookmark')
->join('artikel', 'artikel.id_artikel = bookmark.id_artikel') ->join('artikel', 'artikel.id_artikel = bookmark.id_artikel')
->where('id_user', $key)
->get()->getResultArray();
}
public function getBookmarkDetail($key)
{
return $this->db->table('bookmark')
->join('artikel', 'artikel.id_artikel = bookmark.id_artikel')
->where('id_bookmark', $key)
->get()->getResultArray(); ->get()->getResultArray();
} }
} }
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<?php foreach ($data as $value) : ?> <?php foreach ($data as $value) : ?>
<?php <?php
$isi_artikel = $value['isi_artikel']; $isi_artikel = $value['isi_artikel'];
$isi_artikel = character_limiter($isi_artikel, 100); $isi_artikel = character_limiter($isi_artikel, 500);
?> ?>
<div class="container"> <div class="container">
<div class="row"> <div class="row">
......
<?= $this->extend('layout/template'); ?>
<?= $this->section('content'); ?>
<?php foreach ($allValue as $value) : ?>
<div class="container">
<div class="row">
<div class="col">
<div class="card">
<?php $image = $value['gambar']; ?>
<img id="gambar" src="<?php echo base_url("upload/$image"); ?> " />
<div class=" card-body">
<a href="<?= base_url('delete-bookmark/' . $value['id_bookmark']); ?>" class=" btn btn-primary">Un-bookmark</a></br></br>
<h5 class="card-title"><?= $value['judul_artikel']; ?></h5>
<p class="card-text"><?= $value['isi_artikel']; ?></p>
</div>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
<?= $this->endSection(); ?>
\ No newline at end of file
<h2 id="judul_artikel" name="judul_artikel"><?= $value['judul_artikel']; ?></h1> <?= $this->extend('layout/template'); ?>
<button> <a href="<?= base_url('ArtikelController/bookmark') ?>">Submit</a></button> <?= $this->section('content'); ?>
\ No newline at end of file
<div class="container">
<div class="row">
<div class="col">
<div class="card">
<?php $image = $value['gambar']; ?>
<img id="gambar" src="<?php echo base_url("upload/$image"); ?> " />
<div class=" card-body">
<?php if (session()->get('isLoggedIn')) : ?>
<a href="<?= base_url('tambah-bookmark') ?> " class=" btn btn-primary">Bookmark</a></br></br>
<?php endif ?>
<h5 class="card-title"><?= $value['judul_artikel']; ?></h5>
<p class="card-text"><?= $value['isi_artikel']; ?></p>
</div>
</div>
</div>
</div>
</div>
<?= $this->endSection(); ?>
\ No newline at end of file
...@@ -5,7 +5,13 @@ ...@@ -5,7 +5,13 @@
<meta content="" name="description"> <meta content="" name="description">
<meta content="" name="keywords"> <meta content="" name="keywords">
<title><?= $data['title'] ?></title> <title><?= $data['title'] ?></title>
<!-- Favicons --> <!-- Favicons -->
<link href=" <?php echo base_url('img/favicon.png'); ?> " rel="icon"> <link href=" <?php echo base_url('img/favicon.png'); ?> " rel="icon">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
...@@ -33,7 +39,7 @@ ...@@ -33,7 +39,7 @@
<body> <body>
<!-- ======= Header ======= --> <!-- ======= Header ======= -->
<header id="header" class="fixed-top "> <header id="header" class="position-relative ">
<div class="container-fluid"> <div class="container-fluid">
<div class="row justify-content-center"> <div class="row justify-content-center">
...@@ -44,13 +50,12 @@ ...@@ -44,13 +50,12 @@
<nav id="navbar" class="navbar order-last order-lg-0"> <nav id="navbar" class="navbar order-last order-lg-0">
<ul> <ul>
<li><a class="scrollto" href="hotel1.html">Hotel</a></li>
<li><a class="scrollto " href="<?php echo base_url('list-pariwisata'); ?>">Pariwisata</a></li> <li><a class="scrollto " href="<?php echo base_url('list-pariwisata'); ?>">Pariwisata</a></li>
<li><a class="scrollto" href="<?php echo base_url('list-kuliner'); ?>">Kuliner</a></li> <li><a class="scrollto" href="<?php echo base_url('list-kuliner'); ?>">Kuliner</a></li>
<li><a class="scrollto" href="<?php echo base_url('list-travel'); ?>">Travel</a></li> <li><a class="scrollto" href="<?php echo base_url('list-travel'); ?>">Travel</a></li>
<li><a class="scrollto" href="<?php echo base_url('list-oleh-oleh'); ?>">Oleh Oleh</a></li> <li><a class="scrollto" href="<?php echo base_url('list-oleh-oleh'); ?>">Oleh Oleh</a></li>
<li><?php if (session()->get('role_id') == 2) : ?> <li><?php if (session()->get('role_id') == 2) : ?>
<a href="<?= base_url('AuthController/logout') ?>" class="get-started-btn">Bookmark</a> <a href="<?= base_url('bookmark') ?>" class="scrollto">Bookmark</a>
<?php endif ?> <?php endif ?>
</li> </li>
</ul> </ul>
......
...@@ -2,10 +2,11 @@ ...@@ -2,10 +2,11 @@
<?= $this->section('content'); ?> <?= $this->section('content'); ?>
<?php foreach ($allValue as $value) : ?> <?php if ($allValue != null) : ?>
<?php foreach ($allValue as $value) : ?>
<?php <?php
$isi_artikel = $value['isi_artikel']; $isi_artikel = $value['isi_artikel'];
$isi_artikel = character_limiter($isi_artikel, 100); $isi_artikel = character_limiter($isi_artikel, 500);
?> ?>
<div class="container"> <div class="container">
<div class="row"> <div class="row">
...@@ -14,13 +15,29 @@ ...@@ -14,13 +15,29 @@
<img id="gambar" class="card-img-top" src="<?= "upload/" . $value['gambar']; ?>" alt="image" /> <img id="gambar" class="card-img-top" src="<?= "upload/" . $value['gambar']; ?>" alt="image" />
<div class=" card-body"> <div class=" card-body">
<h5 class="card-title"><?= $value['judul_artikel']; ?></h5> <h4 class="card-title"><?= $value['judul_artikel']; ?></h4>
<p class="card-text"><?= $isi_artikel; ?></p> <p class="card-text"><?= $isi_artikel; ?></p>
<a href="<?= base_url('artikel/' . $value['id_artikel']); ?>" class="btn btn-primary">Go somewhere</a> <a href="<?= base_url('artikel/' . $value['id_artikel']); ?>" class="btn btn-primary">Baca Artikel...</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
<?php else : ?>
<div class="container">
<div class="row">
<div class="col">
<div class="card">
<div class=" card-body" style="height: 300px;">
<h5>Maaf, belum terdapat artikel.</h5>
</div>
</div>
</div>
</div>
</div>
<?php endif ?>
<?= $this->endSection(); ?> <?= $this->endSection(); ?>
\ No newline at end of file
<?= $this->extend('layout/template'); ?>
<?= $this->section('content'); ?>
<?php if ($allValue != null) : ?>
<?php foreach ($allValue as $value) : ?>
<?php
$isi_artikel = $value['isi_artikel'];
$isi_artikel = character_limiter($isi_artikel, 500);
?>
<div class="container">
<div class="row">
<div class="col">
<div class="card">
<img id="gambar" class="card-img-top" src="<?= "upload/" . $value['gambar']; ?>" alt="image" />
<div class=" card-body">
<h5 class="card-title"><?= $value['judul_artikel']; ?></h5>
<p class="card-text"><?= $isi_artikel; ?></p>
<a href="<?= base_url('bookmark/' . $value['id_bookmark']); ?>" class="btn btn-primary">Baca Artikel...</a>
</div>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
<?php else : ?>
<div class="container">
<div class="row">
<div class="col">
<div class="card">
<div class=" card-body" style="height: 300px;">
<h5>Anda tidak memiliki bookmark.</h5>
</div>
</div>
</div>
</div>
</div>
<?php endif ?>
<?= $this->endSection(); ?>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="utf-8">
<title>SEARCHING DATA DENGAN CODEIGNITER 4</title> <meta content="width=device-width, initial-scale=1.0" name="viewport">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha/css/bootstrap.css" rel="stylesheet">
<link href="https://getbootstrap.com/docs/4.0/dist/css/bootstrap.min.css" rel="stylesheet">
<meta content="" name="description">
<meta content="" name="keywords">
<title>Sistem Informasi Tapanuli Utara</title>
<!-- Favicons -->
<link href=" <?php echo base_url('img/favicon.png'); ?> " rel="icon">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.js"></script>
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">
<!-- Vendor CSS Files -->
<link href="<?php echo base_url('assets/vendor/bootstrap/css/bootstrap.min.css'); ?> " rel="stylesheet">
<link href="<?php echo base_url('assets/vendor/bootstrap-icons/bootstrap-icons.css'); ?> " rel="stylesheet">
<link href="<?php echo base_url('assets/vendor/boxicons/css/boxicons.min.css'); ?> " rel="stylesheet">
<link href="<?php echo base_url('assets/vendor/glightbox/css/glightbox.min.css'); ?> " rel="stylesheet">
<link href="<?php echo base_url('assets/vendor/remixicon/remixicon.css'); ?> " rel="stylesheet">
<link href="<?php echo base_url('assets/vendor/swiper/swiper-bundle.min.css'); ?> " rel="stylesheet">
<!-- Template Main CSS File -->
<link href="<?php echo base_url('css/style.css'); ?> " rel="stylesheet">
</head> </head>
<body style="width: 70%; margin: 0 auto; padding-top: 30px;"> <body>
<div class="row">
<div class="col-lg-12 margin-tb"> <!-- ======= Header ======= -->
<div class="pull-left"> <header id="header" class="fixed-top ">
<h2>SEARCHING DATA DENGAN CODEIGNITER 4 </h2> <div class="container-fluid">
<div class="row justify-content-center">
<div class="col-xl-9 d-flex align-items-center justify-content-lg-between">
<h1 class="logo me-auto me-lg-0"><a href="<?= base_url('/'); ?>">Pariwisata Tapanuli Utara</a></h1>
<!-- Uncomment below if you prefer to use an image logo -->
<!-- <a href="index.html" class="logo me-auto me-lg-0"><img src="assets/img/logo.png" alt="" class="img-fluid"></a>-->
<nav id="navbar" class="navbar order-last order-lg-0">
<ul>
<li><a class="scrollto" href="hotel1.html">Hotel</a></li>
<li><a class="scrollto " href="<?php echo base_url('list-pariwisata'); ?>">Pariwisata</a></li>
<li><a class="scrollto" href="<?php echo base_url('list-kuliner'); ?>">Kuliner</a></li>
<li><a class="scrollto" href="<?php echo base_url('list-travel'); ?>">Travel</a></li>
<li><a class="scrollto" href="<?php echo base_url('list-oleh-oleh'); ?>">Oleh Oleh</a></li>
<li><?php if (session()->get('role_id') == 2) : ?>
<a href="<?= base_url('bookmark') ?>" class="scrollto">Bookmark</a>
<?php endif ?>
</li>
</ul>
</nav><!-- .navbar -->
<?php if (session()->get('isLoggedIn') != null) : ?>
<a href="<?= base_url('AuthController/logout') ?>" class="get-started-btn">Logout</a>
<?php else : ?>
<a href="<?= base_url('login') ?>" class="get-started-btn">Login</a>
<?php endif ?>
</div> </div>
<div class="Hotbg">
<input onchange="ganti()" id="search" type="text" name="input" class="Hotbg-txt" placeholder="Search >>>">
<a id="searchb" href="" class="Hotbg-btn">
<i class="fa fa-search"></i>
</a>
</div> </div>
<script>
function ganti() {
let searchin = document.getElementById("search");
let searchButton = document.getElementById("searchb");
let baseURL = "<?php echo base_url('Home/search'); ?>";
let link = baseURL + "?cari=" + searchin.value;
searchButton.href = link;
}
</script>
</div> </div>
<hr> </header><!-- End Header -->
<form method="GET" action="<?php echo base_url('Home/search'); ?>" class="form-group">
<?php $no = 1 + (10 * ($page - 1));
foreach ($artikel as $row) : ?>
<?php
$isi_artikel = $row['isi_artikel'];
$isi_artikel = character_limiter($isi_artikel, 500);
?>
<div class="container">
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col">
<div class="input-group mb-3"> <div class="card">
<input type="text" class="form-control" name="cari" placeholder="Mencari Data Berdasarkan Nama"> <?php $image = $row['gambar']; ?>
<div class="input-group-append">
<button class="btn btn-outline-secondary" type="Submit">CARI DATA</button> <img id="gambar" class="card-img-top" src="<?php echo base_url("upload/$image"); ?> " />
<div class="card-body">
<h5 class="card-title"><?= $row['judul_artikel']; ?></h5>
<p class="card-text"><?= $isi_artikel; ?></p>
<a href="<?= base_url('artikel/' . $row['id_artikel']); ?>" class="btn btn-primary">Baca Artikel...</a>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</form>
<div class="row">
<div class="col-lg-12 margin-tb">
<table class="table table-bordered">
<tr>
<th>No</th>
<th>Judul</th>
</tr>
<?php $no = 1 + (10 * ($page - 1));
foreach ($artikel as $row) : ?>
<tr>
<td><?= $no; ?></td>
<td><?= $row['judul_artikel']; ?></td>
</tr>
<?php $no++; <?php $no++;
endforeach; ?> endforeach; ?>
</table> </table>
<?= $pager->Links() ?> <?= $pager->Links() ?>
<footer id="footer">
<div class="container">
<h3>Diskominfo Tapanuli Utara</h3>
<p>Dinas Komunikasi dan Informatika Tapanuli Utara</p>
<div class="social-links">
<a href="#" class="twitter"><i class="bx bxl-twitter"></i></a>
<a href="#" class="facebook"><i class="bx bxl-facebook-circle"></i></a>
<a href="#" class="instagram"><i class="bx bxl-instagram-alt"></i></a>
<a href="#" class="google-plus"><i class="bx bxl-whatsapp"></i></a>
<a href="#" class="linkedin"><i class="bx bxl-linkedin-square"></i></a>
</div> </div>
<div class="copyright">
&copy; Copyright <strong><span>Diskominfo Tapanuli Utara <?= date('Y'); ?></span></strong>.
</div> </div>
</body> </div>
</footer><!-- End Footer -->
</html> <!-- Vendor JS Files -->
\ No newline at end of file <script src="<?php echo base_url('assets/vendor/bootstrap/js/bootstrap.bundle.min.js'); ?> "></script>
<script src="<?php echo base_url('assets/vendor/glightbox/js/glightbox.min.js'); ?> "></script>
<script src="<?php echo base_url('assets/vendor/isotope-layout/isotope.pkgd.min.js'); ?> "></script>
<script src="<?php echo base_url('assets/vendor/php-email-form/validate.js'); ?> "></script>
<script src="<?php echo base_url('assets/vendor/purecounter/purecounter.js'); ?> "></script>
<script src="<?php echo base_url('assets/vendor/swiper/swiper-bundle.min.js'); ?> "></script>
<script src="<?php echo base_url('assets/vendor/typed.js/typed.min.js'); ?> "></script>
<script src="<?php echo base_url('assets/vendor/aos/aos.js'); ?> "></script>
<script src="<?php echo base_url('dir/vendor/aos/aos.js'); ?> "></script>
<!-- Template Main JS File -->
<script type="text/javascript" src="<?php echo base_url('js/main.js'); ?> "></script>
</body>
\ No newline at end of file
<?php foreach ($allValue as $value) : ?>
<div class="container">
<div class="row">
<div class="col">
<div class="card">
<img id="gambar" class="card-img-top" src="<?= "upload/" . $value['gambar']; ?>" alt="image" />
<div class=" card-body">
<h5 class="card-title"><?= $value['judul_artikel']; ?></h5>
<p class="card-text"><?= $value['isi_artikel'] ?></p>
<a href="<?= base_url('artikel/' . $value['id_artikel']); ?>" class="btn btn-primary">Go somewhere</a>
</div>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
<?= $key['key']; ?>
\ No newline at end of file
...@@ -129,11 +129,28 @@ input.src { ...@@ -129,11 +129,28 @@ input.src {
.container { .container {
margin: 15px 0px 15px 0px; margin: 15px 0px 15px 0px;
display: block;
margin-left: auto;
margin-right: auto;
} }
#gambar { #gambar {
width: 400px; width: 100%;
height: 400px;
object-fit: cover;
object-position: center;
display: block; display: block;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.card > .card-body {
text-align: justify;
text-justify: inter-word;
}
.card > .card-body > .btn {
float: right;
border-radius: 25px;
background-color: #009961;
}
...@@ -119,6 +119,7 @@ h6 { ...@@ -119,6 +119,7 @@ h6 {
transition: all 0.5s; transition: all 0.5s;
z-index: 997; z-index: 997;
border-bottom: 1px solid rgba(255, 255, 255, 0.1); border-bottom: 1px solid rgba(255, 255, 255, 0.1);
background-color: currentColor;
} }
#header.header-scrolled, #header.header-scrolled,
...@@ -280,63 +281,6 @@ h6 { ...@@ -280,63 +281,6 @@ h6 {
color: #fff; color: #fff;
} }
.navbar .dropdown ul {
display: block;
position: absolute;
left: 0;
top: calc(100% + 30px);
margin: 0;
padding: 10px 0;
z-index: 99;
opacity: 0;
visibility: hidden;
background: #fff;
box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
transition: 0.3s;
border-top: 2px solid #009961;
}
.navbar .dropdown ul li {
min-width: 200px;
}
.navbar .dropdown ul a {
padding: 10px 20px;
font-size: 14px;
text-transform: none;
font-weight: 500;
color: #282828;
}
.navbar .dropdown ul a i {
font-size: 12px;
}
.navbar .dropdown ul a:hover,
.navbar .dropdown ul .active:hover,
.navbar .dropdown ul li:hover > a {
color: #009961;
}
.navbar .dropdown:hover > ul {
opacity: 1;
top: 100%;
visibility: visible;
}
.navbar .dropdown .dropdown ul {
top: 0;
left: calc(100% - 30px);
visibility: hidden;
}
.navbar .dropdown .dropdown:hover > ul {
opacity: 1;
top: 0;
left: 100%;
visibility: visible;
}
@media (max-width: 1366px) { @media (max-width: 1366px) {
.navbar .dropdown .dropdown ul { .navbar .dropdown .dropdown ul {
left: -90%; left: -90%;
...@@ -1737,8 +1681,22 @@ section { ...@@ -1737,8 +1681,22 @@ section {
} }
#gambar { #gambar {
width: 400px; width: 100%;
height: 400px;
object-fit: cover;
object-position: center;
display: block; display: block;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
} }
.card > .card-body {
text-align: justify;
text-justify: inter-word;
}
.card > .card-body > .btn {
float: right;
border-radius: 25px;
background-color: #009961;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment