Your IP : 216.73.216.84


Current Path : /home/h/e/l/helpink/www/modules/mod_uk_progressbar/tmpl/
Upload File :
Current File : /home/h/e/l/helpink/www/modules/mod_uk_progressbar/tmpl/default.php

<?php defined('_JEXEC') or die;
/*
 * @package     mod_uk_progressbar
 * @copyright   Copyright (C) Joomlaplates. All rights reserved.
 * @license     GNU General Public License version 3 or later; see http://www.gnu.org/licenses/gpl-3.0.txt
 */

$skill_title       = $params->get('skill_title');
$progress_bg       = $params->get('progress_bg');
$skill_bg        = $params->get('skill_bg');
$skill_value     = $params->get('skill_value');
$content_before_class       = $params->get('content_before_class');
$content_before    = $params->get('content_before');

?>
<?php if ($content_before) { ?>
<div class="<?php echo $content_before_class; ?>">
<?php echo $content_before; ?>
</div>
<?php } ?>
<style type="text/css">
.hide-progress-bar {
  opacity: 0;
}


</style>



<?php
		foreach ($items as $item)
		{
		
		?>
		<div class="col">
			<h3 class="progress-title"><?php echo $item->title; ?></h3>
			<div class="progress" style="background-color:<?php echo $item->progress_bg; ?>">
				<div class="hide-progress-bar progress-bar-striped <?php echo $item->skill_bg; ?> active" style="width:<?php echo $item->skill_value; ?>%;">
					<div  class="progress-value"><?php echo $item->skill_value; ?>%</div>
				</div>
			</div>
			
		</div>

<?php } ?>

<style type="text/css">
.progress-title{
    margin: 0 0 8px;
}

.progress{
    display: flex;
    height: 1.4rem !important;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 20px;
    overflow: visible;
    position: relative;
}
.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent)!important;
    background-size: 1.4rem 1.4rem;
}
.progress .progress-bar{
    box-shadow: none;
    border-radius: 0;
    position: relative;
    -webkit-animation: 2s linear 0s normal none infinite running progress-bar-stripes,animate-positive 1s;
    animation: 2s linear 0s normal none infinite running progress-bar-stripes,animate-positive 1s;
}

.progress-bar .progress-value{
    width: 50px;
    height: 100%;
    font-size: 14px;
    font-weight: 300;
    position: absolute;
    line-height: 1.6;
	background:#000;
    top: 0;
    left: 0;
}
.progress:after,
.progress .progress-bar:after,
.progress .progress-value:after{
    content: "";
    border-left: 13px solid rgba(0,0,0,0.1);
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    position: absolute;
    top: 0;
    right: -13px;
}
.progress.red .progress-bar:after{ border-left-color: #d9534f; }
.progress .progress-value:after{ border-left: 13px solid #000; }
.progress.blue .progress-bar:after{ border-left-color: #5bc0de; }
.progress.yellow .progress-bar:after{ border-left-color: #f0ad4e; }
.progress.green .progress-bar:after{ border-left-color: #5cb85c; }
@-webkit-keyframes animate-positive{
    0%{ width: 0; }
}
@keyframes animate-positive{
    0%{ width: 0; }
}
</style>
<script type="text/javascript">
(function() {
  var elements;
  var windowHeight;

  function init() {
    elements = document.querySelectorAll('.hide-progress-bar');
    windowHeight = window.innerHeight;
  }

  function checkPosition() {
    for (var i = 0; i < elements.length; i++) {
      var element = elements[i];
      var positionFromTop = elements[i].getBoundingClientRect().top;

      if (positionFromTop - windowHeight <= 0) {
        element.classList.add('progress-bar');
        element.classList.remove('hide-progress-bar');
      }
    }
  }

  window.addEventListener('scroll', checkPosition);
  window.addEventListener('resize', init);

  init();
  checkPosition();
})();


</script>