Skip to content

Commit

Permalink
add slider berita terbaru dan menu plus side bar
Browse files Browse the repository at this point in the history
  • Loading branch information
dickysudaryatmo committed Sep 2, 2022
1 parent 54435b6 commit f3365a1
Show file tree
Hide file tree
Showing 50 changed files with 116 additions and 38 deletions.
86 changes: 49 additions & 37 deletions application/views/nicepage/sections/section_berita.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,45 +63,57 @@
break;
}
?>
<?php foreach($get_berita as $berita) {?>
<div class="mb-4 col-md-6 col-lg-<?php echo $layout;?>">
<div class="body-container animate shadow h-100" style="border-radius: 15px;">
<?php
$img_src= base_url().'asset/foto_berita/small_no-image.jpg';
if ($berita['gambar'] !==''){
$img_src =base_url().'asset/foto_berita/'.$berita['gambar'];
}
?>
<div class="post-img-container border-radius-img-news"
style="background:url('<?php echo $img_src;?>');
background-position:center;
background-size:cover;
background-repeat:no-repeat;
height:250px;"></div>
<a href="<?php echo base_url($berita['judul_seo']);?>">
<h5 class="body-title center">
<?php echo $berita['judul'];?>
</h5>
</a>
<div class="body-post-meta">
<i class="fa fa-calendar"></i> <?php echo tgl_indo($berita['tanggal']); ?> ,
<i class="fa fa-user"></i> <?php echo $berita['nama_lengkap']; ?>,
<a href="<?php echo base_url()."kategori/detail/".$berita['kategori_seo']; ?>">
<b><?php echo $berita['nama_kategori']; ?></b>
</a>

</div>
<div class="body-post-content">
<?php echo strip_tags(word_limiter($berita['isi_berita'],10) );?>
</div>
<div class="body-action">
<a href="<?php echo base_url($berita['judul_seo']);?>" class="read-more">
Selengkapnya
</a>




<div class="mb-4 col-md-12">
<section id="slide-berita" class="splide" aria-labelledby="carousel-heading">
<div class="splide__track">
<ul class="splide__list">
<?php foreach($get_berita as $berita) {?>
<li class="splide__slide">
<div class="body-container animate shadow height-card-berita" style="border-radius: 15px;">
<?php
$img_src= base_url().'asset/foto_berita/small_no-image.jpg';
if ($berita['gambar'] !==''){
$img_src =base_url().'asset/foto_berita/'.$berita['gambar'];
}
?>
<div class="post-img-container border-radius-img-news"
style="background:url('<?php echo $img_src;?>');
background-position:center;
background-size:cover;
background-repeat:no-repeat;
height:250px;"></div>
<a href="<?php echo base_url($berita['judul_seo']);?>">
<h5 class="body-title center">
<?php echo $berita['judul'];?>
</h5>
</a>
<div class="body-post-meta">
<i class="fa fa-calendar"></i> <?php echo tgl_indo($berita['tanggal']); ?> ,
<i class="fa fa-user"></i> <?php echo $berita['nama_lengkap']; ?>,
<a href="<?php echo base_url()."kategori/detail/".$berita['kategori_seo']; ?>">
<b><?php echo $berita['nama_kategori']; ?></b>
</a>

</div>
<div class="body-post-content">
<?php echo strip_tags(word_limiter($berita['isi_berita'],10) );?>
</div>
<div class="body-action">
<a href="<?php echo base_url($berita['judul_seo']);?>" class="read-more">
Selengkapnya
</a>
</div>
</div>
</li>
<?php }?>
</ul>
</div>
</div>
</section>
</div>
<?php }?>
<div class="col-12 mt-4 text-center">
<?php
$url_berita = base_url()."kategori/detail/".$berita['kategori_seo'];
Expand Down
Binary file removed captcha/1662041320.4398.jpg
Binary file not shown.
Binary file removed captcha/1662041570.3079.jpg
Binary file not shown.
Binary file removed captcha/1662041869.4236.jpg
Binary file not shown.
Binary file removed captcha/1662041902.8443.jpg
Binary file not shown.
Binary file removed captcha/1662041914.995.jpg
Binary file not shown.
Binary file removed captcha/1662041957.2595.jpg
Binary file not shown.
Binary file removed captcha/1662041965.3936.jpg
Binary file not shown.
Binary file removed captcha/1662041970.9853.jpg
Binary file not shown.
Binary file removed captcha/1662042226.4085.jpg
Binary file not shown.
Binary file removed captcha/1662042237.9509.jpg
Binary file not shown.
Binary file removed captcha/1662042461.6782.jpg
Binary file not shown.
Binary file removed captcha/1662042640.4627.jpg
Binary file not shown.
Binary file removed captcha/1662042708.2899.jpg
Binary file not shown.
Binary file removed captcha/1662042728.3717.jpg
Binary file not shown.
Binary file removed captcha/1662042778.0924.jpg
Binary file not shown.
Binary file removed captcha/1662042785.8828.jpg
Binary file not shown.
Binary file removed captcha/1662042926.514.jpg
Binary file not shown.
Binary file removed captcha/1662042948.3042.jpg
Binary file not shown.
Binary file removed captcha/1662042959.5719.jpg
Binary file not shown.
Binary file removed captcha/1662043032.8407.jpg
Binary file not shown.
Binary file removed captcha/1662043054.5008.jpg
Binary file not shown.
Binary file removed captcha/1662043054.9251.jpg
Binary file not shown.
Binary file removed captcha/1662043135.4586.jpg
Binary file not shown.
Binary file removed captcha/1662043441.054.jpg
Binary file not shown.
Binary file removed captcha/1662043445.1951.jpg
Binary file not shown.
Binary file removed captcha/1662043452.6128.jpg
Diff not rendered.
Binary file removed captcha/1662043463.3352.jpg
Diff not rendered.
Binary file removed captcha/1662043660.0399.jpg
Diff not rendered.
Binary file removed captcha/1662043737.1043.jpg
Diff not rendered.
Binary file removed captcha/1662043758.8647.jpg
Diff not rendered.
Binary file removed captcha/1662043825.7801.jpg
Diff not rendered.
Binary file removed captcha/1662043892.5516.jpg
Diff not rendered.
Binary file removed captcha/1662043924.6628.jpg
Diff not rendered.
Binary file removed captcha/1662044025.3638.jpg
Diff not rendered.
Binary file removed captcha/1662044415.0157.jpg
Diff not rendered.
Binary file removed captcha/1662044476.2237.jpg
Diff not rendered.
Binary file added captcha/1662127958.4017.jpg
Binary file added captcha/1662128250.8002.jpg
Binary file added captcha/1662128650.0412.jpg
Binary file added captcha/1662128725.4359.jpg
Binary file added captcha/1662128945.9597.jpg
11 changes: 10 additions & 1 deletion template/nicepage/css/nav-responsive.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ body.responsive-menu-hide > .responsive-menu {

.responsive-menu .menu-content ul.sidemenu ul.sub-menu li ,
.responsive-menu .menu-content ul.sidemenu li {
padding-left: 15px;
padding-left: 13px;
}

.responsive-menu .menu-content ul.sidemenu ul.sub-menu li a,
Expand Down Expand Up @@ -120,6 +120,9 @@ body.responsive-menu-hide > .responsive-menu {
.height-card-direksi {
height: 96%!important;
}
.height-card-berita {
height: 94%!important;
}
}

/* For Tablet View */
Expand All @@ -142,6 +145,9 @@ body.responsive-menu-hide > .responsive-menu {
.height-card-direksi {
height: 95%!important;
}
.height-card-berita {
height: 95%!important;
}
}

/* For iPhone 4 Portrait or Landscape View */
Expand Down Expand Up @@ -171,6 +177,9 @@ body.responsive-menu-hide > .responsive-menu {
.height-card-direksi {
height: 95%!important;
}
.height-card-berita {
height: 95%!important;
}
}

/* For iPhone 5 Portrait or Landscape View */
Expand Down
57 changes: 57 additions & 0 deletions template/nicepage/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,27 @@ $('#responsive-menu').on('click', '.parent-menu-149', function(e){
$('.menu-149-minus').toggleClass('hide-element')
})

$('#responsive-menu').on('click', '.parent-menu-201', function(e){
e.preventDefault()
$('.sub-menu-mobile-201').toggleClass('show-element')
$('.menu-201-plus').toggleClass('show-element-inline')
$('.menu-201-minus').toggleClass('hide-element')
})

$('#responsive-menu').on('click', '.parent-menu-202', function(e){
e.preventDefault()
$('.sub-menu-mobile-202').toggleClass('show-element')
$('.menu-202-plus').toggleClass('show-element-inline')
$('.menu-202-minus').toggleClass('hide-element')
})

$('#responsive-menu').on('click', '.parent-menu-203', function(e){
e.preventDefault()
$('.sub-menu-mobile-203').toggleClass('show-element')
$('.menu-203-plus').toggleClass('show-element-inline')
$('.menu-203-minus').toggleClass('hide-element')
})

if ($("#responsive-menu").length) {
$('.parent-menu-194').append('<i style="float: right;margin-top: 3%;display:none;" class="fa fa-plus menu-194-plus show-element-inline" aria-hidden="true"></i><i style="float: right;margin-top: 3%;display:inline-block;" class="fa fa-minus menu-194-minus hide-element" aria-hidden="true"></i>')

Expand All @@ -238,6 +259,12 @@ if ($("#responsive-menu").length) {
$('.parent-menu-188').append('<i style="float: right;margin-top: 3%;display:none;" class="fa fa-plus menu-188-plus show-element-inline" aria-hidden="true"></i><i style="float: right;margin-top: 3%;display:inline-block;" class="fa fa-minus menu-188-minus hide-element" aria-hidden="true"></i>')

$('.parent-menu-149').append('<i style="float: right;margin-top: 3%;display:none;" class="fa fa-plus menu-149-plus show-element-inline" aria-hidden="true"></i><i style="float: right;margin-top: 3%;display:inline-block;" class="fa fa-minus menu-149-minus hide-element" aria-hidden="true"></i>')

$('.parent-menu-201').append('<i style="float: right;margin-top: 3%;display:none;" class="fa fa-plus menu-201-plus show-element-inline" aria-hidden="true"></i><i style="float: right;margin-top: 3%;display:inline-block;" class="fa fa-minus menu-201-minus hide-element" aria-hidden="true"></i>')

$('.parent-menu-202').append('<i style="float: right;margin-top: 3%;display:none;" class="fa fa-plus menu-202-plus show-element-inline" aria-hidden="true"></i><i style="float: right;margin-top: 3%;display:inline-block;" class="fa fa-minus menu-202-minus hide-element" aria-hidden="true"></i>')

$('.parent-menu-203').append('<i style="float: right;margin-top: 3%;display:none;" class="fa fa-plus menu-203-plus show-element-inline" aria-hidden="true"></i><i style="float: right;margin-top: 3%;display:inline-block;" class="fa fa-minus menu-203-minus hide-element" aria-hidden="true"></i>')
}

document.addEventListener( 'DOMContentLoaded', function() {
Expand Down Expand Up @@ -297,9 +324,39 @@ document.addEventListener( 'DOMContentLoaded', function() {
},
},
});

var splideBerita = new Splide( '#slide-berita', {
perPage:3,
gap : '50px',
// height : '900px',
autoplay: true,
type : 'loop',
// fixedHeight: '130%',
breakpoints: {
1200: {
perPage:3,
gap : '50px',
autoplay: true,
type : 'loop',
},
640: {
perPage: 1,
gap : '.7rem',
autoplay: true,
type : 'loop',
},
480: {
perPage: 1,
gap : '.7rem',
autoplay: true,
type : 'loop',
},
},
});

splide.mount();
splideDireksi.mount();
splideBerita.mount();

});

Expand Down

0 comments on commit f3365a1

Please sign in to comment.