<?php $__env->startSection('meta_tags'); ?>
    @parent

    <meta name="robots" content="index, follow">
    <meta name="description" content="OSAAtoday Prep High School Sports News Article: <?php echo $info['article']->title; ?>">
    <meta name="keywords" content="OSAA, OSAAtoday, <?php echo $info['article']->tags; ?>">    
    <meta name="author" content="<?php echo $info['author']->getName(); ?>">
    <meta name="generator" content="OSAA, Laravel, Quill">    

<?php $__env->stopSection(); ?>



<?php $__env->startSection('page_title'); ?>
    OSAAtoday - <?php echo $info['article']->title; ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_sub_title'); ?>    
   <a href="<?php echo url('/today'); ?>"><img src="<?php echo asset('/images/logos/OSAAtoday-Tagline.png'); ?>"  data-hover-src="<?php echo asset('/images/logos/OSAAtoday-Tagline-Hover.png'); ?>" data-original-src="<?php echo asset('/images/logos/OSAAtoday-Tagline.png'); ?>" alt="Navigate to OSAAtoday article index" title="Navigate to OSAAtoday article index" style="" /></a>   
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    @parent

    <link rel="stylesheet" type="text/css" href="<?php echo asset('css/news_articles.css'); ?>">

    <style type="text/css">
        h1.header {
            width: auto;
            line-height: 1.2em;           
        } 
        .page_functions {            
            width: auto;
        }

        @media print {
            #full_page_content {
                margin-top: -2em;
            }
        }
    </style>    

<?php $__env->stopSection(); ?>

<?php $__env->startSection('jquery_init'); ?>
    
    /*
     * Close button     
     */
    $('.close_button')
        .button({'icons':{'primary':'ui-icon-circle-close'}})        
        .css({'font-size' : '10pt',
              'margin-top' : '0.5em'});

    /*
     * Print button     
     */
    $('.print_button')
        .button({'icons':{'primary':'ui-icon-print'}})        
        .css({'font-size' : '10pt',
              'margin-top' : '0.5em',
              'margin-right' : '10px'})
        .on('click', function(event)
        {
            event.preventDefault();
            window.print();
        });

    <?php if (Auth::check() and Auth::user()->isTodayPublisher()): ?>

        /*
         * Edit button     
         */
        $('.edit_button')
            .button({'icons':{'primary':'ui-icon-pencil'}})        
            .css({'font-size' : '10pt',
                  'margin-top' : '0.5em',
                  'margin-right' : '10px'});

    <?php endif; ?>

    $('a img[data-hover-src]').hover(function()
    {
        $(this).attr('src', $(this).attr('data-hover-src'));
    },
    function()
    {
        $(this).attr('src', $(this).attr('data-original-src'));
    });

    var space = '<div style="height: 3em;">&nbsp;</div>';
    var more = '<?php echo AdsController::getAd('160x600'); ?>';    
    var more_2 = '<?php echo AdsController::getAd('160x600'); ?>';
    var more_3 = '<?php echo AdsController::getAd('160x600'); ?>';
    var more_4 = '<?php echo AdsController::getAd('160x600'); ?>';
    var more_5 = '<?php echo AdsController::getAd('160x600'); ?>';
    var more_6 = '<?php echo AdsController::getAd('160x600'); ?>';

    if ($('.article-body').outerHeight() > 1000)
    {
        $('#wide_scraper_ad')
            .css({'height' : 'auto'})
            .append(space, more, space);
    }

    if ($('.article-body').outerHeight() > 1600)
    {
        $('#wide_scraper_ad')
            .css({'height' : 'auto'})
            .append(more_2, space);
    }

    if ($('.article-body').outerHeight() > 2200)
    {
        $('#wide_scraper_ad')
            .css({'height' : 'auto'})
            .append(more_3, space);
    }

    if ($('.article-body').outerHeight() > 2800)
    {
        $('#wide_scraper_ad')
            .css({'height' : 'auto'})
            .append(more_4, space);
    }

    if ($('.article-body').outerHeight() > 3400)
    {
        $('#wide_scraper_ad')
            .css({'height' : 'auto'})
            .append(more_5, space);
    }

    if ($('.article-body').outerHeight() > 4200)
    {
        $('#wide_scraper_ad')
            .css({'height' : 'auto'})
            .append(more_6, space);
    }

