Beispiel #1
0
function premise_content_scroller_styles()
{
    $landing_page_style = premise_get_landing_page_style();
    $width = premise_get_fresh_design_option('wrap_width', $landing_page_style) - 2 * premise_get_fresh_design_option('wrap_padding', $landing_page_style) - 90;
    ?>
<style type="text/css">
	#content .coda-slider, #content .coda-slider .panel {
		width: <?php 
    echo absint($width);
    ?>
px;
	}
	#content .coda-slider .container-border {
		width: <?php 
    echo absint($width) - 2;
    ?>
px;
	}
</style>
<?php 
}
Beispiel #2
0
function premise_do_before_post()
{
    global $content_width;
    if (!isset($content_width) || !$content_width) {
        $landing_page_style = premise_get_landing_page_style();
        $width = intval(premise_get_fresh_design_option('wrap_width', $landing_page_style)) - 2 * intval(premise_get_fresh_design_option('wrap_padding', $landing_page_style)) - intval(premise_get_fresh_design_option('optin_holder_padding', $landing_page_style) * 2 + 2 * premise_get_fresh_design_option('optin_holder_border', $landing_page_style));
    } else {
        $width = (int) ($content_width / 2);
    }
    switch (premise_get_advice_type()) {
        case 'opt-in':
            ?>
			<div style="width: <?php 
            echo $width;
            ?>
px;" class="entry-optin entry-optin-align-<?php 
            premise_the_optin_align();
            ?>
">
			<?php 
            premise_the_optin_form_code();
            if (premise_get_optin_align() != 'center') {
                echo apply_filters('the_content', premise_get_optin_copy());
            }
            ?>
				<span class="clear"></span>
			</div>
<?php 
            add_filter('the_content', 'premise_get_optin_below_copy', 0);
            break;
        case 'pricing':
            add_filter('the_content', 'premise_get_pricing_content', 0);
            break;
        case 'social-share':
            add_filter('the_content', premise_has_social_share_shared_page() ? 'premise_get_social_share_after_share_page' : 'premise_get_social_share_teaser_page', 0);
            break;
        case 'content-scroller':
            ?>

<script type="text/javascript">
//<!--
	var $ = jQuery;
	jQuery(document).ready(function($) {
		$('.coda-slider, .coda-slider .panel').css({
			width: '<?php 
            echo $width;
            ?>
px'
		});
		$('.coda-slider .container-border').css({
			width: '<?php 
            echo $width - 2;
            ?>
px'
		});
	});
//-->
</script>
<?php 
            add_filter('the_content', 'premise_get_content_scroller_content', 0);
            //@todo: check that this isn't doing the same thing twice
            add_action('premise_after_footer', 'premise_do_after_content_scroller_content');
            break;
        case 'video':
            premise_do_before_video_content();
            add_filter('the_content', 'premise_get_video_below_copy', 0);
            break;
    }
}
Beispiel #3
0
<?php

/*
Template Name: Video
Template Description: Embed a video that makes it easier to sell your product or subscription to potential customers.
*/
get_header();
$landing_page_style = premise_get_landing_page_style();
$entryVideoWidth = intval(premise_get_fresh_design_option('wrap_width', $landing_page_style)) - intval(premise_get_fresh_design_option('video_holder_padding', $landing_page_style) * 2 + 2 * premise_get_fresh_design_option('video_holder_border', $landing_page_style));
?>
	<div id="content" class="hfeed">
		<?php 
the_post();
?>
		<div class="hentry">
			<?php 
premise_do_headline();
premise_do_before_video_content();
?>
			<div class="entry-content"><?php 
echo apply_filters('the_content', premise_get_video_below_copy());
?>
</div>
		</div>
	</div><!-- end #content -->
	<?php 
get_footer();