コード例 #1
0
ファイル: content-scroller.php プロジェクト: juslee/e27
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 
}
コード例 #2
0
ファイル: template-tags.php プロジェクト: juslee/e27
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;
    }
}
コード例 #3
0
ファイル: stylesheets.php プロジェクト: hscale/webento
/**
 * Calculates the width of the primary or secondary nav elements, or the child
 * UL elements, based on the border settings choices.
 *
 * @author Gary Jones
 * @param string $nav 'primary' or 'secondary'
 * @param boolean $ul True for getting width of child UL, false (default) for the (grand)parent element.
 * @return string
 * @since 1.0
 */
function premise_calculate_nav_width($nav, $ul = false)
{
    $border = premise_get_fresh_design_option($nav . '_nav_border');
    $border_style = premise_get_fresh_design_option($nav . '_nav_border_style');
    if ('none' == $border_style) {
        $border = 0;
    }
    $width = 940 - 2 * $border;
    if ($ul) {
        $border = premise_get_fresh_design_option($nav . '_nav_inner_border');
        $border_style = premise_get_fresh_design_option($nav . '_nav_inner_border_style');
        if ('none' == $border_style) {
            $border = 0;
        }
        $width = $width - 2 * $border;
    }
    return ' ' . $width . 'px';
}
コード例 #4
0
ファイル: video.php プロジェクト: juslee/e27
<?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();
コード例 #5
0
/**
 * Adds a textarea setting - label and textarea.
 *
 * @author Gary Jones
 * @param string $id ID of the element
 * @param string $label Displayed label
 * @param integer cols Value for the cols attribute (default = 25)
 * @param integer rows Value for the rows attribute (default = 10)
 * @since 0.9.5
 * @return string HTML markup
 */
function premise_add_textarea_setting($id, $label, $cols = 25, $rows = 10)
{
    return premise_add_label($id, $label) . '<br /><textarea id="' . $id . '" name="' . 'premise-design' . '[' . $id . ']" cols="39" rows="10">' . premise_get_fresh_design_option($id) . '</textarea>';
}
コード例 #6
0
ファイル: pricing-table.php プロジェクト: hscale/webento
<?php

$columns = premise_get_pricing_columns();
$columnCount = count($columns);
$landing_page_style = premise_get_landing_page_style();
$ctaAlign = premise_get_fresh_design_option('pricing_tier_cta_align', $landing_page_style);
$wrapWidth = premise_get_fresh_design_option('wrap_width', $landing_page_style) - 2 * premise_get_fresh_design_option('wrap_padding', $landing_page_style);
$margins = 10 * ($columnCount - 1);
// Account for margins
// container extraneous
$extraneous = $columnCount * 2 * (premise_get_fresh_design_option('pricing_tier_border', $landing_page_style) + premise_get_fresh_design_option('pricing_tier_padding', $landing_page_style));
$available = $wrapWidth - $margins - $extraneous;
$max = 0;
foreach ($columns as $column) {
    if (count($column['attributes']) > $max) {
        $max = count($column['attributes']);
    }
}
$marker = strtolower(premise_get_pricing_bullet_marker());
if (!in_array($marker, array('none', 'default'))) {
    $marker .= '-' . strtolower(premise_get_pricing_bullet_color());
}
$bullet_class = sanitize_html_class('pricing-table-' . $marker);
?>
<div class="pricing-table-container">
	<div class="pricing-table <?php 
echo $bullet_class;
?>
">
		<?php 
$count = 0;
コード例 #7
0
ファイル: content-scroller.php プロジェクト: hscale/webento
<?php

/*
Template Name: Content Scroller
Template Description: A simple content scroller.
*/
get_header();
$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>

	<div id="content" class="hfeed">
		<?php 
the_post();
?>
		<div class="hentry">
			<?php