<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_functions'); ?>
        
    <?php if (Auth::check() and Auth::user()->isTodayPublisher()): ?>
        <a href="<?php echo url('/today/articles/' . $info['article']->id . '/edit'); ?>" class="edit_button">Edit</a>    
    <?php endif; ?>

    
    <a href="#" class="print_button">Print</a>
    <a href="<?php echo url('/today'); ?>" class="close_button" title="Back to OSAAtoday article listing">Close</a>

<?php $__env->stopSection(); ?>


<?php $__env->startSection('main_content'); ?>    

    <div class="article-title">
        <?php echo $info['article']->title; ?>
    </div>    

    <?php if (!Helpers::strIsEmpty($info['article']->sub_title)): ?>
        <div class="article-sub-title"><?php echo $info['article']->sub_title; ?></div>          
    <?php endif; ?>

    <div class="article-header">
        <?php if (is_null($info['article']->submitted_at)): ?>
            <?php echo date('F j, Y', time()); ?>
        <?php else: ?>
            <?php echo date('F j, Y', strtotime($info['article']->submitted_at)); ?>
        <?php endif; ?>
        by <?php echo $info['author']->getName(); ?>, <?php echo $info['author']->outlet; ?>
    
        <?php if ($info['article']->is_retired): ?>
            - <span class="bold important">Retired Article</span>
        <?php endif; ?>
    </div>    

    <div class="article-body ql-container ql-viewer">
        <?php if (!Helpers::strIsEmpty($info['article']->photo_path)): ?>
            <div class="article-photo">
                <img src="<?php echo asset($info['article']->photo_path); ?>?t=<?php echo time(); ?>" alt="<?php echo (!Helpers::strIsEmpty($info['article']->photo_caption)) ? str_replace('"', '\'', $info['article']->photo_caption) : 'Article Photo'; ?>" title="" />
                <?php if (!Helpers::strIsEmpty($info['article']->photo_caption)): ?>
                <div class="photo-caption"><?php echo $info['article']->photo_caption; ?></div>
                <?php endif; ?>
            </div>
        <?php endif; ?>

        <?php echo $info['article']->body; ?>
    </div>

    <div class="article-footer">        
        <div class="columns">
            <div class="third">
                <?php if (is_null($info['author']->photo_path)): ?>
                    <div class="author-photo-holder">       
                    </div>
                <?php else: ?>
                    <div class="author-photo">      
                        <img src="<?php echo asset($info['author']->photo_path); ?>" alt="Photo of <?php echo $info['author']->getName(); ?>" title="" />
                    </div>
                <?php endif; ?>          
                <div class="author-name"><?php echo $info['author']->getName(); ?></div>         
                <div class="author-role">
                    <?php echo $info['author']->title; ?><br />  
                    <?php echo $info['author']->outlet; ?><br />
                </div>
            </div>
            <div class="third">
                <div class="author-contact">
                    <a href="mailto:<?php echo Helpers::obfuscateEmailAddress($info['author']->getEmail(false)); ?>"><img src="<?php echo asset('/images/icons/email_icon_16px.png'); ?>" alt="Email <?php echo $info['author']->getName(); ?>" title="" style="vertical-align: middle; margin-right: 1em;" /><?php echo Helpers::obfuscateEmailAddress($info['author']->getEmail(false)); ?></a>
                </div>
                <div class="author-social-media">                   
                    <?php foreach ($info['author']->getSocialMediaHandles() as $handle): ?>                      
                        <a href="<?php echo $handle->link; ?>" target="_blank"><img src="<?php echo $handle->icon; ?>" alt="<?php echo $handle->name; ?> Link" title="<?php echo $handle->handle; ?>" /></a>
                    <?php endforeach; ?>
                </div>              
            </div>
            <div class="third">                
                <div style="font-size: 8pt; padding-top: 71px; color: #222222; padding-left: 30px;">
                    &copy; <?php echo date('Y', time()); ?> OSAAtoday, Oregon School Activities Association
                </div>                
            </div>
        </div>
    </div>

    <br class="clear" />

    
    <div class="ad" style="float: left; margin-right: 50px;">       
        <a href="mailto:osaatoday@osaa.org">
            <img src="<?php echo asset('/images/logos/OSAAtoday-Ad 215x90px.jpg'); ?>" alt="Submit a story idea" title="" width="215" height="90" style="width: 215px; height: 90px;">
        </a>        
    </div>

    <!-- Large Leaderboard Ad (970x90) -->                
    <div class="ad" style="margin-left: 73px; width: 728px; height: 90px; margin: 0; float: right; background-color: #ffffff;">
        <?php echo AdsController::getAd('728x90'); ?>
    </div>

    <br class="clear" /><br />
    

<?php $__env->stopSection(); ?>