<?php
/**
* Timeline
* Version		: 1.0
* Created by	: joomla2you
* Email			: info@joomla2you.com
* URL			: www.joomla2you.com
* License GPLv2.0 - http://www.gnu.org/licenses/gpl-2.0.html
*/

// no direct access
defined('_JEXEC') or die('Restricted access');

$doc = JFactory::getDocument();

// Load CSS/JS
$doc->addStyleSheet (JURI::base() . 'modules/mod_ju_timeline/media/css/style.css' );

// Styling from module parameters
$ju_css = '#juiconbox' . $ju_moduleid . ' {position: relative; z-index: 200;  }
#juiconbox' . $ju_moduleid . ' .opp-wrap {position: relative; float: left; padding: ' . ($ju_image_margin_y) . 'px; width:' . $ju_image_width . ';}
@media only screen and (min-width: 960px) and (max-width: 1280px) {#juiconbox' . $ju_moduleid . ' .opp-wrap {width:' . $ju_image_width_tabl . ';}}
@media only screen and (min-width: 768px) and (max-width: 959px) {#juiconbox' . $ju_moduleid . ' .opp-wrap {width:' . $ju_image_width_tabp . ';}}
@media only screen and ( max-width: 767px ) {#juiconbox' . $ju_moduleid . ' .opp-wrap {width:' . $ju_image_width_mobl . ';}}
@media only screen and (max-width: 440px) {#juiconbox' . $ju_moduleid . ' .opp-wrap {width:' . $ju_image_width_mobp . ';}}
';
// Put styling in header
$doc->addStyleDeclaration($ju_css);
?>
<div id="juiconbox<?php echo $ju_moduleid; ?>">
<?php foreach ($timeline_images as $item) : ?>
<div class="mg-top-30 opp-wrap <?php echo $item->ju_position; ?>">
<div class="image-wrap">
<img src="<?php echo $item->ju_image; ?>" alt="<?php echo $item->ju_title; ?>" >
</div>
<div class="menu-item-list item-box-shadow">
<div class="inner-wrap ps-container">
<div class="list">
<h4><?php echo $item->ju_title; ?></h4>
<?php if ($item->ju_text != '') : ?>
<p><?php echo $item->ju_text; ?></p>
<?php endif; ?>
<?php if (!empty($item->ju_target_url)) : ?>
<a href="<?php echo $item->ju_target_url; ?>" target="<?php echo $ju_target; ?>" class="butn butn-bg"><span><?php echo $item->ju_readmore; ?></span></a>
<?php endif; ?>
</div>

</div>
</div>
</div>
<?php endforeach; ?>
</div>
