<?php if ( ! ($reactions == false)): ?>
    <section class="user-reactions" id="reactions<?php echo e($post->id); ?>">
    <div class="colheader">
        <h1><?php echo e(trans('updates.reaction.yourreaction')); ?></h1>
    </div>

        <?php
        $awesomecount = $reactions->where('reaction_type', 'awesome')->count();
        $nicecount = $reactions->where('reaction_type', 'nice')->count();
        $lovedcount = $reactions->where('reaction_type', 'loved')->count();
        $lolcount = $reactions->where('reaction_type', 'lol')->count();
        $funnycount = $reactions->where('reaction_type', 'funny')->count();
        $failcount = $reactions->where('reaction_type', 'fail')->count();
        $omgcount = $reactions->where('reaction_type', 'omg')->count();
        $ewcount = $reactions->where('reaction_type', 'ew')->count();
        $totalrec=$reactions->count();
        ?>
        <div class="clear"></div>
        <div class="percentage-bar">


            <div class="reaction-emoji">
                <div class="bar">
            <span class="count f" style="height:<?php echo e($awesomecount ? number_format(($awesomecount / $totalrec) * 100, 8) : 0); ?>%;">
                <span class="count-text"><?php echo e($awesomecount); ?></span>
            </span>
                </div>

                <a rel="nofollow" <?php echo reactionvoteuserget($post, 'awesome'); ?>href="<?php echo e(action('PollController@VoteReaction', [$post->type, $post->slug , $post->id , 'reaction' => 'awesome'] )); ?>">
                    <img alt="<?php echo e(trans('updates.reaction.awesome')); ?>" src="<?php echo e(Theme::asset('img/reactions/awesome.gif', null, false)); ?> " width="50">
                    <span class="text"><?php echo e(trans('updates.reaction.awesome')); ?></span></a></div>
            <div class="reaction-emoji">
                <div class="bar">
            <span class="count f" style="height: <?php echo e($nicecount ?  number_format(($nicecount / $totalrec) * 100, 8) : 0); ?>%;">
                <span class="count-text"><?php echo e($nicecount); ?></span>
            </span>
                </div>

                <a rel="nofollow" <?php echo reactionvoteuserget($post, 'nice'); ?>href="<?php echo e(action('PollController@VoteReaction', [$post->type, $post->slug , $post->id , 'reaction' => 'nice'] )); ?>">
                    <img alt="<?php echo e(trans('updates.reaction.nice')); ?>" src="<?php echo e(Theme::asset('img/reactions/nice.png', null, false)); ?>" width="50">
                    <span class="text"><?php echo e(trans('updates.reaction.nice')); ?></span></a></div>
            <div class="reaction-emoji">
                <div class="bar">
            <span class="count f" style="height: <?php echo e($lovedcount ? number_format(($lovedcount / $totalrec) * 100, 8) : 0); ?>%;">
                <span class="count-text"><?php echo e($lovedcount); ?> </span>
            </span>
                </div>

                <a rel="nofollow" <?php echo reactionvoteuserget($post, 'loved'); ?>href="<?php echo e(action('PollController@VoteReaction', [$post->type, $post->slug , $post->id, 'reaction' => 'loved'] )); ?>">
                    <img alt="<?php echo e(trans('updates.reaction.loved')); ?>" src="<?php echo e(Theme::asset('img/reactions/loved.gif', null, false)); ?>" width="50">
                    <span class="text"><?php echo e(trans('updates.reaction.loved')); ?></span></a></div>
            <div class="reaction-emoji">
                <div class="bar">
            <span class="count f" style="height: <?php echo e($lolcount ? number_format(($lolcount / $totalrec) * 100, 8) : 0); ?>%;">
                <span class="count-text"><?php echo e($lolcount); ?></span>
            </span>
                </div>
                <a rel="nofollow" <?php echo reactionvoteuserget($post, 'lol'); ?>href="<?php echo e(action('PollController@VoteReaction', [$post->type, $post->slug , $post->id , 'reaction' => 'lol'] )); ?>" >
                    <img alt="<?php echo e(trans('updates.reaction.lol')); ?>" src="<?php echo e(Theme::asset('img/reactions/lol.gif', null, false)); ?>" width="50">
                    <span class="text"><?php echo e(trans('updates.reaction.lol')); ?></span></a></div>
            <div class="reaction-emoji">
                <div class="bar">
            <span class="count f" style="height: <?php echo e($funnycount ? number_format(($funnycount / $totalrec) * 100, 8) : 0); ?>%;">
                <span class="count-text"><?php echo e($funnycount); ?></span>
            </span>
                </div>
                <a rel="nofollow" <?php echo reactionvoteuserget($post, 'funny'); ?>href="<?php echo e(action('PollController@VoteReaction', [$post->type, $post->slug , $post->id , 'reaction' => 'funny'] )); ?>">
                    <img alt="<?php echo e(trans('updates.reaction.funny')); ?>" src="<?php echo e(Theme::asset('img/reactions/funny.gif', null, false)); ?>" width="50">
                    <span class="text"><?php echo e(trans('updates.reaction.funny')); ?></span></a></div>
            <div class="reaction-emoji">
                <div class="bar">
            <span class="count f" style="height: <?php echo e($failcount ? number_format(($failcount / $totalrec) * 100, 8) : 0); ?>%;">
                <span class="count-text"><?php echo e($failcount); ?></span>
            </span>
                </div>
                <a rel="nofollow"  <?php echo reactionvoteuserget($post, 'fail'); ?>href="<?php echo e(action('PollController@VoteReaction', [$post->type, $post->slug , $post->id , 'reaction' => 'fail'] )); ?>">
                    <img alt="<?php echo e(trans('updates.reaction.fail')); ?>" src="<?php echo e(Theme::asset('img/reactions/fail.gif', null, false)); ?>" width="50">
                    <span class="text"><?php echo e(trans('updates.reaction.fail')); ?></span></a></div>
            <div class="reaction-emoji">
                <div class="bar">
            <span class="count f" style="height: <?php echo e($omgcount ? number_format(($omgcount / $totalrec) * 100, 8) : 0); ?>%;">
                <span class="count-text"><?php echo e($omgcount); ?></span>
            </span>
                </div>
                <a rel="nofollow" <?php echo reactionvoteuserget($post, 'omg'); ?>href="<?php echo e(action('PollController@VoteReaction', [$post->type, $post->slug , $post->id , 'reaction' => 'omg'] )); ?>">
                    <img alt="<?php echo e(trans('updates.reaction.omg')); ?>" src="<?php echo e(Theme::asset('img/reactions/wow.gif', null, false)); ?>" width="50">
                    <span class="text"><?php echo e(trans('updates.reaction.omg')); ?></span></a></div>
            <div class="reaction-emoji">
                <div class="bar">
             <span class="count f" style="height: <?php echo e($ewcount ? number_format(($ewcount / $totalrec) * 100, 8) : 0); ?>%;">
                <span class="count-text"><?php echo e($ewcount); ?></span>
             </span>
                </div>
                <a rel="nofollow" <?php echo reactionvoteuserget($post, 'ew'); ?>href="<?php echo e(action('PollController@VoteReaction', [$post->type, $post->slug , $post->id , 'reaction' => 'ew'] )); ?>">
                    <img alt="<?php echo e(trans('updates.reaction.ew')); ?>" src="<?php echo e(Theme::asset('img/reactions/cry.gif', null, false)); ?>" width="50">
                    <span class="text"><?php echo e(trans('updates.reaction.ew')); ?></span></a></div>
        </div>
    </section>
    <br><br>
<?php endif; ?>
