<?php $this->load->view('includes/head') ?>
<?php $this->load->view('includes/topbar') ?>
<?php $this->load->view('includes/header') ?>
<link rel="stylesheet" type="text/css" href="<?=base_url('assets/css/bhajans.css')?>">
<main id="main">

	<style type="text/css">
		
	</style>
	<?php
	$prayerBook = getWebSyncsData('Prayer Book', 'prayerBookSettings', ''); 
	?>
	<!-- ======= Temple Services Section ======= -->
	<section id="temple-services" class="temple-services" style="background-image: url(<?=base_url('assets/img/elegant-background-with-mandala.png');?>);background-size: auto;">


		<div class="container">
			<h2 id="temple-services" class="text-center">Bhajans<br><img src="<?=base_url('assets/img/border.png')?>" class="img-fluid img-responsive" style="width: 20%;"></h2>

			<div class="row mb-5">

				<?php foreach ($prayerBook as $key => $value) { 

					// print_r($value);

					if ($value['Parent']['bookTypes'] == 'BY LANGUAGE') {

						echo '<div class="three"><h2 class=" fw-bold py-3">'.camelCase($value['Parent']['refDataName']).'</h2></div>';

						foreach ($value['Child Grid'] as $key => $item) {

							echo '<div class="col-md-2"><a href="'.ApiBaseUrl()['url'].$item['pdf'].'" target="_blank" class="btn btn-outline-danger" style="border-radius:0px!important"><i class="fa fa-book"></i> '.$item['refDataName1'].'</a></div>';
						}

					}else if($value['Parent']['bookTypes'] == 'BY DEITY'){

						echo '<div class="three"><h2 class=" fw-bold py-3 mt-5">'.camelCase($value['Parent']['refDataName']).'</h2></div>';

						foreach ($value['Child Grid'] as $key => $item) {

							echo '<div class="col-md-6 text-center">

							<a href="'.ApiBaseUrl()['url'].$item['pdf'].'" class="image" target="_blank">
							<img id="img-prayer-books" alt="'.$item['refDataName2'].'" src="'.ApiBaseUrl()['url'].$item['image'].'" target="_blank">
							<span>'.$item['refDataName2'].'</span>
							</a>
							<h4 class="fw-bold mt-3">'. $item['refDataName2'].' '.camelCase($item['refDataName1']).'</h4> 

							</div>';
						}

					}





				} ?>


			</div>
		</section><!-- End Temple Services Section -->


	</main><!-- End #main -->

	<script type="text/javascript">
		$(document).ready(function() {
			window.scrollTo({ top: 140, behavior: 'smooth'});
		});
	</script>
	<?php $this->load->view('includes/footer') ?>
	<?php $this->load->view('includes/script') ?>
