achievement popup design

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

View file

@ -18,10 +18,16 @@
);
</script>
<script src="/js/imagelightbox.min.js"></script>
<script>
<script type="text/javascript">
$( function()
{
$( 'a' ).imageLightbox();
});
</script>
<script type="text/javascript">
$(document).ready(function(){
setTimeout(function() { $(".notify").fadeOut(1500); }, 5000);
$('body').click(function() { $(".notify").fadeOut(200); });
});
</script>
<!--[if lt IE 9]>
@ -52,27 +58,27 @@
</header>
<article class="wrap">
<?php if(count($notifications) > 0) : ?>
<ul class="notifications">
<ul class="notify">
<?php foreach($notifications as &$notification) : ?>
<?php if($notification['type'] == \hhu\z\controllers\components\NotificationComponent::TYPE_ACHIEVEMENT) : ?>
<li class="achievement">
<li class="cf">
<?php if(!is_null($notification['image'])) : ?>
<img src="<?=$notification['image']?>" />
<?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'])) : ?>
<a href="<?=$notification['link']?>"><?=$notification['message']?></a>
<p class="fwb"><a href="<?=$notification['link']?>"><?=$notification['message']?></a></p>
<?php else : ?>
<?=$notification['message']?>
<p class="fwb"><?=$notification['message']?></p>
<?php endif ?>
</li>
<?php else : ?>
<li class="lvlup">
<small><?=_('Level-up')?>:</small>
<li class="cf">
<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'])) : ?>
<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 : ?>
<?=sprintf(_('You have reached level %d'), $notification['message'])?>
<p class="fwb"><?=sprintf(_('You have reached level %d'), $notification['message'])?></p>
<?php endif ?>
</li>
<?php endif ?>