
<?php $__env->startSection('subtitle'); ?>
<?php echo $game -> id; ?> weapons
<?php $__env->stopSection(); ?>

<?php $__env->startSection('description'); ?>
<?php echo $game -> id; ?><?php if($game -> short_name): ?> (<?php echo $game -> short_name; ?>)<?php endif; ?> weapon list. Find the best loadout for any <?php echo $game -> id; ?><?php if($game -> short_name): ?> (<?php echo $game -> short_name; ?>)<?php endif; ?> gun.
<?php $__env->stopSection(); ?>

<?php $__env->startSection('theme-color'); ?>
<body class="<?php echo $game -> theme_color; ?>">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('sub-header'); ?>
<section id="game" >
    <!-- Sub Header -->
    <div class="sub-header" style="background-image: url('<?php echo $game -> header_url; ?>')">
        <div class="container">
            <div class="row" >
                <ul class="sub-header-container" >
                    <li>
                        <h1 class="title"><?php echo $game -> id; ?></h1>
                    </li>
                    <li>
                        <ul class="custom-breadcrumb" >
                            <li>
                                <h5><a href="<?php echo route('home'); ?>"> Home </a></h5>
                            </li>
                            <li>
                                <i class="separator entypo-play" ></i>
                            </li>
                            <li>
                                <h5><?php echo $game -> id; ?></h5>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</section>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<?php if(HelperController::adsEnabled()): ?>
<div class="col-md-12">
	<div class="top-ad-box">
		<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
		<!-- Game Loadouts Leaderboard -->
		<ins class="adsbygoogle"
		style="display:block"
		data-ad-client="ca-pub-9067954073014278"
		data-ad-slot="1230654771"
		data-ad-format="auto"></ins>
		<script>
			( adsbygoogle = window.adsbygoogle || []).push({});
		</script>
	</div>	
</div>
<?php endif; ?>
<div class="col-md-8">
    <h2>Weapons</h2>
    <span class="line"> <span class="sub-line"></span> </span>
    <form>
        <div class="form-group">
            <input type="text" class="form-control input-lg" id="weaponSearch" placeholder="Search Weapons">
        </div>
    </form>
    <table class="table table-striped table-hover" id="weapon-table">
        <?php foreach($weaponsByType as $key => $type): ?>
        <tr>
            <td class="type" style="background-color: #fff; border: none;"><h3><?php echo $key; ?></h3><span class="line"> <span class="sub-line"></span> </span></td>
        </tr>
        <?php foreach($type as $weapon): ?>
        <tr>
            <td class="searchable no-padding"><a class="block padding-8px flex" href="<?php echo route('showLoadouts', array(urlencode($game -> id), urlencode($weapon -> name))); ?>">
            <div class="col-md-3 vertical-center">
                <img src="<?php echo asset($weapon -> thumb_url); ?>" alt="<?php echo $weapon -> name; ?>" />
            </div>
            <div class="col-md-9 vertical-center">
                <span class="h3"><?php echo $weapon ->
                    name; ?></span>
            </div> <div class="clearfix"></div> </a></td>

        </tr>
        <?php endforeach; ?>

        <?php endforeach; ?>
    </table>
</div>
<div class="col-md-4">
    <?php if(HelperController::adsEnabled()): ?>
    <div class="right-ad-box">

		<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
		<!-- Game Loadouts Responsive Sidebar -->
			<ins class="adsbygoogle game-loadouts-responsive-sidebar"
				 style="display:block"
			 data-ad-client="ca-pub-9067954073014278"
			 data-ad-slot="2846988777"
			 data-ad-format="auto"></ins>
		<script>
		(adsbygoogle = window.adsbygoogle || []).push({});
		</script>
		
	</div>
    <?php endif; ?>
    <h2>Top Loadouts</h2>
    <span class="line"> <span class="sub-line"></span> </span>
    <?php foreach($topLoadouts as $loadout): ?>
    <?php
    $count = $loadout -> count;
    $loadout = Loadout::findOrFail($loadout -> id);
    ?>
    <a class="loadoutSmall block" href="<?php echo route('showLoadout', array(urlencode($game -> id), urlencode(Weapon::findOrFail($loadout -> weapon_id) -> name), urlencode($loadout ->id))); ?>"> <h4 class="weaponSmall theme-color"><?php echo Weapon::findOrFail($loadout -> weapon_id) -> name; ?> <small class="pull-right"> (<?php echo $count; ?> votes)</small></h4> <?php foreach($loadout -> attachments as $attachment): ?>
    <div class="attachmentSmall">
        <?php if ($attachment -> thumb_url): ?>
        <img class="mr-5" src="<?php echo asset($attachment -> thumb_url); ?>" alt="<?php echo $attachment -> name; ?>" />
        <?php endif; ?>
        <?php echo $attachment -> name; ?>
    </div> <?php endforeach; ?> </a>
    <?php endforeach; ?>
    <h2>Recent Loadouts</h2>
    <span class="line"> <span class="sub-line"></span> </span>
    <?php foreach($recentLoadouts as $loadout): ?>
    <?php $loadout = Loadout::findOrFail($loadout -> id); ?>
    <a class="loadoutSmall block" href="<?php echo route('showLoadout', array(urlencode($game -> id), urlencode(Weapon::findOrFail($loadout -> weapon_id) -> name), urlencode($loadout ->id))); ?>"> <h4 class="weaponSmall theme-color"><?php echo Weapon::findOrFail($loadout -> weapon_id) -> name; ?></h4> <?php foreach($loadout -> attachments as $attachment): ?>
    <div class="attachmentSmall">
        <?php if ($attachment -> thumb_url): ?>
        <img class="mr-5" src="<?php echo asset($attachment -> thumb_url); ?>" alt="<?php echo $attachment -> name; ?>" />
        <?php endif; ?>
        <?php echo $attachment -> name; ?>
    </div> <?php endforeach; ?> </a>
    <?php endforeach; ?>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
<script type="text/javascript">
    $(document).ready(function() {
        $('#weaponSearch').keyup(function() {
            $query = $('#weaponSearch').val().toLowerCase();
            if ($query == '') {
                $('.type').removeClass('hide').addClass('show');
                $('#weapon-table').addClass('table-striped');
            } else {
                $('.type').removeClass('show').addClass('hide');
                $('#weapon-table').removeClass('table-striped');
            }
            $('.searchable').each(function() {
                if ($(this).text().toLowerCase().indexOf($query) != -1) {
                    $(this).removeClass('hide').addClass('show');
                } else {
                    $(this).removeClass('show').addClass('hide');
                }
            });
        });
    }); 
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>