Esempio n. 1
0
 public static function display_showcase($args, $return = false)
 {
     $display = "";
     if (!empty($args)) {
         $display .= "<section id=\"" . $args['category'] . "\" class=\"ui basic " . get_the_color($args['color'], $args['inverted']) . " vertical segment center aligned\">";
         $display .= "<br><br>";
         $display .= "<div class=\"ui container\">";
         $display .= "<h1 class=\"ui " . get_the_aligment($args['title_alignment']) . " huge header\">";
         $display .= "<div class='content'>";
         $display .= !$args['title'] ? __(ucfirst($args['category']), 'sage') : $args['title'];
         $display .= "<div class='sub header'>" . $args['subtitle'] . "</div>";
         $display .= "</div>";
         $display .= "</h1>";
         $query = self::showcase_query($args['posttype'], $args['category']);
         if ($query && $query->have_posts()) {
             $display .= "<div id='landing-showcase' class='landing-showcase'>";
             while ($query->have_posts()) {
                 $query->the_post();
                 $id = $query->post->ID;
                 $info = self::get_post_data($args['posttype'], $args['category'], $id);
                 if (!empty($info)) {
                     $data[] = $info;
                 } else {
                     $data = array();
                 }
             }
             if (!empty($data)) {
                 $display .= self::get_component($args['component'], $data);
             } else {
                 $display .= "<h3>" . 'Sorry! Currently there are no ' . __(ucfirst($args['category']), 'sage') . "</h3>";
             }
             $display .= "</div>";
         } else {
             $display .= "<h3>" . 'Sorry! Currently there are no ' . __(ucfirst($args['category']), 'sage') . "</h3>";
         }
         $display .= "</div>";
         $display .= "<br><br><br>";
         $display .= "</section>";
     }
     if (!$return) {
         echo $display;
     } else {
         return $display;
     }
 }
Esempio n. 2
0
 private function setBackground()
 {
     if ($this->have_option) {
         $bg_type = $this->options['background_type'];
         if ($bg_type == 'color') {
             $this->background['style'] = '';
             $this->background['class'] = get_the_color($this->options['background_color'], $this->options['color_inverted']);
         } else {
             if ($bg_type == 'texture') {
                 $texture_image = $this->getBackgroundImage($this->options['bg_texture']);
                 $this->background['style'] = $texture_image ? "background-image: url(" . $texture_image . "); background-repeat:repeat;" : "";
                 $this->background['class'] = '';
             } else {
                 $image = $this->getBackgroundImage($this->options['bg_image']);
                 $this->background['style'] = $image ? "background-image:url('" . $image . "');background-repeat:no-repeat;background-size:100%;background-position:center;" : "";
                 $this->background['class'] = '';
             }
         }
     } else {
         $this->background['style'] = '';
         $this->background['class'] = '';
     }
 }
Esempio n. 3
0
<?php

if (!empty($args)) {
    $textimage_option = $args['textimage_options'];
    ?>
    <!-- Showcase Section -->
    <section id="<?php 
    echo $args['category'];
    ?>
" class="ui basic <?php 
    echo get_the_color($args['color'], $args['inverted']);
    ?>
 vertical segment center aligned">
        <br><br>
        <div class="ui container">
            <h1 class="ui <?php 
    echo get_the_aligment($args['title_alignment']);
    ?>
 huge header">
                <div class="content">
                <?php 
    if (!$args['title']) {
        ?>
                    <?php 
        echo __(ucfirst($args['category']), 'sage');
        ?>
                <?php 
    } else {
        ?>
                    <?php 
        echo $args['title'];
Esempio n. 4
0
<?php

$design_options = get_option('experiensa_design_settings');
$display_country_images = $design_options['setting_display_country_images'];
$section = $design_options['promotion_color_group'];
$color = $section['promotion_section_color'][0];
$inverted = $section['promotion_section_inverted'][0];
$taxonomies = array('country');
$args = array('orderby' => 'name', 'order' => 'ASC', 'hide_empty' => true);
$countries = get_terms($taxonomies, $args);
?>

<div class="ui <?php 
echo get_the_color($color, $inverted[0]);
?>
 basic vertical segment center aligned">
    <br>
    <br>
    <div class="ui container">
        <div class="column inverted">
            <h1 class="massive-header">
                <?php 
setlocale(LC_ALL, 'fr_FR');
?>
                <!-- utf8_encode(strftime()) -->
                <?php 
// _e('The best prices in ','sage'); echo " "; echo strftime('%B');
?>
                <?php 
_e('Discover amazing countries', 'sage');
?>
Esempio n. 5
0
<?php

use Roots\Sage\Config;
use Roots\Sage\Wrapper;
require_once 'conf/color.php';
$theme_options = get_option('look_and_feel');
$color = $theme_options['website_color'];
$website_color = get_the_color($color);
?>

<!doctype html>
<html <?php 
language_attributes();
?>
>
<?php 
get_template_part('templates/head');
?>
<body <?php 
body_class();
?>
>
    <!--[if lt IE 9]>
    <div class="alert alert-warning">
    <?php 
_e('You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.', 'sage');
?>
</div>
<![endif]-->
<?php 
do_action('get_header');
Esempio n. 6
0
 public function getBgColor($background_settings, $source)
 {
     if ($source == 'page') {
         return get_the_color($background_settings['background_color_page'], $background_settings['color_inverted_page']);
     }
     return get_the_color($background_settings['background_color_showcase'], $background_settings['color_inverted_showcase']);
 }