예제 #1
0
 function swv_assets()
 {
     $is_cdn = swv_site_option('resource', 'local', 'local') == 'cdn';
     $local_assets = get_template_directory_uri() . '/assets';
     $cdn_assets = "//cdnjs.cloudflare.com/ajax/libs";
     $css_assets = array('bootstrap-css' => 'twitter-bootstrap/3.3.5/css/bootstrap.min.css', 'font-awesome' => 'font-awesome/4.4.0/css/font-awesome.min.css', 'animate-css' => 'animate.css/3.4.0/animate.min.css');
     $js_assets = array('jquery' => 'jquery/1.11.3/jquery.min.js', 'underscore' => 'underscore.js/1.6.0/underscore-min.js', 'lazyload' => 'jquery.lazyload/1.9.1/jquery.lazyload.min.js');
     if ($is_cdn) {
         foreach ($js_assets as $script_id => $script_url) {
             wp_deregister_script($script_id);
             wp_register_script($script_id, "{$cdn_assets}/{$script_url}");
         }
         foreach ($css_assets as $css_id => $css_url) {
             wp_deregister_style($css_id);
             wp_register_style($css_id, "{$cdn_assets}/{$css_url}");
         }
     } else {
         wp_register_script('lazyload', "{$local_assets}/js/jquery.lazyload.min.js");
         wp_register_style('bootstrap-css', "{$local_assets}/css/bootstrap.min.css");
         wp_register_style('font-awesome', "{$local_assets}/css/font-awesome.min.css");
         wp_register_style('animate-css', "{$local_assets}/css/animate.min.css");
     }
     wp_enqueue_script('jquery');
     // We use jQuery to all javascription instances
     wp_enqueue_script('underscore');
     // We use underscore to render some templates
     wp_enqueue_script('lazyload');
     wp_enqueue_script('naked-common-js', "{$local_assets}/js/common.js");
     wp_enqueue_style('bootstrap-css');
     wp_enqueue_style('font-awesome');
     wp_enqueue_style('animate-css');
     wp_enqueue_style('swv-stylesheet', get_template_directory_uri() . '/style.css');
 }
예제 #2
0
<?php

/*********
 * Front page template.
 ***********************/
global $wp_query;
get_header();
?>
 <div id="main-content">
        <?php 
$sections = (array) swv_site_option('section', array(), array(1 => array(), 2 => array()));
$sections = array_filter($sections);
/***************
 * Section 1
 *****************/
if (isset($sections[1]) && count($sections[1]) > 0) {
    $section1 = (object) $sections[1];
    $img = '';
    if (isset($section1->portrait) && (int) $section1->portrait > 0) {
        $img_ = wp_get_attachment_image_src((int) $section1->portrait, 'full');
        $img = $img_[0];
    }
    ?>
        <section id="home-section-1" class="drop" data-image="<?php 
    echo esc_url($img);
    ?>
" data-video="">
                <span class="bg-overlay"></span>
                <div class="container">
                        <div class="page-header">
                                <h1 class="page-title"><?php 
예제 #3
0
<div class="top-header">
        <div class="container">
                <div class="social-container">
                <?php 
$social_links = swv_site_option('socials', array(), array('linkedin' => '#', 'google-plus' => '#', 'facebook' => '#', 'twitter' => '#', 'youtube' => '#', 'instagram' => '#'));
$social_links = array_filter($social_links);
$html = '';
foreach ($social_links as $social => $link) {
    if ($social == 'facebook') {
        $social = 'facebook-official';
    }
    $icon = "fa fa-{$social}";
    printf('<a href="%1$s" class="social-link social-%2$s"><i class="fa fa-%2$s"></i></a>', esc_url($link), $social);
}
?>
                </div>
        </div>
</div>