achievement popup design

This commit is contained in:
Daniel 2014-04-25 23:47:20 +02:00
commit ad12546cc8

View file

@ -18,11 +18,17 @@
); );
</script> </script>
<script src="/js/imagelightbox.min.js"></script> <script src="/js/imagelightbox.min.js"></script>
<script> <script type="text/javascript">
$( function() $( function()
{ {
$( 'a' ).imageLightbox(); $( 'a' ).imageLightbox();
}); });
</script>
<script type="text/javascript">
$(document).ready(function(){
setTimeout(function() { $(".notify").fadeOut(1500); }, 5000);
$('body').click(function() { $(".notify").fadeOut(200); });
});
</script> </script>
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script type="text/javascript" src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <script type="text/javascript" src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
@ -52,27 +58,27 @@
</header> </header>
<article class="wrap"> <article class="wrap">
<?php if(count($notifications) > 0) : ?> <?php if(count($notifications) > 0) : ?>
<ul class="notifications"> <ul class="notify">
<?php foreach($notifications as &$notification) : ?> <?php foreach($notifications as &$notification) : ?>
<?php if($notification['type'] == \hhu\z\controllers\components\NotificationComponent::TYPE_ACHIEVEMENT) : ?> <?php if($notification['type'] == \hhu\z\controllers\components\NotificationComponent::TYPE_ACHIEVEMENT) : ?>
<li class="achievement"> <li class="cf">
<?php if(!is_null($notification['image'])) : ?> <?php if(!is_null($notification['image'])) : ?>
<img src="<?=$notification['image']?>" /> <img src="<?=$notification['image']?>" />
<?php endif ?> <?php endif ?>
<small><?=_('Achievement achieved')?>:</small> <p class="announce"><i class="fa fa-trophy fa-fw"></i><?=_('Achievement achieved')?>:<i class="fa fa-times fa-fw"></i></p>
<?php if(!is_null($notification['link'])) : ?> <?php if(!is_null($notification['link'])) : ?>
<a href="<?=$notification['link']?>"><?=$notification['message']?></a> <p class="fwb"><a href="<?=$notification['link']?>"><?=$notification['message']?></a></p>
<?php else : ?> <?php else : ?>
<?=$notification['message']?> <p class="fwb"><?=$notification['message']?></p>
<?php endif ?> <?php endif ?>
</li> </li>
<?php else : ?> <?php else : ?>
<li class="lvlup"> <li class="cf">
<small><?=_('Level-up')?>:</small> <p class="announce"><i class="fa fa-arrow-up fa-fw"></i><?=_('Level-up')?>:<i class="fa fa-times fa-fw"></i></p>
<?php if(!is_null($notification['link'])) : ?> <?php if(!is_null($notification['link'])) : ?>
<a href="<?=$notification['link']?>"><?=sprintf(_('You have reached level %d'), $notification['message'])?></a> <p class="fwb"><a href="<?=$notification['link']?>"><?=sprintf(_('You have reached level %d'), $notification['message'])?></a></p>
<?php else : ?> <?php else : ?>
<?=sprintf(_('You have reached level %d'), $notification['message'])?> <p class="fwb"><?=sprintf(_('You have reached level %d'), $notification['message'])?></p>
<?php endif ?> <?php endif ?>
</li> </li>
<?php endif ?> <?php endif ?>