/** * getRGBA convert any color to rgba with custom alpha * * @param string $str css color value #hex, rgb(), rgba() * @param string $alpha * @return string returns colors normalized as rgba() */ function getRGBA($str, $alpha = '1.0') { // $keywordsPattern = "/^[a-z]*$/"; $hexPattern = "/^#[0-9a-f]{3}([0-9a-f]{3})?\$/i"; $rgbPattern = "/^rgb\\(\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*\\)\$/"; $rgbaPattern = "/^rgba\\(\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*((0.[1-9])|[01])\\s*\\)\$/"; // $hslPattern = "/^hsl\(\s*(0|[1-9]\d?|[12]\d\d|3[0-5]\d)\s*,\s*((0|[1-9]\d?|100)%)\s*,\s*((0|[1-9]\d?|100)%)\s*\)$/"; if (preg_match($rgbaPattern, $str, $matches)) { return 'rgba(' . implode(',', array_slice($matches, 1, 3)) . ',' . $alpha . ')'; } if (preg_match($rgbPattern, $str, $matches)) { return 'rgba(' . implode(',', array_slice($matches, 1)) . ',' . $alpha . ')'; } if (preg_match($hexPattern, $str, $matches)) { return 'rgba(' . hex2RGB($str, true) . ',' . $alpha . ')'; } return $str; }
imagealphablending($im, false); imagesavealpha($im, true); //setTransparency($im,$imorig); imagecopyresampled($im, $imorig, 0, 0, 0, 0, $w, $h, $x, $y); $cx = empty($_GET['cx']) ? 0 : $_GET['cx']; $cy = empty($_GET['cy']) ? 0 : $_GET['cy']; if (!empty($cx) && !empty($cy)) { // $cc = empty($_GET['cc']) ? 'white' : $_GET['cc']; @($valign = !isset($_GET['val']) ? 1 : $_GET['val']); @($halign = !isset($_GET['hal']) ? 1 : $_GET['hal']); $sx = $halign == 1 ? ($cx - $w) / 2 : 0; $sy = $valign == 1 ? ($cy - $h) / 2 : 0; $canvas = imagecreatetruecolor($cx, $cy); imagealphablending($canvas, false); imagesavealpha($canvas, true); $colorArray = hex2RGB($colorHex); $transparent = imagecolorallocatealpha($canvas, 0, 0, 0, 127); //$white = imagecolorallocate($canvas, 255, 255, 255); //$black = imagecolorallocate($canvas, 255, 0, 0); if (!$isTransparent) { $color = imagecolorallocate($canvas, $colorArray['red'], $colorArray['green'], $colorArray['blue']); imagefill($canvas, 0, 0, $color); } else { imagefill($canvas, 0, 0, $transparent); } imagecopy($canvas, $im, $sx, $sy, 0, 0, $w, $h); $im = $canvas; } header('Content-Type: image/png'); imagepng($im); // header('Content-Type: image/jpeg');
// Format all color hex value strings $post_title_color = "#" . $post_title_color; $post_excerpt_color = "#" . $post_excerpt_color; $post_heading_color = "#" . $post_heading_color; $post_bg_color = "#" . $post_bg_color; $post_innershadow_color = "#" . $post_innershadow_color; $post_outershadow_color = "#" . $post_outershadow_color; $post_selectedslide_textcolor = "#" . $post_selectedslide_textcolor; $post_unselectedslide_textcolor = "#" . $post_unselectedslide_textcolor; $post_selectedslide_bgcolor = "#" . $post_selectedslide_bgcolor; $post_unselectedslide_bgcolor = "#" . $post_unselectedslide_bgcolor; $post_image_bg_color = "#" . $post_image_bg_color; $post_selectedslide_dropshadow_color = "#" . $post_selectedslide_dropshadow_color; $post_unselectedslide_dropshadow_color = "#" . $post_unselectedslide_dropshadow_color; $post_slide_textshadow_color = "#" . $post_slide_textshadow_color; $post_textbg_rgba = 'rgba(' . hex2RGB($post_textbg_color, true) . ',' . $post_textbg_alpha . ')'; $post_textbg_hex = "#" . $post_textbg_color; // Height offset $height_offset = 0; if ($post_display_slidenumbers == '1' && $post_arrow_position != 'borderless' || $post_arrow_position == 'below') { $height_offset += 25; } // Define box shadow $unselected_shadow = $post_unselectedslide_dropshadow_x . 'px ' . $post_unselectedslide_dropshadow_y . 'px ' . $post_unselectedslide_dropshadow_blur . 'px ' . $post_unselectedslide_dropshadow_spread . 'px ' . $post_unselectedslide_dropshadow_color . ' '; $selected_shadow = $post_selectedslide_dropshadow_x . 'px ' . $post_selectedslide_dropshadow_y . 'px ' . $post_selectedslide_dropshadow_blur . 'px ' . $post_selectedslide_dropshadow_spread . 'px ' . $post_selectedslide_dropshadow_color . ' '; if ($post_unselectedslide_inset == '1') { $unselected_shadow .= 'inset'; } if ($post_selectedslide_inset == '1') { $selected_shadow .= 'inset'; }
<?php header("Content-Type: image/png"); define("_WIDTH", 10); define("_HEIGHT", 10); if (empty($_GET["color"])) { exit; } $color = htmlspecialchars(urldecode($_GET["color"])); $w = @abs(intval(htmlspecialchars($_GET["w"]))) | _WIDTH; $h = @abs(intval(htmlspecialchars($_GET["h"]))) | _HEIGHT; $file = "bullet-{$color}-{$w}-{$h}.png"; if (file_exists($file)) { echo file_get_contents($file); exit; } include "bullet-generator.inc.php"; $colorParsed = hex2RGB($color); if ($colorParsed === false) { exit; } $bullet = generateBullet($colorParsed, $w, $h); echo $bullet; file_put_contents($file, $bullet);
function custom_stylesheet_content() { $ltopmar = ot_get_option('pp_logo_top_margin'); $lbotmar = ot_get_option('pp_logo_bottom_margin'); $taglinemar = ot_get_option('pp_tagline_margin'); ?> <style type="text/css"> .boxed #logo,#logo { <?php if (isset($ltopmar[0]) && $ltopmar[1]) { echo 'margin-top:' . $ltopmar[0] . $ltopmar[1] . ';'; } ?> <?php if (isset($lbotmar[0]) && $lbotmar[1]) { echo 'margin-bottom:' . $lbotmar[0] . $lbotmar[1] . ';'; } ?> } #blogdesc { <?php if (isset($ltopmar[0]) && $ltopmar[1]) { echo 'margin-top:' . $taglinemar[0] . $taglinemar[1] . ';'; } ?> } <?php $custom_main_color = get_theme_mod('chow_main_color', '#73b819'); $menu_current_color = get_theme_mod('chow_menu_currcolor', '#505050'); $custom_rgb = hex2RGB($custom_main_color); if ($custom_rgb) { $red = $custom_rgb['red']; $green = $custom_rgb['green']; $blue = $custom_rgb['blue']; } ?> .rsDefaultInv .rsThumb.rsNavSelected { -webkit-box-shadow: inset 0px -1px 0px 0px rgba(<?php echo $red . ',' . $green . ',' . $blue . ','; ?> 0.12), 1px 0px 0px 0px <?php echo $custom_main_color; ?> ; -moz-box-shadow: inset 0px -1px 0px 0px rgba(<?php echo $red . ',' . $green . ',' . $blue . ','; ?> , 0.12), 1px 0px 0px 0px <?php echo $custom_main_color; ?> ; box-shadow: inset 0px -1px 0px 0px rgba(<?php echo $red . ',' . $green . ',' . $blue . ','; ?> 0.12), 1px 0px 0px 0px <?php echo $custom_main_color; ?> ; } #current, .menu ul li a:hover, .menu ul > li:hover > a, .menu ul ul, .rsDefaultInv .rsThumb.rsNavSelected, .rsDefault .rsThumb.rsNavSelected, .menu > ul > li.current-menu-ancestor > a, .menu > ul > li.current-menu-item > a, #current, .foodiepress-wrapper.recipe2 .instructions ul > li.active:before, .foodiepress-wrapper.recipe1 .instructions ul > li.active:before, .foodiepress-wrapper.recipe1 .ingredients li.active:before, .foodiepress-wrapper.recipe1 .ingredients a:hover:after, .foodiepress-wrapper.recipe2 .ingredients-container .ingredients a:hover:after, .foodiepress-wrapper.recipe2 .ingredients li.active:before { border-color: <?php echo $custom_main_color; ?> ; } .alternative #current:hover, .wp-core-ui .button:hover, .foodiepress-wrapper.recipe1 .instructions ul > li.active:before, .foodiepress-wrapper.recipe2 .instructions ul > li.active:before, .menu.alternative ul li a:hover, .menu.alternative ul > li.sfHover > a { background-color: <?php echo $custom_main_color; ?> !important; } .rsDefault .rsArrowIcn:hover, a.print, .ingredients input[type=checkbox]:checked + label:before, #slider-prev:hover, #slider-next:hover, .search button, #bbpress-forums .topic-author div.bbp-reply-header, .rsSlideTitle.tags ul li, ul.categories li a:hover, .post-icon, .rate-recipe, .comment-by a.reply:hover, .comment-by a.comment-reply-link:hover, .newsletter-btn, .product-button, .search-by-keyword button, .chosen-container .chosen-results li.highlighted, .chosen-container-multi .chosen-choices li.search-choice, .tabs-nav li.active a, .ui-accordion .ui-accordion-header-active:hover, .ui-accordion .ui-accordion-header-active, a.nav-toggle.active, .upload-btn, a.button.color, input[type="button"], input.button.color, .widget_categories ul li a:hover, input[type="submit"], .nav-links a:hover, a.button.light:hover, .page-template-template-browserecipe .search-by-keyword button, .search .search-by-keyword button, nav.search button, aside.search button, .foodiepress-wrapper.recipe1 .ingredients li.active:before, .foodiepress-wrapper.recipe2 .ingredients li.active:before, .pagination ul li a.current-page { background-color: <?php echo $custom_main_color; ?> ; } .rsDefaultInv .rsThumb.rsNavSelected, a.blockTitle:hover, .rsDefault .rsThumb.rsNavSelected, .rsDefault .rsThumbsArrow:hover, .qtyplus:hover, .qtyminus:hover, body input[type="button"]:hover, .quantity input.plus:hover, .quantity input.minus:hover, a.cart-remove:hover, .linking .button, .mfp-close:hover, a.calculate-shipping:hover, .widget_price_filter .button, a.button.wc-forward, .shipping-calculator-form .button, .mfp-arrow:hover, .pagination .current, .pagination ul li a:hover, .pagination-next-prev ul li a:hover, .highlight.color { background: <?php echo $custom_main_color; ?> ; } a, .author-box .title, .author-box .contact a:hover, ul.product_list_widget li a:hover, a.adv-search-btn.active i, a.adv-search-btn.active, a.adv-search-btn:hover i, a.adv-search-btn:hover, .foodiepress-wrapper.recipe1 .ingredients a:hover, .foodiepress-wrapper.recipe2 .ingredients a:hover, .comment-by a.url:hover, .author-box a:hover span, .post-meta a:hover, table.cart-table td.product-name a:hover, .widget ul li a:hover, .basic-table.fav-recipes .recipe-title a:hover, .list-1.color li:before, .list-2.color li:before, .list-3.color li:before, .list-4.color li:before { color: <?php echo $custom_main_color; ?> ; } <?php echo ot_get_option('pp_custom_css'); ?> <?php $catalogmode = ot_get_option('pp_woo_catalog', 'off'); if ($catalogmode == "on") { ?> .product-button, .add_to_cart_button, #cart { display: none;} <?php } ?> </style> <?php }
function traiter_image($nomorig, $dest_width, $dest_height, $opacite, $nb, $miroir, $exact, $couleurfond, &$type) { list($width_orig, $height_orig, $type, $attr) = getimagesize($nomorig); if (!$width_orig) { return false; } if ($dest_width == NULL) { $dest_width = $width_orig; } if ($dest_height == NULL) { $dest_height = $height_orig; } $width_diff = $dest_width / $width_orig; $height_diff = $dest_height / $height_orig; $delta_x = $delta_y = $border_width = $border_height = 0; if ($width_diff > 1 and $height_diff > 1) { $next_width = $width_orig; $next_height = $height_orig; $dest_width = intval($exact) == 1 ? $dest_width : $next_width; $dest_height = intval($exact) == 1 ? $dest_height : $next_height; } else { if ($width_diff > $height_diff) { $next_height = $dest_height; $next_width = intval($width_orig * $next_height / $height_orig); if ($exact == IMAGE_REDIM_RECADRE) { $dest_ratio = $dest_width / $width_orig; $ho = $dest_height / $dest_ratio; $delta_y = ($height_orig - $ho) / 2; $height_orig = $ho; $next_width = $dest_width; } else { if ($exact != IMAGE_REDIM_BORDURE) { $dest_width = $next_width; } } } else { $next_width = $dest_width; $next_height = intval($height_orig * $dest_width / $width_orig); if ($exact == IMAGE_REDIM_RECADRE) { $dest_ratio = $dest_height / $height_orig; $wo = $dest_width / $dest_ratio; $delta_x = ($width_orig - $wo) / 2; $width_orig = $wo; $next_height = $dest_height; } else { if ($exact != IMAGE_REDIM_BORDURE) { $dest_height = $next_height; } } } } if ($exact == IMAGE_REDIM_BORDURE) { $border_width = intval(($dest_width - $next_width) / 2); $border_height = intval(($dest_height - $next_height) / 2); } $image_new = imagecreatetruecolor($dest_width, $dest_height); switch ($type) { case IMAGETYPE_GIF: $image_orig = imagecreatefromgif($nomorig); break; case IMAGETYPE_JPEG: default: $image_orig = imagecreatefromjpeg($nomorig); break; case IMAGETYPE_PNG: $image_orig = imagecreatefrompng($nomorig); break; } // Preparer la couleur de fond (pour bordures, transparence, miroir) if ($couleurfond == '') { $couleurfond = 'ffffff'; } $fondrgb = hex2RGB($couleurfond); // Définir la couleur de fond générale $bgcolor = imagecolorallocate($image_new, $fondrgb['red'], $fondrgb['green'], $fondrgb['blue']); // Préserver la transparence des gifs et png if ($type != IMAGETYPE_JPEG) { $trnprt_indx = imagecolortransparent($image_orig); // If we have a specific transparent color if ($trnprt_indx >= 0) { // Get the original image's transparent color's RGB values $trnprt_color = imagecolorsforindex($image_orig, $trnprt_indx); // Allocate the same color in the new image resource $trnprt_indx = imagecolorallocate($image_new, $trnprt_color['red'], $trnprt_color['green'], $trnprt_color['blue']); // Completely fill the background of the new image with allocated color. imagefill($image_new, 0, 0, $trnprt_indx); // Set the background color for new image to transparent imagecolortransparent($image_new, $trnprt_indx); } else { // Turn off transparency blending (temporarily) imagealphablending($image_new, false); // Create a new transparent color for image $color = imagecolorallocatealpha($image_new, 0, 0, 0, 127); // Completely fill the background of the new image with allocated color. imagefill($image_new, 0, 0, $color); // Restore transparency blending imagesavealpha($image_new, true); // Remplir avec la couleur de fond imagefill($image_new, 0, 0, $bgcolor); } } else { // Remplir avec la couleur de fond imagefill($image_new, 0, 0, $bgcolor); } if ($opacite != "") { $opac_img = imagecreatetruecolor($width_orig, $height_orig); imagefill($opac_img, 0, 0, $bgcolor); imagecopymerge($opac_img, $image_orig, 0, 0, 0, 0, $width_orig, $height_orig, $opacite); $image_orig = $opac_img; } // Redimensionnement, avec ajout éventuel de bordures. imagecopyresampled($image_new, $image_orig, $border_width, $border_height, $delta_x, $delta_y, $next_width, $next_height, $width_orig, $height_orig); // Noir et blanc if ($nb != "") { imagetruecolortopalette($image_new, false, 256); $total = ImageColorsTotal($image_new); for ($i = 0; $i < $total; $i++) { $old = ImageColorsForIndex($image_new, $i); $commongrey = (int) (($old['red'] + $old['green'] + $old['blue']) / 3); ImageColorSet($image_new, $i, $commongrey, $commongrey, $commongrey); } } if ($miroir != "") { $mh = intval($miroir) == 1 ? 50 : intval($miroir); $largeur = imagesx($image_new); $hauteur = imagesy($image_new); $temporaireUn = imagecreatetruecolor($largeur, $mh); $temporaireDeux = imagecreatetruecolor($largeur, $mh); $resultat = imagecreatetruecolor($largeur, $hauteur + $mh); imagefill($resultat, 1, 1, $bgcolor); imagefill($temporaireDeux, 1, 1, $bgcolor); imagecopy($resultat, $image_new, 0, 0, 0, 0, $largeur, $hauteur); imagecopy($temporaireUn, $image_new, 0, 0, 0, $hauteur - $mh, $largeur, $mh); effet_miroir($temporaireDeux, $temporaireUn); imagecopy($resultat, $temporaireDeux, 0, $hauteur, 0, 0, $largeur, $mh); $image_new = $resultat; } return $image_new; }
function front_end_video_player($videos, $paramssld, $video_player) { ob_start(); $video_playerID = $video_player[0]->id; $video_playertitle = $video_player[0]->name; $video_playeralbum = $video_player[0]->album_single; $path_site = plugins_url("../images", __FILE__); switch ($video_playeralbum) { case 'single': $j = 0; ?> <script> jQuery(document).ready(function(){ var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); }); function onYouTubeIframeAPIReady(){ <?php foreach ($videos as $video) { if ($video->sl_type == "youtube") { $video_thumb_url = get_youtube_thumb_id_from_url($video->video_url_1); ?> var youtube_single_player_<?php echo $video->id; ?> ; youtube_single_player_<?php echo $video->id; ?> = new YT.Player('youtube_single_player_<?php echo $video->id; ?> ',{ videoId : '<?php echo $video_thumb_url; ?> ', enablejsapi : 1, playerVars:{ 'autohide': <?php echo $paramssld['video_pl_yt_autohide']; ?> , 'autoplay': <?php if ($j == 0) { echo $video_player[0]->autoplay; } else { echo 0; } ?> , 'controls': 1, 'fs': <?php echo $paramssld['video_pl_yt_fullscreen']; ?> , 'disablekb': 0, 'modestbranding': 1, 'enablejsapi': 1, // 'cc_load_policy': 1, // forces closed captions on 'iv_load_policy': <?php echo $paramssld['video_pl_yt_annotation']; ?> , // annotations, 1=on, 3=off 'rel': 1, 'showinfo': <?php echo $paramssld['video_pl_yt_showinfo']; ?> , 'theme': '<?php echo $paramssld['video_pl_yt_theme']; ?> ', // dark, light 'color': '<?php echo $paramssld['video_pl_yt_color']; ?> ' // red, white }, }); if(<?php echo $video_player[0]->autoplay; ?> ==0){ jQuery("#youtube_single_player_container_<?php echo $video->id; ?> .thumbnail_block").css({display:'block'}); } jQuery("#youtube_single_player_container_<?php echo $video->id; ?> .thumbnail_block").on("click",function(){ jQuery("#youtube_single_player_container_<?php echo $video->id; ?> .thumbnail_block").css({display:'none'}); youtube_single_player_<?php echo $video->id; ?> .playVideo(); }); function ythw<?php echo $video->id; ?> (){ var w=<?php echo $video_player[0]->width; ?> ; if(jQuery("#youtube_single_player_container_<?php echo $video->id; ?> ").parent().width()<w){ document.getElementById("youtube_single_player_container_<?php echo $video->id; ?> ").style.width="100%"; var w=document.getElementById("youtube_single_player_container_<?php echo $video->id; ?> ").offsetWidth; document.getElementById("youtube_single_player_container_<?php echo $video->id; ?> ").style.height=w*0.56+"px"; }else{ document.getElementById("youtube_single_player_container_<?php echo $video->id; ?> ").style.width="<?php echo $video_player[0]->width; ?> px"; document.getElementById("youtube_single_player_container_<?php echo $video->id; ?> ").style.height="<?php echo $video_player[0]->width * 0.5600000000000001; ?> px"; } } ythw<?php echo $video->id; ?> (); jQuery(window).on("resize",function(){ ythw<?php echo $video->id; ?> (); }); <?php } } ?> } </script> <?php foreach ($videos as $video) { $video_playeralbum = $video->sl_type; switch ($video_playeralbum) { case 'video': $i = rand(1, 100000); ?> <script type="text/javascript"> /*init snigle video player when document is ready*/ jQuery(document).ready(function(){ init_huge_it_single_video_player_<?php echo $i; ?> ("#huge_it_sigle_video_player_<?php echo $i; ?> "); }); /* Single Player */ function init_huge_it_single_video_player_<?php echo $i; ?> (video_container_id){ var container,video,thumb_box,thumb,paused,dragging,volume_dragging,volume,progress_duration_bar,progress_bar,progress_played_bar,progress_thumb,progress_buffered,current_time,duration_time,current_time_text,duration_time_text,autoplay,video_param_width,video_width,play_btn,center_play_icon,center_pause_icon,center_wait_icon,backward_btn,forward_btn,mute_btn,volume_handle,volume_before,volume_current,volume_after,fullscreen_btn,hover_timer_box,hover_timer; current_time="00"; duration_time="00"; volume=1; dragging=""; paused=""; volume_dragging=""; /* PLUGIN PARAMETERS */ <?php if ($video_player[0]->autoplay == 1) { $autoplay = "true"; } else { $autoplay = "false"; } ?> autoplay='<?php echo $autoplay; ?> '; video_width=<?php echo $video_player[0]->width; ?> ;; video_param_width=<?php echo $video_player[0]->width; ?> ; /* check if video player exists */ container=document.querySelector(video_container_id); if(container){ /* SET OBJECT LISTENERS */ /* *** */ video=container.querySelector("video"); play_btn=container.querySelector(".play_pause"); center_play_icon=container.querySelector(".center_play"); center_pause_icon=container.querySelector(".center_pause"); center_wait_icon=container.querySelector(".center_wait"); backward_btn=container.querySelector(".fast_back"); forward_btn=container.querySelector(".fast_forward"); mute_btn=container.querySelector(".mute_button"); volume_handle=container.querySelector(".volume_handle"); volume_before=container.querySelector(".volume_before"); volume_current=container.querySelector(".volume_current"); volume_after=container.querySelector(".volume_after"); fullscreen_btn=container.querySelector(".full_screen"); current_time_text=container.querySelector(".current_time"); duration_time_text=container.querySelector(".duration_time"); progress_bar=container.querySelector(".huge_it_video_player_duration_slide"); progress_played_bar=container.querySelector(".played"); progress_thumb=container.querySelector(".thumb"); progress_buffered=container.querySelector(".buffered"); hover_timer_box=container.querySelector(".hover_timer"); hover_timer=container.querySelector(".hover_timer_time"); thumb_box=container.querySelector(".thumbnail_block"); thumb=container.querySelector(".thumbnail_block img"); /* *** */ /* FUNCTIONS */ function timeupdate(){ if(!isNaN(video.currentTime)){ current_time=Math.floor(video.currentTime); } if(!isNaN(video.duration)){ duration_time=Math.floor(video.duration); } video_width=video.offsetWidth; var curmins = Math.floor(video.currentTime / 60); var cursecs = Math.floor(video.currentTime - curmins * 60); var durmins = Math.floor(video.duration / 60); var dursecs = Math.floor(video.duration - durmins * 60); if(cursecs < 10){ cursecs = "0"+cursecs; } if(dursecs < 10){ dursecs = "0"+dursecs; } if(curmins < 10){ curmins = "0"+curmins; } if(durmins < 10){ durmins = "0"+durmins; } current_time_text.innerHTML = curmins+":"+cursecs; duration_time_text.innerHTML = durmins+":"+dursecs; var current_time_percent = current_time*(100/duration_time); var progress_bar_pixels=(current_time_percent*video_width)/100; progress_played_bar.style.width=progress_bar_pixels+"px"; console.log(progress_thumb.offsetWidth); if(progress_bar_pixels+progress_thumb.offsetWidth/2 > video_width){ var last_px = video_width-progress_thumb.offsetWidth/2; progress_thumb.style.left=last_px+"px"; }else if(progress_bar_pixels < progress_thumb.offsetWidth/2){ var first_px = progress_thumb.offsetWidth/2; progress_thumb.style.left=first_px+"px"; }else{ progress_thumb.style.left=progress_bar_pixels+"px"; } } function progressHandler(){ if(!isNaN(video.currentTime)){ current_time=Math.floor(video.currentTime); } if(!isNaN(video.duration)){ duration_time=Math.floor(video.duration); } if(!video.paused){ play_btn.innerHTML='<i class="hugeicons hugeicons-pause"></i>'; } if(thumb_box.style.display=="block" && !video.paused){ thumb_box.style.display="none"; } if(video.buffered.length > 0){ var i=video.buffered.length; var buffered_end=video.buffered.end(i-1); var loaded_percent=(buffered_end/duration_time)*100; var progress_bar_pixels=(loaded_percent*video_width)/100; progress_buffered.style.width=progress_bar_pixels+"px"; } if(!isFullScreen() && hasClass("hide_controls",container)){ removeClass("hide_controls",container); } } function VideoClickPlayPause(){ if(video.paused){ /* PLAY THE VIDEO */ video.play(); paused=""; addClass("playing",container); play_btn.innerHTML='<i class="hugeicons hugeicons-pause"></i>'; center_play_icon.style.webkitAnimationName="popup"; center_play_icon.style.display="block"; setTimeout(function(){ center_play_icon.removeAttribute("style"); },500); }else{ /* PAUSE THE VIDEO */ video.pause(); paused=1; removeClass("playing",container); play_btn.innerHTML='<i class="hugeicons hugeicons-play"></i>'; center_pause_icon.style.webkitAnimationName="popup"; center_pause_icon.style.display="block"; setTimeout(function(){ center_pause_icon.removeAttribute("style"); },500); } } function PlayPause(){ if(hasClass("poster",container)){ video.play(); paused=""; thumb_box.style.display="none"; removeClass("poster",container); addClass("playing",container); play_btn.innerHTML='<i class="hugeicons hugeicons-pause"></i>'; }else{ if(video.paused){ /* PLAY THE VIDEO */ video.play(); paused=""; addClass("playing",container); play_btn.innerHTML='<i class="hugeicons hugeicons-pause"></i>'; }else{ /* PAUSE THE VIDEO */ video.pause(); paused=1; removeClass("playing",container); play_btn.innerHTML='<i class="hugeicons hugeicons-play"></i>'; } } } function step_back(){ if(!isNaN(video.currentTime)){ current_time=Math.floor(video.currentTime); } if(!isNaN(video.duration)){ duration_time=Math.floor(video.duration); } video.currentTime=current_time-15; } function step_forward(){ if(!isNaN(video.currentTime)){ current_time=Math.floor(video.currentTime); } if(!isNaN(video.duration)){ duration_time=Math.floor(video.duration); } video.currentTime=current_time+15; } function toggle_mute(){ if(video.muted){ video.muted=false; if(volume<0.7){ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-down"></i>'; }else{ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-up"></i>'; } var volume_handle_width=volume_handle.offsetWidth; var volume_current_pixels=volume*volume_handle_width; volume_before.style.width=volume_current_pixels+"px"; volume_current.style.left=volume_current_pixels+"px"; }else{ var volume_handle_width=volume_handle.offsetWidth; var volume_current_width=volume_before.offsetWidth; volume=volume_current_width/volume_handle_width; video.muted=true; mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-off"></i>'; volume_before.style.width="0px"; volume_current.style.left="0px"; } } function saveVolume(){ var volume_handle_width=volume_handle.offsetWidth; var volume_current_pixels=volume*volume_handle_width; volume_before.style.width=volume_current_pixels+"px"; volume_current.style.left=volume_current_pixels+"px"; } function exitHandler(){ if (isFullScreen()) console.log(""); // nothing else cFullScreen(); } function toggle_full_screen(){ if (isFullScreen()) cFullScreen(); else requestFullScreen(container || document.documentElement); jQuery.when(toggle_full_screen).done(function(){ setTimeout(function(){ video_width=video.offsetWidth; timeupdate(); progressHandler(); saveVolume(); },800); }); } function isFullScreen(){ return (document.fullScreenElement && document.fullScreenElement !== null) || document.mozFullScreen || document.webkitIsFullScreen; } function vidSeeking(e){ var x = e.clientX; var l=container.getBoundingClientRect().left; var pos = x-l; if(pos>=0 && pos<video_width){ progress_played_bar.style.width = pos+"px"; progress_thumb.style.left = pos+"px"; var current_percent=(pos/video_width)*100; var seekto=duration_time*(current_percent/100); video.currentTime=seekto; } } function requestFullScreen(element){ if (element.requestFullscreen) element.requestFullscreen(); else if (element.msRequestFullscreen) element.msRequestFullscreen(); else if (element.mozRequestFullScreen) element.mozRequestFullScreen(); else if (element.webkitRequestFullscreen) element.webkitRequestFullscreen(); addClass("fullscreen",container); fullscreen_btn.innerHTML='<i class="hugeicons hugeicons-compress"></i>'; jQuery.when(requestFullScreen).done(function(){ setTimeout(function(){ video_width=video.offsetWidth; timeupdate(); progressHandler(); saveVolume(); },500); }); } function cFullScreen(){ if (document.exitFullscreen) document.exitFullscreen(); else if (document.msExitFullscreen) document.msExitFullscreen(); else if (document.mozCancelFullScreen) document.mozCancelFullScreen(); else if (document.webkitExitFullscreen) document.webkitExitFullscreen(); removeClass("fullscreen",container); removeClass("hide_controls",container); fullscreen_btn.innerHTML='<i class="hugeicons hugeicons-expand"></i>'; jQuery.when(cFullScreen).done(function(){ setTimeout(function(){ video_width=video.offsetWidth; timeupdate(); progressHandler(); saveVolume(); },500); }); } function setVolume(e){ var x = e.clientX; var l=volume_handle.getBoundingClientRect().left; var pos = x-l; if(pos>0 && pos<=volume_handle.offsetWidth){ volume_before.style.width=pos+"px"; volume_current.style.left=pos+"px"; var volume_handle_width=volume_handle.offsetWidth; var current_percent=(pos/volume_handle_width)*100; volume=current_percent/100; video.muted=false; video.volume=current_percent/100; if(current_percent<70){ if(current_percent==0){ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-off"></i>'; }else{ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-down"></i>'; } }else{ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-up"></i>'; } }else{ if(pos<=0){ video.muted=true; mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-off"></i>'; volume_before.style.width="0px"; volume_current.style.left="0px"; } } } function waiting(){ center_wait_icon.style.display="block"; center_wait_icon.style.opacity="1"; } function notWaiting(){ center_wait_icon.style.display="none"; center_wait_icon.style.opacity="0"; } function videoEnd(){ play_btn.innerHTML ='<i class="hugeicons hugeicons-refresh"></i>'; paused=1; removeClass("playing",container); } function timerDisplay(e){ if(video.buffered.length > 0){ var x = e.clientX; var l=container.getBoundingClientRect().left; var w=hover_timer_box.offsetWidth; var pos = x-l; var mouse_pos_percent= (pos/video_width)*100; var mouse_pos_time=duration_time*(mouse_pos_percent/100); var curmins = Math.floor(mouse_pos_time / 60); var cursecs = Math.floor(mouse_pos_time - curmins * 60); if(cursecs < 10){ cursecs="0"+cursecs; } if(curmins < 10){ curmins="0"+curmins; } //hover_timer_box.style.webkitAnimationName="opacity"; hover_timer_box.style.opacity="1"; hover_timer_box.style.display = "block"; hover_timer_box.style.left = x-l-w/2+"px"; hover_timer.innerHTML = curmins+":"+cursecs; } } function timerNotDisplay(e){ hover_timer_box.style.display = "none"; } function keyFunctions(e){ switch(e.keyCode){ case 40: var curent_volume=video.volume; var curent_volume_percent=curent_volume*100; if(curent_volume_percent>0){ var new_volume_percent=curent_volume_percent-10; if(new_volume_percent<=0){ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-off"></i>'; volume_before.style.width="0px"; volume_current.style.left="0px"; video.muted=true; volume=0; }else{ if(new_volume_percent<70){ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-down"></i>'; }else{ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-up"></i>'; } var new_volume=new_volume_percent/100; var volume_handle_width=volume_handle.offsetWidth; var new_position=new_volume*volume_handle_width; volume_before.style.width=new_position+"px"; volume_current.style.left=new_position+"px"; video.muted=false; video.volume=new_volume; volume=new_volume; } } e.preventDefault(); break; case 38: var curent_volume=video.volume; var curent_volume_percent=curent_volume*100; if(curent_volume_percent<100){ var new_volume_percent=curent_volume_percent+10; if(new_volume_percent>100){ new_volume_percent=100; } if(new_volume_percent<70){ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-down"></i>'; }else{ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-up"></i>'; } var new_volume=new_volume_percent/100; var volume_handle_width=volume_handle.offsetWidth; var new_position=new_volume*volume_handle_width; volume_before.style.width=new_position+"px"; volume_current.style.left=new_position+"px"; video.volume=new_volume; video.muted=false; volume=new_volume; } e.preventDefault(); break; case 39: step_forward(); e.preventDefault(); break; case 37: step_back(); e.preventDefault(); break; case 32: VideoClickPlayPause(); e.preventDefault(); break; } } function huge_it_single_video_responsive(){ var video_parent=container.parentNode; var computedStyle = getComputedStyle(video_parent); var video_parent_width=video_parent.clientWidth-parseFloat(computedStyle.paddingRight)-parseFloat(computedStyle.paddingLeft); if(!isFullScreen()){ if(video_parent_width<=video_param_width){ /*container.style.width="100%";*/ addClass("fullwidth",container); jQuery.when(huge_it_single_video_responsive).done(function(){ setTimeout(function(){ video_width=video.offsetWidth; videoResize(); },500); }); }else{ removeClass("fullwidth",container); /*container.style.width=video_param_width+"px";*/ jQuery.when(huge_it_single_video_responsive).done(function(){ setTimeout(function(){ video_width=video.offsetWidth; videoResize(); },500); }); } }else{ setTimeout(function(){ video_width=video.offsetWidth; },500); } } function videoResize(){ setTimeout(function(){ video_width=video.offsetWidth; timeupdate(); progressHandler(); saveVolume(); if(video_width<325){ addClass("small",container); }else{ removeClass("small",container); } if(video_width<225){ addClass("very_small",container); }else{ removeClass("very_small",container); } },200); } /* helping functions */ /* *** */ function addClass( classname, element ) { var cn = element.className; /*test for existance */ if( cn.indexOf( classname ) != -1 ) { return; } /* add a space if the element already has class */ if( cn != '' ) { classname = ' '+classname; } element.className = cn+classname; } function removeClass( classname, element ) { var cn = element.className; var rxp = new RegExp( "\\s?\\b"+classname+"\\b", "g" ); cn = cn.replace( rxp, '' ); element.className = cn; } function hasClass(cls, element) { return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1; } /* *** */ /* ADD EVENT LISTENERS */ /* *** */ video.addEventListener("timeupdate",timeupdate,false); video.addEventListener("playing",progressHandler,false); video.addEventListener("loadeddata",progressHandler,false); video.addEventListener("canplaythrough",progressHandler,false); video.addEventListener("progress",progressHandler,false); video.addEventListener("waiting",waiting,false); video.addEventListener("canplay",notWaiting,false); video.addEventListener("ended",videoEnd,false); video.addEventListener("resize",videoResize,false); /* *** */ video.addEventListener("click",VideoClickPlayPause,false); video.addEventListener("dblclick",toggle_full_screen,false); center_play_icon.addEventListener("click",VideoClickPlayPause,false); center_pause_icon.addEventListener("click",VideoClickPlayPause,false); center_wait_icon.addEventListener("click",VideoClickPlayPause,false); thumb_box.addEventListener("click",PlayPause,false); play_btn.addEventListener("click",PlayPause,false); backward_btn.addEventListener("click",step_back,false); forward_btn.addEventListener("click",step_forward,false); mute_btn.addEventListener("click",toggle_mute,false); fullscreen_btn.addEventListener("click",toggle_full_screen,false); container.addEventListener('webkitfullscreenchange', exitHandler, false); container.addEventListener('mozfullscreenchange', exitHandler, false); container.addEventListener('fullscreenchange', exitHandler, false); container.addEventListener('MSFullscreenChange', exitHandler, false); progress_bar.addEventListener("mouseover",timerDisplay,false); progress_bar.addEventListener("mousemove",timerDisplay,false); progress_bar.addEventListener("mouseout",timerNotDisplay,false); /* KEYBOARD */ /* *** */ container.addEventListener("mouseover",function(){ window.addEventListener("keydown",keyFunctions,false); },false) container.addEventListener("mouseout",function(){ window.removeEventListener("keydown",keyFunctions,false); },false) /* *** */ /* VIDEO SEEKING */ progress_bar.addEventListener("mousedown",function(e){ dragging=1; vidSeeking(e); },false); window.addEventListener("mousemove",function(e){ if(dragging==1){ if(paused!=1){ video.pause(); } removeClass("playing",container); vidSeeking(e); } },false); window.addEventListener("mouseup",function(){ if(dragging==1){ if(paused!==1){ video.play(); } addClass("playing",container); dragging=""; } },false); /* VOLUME CHANGING */ volume_handle.addEventListener("mousedown",function(e){ volume_dragging=1; setVolume(e); },false); window.addEventListener("mousemove",function(e){ if(volume_dragging==1){ setVolume(e); } },false); window.addEventListener("mouseup",function(){ if(volume_dragging==1){ volume_dragging=""; } },false); /* *** */ /* ONLOAD STUFF */ /* *** */ if(autoplay=="true"){ video.autoplay = true; addClass("playing",container); removeClass("poster",container); thumb_box.style.display="none"; play_btn.innerHTML='<i class="hugeicons hugeicons-pause"></i>'; }else{ video.autoplay = false; removeClass("playing",container); play_btn.innerHTML='<i class="hugeicons hugeicons-play"></i>'; addClass("poster",container); thumb_box.style.display="block"; } huge_it_single_video_responsive(); jQuery(window).on("resize",function(){ huge_it_single_video_responsive(); }); var timeout; container.onmousemove = function(){ if(isFullScreen()){ removeClass("hide_controls",container); clearTimeout(timeout); timeout = setTimeout(function(){ addClass("hide_controls",container); },3000); } } /* *** */ } } </script> <style> /* parameters */ #huge_it_sigle_video_player_<?php echo $i; ?> { width:<?php echo $video_player[0]->width; ?> px; <?php switch ($paramssld['video_pl_position']) { case "left": ?> float:left; margin-left:<?php echo $paramssld['video_pl_margin_left']; ?> px; margin-right:<?php echo $paramssld['video_pl_margin_right']; ?> px; <?php break; case "right": ?> float:right; margin-left:<?php echo $paramssld['video_pl_margin_left']; ?> px; margin-right:<?php echo $paramssld['video_pl_margin_right']; ?> px; <?php break; case "center": ?> margin:0px auto; <?php break; } ?> margin-top:<?php echo $paramssld['video_pl_margin_top']; ?> px; margin-bottom:<?php echo $paramssld['video_pl_margin_bottom']; ?> px; border:<?php echo $paramssld['video_pl_border_size']; ?> px solid #<?php echo $paramssld['video_pl_border_color']; ?> ; } #huge_it_sigle_video_player_<?php echo $i; ?> .thumbnail_block { background:#<?php echo $paramssld['video_pl_background_color']; ?> ; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom { background:rgba(<?php echo hex2RGB($paramssld['video_pl_controls_panel_color']); ?> ,<?php echo $paramssld['video_pl_controls_panel_opacity'] / 100; ?> ); } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_center { color:#<?php echo $paramssld['video_pl_buttons_color']; ?> !important; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .control { color:#<?php echo $paramssld['video_pl_buttons_color']; ?> !important; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .control:hover { color:#<?php echo $paramssld['video_pl_buttons_hover_color']; ?> !important; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_duration_slide { background:transparent; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_duration_slide .duration { background:rgba(<?php echo hex2RGB($paramssld['video_pl_timeline_background']); ?> ,<?php echo $paramssld['video_pl_timeline_background_opacity'] / 100; ?> ); } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_duration_slide .buffered { background:rgba(<?php echo hex2RGB($paramssld['video_pl_timeline_buffering_color']); ?> ,<?php echo $paramssld['video_pl_timeline_buffering_opacity'] / 100; ?> ); } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle .volume_before, #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_duration_slide .played{ background:#<?php echo $paramssld['video_pl_timeline_color']; ?> ; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_duration_slide .thumb { background:#<?php echo $paramssld['video_pl_timeline_slider_color']; ?> ; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .timer .current_time { color:#<?php echo $paramssld['video_pl_curtime_color']; ?> ; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .timer .separator, #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .timer .duration_time { color:#<?php echo $paramssld['video_pl_durtime_color']; ?> ; } /* static */ #huge_it_sigle_video_player_<?php echo $i; ?> { position:relative; display:table; height:auto; font-size:15px; font-weight:normal; font-family:Roboto, Arial, Helvetica, sans-serif; font-style:normal; line-height:1; text-indent:0px; user-select:none; -webkit-user-select:none; -moz-user-select:none; -o-user-select:none; -ms-user-select:none; transition:width .3s linear,height .3s linear; box-sizing: content-box; } #huge_it_sigle_video_player_<?php echo $i; ?> .poster { overflow:hidden; } #huge_it_sigle_video_player_<?php echo $i; ?> .fullwidth { width:100%; } #huge_it_sigle_video_player_<?php echo $i; ?> .fullscreen { width:100%; transition:none; } #huge_it_sigle_video_player_<?php echo $i; ?> .fullscreen video { width:100%; max-height:100%; } #huge_it_sigle_video_player_<?php echo $i; ?> div[data-title]:hover:after { content: attr(data-title); padding:8px 10px; color: #fff; position: absolute; left:0; bottom: calc(100% + 20px); bottom: -webkit-calc(100% + 20px); bottom: -moz-calc(100% + 20px); bottom: -ms-calc(100% + 20px); bottom: -o-calc(100% + 20px); white-space: nowrap; z-index:6; font-size:12px; background:#444; border-radius:2px; line-height:1; -moz-transition: opacity .1s cubic-bezier(0.0,0.0,0.2,1); -webkit-transition: opacity .1s cubic-bezier(0.0,0.0,0.2,1); transition: opacity .1s cubic-bezier(0.0,0.0,0.2,1); } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_player { position:relative; float:left; display:block; width:100%; height:100%; margin:0px; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_player video { position:relative; float:left; display:block; width:100%; height:auto; margin:0px; z-index:5; background:#000; } #huge_it_sigle_video_player_<?php echo $i; ?> .thumbnail_block { position:absolute; display:none; left:0px; top:0px; width:100%; height:100%; overflow:hidden; z-index:10; text-align:center; vertical-align:middle; } #huge_it_sigle_video_player_<?php echo $i; ?> .thumbnail_block:before { content: ""; display: inline-block; vertical-align: middle; height: 100%; } #huge_it_sigle_video_player_<?php echo $i; ?> .poster .thumbnail_block { display:block; } #huge_it_sigle_video_player_<?php echo $i; ?> .thumbnail_block img { display:block; position:absolute; top:0px; left:0px; min-width:100%; min-height:100%; max-width:none; } #huge_it_sigle_video_player_<?php echo $i; ?> .thumbnail_block .thumbnail_play { position:absolute; display:block; left:50%; top:50%; margin:-30px 0px 0px -30px; width:60px; height:60px; font-size:58px; line-height:60px; text-align:center; color:#f12b24; cursor:poiner; transition:transform .5s cubic-bezier(0.0,0.0,0.2,1); cursor:pointer; } #huge_it_sigle_video_player_<?php echo $i; ?> .thumbnail_block .thumbnail_play:hover { transform:scale(1.05,1.05); } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_top { position: absolute; top: 0px; left: 0px; width: calc(100% - 30px); width: -webkit-calc(100% - 30px); width: -moz-calc(100% - 30px); width: -o-calc(100% - 30px); width: -ms-calc(100% - 30px); padding: 15px; background:rgba(0,0,0,.1); cursor: pointer; overflow: hidden; z-index:11; webkit-transition: opacity .25s cubic-bezier(0.0,0.0,0.2,1); transition: opacity .25s cubic-bezier(0.0,0.0,0.2,1); } #huge_it_sigle_video_player_<?php echo $i; ?> .playing .huge_it_video_player_top, #huge_it_sigle_video_player_<?php echo $i; ?> .hide_controls.playing .huge_it_video_player_top { opacity:0; } #huge_it_sigle_video_player_<?php echo $i; ?> .playing:not(.hide_controls):hover .huge_it_video_player_top { opacity:1; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_top .video_title { color: #fff; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom { position:absolute; display:block; bottom:0px; left:0px; height:50px; width:100%; z-index:6; webkit-transition: opacity .25s cubic-bezier(0.0,0.0,0.2,1); transition: opacity .25s cubic-bezier(0.0,0.0,0.2,1); } #huge_it_sigle_video_player_<?php echo $i; ?> .fullscreen .huge_it_video_player_bottom { height:80px; } #huge_it_sigle_video_player_<?php echo $i; ?> .playing .huge_it_video_player_bottom { opacity:0; } #huge_it_sigle_video_player_<?php echo $i; ?> .hide_controls.playing .huge_it_video_player_bottom { opacity:0; } #huge_it_sigle_video_player_<?php echo $i; ?> .playing:not(.hide_controls):hover .huge_it_video_player_bottom { opacity:1; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_duration_slide { position:absolute; left:0px; bottom:30px; display:block; width:100%; height:20px; margin:0px; line-height:1; cursor:pointer; -moz-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); -webkit-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); -ms-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); transition:all .1s cubic-bezier(0.0,0.0,0.2,1); transform-origin:center center; -webkit-transform-origin:center center; -moz-transform-origin:center center; -o-transform-origin:center center; } #huge_it_sigle_video_player_<?php echo $i; ?> .fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide { height:30px; bottom:50px; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_duration_slide .duration { position:absolute; display:block; bottom:7.5px; left:0px; width:100%; height:5px; z-index:6; -moz-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); -webkit-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); -ms-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); transition:all .1s cubic-bezier(0.0,0.0,0.2,1); transform-origin:center center; -webkit-transform-origin:center center; -moz-transform-origin:center center; -o-transform-origin:center center; } #huge_it_sigle_video_player_<?php echo $i; ?> .fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide .duration { bottom:11px; height:8px; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_duration_slide .played { position:absolute; display:block; bottom:7.5px; left:0px; width:0px; height:5px; z-index:8; -moz-transition:height .1s cubic-bezier(0.0,0.0,0.2,1); -webkit-transition:height .1s cubic-bezier(0.0,0.0,0.2,1); -ms-transition:height .1s cubic-bezier(0.0,0.0,0.2,1); transition:height .1s cubic-bezier(0.0,0.0,0.2,1); transform-origin:center center; -webkit-transform-origin:center center; -moz-transform-origin:center center; -o-transform-origin:center center; } #huge_it_sigle_video_player_<?php echo $i; ?> .fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide .played { bottom:11px; height:8px; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_duration_slide .thumb { position:absolute; display:block; bottom:3.5px; left:0px; width:13px; height:13px; margin-left:-6.5px; background:#f12b24; border-radius:6.5px; z-index:9; cursor:pointer; -moz-transition:transform .1s cubic-bezier(0.0,0.0,0.2,1); -webkit-transition:transform .1s cubic-bezier(0.0,0.0,0.2,1); -ms-transition:transform .1s cubic-bezier(0.0,0.0,0.2,1); transition:transform .1s cubic-bezier(0.0,0.0,0.2,1); transform-origin:center center; -webkit-transform-origin:center center; -moz-transform-origin:center center; -o-transform-origin:center center; } #huge_it_sigle_video_player_<?php echo $i; ?> .fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide .thumb { bottom:5px; width:20px; height:20px; border-radius:10px; margin-left:-10px; } #huge_it_sigle_video_player_<?php echo $i; ?> .playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide .thumb { transform:scale(0,0); } #huge_it_sigle_video_player_<?php echo $i; ?> .playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide:hover .thumb { transform:scale(1,1); } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_duration_slide .buffered { position:absolute; display:block; bottom:7.5px; left:0px; width:0px; height:5px; z-index:7; -moz-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); -webkit-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); -ms-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); transition:all .1s cubic-bezier(0.0,0.0,0.2,1); transform-origin:center center; -webkit-transform-origin:center center; -moz-transform-origin:center center; -o-transform-origin:center center; } #huge_it_sigle_video_player_<?php echo $i; ?> .fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide .buffered { bottom:11px; height:8px; } #huge_it_sigle_video_player_<?php echo $i; ?> .playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide .duration, #huge_it_sigle_video_player_<?php echo $i; ?> .playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide .played, #huge_it_sigle_video_player_<?php echo $i; ?> .playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide .buffered { bottom:8.5px; height:3px; } #huge_it_sigle_video_player_<?php echo $i; ?> .playing.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide .duration, #huge_it_sigle_video_player_<?php echo $i; ?> .playing.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide .played, #huge_it_sigle_video_player_<?php echo $i; ?> .playing.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide .buffered { bottom:12.5px; height:5px; } #huge_it_sigle_video_player_<?php echo $i; ?> .playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide:hover .duration, #huge_it_sigle_video_player_<?php echo $i; ?> .playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide:hover .played, #huge_it_sigle_video_player_<?php echo $i; ?> .playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide:hover .buffered { bottom:7.5px; height:5px; } #huge_it_sigle_video_player_<?php echo $i; ?> .playing.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide:hover .duration, #huge_it_sigle_video_player_<?php echo $i; ?> .playing.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide:hover .played, #huge_it_sigle_video_player_<?php echo $i; ?> .playing.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide:hover .buffered { bottom:11px; height:8px; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_duration_slide .hover_timer { position: absolute; display:none; left:0; bottom:100%; padding: 5px 9px; max-width: 200px; background:rgba(28,28,28,0.8); border-radius:2px; white-space: nowrap; word-wrap: normal; -o-text-overflow: ellipsis; text-overflow: ellipsis; font-size:11px; line-height:1; color: #fff; z-index:6; -moz-transform: none; -ms-transform: none; -webkit-transform: none; transform: none; -moz-transition:opacity .1s cubic-bezier(0.4,0.0,1,1); -webkit-transition:opacity .1s cubic-bezier(0.4,0.0,1,1); -ms-transition:opacity .1s cubic-bezier(0.4,0.0,1,1); transition:opacity .1s cubic-bezier(0.4,0.0,1,1); -webkit-animation-duration:.1s; -webkit-animation-iteration-count:1; -webkit-animation-timing-function: cubic-bezier(0.4,0.0,1,1); opacity:0; } @-webkit-keyframes opacity { 0% { opacity:0; } 100% { opacity:1; } } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls { position:absolute; left:0px; bottom:0px; display:block; width:100%; height:30px; margin:0px; } #huge_it_sigle_video_player_<?php echo $i; ?> .small .huge_it_video_player_bottom .huge_it_video_player_controls { text-align:center; } #huge_it_sigle_video_player_<?php echo $i; ?> .fullscreen .huge_it_video_player_bottom .huge_it_video_player_controls { height:50px; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .control { position:relative; display:inline-block; width:30px; height:30px; margin:0px 0px 0px 5px; font-size:16px; line-height:30px; text-align:center; vertical-align:top; cursor:pointer; } #huge_it_sigle_video_player_<?php echo $i; ?> .fullscreen .huge_it_video_player_bottom .huge_it_video_player_controls .control { width:50px; height:50px; margin:0px 0px 0px 5px; font-size:30px; line-height:50px; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .fast_back { } #huge_it_sigle_video_player_<?php echo $i; ?> .small .huge_it_video_player_bottom .huge_it_video_player_controls .fast_back { display:none; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .play_pause { } #huge_it_sigle_video_player_<?php echo $i; ?> .small .huge_it_video_player_bottom .huge_it_video_player_controls .play_pause { float:left; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .fast_forward { } #huge_it_sigle_video_player_<?php echo $i; ?> .small .huge_it_video_player_bottom .huge_it_video_player_controls .fast_forward { display:none; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .mute_button { } #huge_it_sigle_video_player_<?php echo $i; ?> .small .huge_it_video_player_bottom .huge_it_video_player_controls .mute_button { float:left; } #huge_it_sigle_video_player_<?php echo $i; ?> .very_small .huge_it_video_player_bottom .huge_it_video_player_controls .mute_button { display:none; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle { position:relative; display:inline-block; width:50px; height:30px; background: none; cursor: pointer; } #huge_it_sigle_video_player_<?php echo $i; ?> .small .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle { float:left; } #huge_it_sigle_video_player_<?php echo $i; ?> .very_small .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle { display:none; } #huge_it_sigle_video_player_<?php echo $i; ?> .fullscreen .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle { position:relative; display:inline-block; width:100px; height:50px; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle .volume_before { position: absolute; top:13.5px; left:0px; height:3px; width:50px; z-index:7; } #huge_it_sigle_video_player_<?php echo $i; ?> .fullscreen .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle .volume_before { top:22.5px; height:5px; width:100px; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle .volume_current { position: absolute; top:8.5px; left:50px; height:13px; width: 4px; margin-left:-2px; background: #fff; z-index:8; } #huge_it_sigle_video_player_<?php echo $i; ?> .fullscreen .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle .volume_current { top:15px; height:20px; width:6px; margin-left:-3px; left:100px; width: 4px; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle .volume_after { position: absolute; top:13.5px; left:0px; height:3px; width:50px; background:#fff; z-index:6; } #huge_it_sigle_video_player_<?php echo $i; ?> .fullscreen .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle .volume_after { top:22.5px; height:5px; width:100px; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .timer { position:relative; display:inline-block; min-width:50px; height:30px; margin:0px 0px 0px 5px; vertical-align:top; font-size:11px; line-height:30px; font-style:normal; font-weight:normal; text-align:center; cursor:pointer; } #huge_it_sigle_video_player_<?php echo $i; ?> .fullscreen .huge_it_video_player_bottom .huge_it_video_player_controls .timer { height:50px; font-size:14px; line-height:50px; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .timer .current_time { display:inline-block; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .timer .separator { display:inline-block; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .timer .duration_time { display:inline-block; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_bottom .huge_it_video_player_controls .full_screen { float:right; } #huge_it_sigle_video_player_<?php echo $i; ?> .small .huge_it_video_player_bottom .huge_it_video_player_controls .full_screen { float:right; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_center { text-align:center; font-size:15px; line-height:40px; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_center div { position:absolute; display:none; left:50%; top:50%; margin-top:-20px; height:40px; width:40px; margin-left:-20px; background: rgba(0,0,0,.2); border-radius: 100%; text-align:center; transition:all .5s linear; -webkit-animation-duration:.5s; -webkit-animation-iteration-count:1; -webkit-animation-timing-function: linear; z-index:6; opacity:0; } #huge_it_sigle_video_player_<?php echo $i; ?> .huge_it_video_player_center .center_wait { background:transparent; } @-webkit-keyframes popup { 0% { opacity:1; transform:scale(1,1); } 100% { opacity:0; transform:scale(3,3); } } </style> <div id="huge_it_sigle_video_player_<?php echo $i; ?> "> <div class="huge_it_video_player_player"> <video src="<?php echo $video->video_url_1; ?> " data-current="--" data-duration="--"> Your browser does not support HTML5 video. </video> </div> <div class="thumbnail_block"> <img src="<?php echo $video->image_url; ?> " alt="poster" /> <div class="thumbnail_play"><i class="hugeicons hugeicons-play-circle-o"></i></div> </div> <div class="huge_it_video_player_top"> <div class="video_title"><?php echo $video->name; ?> </div> </div> <div class="huge_it_video_player_bottom"> <div class="huge_it_video_player_duration_slide"> <div class="duration"></div> <div class="played"></div> <div class="thumb"></div> <div class="buffered"></div> <div class="hover_timer"> <span class="hover_timer_time">00:00</span> </div> </div> <div class="huge_it_video_player_controls"> <div class="fast_back control" data-title="Fast backward"><i class="hugeicons hugeicons-step-backward"></i></div> <div class="play_pause control" data-title="Play"><i class="hugeicons hugeicons-play"></i></div> <div class="fast_forward control" data-title="Fast forward"><i class="hugeicons hugeicons-step-forward"></i></div> <div class="mute_button control" data-title="Mute"><i class="hugeicons hugeicons-volume-up"></i></div> <div class="volume_handle"> <div class="volume_before"></div> <div class="volume_current"></div> <div class="volume_after"></div> </div> <div class="timer"> <div class="current_time">--</div> <div class="separator"> / </div> <div class="duration_time">--</div> </div> <div class="full_screen control" data-title="Full Screen"><i class="hugeicons hugeicons-expand"></i></div> </div> </div> <div class="huge_it_video_player_center"> <div class="center_play"><i class="hugeicons hugeicons-play"></i></div> <div class="center_pause"><i class="hugeicons hugeicons-pause"></i></div> <div class="center_wait"><i class="hugeicons hugeicons-spinner hugeicons-pulse"></i></div> </div> </div> <?php break; case 'youtube': $i = rand(1, 100000); ?> <style> #youtube_single_player_container_<?php echo $video->id; ?> { display:block; position:relative; <?php switch ($paramssld['video_pl_position']) { case "left": ?> float:left; margin-left:<?php echo $paramssld['video_pl_margin_left']; ?> px; margin-right:<?php echo $paramssld['video_pl_margin_right']; ?> px; <?php break; case "right": ?> float:right; margin-left:<?php echo $paramssld['video_pl_margin_left']; ?> px; margin-right:<?php echo $paramssld['video_pl_margin_right']; ?> px; <?php break; case "center": ?> display:block; margin:0px auto; <?php break; } ?> margin-top:<?php echo $paramssld['video_pl_margin_top']; ?> px; margin-bottom:<?php echo $paramssld['video_pl_margin_bottom']; ?> px; max-width:none; width:<?php echo $video_player[0]->width; ?> px; height:<?php echo floor($video_player[0]->width * 0.5600000000000001); ?> px; box-sizing:content-box; border:<?php echo $paramssld['video_pl_border_size']; ?> px solid #<?php echo $paramssld['video_pl_border_color']; ?> ; } #youtube_single_player_<?php echo $video->id; ?> { position:absolute; top:0px; left:0px; width:100%; height:100%; z-index:5; } #youtube_single_player_container_<?php echo $video->id; ?> .thumbnail_block { position:absolute; display:none; top:0px; left:0px; width:100%; height:100%; overflow:hidden; z-index:6; } #youtube_single_player_container_<?php echo $video->id; ?> .thumbnail_block .thumb { position:absolute; left:0px; top:0px; min-width:100%; min-height:100%; max-width:none; vertical-align:middle } #youtube_single_player_container_<?php echo $video->id; ?> .thumbnail_block .play { position:absolute; left:50%; top:50%; width:70px; height:49px; margin-left:-35px; margin-top:-24.5px; cursor:pointer; } </style> <div id="youtube_single_player_container_<?php echo $video->id; ?> "> <div id="youtube_single_player_<?php echo $video->id; ?> "></div> <div class="thumbnail_block"> <img class="thumb" src="<?php echo $video->image_url; ?> " alt="<?php echo $video->name; ?> " /> <img class="play" src="<?php echo plugins_url("../images/play.youtube.png", __FILE__); ?> " alt="youtube play" /> </div> </div> <?php break; case "vimeo": $i = rand(1, 100000); $vid = $video->video_url_1; $vid = explode("/", $vid); $vidid = end($vid); if ($j == 0) { $autoplay = $video_player[0]->autoplay; } else { $autoplay = 0; } $vidurl = "https://player.vimeo.com/video/" . $vidid . "?player_id=vimeo_single_player_" . $video->id . "&color=" . $paramssld['video_pl_vimeo_color'] . "&autoplay=" . $autoplay; ?> <script> jQuery(document).ready(function(){ function vimhw<?php echo $i; ?> (){ var w=<?php echo $video_player[0]->width; ?> ; if(jQuery("#vimeo_single_player_<?php echo $video->id; ?> ").parent().width()<=w){ document.getElementById("vimeo_single_player_<?php echo $video->id; ?> ").style.width="100%"; var w=document.getElementById("vimeo_single_player_<?php echo $video->id; ?> ").offsetWidth; document.getElementById("vimeo_single_player_<?php echo $video->id; ?> ").style.height=w*0.56+"px"; }else{ document.getElementById("vimeo_single_player_<?php echo $video->id; ?> ").style.width="<?php echo $video_player[0]->width; ?> px"; document.getElementById("vimeo_single_player_<?php echo $video->id; ?> ").style.height="<?php echo $video_player[0]->width * 0.5600000000000001; ?> px"; } } if((<?php echo $j; ?> ==0 && <?php echo $video_player[0]->autoplay; ?> ==0) || <?php echo $j; ?> !=0){ jQuery("#vimeo_single_player_container_<?php echo $video->id; ?> .thumbnail_block").css({display:'block'}); } jQuery("#vimeo_single_player_container_<?php echo $video->id; ?> .thumbnail_block").on("click",function(){ jQuery("#vimeo_single_player_container_<?php echo $video->id; ?> .thumbnail_block").css({display:'none'}); jQuery("#vimeo_single_player_container_<?php echo $video->id; ?> #vimeo_single_player_<?php echo $video->id; ?> ").attr("src","https://player.vimeo.com/video/<?php echo $vidid; ?> ?player_id=vimeo_single_player_<?php echo $video->id; ?> &color=<?php echo $paramssld['video_pl_vimeo_color']; ?> &autoplay=1"); }); vimhw<?php echo $i; ?> (); jQuery(window).on("resize",function(){ vimhw<?php echo $i; ?> (); }); }); </script> <style> #vimeo_single_player_container_<?php echo $video->id; ?> { display:block; position:relative; <?php switch ($paramssld['video_pl_position']) { case "left": ?> float:left; margin-left:<?php echo $paramssld['video_pl_margin_left']; ?> px; margin-right:<?php echo $paramssld['video_pl_margin_right']; ?> px; <?php break; case "right": ?> float:right; margin-left:<?php echo $paramssld['video_pl_margin_left']; ?> px; margin-right:<?php echo $paramssld['video_pl_margin_right']; ?> px; <?php break; case "center": ?> display:block; margin:0px auto; <?php break; } ?> margin-top:<?php echo $paramssld['video_pl_margin_top']; ?> px; margin-bottom:<?php echo $paramssld['video_pl_margin_bottom']; ?> px; width:<?php echo $video_player[0]->width; ?> px; max-width:none; height:<?php $ff = round($video_player[0]->width * 0.5600000000000001); echo $ff; ?> px; box-sizing:content-box; border:<?php echo $paramssld['video_pl_border_size']; ?> px solid #<?php echo $paramssld['video_pl_border_color']; ?> ; } #vimeo_single_player_<?php echo $video->id; ?> { position:absolute; top:0px; left:0px; width:100%; height:100%; z-index:5; } #vimeo_single_player_container_<?php echo $video->id; ?> .thumbnail_block { position:absolute; display:none; top:0px; left:0px; width:100%; overflow:hidden; height:100%; z-index:6; } #vimeo_single_player_container_<?php echo $video->id; ?> .thumbnail_block .thumb { position:absolute; left:0px; top:0px; width:100%; max-height:none; vertical-align:middle } #vimeo_single_player_container_<?php echo $video->id; ?> .thumbnail_block .play { position:absolute; left:50%; top:50%; width:70px; height:49px; margin-left:-35px; margin-top:-24.5px; cursor:pointer; } </style> <div id="vimeo_single_player_container_<?php echo $video->id; ?> "> <iframe id="vimeo_single_player_<?php echo $video->id; ?> " width="<?php echo $video_player[0]->width; ?> " height="<?php echo $video_player[0]->width * 0.5600000000000001; ?> " src="<?php echo $vidurl; ?> " frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <div class="thumbnail_block"> <img class="thumb" src="<?php echo $video->image_url; ?> " alt="<?php echo $video->name; ?> " /> <img class="play" src="<?php echo plugins_url("../images/play.vimeo.png", __FILE__); ?> " alt="vimeo play" /> </div> </div> <?php break; } $j++; } ?> <?php break; /////////////////////////////////////////////////////album/////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////album/////////////////////////////////////////////////////////////////////////////////////////////////////////// case 'album': $i = rand(1, 1000); ?> <script> var YTdeferred =jQuery.Deferred(); window.onYouTubeIframeAPIReady = function() { // resolve when youtube callback is called // passing YT as a parameter YTdeferred.resolve(window.YT); }; /*init Album video player when document is ready*/ jQuery(document).ready(function(){ var tag = document.createElement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); init_huge_it_playlist_vide_player_<?php echo $i; ?> ("#huge_it_album_video_player_<?php echo $i; ?> "); // Listen for the ready event for any vimeo video players on the page function init_huge_it_playlist_vide_player_<?php echo $i; ?> (video_container_id){ var playlist_autoplay,player_width,video_width,video_param_width,global_container,container,load_icon,youtube,jQ_youtube,vimeo,jQ_vimeo,playlist_container,items; /* PLUGIN PARAMETERS */ playlist_autoplay="false"; player_width=<?php echo $video_player[0]->width; ?> ; <?php if ($video_player[0]->layout == "bottom") { ?> video_width=<?php echo $video_player[0]->width; ?> ; video_param_width=<?php echo $video_player[0]->width; ?> <?php } else { ?> video_width=<?php echo $video_player[0]->width * (3 / 5); ?> ; video_param_width=<?php echo $video_player[0]->width * (3 / 5); ?> ; <?php } ?> video_param_aprox_height=video_param_width*0.7; /* check if video player exists */ global_container=document.querySelector(video_container_id); if(global_container){ /* SET OBJECT LISTENERS */ /* *** */ /* custom video container */ container=global_container.querySelector(".huge_it_player"); load_icon=global_container.querySelector(".load_icon"); /* youtube player container */ youtube=global_container.querySelector("#youtube_player_<?php echo $i; ?> "); jQ_youtube=jQuery("#youtube_player_<?php echo $i; ?> "); /* vimeo player container */ vimeo_js=global_container.querySelector("#vimeo_<?php echo $i; ?> "); jQ_vimeo=jQuery("#vimeo_<?php echo $i; ?> "); /* playlist container */ playlist_container=global_container.querySelector(".playlist_wrapper"); /* playlist items */ items=playlist_container.querySelectorAll("li"); jQ_items=jQuery("#huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper li"); if(items.length){ /* create youtube player */ var youtube_player; YTdeferred.done(function(YT) { youtube_player = new YT.Player('youtube_player_<?php echo $i; ?> ', { autoplay : 0, enablejsapi : 1, playerVars:{ 'autohide': <?php echo $paramssld['video_pl_yt_autohide']; ?> , 'autoplay': 0, 'controls': 1, 'fs': 0, 'disablekb': 0, 'modestbranding': 1, 'enablejsapi': 1, // 'cc_load_policy': 1, // forces closed captions on 'iv_load_policy': <?php echo $paramssld['video_pl_yt_annotation']; ?> , // annotations, 1=on, 3=off // 'playlist': videoID, videoID, videoID, etc, 'rel': 1, 'showinfo': <?php echo $paramssld['video_pl_yt_showinfo']; ?> , 'theme': '<?php echo $paramssld['video_pl_yt_theme']; ?> ', // dark, light 'color': '<?php echo $paramssld['video_pl_yt_color']; ?> ' // red, white }, events : { 'onReady' : onReady, } }); function onReady() { youtube_player.pauseVideo(); youtube_player.addEventListener('onStateChange', function(e) { if(e.data==0){ /* video ended. load next track in playlist */ next_track(); } if(e.data==1){ playlist_autoplay="true"; } }); } var vimeo; var vimeo_player=jQuery('#vimeo_<?php echo $i; ?> ')[0]; vimeo = Froogaloop(vimeo_player); vimeo.addEvent('ready', function() { vimeo.addEvent('finish', function() { next_track(); }); }); /* helping functions */ /* *** */ function addClass( classname, element ) { var cn = element.className; /*test for existance */ if( cn.indexOf( classname ) != -1 ) { return; } /* add a space if the element already has class */ if( cn != '' ) { classname = ' '+classname; } element.className = cn+classname; } function removeClass( classname, element ) { var cn = element.className; var rxp = new RegExp( "\\s?\\b"+classname+"\\b", "g" ); cn = cn.replace( rxp, '' ); element.className = cn; } function hasClass(cls, element) { return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1; } function init_playlist_custom_video(src){ var video,thumb_box,thumb,paused,dragging,volume_dragging,volume,progress_duration_bar,progress_bar,progress_played_bar,progress_thumb,progress_buffered,current_time,duration_time,current_time_text,duration_time_text,autoplay,play_btn,center_play_icon,center_pause_icon,center_wait_icon,backward_btn,forward_btn,mute_btn,volume_handle,volume_before,volume_current,volume_after,fullscreen_btn,hover_timer_box,hover_timer; current_time="00"; duration_time="00"; volume=1; dragging=""; paused=""; volume_dragging=""; /* PLUGIN PARAMETERS */ autoplay=playlist_autoplay; /* check if video player exists */ if(container && src!=""){ /* SET OBJECT LISTENERS */ /* *** */ video=container.querySelector("video"); play_btn=container.querySelector(".play_pause"); center_play_icon=container.querySelector(".center_play"); center_pause_icon=container.querySelector(".center_pause"); center_wait_icon=container.querySelector(".center_wait"); backward_btn=container.querySelector(".fast_back"); forward_btn=container.querySelector(".fast_forward"); mute_btn=container.querySelector(".mute_button"); volume_handle=container.querySelector(".volume_handle"); volume_before=container.querySelector(".volume_before"); volume_current=container.querySelector(".volume_current"); volume_after=container.querySelector(".volume_after"); fullscreen_btn=container.querySelector(".full_screen"); current_time_text=container.querySelector(".current_time"); duration_time_text=container.querySelector(".duration_time"); progress_bar=container.querySelector(".huge_it_video_player_duration_slide"); progress_played_bar=container.querySelector(".played"); progress_thumb=container.querySelector(".thumb"); progress_buffered=container.querySelector(".buffered"); hover_timer_box=container.querySelector(".hover_timer"); hover_timer=container.querySelector(".hover_timer_time"); thumb_box=container.querySelector(".thumbnail_block"); thumb=container.querySelector(".thumbnail_block img"); /* *** */ /* FUNCTIONS */ function timeupdate(){ if(!isNaN(video.currentTime)){ current_time=Math.floor(video.currentTime); } if(!isNaN(video.duration)){ duration_time=Math.floor(video.duration); } var curmins = Math.floor(video.currentTime / 60); var cursecs = Math.floor(video.currentTime - curmins * 60); var durmins = Math.floor(video.duration / 60); var dursecs = Math.floor(video.duration - durmins * 60); if(cursecs < 10){ cursecs = "0"+cursecs; } if(dursecs < 10){ dursecs = "0"+dursecs; } if(curmins < 10){ curmins = "0"+curmins; } if(durmins < 10){ durmins = "0"+durmins; } current_time_text.innerHTML = curmins+":"+cursecs; duration_time_text.innerHTML = durmins+":"+dursecs; var current_time_percent = current_time*(100/duration_time); var progress_bar_pixels=(current_time_percent*video_width)/100; progress_played_bar.style.width=progress_bar_pixels+"px"; if(progress_bar_pixels+progress_thumb.offsetWidth/2 > video_width){ var last_px = video_width-progress_thumb.offsetWidth/2; progress_thumb.style.left=last_px+"px"; }else if(progress_bar_pixels < progress_thumb.offsetWidth/2){ var first_px = progress_thumb.offsetWidth/2; progress_thumb.style.left=first_px+"px"; }else{ progress_thumb.style.left=progress_bar_pixels+"px"; } } function progressHandler(){ if(!isNaN(video.currentTime)){ current_time=Math.floor(video.currentTime); } if(!isNaN(video.duration)){ duration_time=Math.floor(video.duration); } if(!video.paused){ play_btn.innerHTML='<i class="hugeicons hugeicons-pause"></i>'; } if(thumb_box.style.display=="block" && !video.paused){ thumb_box.style.display="none"; } if(video.buffered.length > 0){ var i=video.buffered.length; var buffered_end=video.buffered.end(i-1); var loaded_percent=(buffered_end/duration_time)*100; var progress_bar_pixels=(loaded_percent*video_width)/100; progress_buffered.style.width=progress_bar_pixels+"px"; } if(!isFullScreen() && hasClass("hide_controls",container)){ removeClass("hide_controls",container); } } function VideoClickPlayPause(){ if(video.paused){ /* PLAY THE VIDEO */ video.play(); paused=""; addClass("playing",container); play_btn.innerHTML='<i class="hugeicons hugeicons-pause"></i>'; center_play_icon.style.webkitAnimationName="popup"; center_play_icon.style.display="block"; setTimeout(function(){ center_play_icon.removeAttribute("style"); },500); playlist_autoplay="true"; }else{ /* PAUSE THE VIDEO */ video.pause(); paused=1; removeClass("playing",container); play_btn.innerHTML='<i class="hugeicons hugeicons-play"></i>'; center_pause_icon.style.webkitAnimationName="popup"; center_pause_icon.style.display="block"; setTimeout(function(){ center_pause_icon.removeAttribute("style"); },500); } } function PlayPause(){ if(hasClass("poster",container)){ video.play(); paused=""; thumb_box.style.display="none"; removeClass("poster",container); addClass("playing",container); play_btn.innerHTML='<i class="hugeicons hugeicons-pause"></i>'; playlist_autoplay="true"; }else{ if(video.paused){ /* PLAY THE VIDEO */ video.play(); paused=""; addClass("playing",container); play_btn.innerHTML='<i class="hugeicons hugeicons-pause"></i>'; }else{ /* PAUSE THE VIDEO */ video.pause(); paused=1; removeClass("playing",container); play_btn.innerHTML='<i class="hugeicons hugeicons-play"></i>'; } } } function step_back(){ if(!isNaN(video.currentTime)){ current_time=Math.floor(video.currentTime); } if(!isNaN(video.duration)){ duration_time=Math.floor(video.duration); } video.currentTime=current_time-15; } function step_forward(){ if(!isNaN(video.currentTime)){ current_time=Math.floor(video.currentTime); } if(!isNaN(video.duration)){ duration_time=Math.floor(video.duration); } video.currentTime=current_time+15; } function toggle_mute(){ if(video.muted){ video.muted=false; if(volume<0.7){ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-down"></i>'; }else{ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-up"></i>'; } var volume_handle_width=volume_handle.offsetWidth; var volume_current_pixels=volume*volume_handle_width; volume_before.style.width=volume_current_pixels+"px"; volume_current.style.left=volume_current_pixels+"px"; }else{ var volume_handle_width=volume_handle.offsetWidth; var volume_current_width=volume_before.offsetWidth; volume=volume_current_width/volume_handle_width; video.muted=true; mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-off"></i>'; volume_before.style.width="0px"; volume_current.style.left="0px"; } } function exitHandler(){ if (isFullScreen()) console.log(""); // nothing else cFullScreen(); } function toggle_full_screen(){ if (isFullScreen()) cFullScreen(); else requestFullScreen(container || document.documentElement); } function isFullScreen(){ return (document.fullScreenElement && document.fullScreenElement !== null) || document.mozFullScreen || document.webkitIsFullScreen; } function vidSeeking(e){ var x = e.clientX; var l=container.getBoundingClientRect().left; var pos = x-l; if(pos>=0 && pos<video_width){ progress_played_bar.style.width = pos+"px"; progress_thumb.style.left = pos+"px"; var current_percent=(pos/video_width)*100; var seekto=duration_time*(current_percent/100); video.currentTime=seekto; } } function requestFullScreen(element){ if (element.requestFullscreen) element.requestFullscreen(); else if (element.msRequestFullscreen) element.msRequestFullscreen(); else if (element.mozRequestFullScreen) element.mozRequestFullScreen(); else if (element.webkitRequestFullscreen) element.webkitRequestFullscreen(); addClass("fullscreen",container); fullscreen_btn.innerHTML='<i class="hugeicons hugeicons-compress"></i>'; jQuery.when(requestFullScreen).done(function(){ setTimeout(function(){ video_width=video.offsetWidth; },500); }); } function cFullScreen(){ if (document.exitFullscreen) document.exitFullscreen(); else if (document.msExitFullscreen) document.msExitFullscreen(); else if (document.mozCancelFullScreen) document.mozCancelFullScreen(); else if (document.webkitExitFullscreen) document.webkitExitFullscreen(); removeClass("fullscreen",container); fullscreen_btn.innerHTML='<i class="hugeicons hugeicons-expand"></i>'; jQuery.when(cFullScreen).done(function(){ setTimeout(function(){ video_width=video.offsetWidth; },500); }); } function setVolume(e){ var x = e.clientX; var l=volume_handle.getBoundingClientRect().left; var pos = x-l; if(pos>0 && pos<=volume_handle.offsetWidth){ volume_before.style.width=pos+"px"; volume_current.style.left=pos+"px"; var volume_handle_width=volume_handle.offsetWidth; var current_percent=(pos/volume_handle_width)*100; volume=current_percent/100; video.muted=false; video.volume=current_percent/100; if(current_percent<70){ if(current_percent==0){ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-off"></i>'; }else{ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-down"></i>'; } }else{ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-up"></i>'; } }else{ if(pos<=0){ video.muted=true; mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-off"></i>'; volume_before.style.width="0px"; volume_current.style.left="0px"; } } } function waiting(){ center_wait_icon.style.display="block"; center_wait_icon.style.opacity="1"; } function notWaiting(){ center_wait_icon.style.display="none"; center_wait_icon.style.opacity="0"; } function videoEnd(){ play_btn.innerHTML ='<i class="hugeicons hugeicons-refresh"></i>'; if (isFullScreen()) cFullScreen(); next_track(); } function timerDisplay(e){ if(video.buffered.length > 0){ var x = e.clientX; var l=container.getBoundingClientRect().left; var w=hover_timer_box.offsetWidth; var pos = x-l; var mouse_pos_percent= (pos/video_width)*100; var mouse_pos_time=duration_time*(mouse_pos_percent/100); var curmins = Math.floor(mouse_pos_time / 60); var cursecs = Math.floor(mouse_pos_time - curmins * 60); if(cursecs < 10){ cursecs="0"+cursecs; } if(curmins < 10){ curmins="0"+curmins; } //hover_timer_box.style.webkitAnimationName="opacity"; hover_timer_box.style.opacity="1"; hover_timer_box.style.display = "block"; hover_timer_box.style.left = x-l-w/2+"px"; hover_timer.innerHTML = curmins+":"+cursecs; } } function timerNotDisplay(e){ hover_timer_box.style.display = "none"; } function keyFunctions(e){ switch(e.keyCode){ case 40: var curent_volume=video.volume; var curent_volume_percent=curent_volume*100; if(curent_volume_percent>0){ var new_volume_percent=curent_volume_percent-10; if(new_volume_percent<=0){ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-off"></i>'; volume_before.style.width="0px"; volume_current.style.left="0px"; video.muted=true; volume=0; }else{ if(new_volume_percent<70){ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-down"></i>'; }else{ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-up"></i>'; } var new_volume=new_volume_percent/100; var volume_handle_width=volume_handle.offsetWidth; var new_position=new_volume*volume_handle_width; volume_before.style.width=new_position+"px"; volume_current.style.left=new_position+"px"; video.muted=false; video.volume=new_volume; volume=new_volume; } } e.preventDefault(); break; case 38: var curent_volume=video.volume; var curent_volume_percent=curent_volume*100; if(curent_volume_percent<100){ var new_volume_percent=curent_volume_percent+10; if(new_volume_percent>100){ new_volume_percent=100; } if(new_volume_percent<70){ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-down"></i>'; }else{ mute_btn.innerHTML='<i class="hugeicons hugeicons-volume-up"></i>'; } var new_volume=new_volume_percent/100; var volume_handle_width=volume_handle.offsetWidth; var new_position=new_volume*volume_handle_width; volume_before.style.width=new_position+"px"; volume_current.style.left=new_position+"px"; video.volume=new_volume; video.muted=false; volume=new_volume; } e.preventDefault(); break; case 39: step_forward(); e.preventDefault(); break; case 37: step_back(); e.preventDefault(); break; case 32: VideoClickPlayPause(); e.preventDefault(); break; } } function huge_it_single_video_responsive(){ var video_parent=container.parentNode; var video_parent_width=video_parent.offsetWidth; if(video_parent_width<=video_param_width && !isFullScreen()){ /*container.style.width="100%";*/ addClass("fullwidth",container); jQuery.when(huge_it_single_video_responsive).done(function(){ setTimeout(function(){ video_width=video.offsetWidth; },500); }); }else{ removeClass("fullwidth",container); /*container.style.width=video_param_width+"px";*/ jQuery.when(huge_it_single_video_responsive).done(function(){ setTimeout(function(){ video_width=video.offsetWidth; },500); }); } } function videoResized(){ setTimeout(function(){ video_width=video.offsetWidth; },500); } /* *** */ /* ADD EVENT LISTENERS */ /* *** */ video.addEventListener("timeupdate",timeupdate,false); video.addEventListener("playing",progressHandler,false); video.addEventListener("loadeddata",progressHandler,false); video.addEventListener("canplaythrough",progressHandler,false); video.addEventListener("progress",progressHandler,false); video.addEventListener("waiting",waiting,false); video.addEventListener("canplay",notWaiting,false); video.addEventListener("ended",videoEnd,false); video.addEventListener("resize",videoResized,false); /* *** */ video.addEventListener("click",VideoClickPlayPause,false); video.addEventListener("dblclick",toggle_full_screen,false); center_play_icon.addEventListener("click",VideoClickPlayPause,false); center_pause_icon.addEventListener("click",VideoClickPlayPause,false); center_wait_icon.addEventListener("click",VideoClickPlayPause,false); thumb_box.addEventListener("click",PlayPause,false); play_btn.addEventListener("click",PlayPause,false); backward_btn.addEventListener("click",step_back,false); forward_btn.addEventListener("click",step_forward,false); mute_btn.addEventListener("click",toggle_mute,false); fullscreen_btn.addEventListener("click",toggle_full_screen,false); container.addEventListener('webkitfullscreenchange', exitHandler, false); container.addEventListener('mozfullscreenchange', exitHandler, false); container.addEventListener('fullscreenchange', exitHandler, false); container.addEventListener('MSFullscreenChange', exitHandler, false); progress_bar.addEventListener("mouseover",timerDisplay,false); progress_bar.addEventListener("mousemove",timerDisplay,false); progress_bar.addEventListener("mouseout",timerNotDisplay,false); /* KEYBOARD */ /* *** */ container.addEventListener("mouseover",function(){ window.addEventListener("keydown",keyFunctions,false); },false) container.addEventListener("mouseout",function(){ window.removeEventListener("keydown",keyFunctions,false); },false) /* *** */ /* VIDEO SEEKING */ progress_bar.addEventListener("mousedown",function(e){ dragging=1; vidSeeking(e); },false); window.addEventListener("mousemove",function(e){ if(dragging==1){ if(paused!=1){ video.pause(); } removeClass("playing",container); vidSeeking(e); } },false); window.addEventListener("mouseup",function(){ if(dragging==1){ if(paused!==1){ video.play(); } addClass("playing",container); dragging=""; } },false); /* VOLUME CHANGING */ volume_handle.addEventListener("mousedown",function(e){ volume_dragging=1; setVolume(e); },false); window.addEventListener("mousemove",function(e){ if(volume_dragging==1){ setVolume(e); } },false); window.addEventListener("mouseup",function(){ if(volume_dragging==1){ volume_dragging=""; } },false); /* *** */ /* *** */ /*video.setAttribute("src",src);*/ /*if(autoplay=="true"){ video.autoplay = true; addClass("playing",container); removeClass("poster",container); thumb_box.style.display="none"; play_btn.innerHTML='<i class="hugeicons hugeicons-pause"></i>'; playlist_autoplay=="true"; }else{ video.autoplay = false; removeClass("playing",container); play_btn.innerHTML='<i class="hugeicons hugeicons-play"></i>'; addClass("poster",container); thumb_box.style.display="block"; playlist_autoplay=="true"; }*/ var timeout; container.onmousemove = function(){ if(isFullScreen()){ removeClass("hide_controls",container); clearTimeout(timeout); timeout = setTimeout(function(){ addClass("hide_controls",container); },3000); } } /* *** */ } } function init_playlist_active_item(){ /* AS THE ATTRIBUTES OF DOM ELEMENTS CHANGE I REDECLARE THESE VARIABLE(MAYBE THERE IS A BETTER WAY ??hmm) */ /* youtube player container */ youtube=global_container.querySelector("#youtube_player_<?php echo $i; ?> "); jQ_youtube=jQuery("#youtube_player_<?php echo $i; ?> "); /* vimeo player container */ vimeo_js=global_container.querySelector("#vimeo_<?php echo $i; ?> "); jQ_vimeo=jQuery("#vimeo_<?php echo $i; ?> "); var active=playlist_container.querySelector("li.active") var id=active.getAttribute("data-item-id"); var type=active.getAttribute("data-type"); switch(type){ case "custom": /* HIDE YOUTUBE PLAYER */ youtube.style.display="none"; if(typeof youtube_player.loadVideoById === 'function'){ youtube_player.loadVideoById(""); } global_container.querySelector(".players_wrapper #youtube_<?php echo $i; ?> _thumb").style.display="none"; /* HIDE VIMEO PLAYER */ vimeo_player.setAttribute("src",""); vimeo_js.style.display="none"; global_container.querySelector(".players_wrapper #vimeo_<?php echo $i; ?> _thumb").style.display="none"; /* DISPLAY CUSTOM VIDEO */ container.style.display="block"; var src=active.getAttribute("data-src"); var thumb=active.getAttribute("data-poster"); var title=active.getAttribute("data-title"); container.querySelector("video").setAttribute("src",src); container.querySelector(".video_title").innerHTML=title; if(playlist_autoplay=="true"){ container.querySelector("video").autoplay = true; addClass("playing",container); removeClass("poster",container); container.querySelector(".thumbnail_block").style.display="none"; container.querySelector(".play_pause").innerHTML='<i class="hugeicons hugeicons-pause"></i>'; playlist_autoplay="true"; }else{ container.querySelector("video").autoplay = false; removeClass("playing",container); container.querySelector(".play_pause").innerHTML='<i class="hugeicons hugeicons-play"></i>'; addClass("poster",container); container.querySelector(".thumbnail_block img").setAttribute("src",thumb); container.querySelector(".thumbnail_block").style.display="block"; } break; case "youtube": /* DISPLAY YOUTUBE PLAYER */ var id=active.getAttribute("data-video-id"); var thumb=active.getAttribute("data-poster"); youtube_player.loadVideoById(id); youtube.style.display="block"; if(playlist_autoplay=="true"){ youtube_player.playVideo(); global_container.querySelector(".players_wrapper #youtube_<?php echo $i; ?> _thumb").style.display="none"; }else{ youtube_player.pauseVideo(); global_container.querySelector(".players_wrapper #youtube_<?php echo $i; ?> _thumb img.thumb").setAttribute("src",thumb); global_container.querySelector(".players_wrapper #youtube_<?php echo $i; ?> _thumb").style.display="block"; } /* HIDE VIMEO PLAYER */ vimeo_player.setAttribute("src",""); vimeo_js.style.display="none"; global_container.querySelector(".players_wrapper #vimeo_<?php echo $i; ?> _thumb").style.display="none"; /* HIDE CUSTOM VIDEO */ container.style.display="none"; container.querySelector("video").setAttribute("src",""); container.querySelector(".thumbnail_block").style.display="none"; break; case "vimeo": /* HIDE YOUTUBE PLAYER */ youtube.style.display="none"; youtube_player.loadVideoById(""); global_container.querySelector(".players_wrapper #youtube_<?php echo $i; ?> _thumb").style.display="none"; /* DISPLAY VIMEO PLAYER */ var id=active.getAttribute("data-video-id"); var thumb=active.getAttribute("data-poster"); var vimeo_autoplay; if(playlist_autoplay=="true"){ vimeo_autoplay="&autoplay=1"; global_container.querySelector(".players_wrapper #vimeo_<?php echo $i; ?> _thumb").style.display="none"; }else{ vimeo_autoplay=""; global_container.querySelector(".players_wrapper #vimeo_<?php echo $i; ?> _thumb img.thumb").setAttribute("src",thumb); global_container.querySelector(".players_wrapper #vimeo_<?php echo $i; ?> _thumb").style.display="block"; } vimeo_player.setAttribute("src","https://player.vimeo.com/video/"+id+"?api=1&color=<?php echo $paramssld['video_pl_vimeo_color']; ?> &player_id=vimeo_<?php echo $i; ?> &fullscreen=0"+vimeo_autoplay); vimeo_js.style.display="block"; /* HIDE CUSTOM VIDEO */ container.style.display="none"; container.querySelector("video").setAttribute("src",""); container.querySelector(".thumbnail_block").style.display="none"; break; } } function next_track(){ var active=jQ_items.parent().find("li.active"); var active_id=active.data("item-id"); var max_id=jQ_items.length-1; var next; if(active_id!=max_id){ next=active_id+1; }else{ next=0; } active.removeClass("active"); jQ_items.eq(next).addClass("active"); init_playlist_active_item(); } function change_track(el){ var active=el.parent().find("li.active"); var active_id=active.data("item-id"); var this_id=el.data("item-id"); var max_id=jQ_items.length-1; if(this_id!=active_id){ active.removeClass("active"); el.addClass("active"); jQuery.when(change_track).done(function(){ setTimeout(function(){ init_playlist_active_item(); },100); }); } } function huge_it_playlist_responsive(){ var computedStyle = getComputedStyle(global_container.parentNode); var a=global_container.parentNode.clientWidth-parseFloat(computedStyle.paddingRight)-parseFloat(computedStyle.paddingLeft); if(player_width>=a){ addClass("fullwidth",global_container); jQuery.when(change_track).done(function(){ setTimeout(function(){ var player_width=global_container.offsetWidth; var player_aprox_height=player_width*0.56; youtube.style.height=player_aprox_height+"px"; vimeo_js.style.height=player_aprox_height+"px"; },100); }); }else{ removeClass("fullwidth",global_container); youtube.style.height=video_param_aprox_height+"px"; vimeo_js.style.height=video_param_aprox_height+"px"; } } function removeVimeoThumb(){ var active=playlist_container.querySelector("li.active"); var type=active.getAttribute("data-type"); if(type=="vimeo"){ var id=active.getAttribute("data-video-id"); global_container.querySelector(".players_wrapper #vimeo_<?php echo $i; ?> _thumb").style.display="none"; vimeo_player.setAttribute("src","https://player.vimeo.com/video/"+id+"?api=1&color=<?php echo $paramssld['video_pl_vimeo_color']; ?> &portrait=<?php echo $paramssld['video_pl_vimeo_portrait']; ?> &player_id=vimeo_<?php echo $i; ?> &fullscreen=0&autoplay=1"); playlist_autoplay="true"; } } function removeYoutubeThumb(){ var active=playlist_container.querySelector("li.active"); var type=active.getAttribute("data-type"); if(type=="youtube"){ var id=active.getAttribute("data-video-id"); global_container.querySelector(".players_wrapper #youtube_<?php echo $i; ?> _thumb").style.display="none"; youtube_player.loadVideoById(id); youtube_player.playVideo(); playlist_autoplay="true"; } } /* ADD EVENT LISTENERS */ init_playlist_custom_video(); jQuery.when(onYouTubeIframeAPIReady).done(function(){ setTimeout(function(){ load_icon.style.display="none"; removeClass("loading",global_container); init_playlist_active_item(); },2000); }); huge_it_playlist_responsive(); jQuery(window).on("resize",function(){ huge_it_playlist_responsive(); }); jQ_items.on("click",function(){ change_track(jQuery(this)); }); global_container.querySelector(".players_wrapper #youtube_<?php echo $i; ?> _thumb").addEventListener("click",removeYoutubeThumb,false); global_container.querySelector(".players_wrapper #vimeo_<?php echo $i; ?> _thumb").addEventListener("click",removeVimeoThumb,false); }); } /* *** */ } } }); </script> <style> /* parameters */ #huge_it_album_video_player_<?php echo $i; ?> { width:<?php echo $video_player[0]->width; ?> px; height:auto; <?php switch ($paramssld['video_pl_position']) { case "left": ?> float:left; margin-right:<?php echo $paramssld['video_pl_margin_right']; ?> px; margin-left:<?php echo $paramssld['video_pl_margin_left']; ?> px; <?php break; case "right": ?> float:right; margin-right:<?php echo $paramssld['video_pl_margin_right']; ?> px; margin-left:<?php echo $paramssld['video_pl_margin_left']; ?> px; <?php break; case "center": ?> margin:0px auto; <?php break; } ?> margin-top:<?php echo $paramssld['video_pl_margin_top']; ?> px; margin-bottom:<?php echo $paramssld['video_pl_margin_bottom']; ?> px; background:#<?php echo $paramssld['video_pl_background_color']; ?> ; border:<?php echo $paramssld['video_pl_border_size']; ?> px solid #<?php echo $paramssld['video_pl_border_color']; ?> ; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper { <?php switch ($video_player[0]->layout) { case "left": ?> float:right; <?php break; case "right": ?> float:left; <?php break; case "bottom": ?> float:left; <?php break; } ?> } #huge_it_album_video_player_<?php echo $i; ?> , #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .custom_thumb, #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .thumbnail_block { background:#f1f1f1; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player { position:relative; float:left; display:block; width:100%; height:100%; margin:0px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper > iframe { height:<?php echo $video_player[0]->width * (3 / 5) * 0.5600000000000001; ?> px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper { width:<?php echo $video_player[0]->width * (3 / 5); ?> px; } #huge_it_album_video_player_<?php echo $i; ?> .align_bottom .players_wrapper { width:<?php echo $video_player[0]->width; ?> px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .thumbnail_block { background:#<?php echo $paramssld['video_pl_background_color']; ?> ; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_video_player_bottom { background:rgba(<?php echo hex2RGB($paramssld['video_pl_controls_panel_color']); ?> ,<?php echo $paramssld['video_pl_controls_panel_opacity'] / 100; ?> ); } #huge_it_album_video_player_<?php echo $i; ?> .huge_it_player .thumbnail_block .thumbnail_play, #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_video_player_center, #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_video_player_bottom .huge_it_video_player_controls .control { color:#<?php echo $paramssld['video_pl_buttons_color']; ?> !important; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_video_player_bottom .huge_it_video_player_controls .control:hover { color:#<?php echo $paramssld['video_pl_buttons_hover_color']; ?> !important; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_video_player_bottom .huge_it_video_player_duration_slide { background:transparent; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_video_player_bottom .huge_it_video_player_duration_slide .duration { background:rgba(<?php echo hex2RGB($paramssld['video_pl_timeline_background']); ?> ,<?php echo $paramssld['video_pl_timeline_background_opacity'] / 100; ?> ); } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_video_player_bottom .huge_it_video_player_duration_slide .buffered { background:rgba(<?php echo hex2RGB($paramssld['video_pl_timeline_buffering_color']); ?> ,<?php echo $paramssld['video_pl_timeline_buffering_opacity'] / 100; ?> ); } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle .volume_before, #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_video_player_bottom .huge_it_video_player_duration_slide .played{ background:#<?php echo $paramssld['video_pl_timeline_color']; ?> ; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_video_player_bottom .huge_it_video_player_duration_slide .thumb { background:#<?php echo $paramssld['video_pl_timeline_slider_color']; ?> ; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_video_player_bottom .huge_it_video_player_controls .timer .current_time { color:#<?php echo $paramssld['video_pl_curtime_color']; ?> ; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_video_player_bottom .huge_it_video_player_controls .timer .separator, #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_video_player_bottom .huge_it_video_player_controls .timer .duration_time { color:#<?php echo $paramssld['video_pl_durtime_color']; ?> ; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper, #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul { background:#<?php echo $paramssld['video_pl_playlist_color']; ?> ; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper h3 { color:#<?php echo $paramssld['video_pl_playlist_head_color']; ?> ; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul li.item:hover { background:#<?php echo $paramssld['video_pl_playlist_hover_color']; ?> ; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul li.item.active { background:#<?php echo $paramssld['video_pl_playlist_active_color']; ?> ; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul li.item .playlist_button .item_title { color:#<?php echo $paramssld['video_pl_playlist_text_color']; ?> ; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul li.item:hover .playlist_button .item_title { color:#<?php echo $paramssld['video_pl_playlist_hover_text_color']; ?> ; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul li.item.active .playlist_button .item_title { color:#<?php echo $paramssld['video_pl_playlist_active_text_color']; ?> ; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul::-webkit-scrollbar-thumb { border-left-color: #<?php echo $paramssld['video_pl_playlist_scroll_thumb']; ?> ; background: #<?php echo $paramssld['video_pl_playlist_scroll_thumb']; ?> ; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul::-webkit-scrollbar-track { border-left-color: #<?php echo $paramssld['video_pl_playlist_scroll_track']; ?> ; background: #<?php echo $paramssld['video_pl_playlist_scroll_track']; ?> ; -webkit-box-shadow: inset 0 0 1px #<?php echo $paramssld['video_pl_playlist_scroll_track']; ?> ; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul::-webkit-scrollbar-thumb:hover { border-left-color: #<?php echo $paramssld['video_pl_playlist_scroll_thumb_hover']; ?> ; background: #<?php echo $paramssld['video_pl_playlist_scroll_thumb_hover']; ?> ; } /* static */ #huge_it_album_video_player_<?php echo $i; ?> { position:relative; display:table; height:auto; min-width:350px; font-size:15px; font-weight:normal; font-family:Roboto, Arial, Helvetica, sans-serif; font-style:normal; line-height:1; user-select:none; -webkit-user-select:none; -moz-user-select:none; -o-user-select:none; -ms-user-select:none; transition:width .3s linear,height .3s linear; box-sizing:content-box; } #huge_it_album_video_player_<?php echo $i; ?> .fullwidth { width:100%; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper { position:relative; display:table; height:auto; } #huge_it_album_video_player_<?php echo $i; ?> .fullwidth .players_wrapper { width:100%; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player { position:relative; display:table; height:auto; min-width:350px; font-size:15px; font-weight:normal; font-family:Roboto, Arial, Helvetica, sans-serif; font-style:normal; line-height:1; user-select:none; -webkit-user-select:none; -moz-user-select:none; -o-user-select:none; -ms-user-select:none; transition:width .3s linear,height .3s linear; } #huge_it_album_video_player_<?php echo $i; ?> .loading { overflow:hidden; } #huge_it_album_video_player_<?php echo $i; ?> .load_icon { position:absolute; display:block; width:100%; height:100%; background:#fff; z-index:15; } #huge_it_album_video_player_<?php echo $i; ?> .load_icon img { width:50px; position:absolute; top:50%; left:50%; margin-left:-40px; margin-top:30px; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_player, #huge_it_album_video_player_<?php echo $i; ?> .playlist_player iframe { position:relative; display:block; width:100%; height:auto; margin:0px; z-index:5; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.poster { overflow:hidden; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullwidth { width:100%; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullscreen { width:100%; transition:none; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullscreen video { width:100%; max-height:100%; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player div[data-title]:hover:after { content: attr(data-title); padding:8px 10px; color: #fff; position: absolute; left:0; bottom: calc(100% + 20px); bottom: -webkit-calc(100% + 20px); bottom: -moz-calc(100% + 20px); bottom: -ms-calc(100% + 20px); bottom: -o-calc(100% + 20px); white-space: nowrap; z-index:6; font-size:12px; background:#444; border-radius:2px; line-height:1; -moz-transition: opacity .1s cubic-bezier(0.0,0.0,0.2,1); -webkit-transition: opacity .1s cubic-bezier(0.0,0.0,0.2,1); transition: opacity .1s cubic-bezier(0.0,0.0,0.2,1); } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_player { position:relative; float:left; display:block; width:100%; height:100%; margin:0px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_player video { position:relative; float:left; display:block; width:100%; height:auto; margin:0px; z-index:5; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .thumbnail_block { position:absolute; display:none; left:0px; top:0px; width:100%; height:100%; overflow:hidden; z-index:10; text-align:center; vertical-align:middle; white-space:nowrap; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.poster .thumbnail_block { display:block; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .thumbnail_block img { position:absolute; left:0px; top:0px; display:block; width:100%; max-height:none; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .thumbnail_block .thumbnail_play { position:absolute; display:block; left:50%; top:50%; margin:-30px 0px 0px -30px; width:60px; height:60px; font-size:58px; line-height:60px; text-align:center; cursor:poiner; transition:transform .5s cubic-bezier(0.0,0.0,0.2,1); cursor:pointer; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .thumbnail_block .thumbnail_play:hover { transform:scale(1.05,1.05); } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_top { position: absolute; top: 0px; left: 0px; width: calc(100% - 30px); width: -webkit-calc(100% - 30px); width: -moz-calc(100% - 30px); width: -o-calc(100% - 30px); width: -ms-calc(100% - 30px); padding: 15px; background:rgba(0,0,0,.1); cursor: pointer; overflow: hidden; z-index:11; webkit-transition: opacity .25s cubic-bezier(0.0,0.0,0.2,1); transition: opacity .25s cubic-bezier(0.0,0.0,0.2,1); } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing .huge_it_video_player_top, #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.hide_controls.playing .huge_it_video_player_top { opacity:0; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing:not(.hide_controls):hover .huge_it_video_player_top { opacity:1; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_top .video_title { color: #fff; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom { position:absolute; display:block; bottom:0px; left:0px; height:50px; width:100%; z-index:6; webkit-transition: opacity .25s cubic-bezier(0.0,0.0,0.2,1); transition: opacity .25s cubic-bezier(0.0,0.0,0.2,1); } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullscreen .huge_it_video_player_bottom { height:80px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing .huge_it_video_player_bottom { opacity:0; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.hide_controls.playing .huge_it_video_player_bottom { opacity:0; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing:not(.hide_controls):hover .huge_it_video_player_bottom { opacity:1; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_duration_slide { position:absolute; left:0px; bottom:30px; display:block; width:100%; height:20px; margin:0px; line-height:1; cursor:pointer; -moz-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); -webkit-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); -ms-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); transition:all .1s cubic-bezier(0.0,0.0,0.2,1); transform-origin:center center; -webkit-transform-origin:center center; -moz-transform-origin:center center; -o-transform-origin:center center; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide { height:30px; bottom:50px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_duration_slide .duration { position:absolute; display:block; bottom:7.5px; left:0px; width:100%; height:5px; z-index:6; -moz-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); -webkit-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); -ms-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); transition:all .1s cubic-bezier(0.0,0.0,0.2,1); transform-origin:center center; -webkit-transform-origin:center center; -moz-transform-origin:center center; -o-transform-origin:center center; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide .duration { bottom:11px; height:8px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_duration_slide .played { position:absolute; display:block; bottom:7.5px; left:0px; width:0px; height:5px; z-index:8; -moz-transition:height .1s cubic-bezier(0.0,0.0,0.2,1); -webkit-transition:height .1s cubic-bezier(0.0,0.0,0.2,1); -ms-transition:height .1s cubic-bezier(0.0,0.0,0.2,1); transition:height .1s cubic-bezier(0.0,0.0,0.2,1); transform-origin:center center; -webkit-transform-origin:center center; -moz-transform-origin:center center; -o-transform-origin:center center; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide .played { bottom:11px; height:8px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_duration_slide .thumb { position:absolute; display:block; bottom:3.5px; left:0px; width:13px; height:13px; margin-left:-6.5px; background:#f12b24; border-radius:6.5px; z-index:9; cursor:pointer; -moz-transition:transform .1s cubic-bezier(0.0,0.0,0.2,1); -webkit-transition:transform .1s cubic-bezier(0.0,0.0,0.2,1); -ms-transition:transform .1s cubic-bezier(0.0,0.0,0.2,1); transition:transform .1s cubic-bezier(0.0,0.0,0.2,1); transform-origin:center center; -webkit-transform-origin:center center; -moz-transform-origin:center center; -o-transform-origin:center center; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide .thumb { bottom:5px; width:20px; height:20px; border-radius:10px; margin-left:-10px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide .thumb { transform:scale(0,0); } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide:hover .thumb { transform:scale(1,1); } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_duration_slide .buffered { position:absolute; display:block; bottom:7.5px; left:0px; width:0px; height:5px; z-index:7; -moz-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); -webkit-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); -ms-transition:all .1s cubic-bezier(0.0,0.0,0.2,1); transition:all .1s cubic-bezier(0.0,0.0,0.2,1); transform-origin:center center; -webkit-transform-origin:center center; -moz-transform-origin:center center; -o-transform-origin:center center; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide .buffered { bottom:11px; height:8px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide .duration, #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide .played, #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide .buffered { bottom:8.5px; height:3px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide .duration, #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide .played, #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide .buffered { bottom:12.5px; height:5px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide:hover .duration, #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide:hover .played, #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing .huge_it_video_player_bottom .huge_it_video_player_duration_slide:hover .buffered { bottom:7.5px; height:5px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide:hover .duration, #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide:hover .played, #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.playing.fullscreen .huge_it_video_player_bottom .huge_it_video_player_duration_slide:hover .buffered { bottom:11px; height:8px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_duration_slide .hover_timer { position: absolute; display:none; left:0; bottom:100%; padding: 5px 9px; max-width: 200px; background:rgba(28,28,28,0.8); border-radius:2px; white-space: nowrap; word-wrap: normal; -o-text-overflow: ellipsis; text-overflow: ellipsis; font-size:11px; line-height:1; color: #fff; z-index:6; -moz-transform: none; -ms-transform: none; -webkit-transform: none; transform: none; -moz-transition:opacity .1s cubic-bezier(0.4,0.0,1,1); -webkit-transition:opacity .1s cubic-bezier(0.4,0.0,1,1); -ms-transition:opacity .1s cubic-bezier(0.4,0.0,1,1); transition:opacity .1s cubic-bezier(0.4,0.0,1,1); -webkit-animation-duration:.1s; -webkit-animation-iteration-count:1; -webkit-animation-timing-function: cubic-bezier(0.4,0.0,1,1); opacity:0; } @-webkit-keyframes opacity { 0% { opacity:0; } 100% { opacity:1; } } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_controls { position:absolute; left:0px; bottom:0px; display:block; width:100%; height:30px; margin:0px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.small .huge_it_video_player_bottom .huge_it_video_player_controls { text-align:center; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullscreen .huge_it_video_player_bottom .huge_it_video_player_controls { height:50px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_controls .control { position:relative; display:inline-block; width:30px; height:30px; margin:0px 0px 0px 5px; font-size:16px; line-height:30px; text-align:center; vertical-align:top; cursor:pointer; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullscreen .huge_it_video_player_bottom .huge_it_video_player_controls .control { width:50px; height:50px; margin:0px 0px 0px 5px; font-size:30px; line-height:50px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_controls .fast_back { } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.small .huge_it_video_player_bottom .huge_it_video_player_controls .fast_back { display:none; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_controls .play_pause { } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.small .huge_it_video_player_bottom .huge_it_video_player_controls .play_pause { float:left; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_controls .fast_forward { } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.small .huge_it_video_player_bottom .huge_it_video_player_controls .fast_forward { display:none; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_controls .mute_button { } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.small .huge_it_video_player_bottom .huge_it_video_player_controls .mute_button { float:left; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.very_small .huge_it_video_player_bottom .huge_it_video_player_controls .mute_button { display:none; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle { position:relative; display:inline-block; width:50px; height:30px; background: none; cursor: pointer; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.small .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle { float:left; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.very_small .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle { display:none; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullscreen .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle { position:relative; display:inline-block; width:100px; height:50px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle .volume_before { position: absolute; top:13.5px; left:0px; height:3px; width:50px; z-index:7; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullscreen .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle .volume_before { top:22.5px; height:5px; width:100px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle .volume_current { position: absolute; top:8.5px; left:50px; height:13px; width: 4px; margin-left:-2px; background: #fff; z-index:8; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullscreen .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle .volume_current { top:15px; height:20px; width:6px; margin-left:-3px; left:100px; width: 4px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle .volume_after { position: absolute; top:13.5px; left:0px; height:3px; width:50px; background:#fff; z-index:6; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullscreen .huge_it_video_player_bottom .huge_it_video_player_controls .volume_handle .volume_after { top:22.5px; height:5px; width:100px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_controls .timer { position:relative; display:inline-block; min-width:50px; height:30px; margin:0px 0px 0px 5px; vertical-align:top; font-size:11px; line-height:30px; font-style:normal; font-weight:normal; text-align:center; cursor:pointer; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.fullscreen .huge_it_video_player_bottom .huge_it_video_player_controls .timer { height:50px; font-size:14px; line-height:50px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_controls .timer .current_time { display:inline-block; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_controls .timer .separator { display:inline-block; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_controls .timer .duration_time { display:inline-block; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_bottom .huge_it_video_player_controls .full_screen { float:right; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player.small .huge_it_video_player_bottom .huge_it_video_player_controls .full_screen { float:right; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_center { text-align:center; font-size:15px; line-height:40px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_center div { position:absolute; display:none; left:50%; top:50%; margin-top:-20px; height:40px; width:40px; margin-left:-20px; background: rgba(0,0,0,.2); border-radius: 100%; text-align:center; transition:all .5s linear; -webkit-animation-duration:.5s; -webkit-animation-iteration-count:1; -webkit-animation-timing-function: linear; z-index:6; opacity:0; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .huge_it_player .huge_it_video_player_center .center_wait { background:transparent; } @-webkit-keyframes popup { 0% { opacity:1; transform:scale(1,1); } 100% { opacity:0; transform:scale(3,3); } } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper { float:left; display:block; width:<?php echo $video_player[0]->width * (2 / 5); ?> px; height:100%; margin:0px; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper h3 { position: relative; float: left; display: block; width: calc(100% - 20px); width: -webkit-calc(100% - 20px); width: -o-calc(100% - 20px); width: -moz-calc(100% - 20px); height: 30px; font-size: 18px; font-style: normal; text-shadow: none; margin: 0px; padding: 10px; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul { position:absolute; display:block; width:<?php echo $video_player[0]->width * (2 / 5); ?> px; top:50px; height:calc(100% - 50px); height:-webkit-calc(100% - 50px); height:-moz-calc(100% - 50px); height:-o-calc(100% - 50px); height:-ms-calc(100% - 50px); margin:0px; padding:0px; list-style-type:none; transition:all .3s linear; overflow:auto; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul::-webkit-scrollbar-track { } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul::-webkit-scrollbar { width: 10px; height: 9px; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul::-webkit-scrollbar-thumb { } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul::-webkit-scrollbar-thumb:hover { } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul li.item { position:relative; float:left; display:block; width:100%; margin:0px; padding:0px; overflow:hidden; list-style-type:none; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul li.item .playlist_button { position:relative; float:left; display:block; width:calc(100% - 20px); width:-webkit-calc(100% - 20px); width:-moz-calc(100% - 20px); width:-o-calc(100% - 20px); width:-ms-calc(100% - 20px); padding:10px; cursor:pointer; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul li.item .playlist_button .thumb { position:relative; float:left; display:block; width:72px; height:54px; overflow:hidden; text-align: center; vertical-align: middle; white-space: nowrap; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul li.item .playlist_button .thumb:before { content:''; display:inline-block; height:100%; vertical-align:middle; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul li.item .playlist_button img { display: inline-block; vertical-align: middle; width: auto; height: auto; max-width: 100%; } #huge_it_album_video_player_<?php echo $i; ?> .playlist_wrapper ul li.item .playlist_button .item_title { position: relative; display: block; float:right; width: calc(100% - 72px); height:54px; font-size:13px; vertical-align:middle; line-height:54px; white-space: nowrap; text-overflow: ellipsis; word-wrap: break-word; text-indent: 15px; cursor: pointer; overflow: hidden; } #huge_it_album_video_player_<?php echo $i; ?> .fullwidth .playlist_wrapper { width:100%; } #huge_it_album_video_player_<?php echo $i; ?> .fullwidth .playlist_wrapper ul { position:relative; top:0px; width:100%; height:300px; margin:0px; } #huge_it_album_video_player_<?php echo $i; ?> .align_bottom .playlist_wrapper { width:100%; } #huge_it_album_video_player_<?php echo $i; ?> .align_bottom .playlist_wrapper ul { position:relative; top:0px; width:100%; height:300px; margin:0px; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .custom_thumb { position: absolute; display: none; left: 0px; top: 0px; width: 100%; height: 100%; overflow: hidden; z-index: 10; text-align: center; vertical-align: middle; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .custom_thumb img.thumb { display:block; position:absolute; top:0px; left:0px; width:100%; max-height:none; } #huge_it_album_video_player_<?php echo $i; ?> .players_wrapper .custom_thumb img.play { position:absolute; top:calc(50% - 24.5px); top:-webkit-calc(50% - 24.5px); top:-moz-calc(50% - 24.5px); top:-o-calc(50% - 24.5px); top:-ms-calc(50% - 24.5px); left:calc(50% - 35px); left:-webkit-calc(50% - 35px); left:-moz-calc(50% - 35px); left:-o-calc(50% - 35px); left:-ms-calc(50% - 35px); width:70px; height:49px; cursor: pointer; } </style> <div id="huge_it_album_video_player_<?php echo $i; ?> " class="loading <?php if ($video_player[0]->layout == "bottom") { echo "align_bottom"; } ?> "> <div class="load_icon"> <img src="<?php echo plugins_url('video-player/images/loading.gif'); ?> " alt="loading" /> </div> <div class="players_wrapper"> <div class="huge_it_player playlist_player"> <div class="huge_it_video_player_player"> <video src="" data-current="--" data-duration="--"> Your browser does not support HTML5 video. </video> </div> <div class="thumbnail_block"> <img src="https://dailypost.files.wordpress.com/2013/08/img_8488.jpg" alt="poster" /> <div class="thumbnail_play"><i class="hugeicons hugeicons-play-circle-o"></i></div> </div> <div class="huge_it_video_player_top"> <div class="video_title">Big Buck Bunny</div> </div> <div class="huge_it_video_player_bottom"> <div class="huge_it_video_player_duration_slide"> <div class="duration"></div> <div class="played"></div> <div class="thumb"></div> <div class="buffered"></div> <div class="hover_timer"> <span class="hover_timer_time">00:00</span> </div> </div> <div class="huge_it_video_player_controls"> <div class="fast_back control" data-title="Fast backward"><i class="hugeicons hugeicons-step-backward"></i></div> <div class="play_pause control" data-title="Play"><i class="hugeicons hugeicons-play"></i></div> <div class="fast_forward control" data-title="Fast forward"><i class="hugeicons hugeicons-step-forward"></i></div> <div class="mute_button control" data-title="Mute"><i class="hugeicons hugeicons-volume-up"></i></div> <div class="volume_handle"> <div class="volume_before"></div> <div class="volume_current"></div> <div class="volume_after"></div> </div> <div class="timer"> <div class="current_time">--</div> <div class="separator"> / </div> <div class="duration_time">--</div> </div> <div class="full_screen control" data-title="Full Screen"><i class="hugeicons hugeicons-expand"></i></div> </div> </div> <div class="huge_it_video_player_center"> <div class="center_play"><i class="hugeicons hugeicons-play"></i></div> <div class="center_pause"><i class="hugeicons hugeicons-pause"></i></div> <div class="center_wait"><i class="hugeicons hugeicons-spinner hugeicons-pulse"></i></div> </div> </div> <div id="youtube_<?php echo $i; ?> _thumb" class="custom_thumb"><img class="thumb" src="<?php echo $videos[0]->image_url; ?> " alt="" /><img class="play" src="<?php echo plugins_url('video-player/images/play.youtube.png'); ?> " alt="youtube play" /></div> <div id="youtube_player_<?php echo $i; ?> " class="playlist_player"></div> <div id="vimeo_<?php echo $i; ?> _thumb" class="custom_thumb"><img class="thumb" src="<?php echo $videos[0]->image_url; ?> " alt="" /><img class="play" src="<?php echo plugins_url('video-player/images/play.vimeo.png'); ?> " alt="vimeo play" /></div> <iframe id="vimeo_<?php echo $i; ?> " class="playlist_player" src="" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> </div> <div class="playlist_wrapper"> <h3><?php echo $video_player[0]->name; ?> </h3> <ul> <?php $j = 0; foreach ($videos as $video) { switch ($video->sl_type) { case "video": ?> <li class="item <?php if ($j == 0) { echo "active"; } ?> " data-item-id="<?php echo $j; ?> " data-type="custom" data-src="<?php echo $video->video_url_1; ?> " data-poster="<?php echo $video->image_url; ?> " data-title="<?php echo $video->name; ?> "> <div class="playlist_button"> <div class="thumb"> <img src="<?php echo $video->image_url; ?> " alt="<?php echo $video->name; ?> " /> </div> <span class="item_title"><?php echo $video->name; ?> </span> </div> </li> <?php break; case "youtube": ?> <li class="item <?php if ($j == 0) { echo "active"; } ?> " data-item-id="<?php echo $j; ?> " data-type="youtube" data-video-id="<?php echo get_youtube_thumb_id_from_url($video->video_url_1); ?> " data-poster="<?php echo $video->image_url; ?> " data-title="<?php echo $video->name; ?> "> <div class="playlist_button"> <div class="thumb"> <img src="<?php echo $video->image_url; ?> " alt="<?php echo $video->name; ?> " /> </div> <span class="item_title"><?php echo $video->name; ?> </span> </div> </li> <?php break; case "vimeo": $vid = $video->video_url_1; $vid = explode("/", $vid); $vidid = end($vid); if ($j == 0) { $autoplay = $video_player[0]->autoplay; } else { $autoplay = 0; } $vidurl = "https://player.vimeo.com/video/" . $vidid . "?player_id=vimeo_player_" . $video->id . "&color=" . $paramssld['video_pl_vimeo_color'] . "&autoplay=" . $autoplay; ?> <li class="item <?php if ($j == 0) { echo "active"; } ?> " data-item-id="<?php echo $j; ?> " data-type="vimeo" data-video-id="<?php echo $vidid; ?> " data-poster="<?php echo $video->image_url; ?> "> <div class="playlist_button"> <div class="thumb"> <img src="<?php echo $video->image_url; ?> " alt="<?php echo $video->name; ?> " /> </div> <span class="item_title"><?php echo $video->name; ?> </span> </div> </li> <?php break; } $j++; } ?> </ul> </div> </div> <?php break; } return ob_get_clean(); }
background:<?php echo hex2RGB($btn['egw_button_options']['print_color']); ?> ; } #print.egw_effect_2:hover span{ -moz-box-shadow: inset 0px 0px 0px 19px <?php echo hex2RGB($btn['egw_button_options']['print_color']); ?> ; -webkit-box-shadow: inset 0px 0px 0px 19px <?php echo hex2RGB($btn['egw_button_options']['print_color']); ?> ; box-shadow: inset 0px 0px 0px 19px <?php echo hex2RGB($btn['egw_button_options']['print_color']); ?> ; } #print.egw_effect_7:hover{ color:<?php echo $btn['egw_button_options']['print_color']; ?> !important; } #print.item_1,#print.item_2,#print.item_3{ background:<?php echo $btn['egw_button_options']['print_color']; ?> ; }
function calc_brightness($color) { $rgb = hex2RGB($color); return sqrt($rgb["red"] * $rgb["red"] * 0.299 + $rgb["green"] * $rgb["green"] * 0.587 + $rgb["blue"] * $rgb["blue"] * 0.114); }
function custom_stylesheet_content() { $ltopmar = ot_get_option('logo_top_margin'); $lbotmar = ot_get_option('logo_bottom_margin'); $taglinemar = ot_get_option('tagline_margin'); $logofont = ot_get_option('incr_logo_typo', array()); $bodytypo = ot_get_option('centum_body_font'); $menutypo = ot_get_option('centum_menu_font'); $logotypo = ot_get_option('centum_logo_font'); $headerstypo = ot_get_option('centum_headers_font'); global $post; ?> <style type="text/css"> body { <?php phantom_generate_typo_css($bodytypo); ?> } h1, h2, h3, h4, h5, h6 { <?php phantom_generate_typo_css($headerstypo); ?> } h2.logo a, h1.logo a { <?php phantom_generate_typo_css($logotypo); ?> } #navigation ul li a { <?php phantom_generate_typo_css($menutypo); ?> } #logo { <?php if (isset($ltopmar[0]) && $ltopmar[1]) { echo 'margin-top:' . $ltopmar[0] . $ltopmar[1] . ';'; } ?> <?php if (isset($lbotmar[0]) && $lbotmar[1]) { echo 'margin-bottom:' . $lbotmar[0] . $lbotmar[1] . ';'; } ?> } #tagline { <?php if (isset($taglinemar[0]) && $taglinemar[1]) { echo 'margin-top:' . $taglinemar[0] . $taglinemar[1] . ';'; } ?> } #header { min-height: <?php echo ot_get_option('centum_minhh', '100'); ?> px; } <?php if (ot_get_option('centum_blog_icons') == "disable") { ?> .post-icon { display: none; } .post-content { margin: 22px 0 0; } <?php } if (ot_get_option('color_on') == "yes") { ?> #footer { background: <?php echo ot_get_option('f_color'); ?> ; color: <?php echo ot_get_option('f_text_color'); ?> ; } #footer-bottom { background: <?php echo ot_get_option('bgf_color'); ?> ; color: <?php echo ot_get_option('bgf_text_color'); ?> ; } #footer h5 { border-bottom: 1px solid <?php echo ot_get_option('f_header_border_color'); ?> ; color: <?php echo ot_get_option('f_header_color'); ?> ; } <?php } ?> <?php if (ot_get_option('incr_logofonts_on') == "yes") { ?> h2.logo, h1.logo { font-family: <?php echo str_replace("+", " ", $logofont['font-family']); ?> ; } h2.logo a, h1.logo a { color: <?php echo $logofont['font-color']; ?> ; font-family: <?php echo str_replace("+", " ", $logofont['font-family']); ?> ; font-style: <?php echo $logofont['font-style']; ?> ; font-variant: <?php echo $logofont['font-variant']; ?> ; font-weight: <?php echo $logofont['font-weight']; ?> ; font-size: <?php echo $logofont['font-size']; ?> ; } <?php } if (ot_get_option('incr_main_color') != '#2da0ce') { ?> #backtotop a:hover,.feature-circle.blue,.prev:hover, .next:hover,.mr-rotato-prev:hover, .mr-rotato-next:hover,.flex-direction-nav a:hover, .post .flex-direction-nav a:hover, .project .flex-direction-nav a:hover { background-color: <?php echo ot_get_option('incr_main_color'); ?> ; } <?php } if (ot_get_option('incr_menuborder_color') != '#555555') { ?> <?php } if (ot_get_option('incr_headers_color') != '#444444') { ?> h1, h2, h3, h4, h5, h6 { color: <?php echo ot_get_option('incr_headers_color'); ?> } <?php } if (ot_get_option('incr_linkhover_color') != '#888888') { ?> a:hover, a:focus { color: <?php echo ot_get_option('incr_linkhover_color'); ?> ; } <?php } if (ot_get_option('incr_link_color') != '#3f8faf') { ?> a, a:visited { color: <?php echo ot_get_option('incr_link_color'); ?> ; } <?php } $bodysize = ot_get_option('incr_body_size'); if ($bodysize) { ?> body { font-size: <?php echo $bodysize[0] . $bodysize[1]; ?> } <?php } $custom_main_color = get_theme_mod('centum_main_color', '#72b626'); ?> #navigation ul li a:hover, #navigation ul li:hover > a, #bolded-line, .button.gray:hover, .button.light:hover, .price_slider_wrapper .ui-slider-horizontal .ui-slider-range, .button.color, .onsale, input[type="submit"] { background: <?php echo $custom_main_color; ?> ; } .blog-sidebar .widget #twitter-blog li a, a, a:hover, .testimonials-author, .shop-item span.price, a.post-entry { color: <?php echo $custom_main_color; ?> } #navigation > div > ul > li.current-menu-item > a, .pricing-table .color-3 h3, .color-3 .sign-up, .flex-direction-nav .flex-prev:hover, .flex-direction-nav .flex-next:hover, .slider .tp-leftarrow:hover, .slider .tp-rightarrow:hover, #scroll-top-top a, .quantity .plus:hover,#content .quantity .plus:hover,.quantity .minus:hover,#content .quantity .minus:hover, .post-icon { background-color:<?php echo $custom_main_color; ?> ; } .mr-rotato-prev:hover, .mr-rotato-next:hover, li.current, .tagcloud a:hover { background-color: <?php echo $custom_main_color; ?> ; border-color: <?php echo $custom_main_color; ?> ; } #filters a:hover, .selected, .wp-pagenavi .current, .pagination .current, #portfolio-navi a:hover { background-color: <?php echo $custom_main_color; ?> !important; border: 1px solid <?php echo $custom_main_color; ?> !important; } .pricing-table .color-3 h4 { background-color:<?php echo $custom_main_color; ?> ; opacity:0.8 } <?php $custom_overlay_color = get_theme_mod('centum_overlay_color', '#000000'); $custom_overlay_opacity = get_theme_mod('centum_overlay_opacity', '0.7'); ?> .image-overlay-link, .image-overlay-zoom { background-color: rgba(<?php echo hex2RGB($custom_overlay_color, true); ?> ,<?php echo $custom_overlay_opacity; ?> ); } <?php $custom_menu_bg = get_theme_mod('centum_nav_bg', '#303030'); if ($custom_menu_bg != '#303030') { ?> #navigation ul li a { background: none; } #navigation { background-color:<?php echo $custom_menu_bg; ?> ; } <?php } ?> <?php $custom_footer_bg = get_theme_mod('centum_footer_bg', '#303030'); if ($custom_footer_bg != '#303030') { ?> #footer { background: <?php echo $custom_footer_bg; ?> ; } #footer .headline, .footer-headline { background: none } #footer .headline h4, .footer-headline h4 { background-color: <?php echo $custom_footer_bg; ?> ; } #footer-bottom { border-top: 0px; } <?php } ?> <?php echo ot_get_option('incr_custom_css'); ?> </style> <?php }
function RADStyler() { global $post, $ioa_meta_data, $radunits; if (!is_singular()) { return; } $styler_code = ''; $responsive_view = array('Screen' => array('el' => array(), 'query' => '@media (min-width:1024px)'), 'iPad Horizontal' => array('el' => array(), 'query' => '@media (min-width: 768px) and (max-width: 1024px)'), 'iPad Vertical & Small Tablets' => array('el' => array(), 'query' => '@media only screen and (min-width: 768px) and (max-width: 979px)'), 'Mobile Landscape' => array('el' => array(), 'query' => '@media only screen and (min-width: 480px) and (max-width: 767px) '), 'Mobile Potrait' => array('el' => array(), 'query' => ' @media only screen and (max-width: 479px)')); $rad_styles = get_post_meta(get_the_ID(), '_style_keys', true); if (get_post_meta($post->ID, '_style_keys', true) == "" && is_array($ioa_meta_data['rad_data'])) { $this->RADBaseStyler(); return; } $rad_styles = json_decode(urldecode(str_replace('[p]', '%', $rad_styles)), true); if ($rad_styles != "") { foreach ($rad_styles as $k => $element) { switch ($element['key']) { case 'rad_page_section': $sc = ''; $d = array(); if (isset($element['data'])) { $d = $element['data']; } $d = $this->getAssocMap($d, 'value'); if (isset($d['visibility'])) { $view_test = explode(';', $d['visibility']); foreach ($view_test as $key => $pkey) { if (isset($responsive_view[$pkey])) { $responsive_view[$pkey]['el'][] = '#' . $k; } } } if (isset($d['ov_use']) && $d['ov_use'] == "yes") { $ov = ''; $styler_code .= "#" . $k . " .section-overlay{ "; $styler_code .= "opacity:" . intval($d['ov_opacity']) / 100 . ";"; $styler_code .= "background:url(" . $d['ov_background_image'] . ") " . $d['ov_background_position'] . " " . $d['ov_background_repeat'] . " " . $d['ov_background_attachment'] . " " . $d['ov_background_color'] . ";;background-size:" . $d['ov_background_cover'] . " "; if ($d['ov_use_gradient_dir'] == 'yes') { $iefix = 0; $dir_gr = 'top'; $end_gr = $d['ov_end_gr']; $start_gr = $d['ov_start_gr']; switch ($d['ov_background_gradient_dir']) { case "vertical": $dir_gr = "top"; break; case "horizontal": $dir_gr = "left"; $iefix = 1; break; case "diagonaltl": $dir_gr = "45deg"; $iefix = 1; break; case "diagonalbr": $dir_gr = "-45deg"; $iefix = 1; break; } $styler_code .= "background:{$start_gr};background: -webkit-gradient(" . $dir_gr . ", 0% 0%, 0% 100%, from(" . $end_gr . "), to(" . $start_gr . "));background: -webkit-linear-gradient(" . $dir_gr . ", " . $start_gr . ", " . $end_gr . ");background: -moz-linear-gradient(" . $dir_gr . ", " . $start_gr . ", " . $end_gr . ");background: -ms-linear-gradient(" . $dir_gr . ", " . $start_gr . ", " . $end_gr . ");background: -o-linear-gradient(" . $dir_gr . ", " . $start_gr . ", " . $end_gr . ");filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='" . $start_gr . "', endColorstr='" . $end_gr . "',GradientType=" . $iefix . " );"; } $styler_code .= "}"; } if (isset($d['v_padding_top']) && $d['v_padding_top'] != "" && $d['v_padding_top'] != "0") { $sc = "padding-top: " . $d['v_padding_top'] . "px;"; } if (isset($d['v_padding']) && $d['v_padding'] != "" && $d['v_padding'] != "0") { $sc = "padding: " . $d['v_padding'] . "px 0px;"; } if (isset($d['v_padding_bottom']) && $d['v_padding_bottom'] != "" && $d['v_padding_bottom'] != "0") { $sc .= "padding-bottom: " . $d['v_padding_bottom'] . "px;"; } if (isset($d['background_opts'])) { switch ($d['background_opts']) { case 'bg-color': $rgb = hex2RGB($d['background_color']); if (isset($d['bg_opacity']) && $d['bg_opacity'] != "") { $op = $d['bg_opacity']; if ($op == "") { $op = 100; } $op = $op / 100; $sc .= "background:rgba(" . $rgb['red'] . "," . $rgb['green'] . "," . $rgb['blue'] . "," . $op . ");"; } else { $sc .= "background:rgb(" . $rgb['red'] . "," . $rgb['green'] . "," . $rgb['blue'] . ");"; } break; case 'bg-image': $sc .= "background:url(" . $d['background_image'] . ") top left " . $d['background_attachment'] . ";background-size:cover;"; break; case 'parallax': $sc .= "background:url(" . $d['background_image'] . ") top center fixed;background-size:cover;"; break; case 'bg-texture': $sc .= "background:url(" . $d['background_image'] . ") " . $d['background_position'] . " " . $d['background_repeat'] . " " . $d['background_attachment'] . ";"; break; case 'custom': $sc .= "background-color:" . $d['background_color'] . ";background:url(" . $d['background_image'] . ") " . $d['background_position'] . " " . $d['background_repeat'] . " " . $d['background_attachment'] . ";background-size:" . $d['background_cover'] . ";"; break; case 'bg-gr': $iefix = 0; $dir_gr = 'top'; $end_gr = $d['end_gr']; $start_gr = $d['start_gr']; switch ($d['background_gradient_dir']) { case "vertical": $dir_gr = "top"; break; case "horizontal": $dir_gr = "left"; $iefix = 1; break; case "diagonaltl": $dir_gr = "45deg"; $iefix = 1; break; case "diagonalbr": $dir_gr = "-45deg"; $iefix = 1; break; } $code = "background:{$start_gr};background: -webkit-gradient(" . $dir_gr . ", 0% 0%, 0% 100%, from(" . $end_gr . "), to(" . $start_gr . "));background: -webkit-linear-gradient(" . $dir_gr . ", " . $start_gr . ", " . $end_gr . ");background: -moz-linear-gradient(" . $dir_gr . ", " . $start_gr . ", " . $end_gr . ");background: -ms-linear-gradient(" . $dir_gr . ", " . $start_gr . ", " . $end_gr . ");background: -o-linear-gradient(" . $dir_gr . ", " . $start_gr . ", " . $end_gr . ");filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='" . $start_gr . "', endColorstr='" . $end_gr . "',GradientType=" . $iefix . " );"; $sc .= $code; break; } } if (isset($d['border_top_width']) && $d['border_top_width'] != "" && $d['border_top_width'] != "0") { $op = 1; if (isset($d['border_top_opacity'])) { $op = $d['border_top_opacity'] / 100; } $rgb = hex2RGB($d['border_top_color']); $color = "rgba(" . $rgb['red'] . "," . $rgb['green'] . "," . $rgb['blue'] . "," . $op . ")"; $sc .= "border-top:" . $d['border_top_width'] . "px " . $d['border_top_type'] . " " . $color . ";"; } if (isset($d['border_bottom_width']) && $d['border_bottom_width'] != "" && $d['border_bottom_width'] != "0") { $op = 1; if (isset($d['border_bottom_opacity'])) { $op = $d['border_bottom_opacity'] / 100; } $rgb = hex2RGB($d['border_bottom_color']); $color = "rgba(" . $rgb['red'] . "," . $rgb['green'] . "," . $rgb['blue'] . "," . $op . ")"; $sc .= "border-bottom:" . $d['border_bottom_width'] . "px " . $d['border_bottom_type'] . " " . $color . ";"; } if (trim($sc) != "") { $styler_code .= "#" . $k . "{ {$sc} }"; } break; case 'rad_page_container': $sc = ''; $c = $element['data']; $c = $this->getAssocMap($c, 'value'); if (isset($c['background_opts'])) { switch ($c['background_opts']) { case 'bg-color': $rgb = hex2RGB($c['background_color']); $op = $c['background_opacity']; if ($op == "") { $op = 1; } $sc .= "background:rgba(" . $rgb['red'] . "," . $rgb['green'] . "," . $rgb['blue'] . "," . $op . ");"; break; case 'bg-image': $sc .= "background:url(" . $c['background_image'] . ") top left " . $c['background_attachment'] . ";background-size:cover;"; break; case 'bg-texture': $sc .= "background:url(" . $c['background_image'] . ") " . $c['background_position'] . " " . $c['background_repeat'] . " " . $c['background_attachment'] . ";"; break; case 'custom': $sc .= "background-color:" . $c['background_color'] . ";background:url(" . $c['background_image'] . ") " . $c['background_position'] . " " . $c['background_repeat'] . " " . $c['background_attachment'] . ";background-size:" . $c['background_cover'] . ";"; break; case 'bg-gr': $iefix = 0; $dir_gr = 'top'; $end_gr = $c['end_gr']; $start_gr = $c['start_gr']; switch ($c['background_gradient_dir']) { case "vertical": $dir_gr = "top"; break; case "horizontal": $dir_gr = "left"; $iefix = 1; break; case "diagonaltl": $dir_gr = "45deg"; $iefix = 1; break; case "diagonalbr": $dir_gr = "-45deg"; $iefix = 1; break; } $code = "background:{$start_gr};background: -webkit-gradient(" . $dir_gr . ", 0% 0%, 0% 100%, from(" . $end_gr . "), to(" . $start_gr . "));background: -webkit-linear-gradient(" . $dir_gr . ", " . $start_gr . ", " . $end_gr . ");background: -moz-linear-gradient(" . $dir_gr . ", " . $start_gr . ", " . $end_gr . ");background: -ms-linear-gradient(" . $dir_gr . ", " . $start_gr . ", " . $end_gr . ");background: -o-linear-gradient(" . $dir_gr . ", " . $start_gr . ", " . $end_gr . ");filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='" . $start_gr . "', endColorstr='" . $end_gr . "',GradientType=" . $iefix . " );"; $sc .= $code; break; } } if (isset($c['border_top_width']) && $c['border_top_width'] != "" && $c['border_top_width'] != "0") { $sc .= "border-top:" . $c['border_top_width'] . "px " . $c['border_top_type'] . " " . $c['border_top_color'] . ";"; } if (isset($c['border_bottom_width']) && $c['border_bottom_width'] != "" && $c['border_bottom_width'] != "0") { $sc .= "border-bottom:" . $c['border_bottom_width'] . "px " . $c['border_bottom_type'] . " " . $c['border_bottom_color'] . ";"; } if (isset($c['use_margin']) && $c['use_margin'] == 'yes' && $c['margin_top'] != "" && $c['margin_top'] != "0") { $sc .= "margin-top:" . $c['margin_top'] . "px;"; } if (isset($c['use_margin']) && $c['use_margin'] == 'yes' && $c['margin_bottom'] != "" && $c['margin_bottom'] != "0") { $sc .= "margin-bottom:" . $c['margin_bottom'] . "px;"; } if (trim($sc) != "") { $styler_code .= "#" . $k . "{ {$sc} } "; } $view_test = array(); if (isset($c['visibility'])) { $view_test = explode(';', $c['visibility']); foreach ($view_test as $key => $pkey) { if (isset($responsive_view[$pkey])) { $responsive_view[$pkey]['el'][] = '#' . $k; } } } break; default: $widget_data = $element['data']; $widget_data = $this->getAssocMap($widget_data, 'value'); $keys = $radunits[str_replace('-', '_', $element['key'])]->getStyleKeys(); foreach ($keys as $key => $field) { if (isset($widget_data[$field['name']]) && trim($widget_data[$field['name']]) != "") { $v = $widget_data[$field['name']]; $d = $field['data']; if ($field['type'] == 'slider') { $v .= $field['suffix']; } if ($v != "" || $v != "0" || $v != "0px") { $styler_code .= ' #' . $k . ' ' . $d['target'] . ' { ' . $d['property'] . ' : ' . $v . ' }'; } if (isset($d['extra_cl'])) { foreach ($d['extra_cl'] as $key => $value) { $styler_code .= ' #' . $k . ' ' . $key . ' { ' . $value . ' : ' . $v . '!important }'; } } } } break; } } } $page_css = get_post_meta(get_the_ID(), 'rad_custom_css', true); $styler_code .= " " . $page_css; foreach ($responsive_view as $view) { $styler_code .= " " . $view['query'] . " { " . join(',', $view['el']) . " { display:none; } } "; } echo "<style type='text/css' id='rad_styler'> {$styler_code} </style>"; }
$captchaOptions['width'] = min($captchaOptions['width'], 300); $captchaOptions['width'] = max($captchaOptions['width'], 20); } else { $captchaOptions['width'] = 190; } if (array_key_exists('height', $captchaOptions)) { $captchaOptions['height'] = abs(intval($captchaOptions['height'])); $captchaOptions['height'] = min($captchaOptions['height'], 300); $captchaOptions['height'] = max($captchaOptions['height'], 10); } else { $captchaOptions['height'] = 60; } if (!array_key_exists('bgColour', $captchaOptions) || ($captchaOptions['bgColour'] = hex2RGB($captchaOptions['bgColour'])) === false) { $captchaOptions['bgColour'] = array('red' => 255, 'green' => 255, 'blue' => 255); } if (!array_key_exists('textColour', $captchaOptions) || ($captchaOptions['textColour'] = hex2RGB($captchaOptions['textColour'])) === false) { $captchaOptions['textColour'] = array('red' => 10, 'green' => 10, 'blue' => 10); } if (array_key_exists('font', $captchaOptions) && file_exists(IPHORM_INCLUDES_DIR . '/fonts/' . $captchaOptions['font'])) { $captchaOptions['font'] = IPHORM_INCLUDES_DIR . '/fonts/' . $captchaOptions['font']; } else { $captchaOptions['font'] = IPHORM_INCLUDES_DIR . '/fonts/Typist.ttf'; } if (array_key_exists('minFontSize', $captchaOptions)) { $captchaOptions['minFontSize'] = abs(intval($captchaOptions['minFontSize'])); $captchaOptions['minFontSize'] = min($captchaOptions['minFontSize'], 72); $captchaOptions['minFontSize'] = max($captchaOptions['minFontSize'], 5); } else { $captchaOptions['minFontSize'] = 15; } if (array_key_exists('maxFontSize', $captchaOptions)) {
input[type="color"]:focus, .uneditable-input:focus { border-color: rgba(<?php print hex2RGB(theme_get_setting('theme_color_scheme'), true); ?> , 0.8); -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(<?php print hex2RGB($color, true); ?> , 0.6); -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(<?php print hex2RGB($color, true); ?> , 0.6); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(<?php print hex2RGB($color, true); ?> , 0.6); } .bar .foreground, .node-product .product-title{ background: <?php print $color; ?> ; /* Old browsers */ /* IE9 SVG, needs conditional override of 'filter' to 'none' */ background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ViN2MxMiIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNlZjk2NDEiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); background: -moz-linear-gradient(top, <?php print $lightestColor; ?> 0%, <?php
function custom_stylesheet_content() { $ltopmar = ot_get_option('pp_logo_top_margin'); $ltopmarsticky = ot_get_option('pp_logo_top_margin_sticky'); $lbotmar = ot_get_option('pp_logo_bottom_margin'); $taglinemar = ot_get_option('pp_tagline_margin'); $logofont = ot_get_option('pp_logo_typo', array()); global $post; global $google_array; ?> <style type="text/css"> #header { height: <?php echo ot_get_option('pp_header_height', 86); ?> px; } <?php if (ot_get_option('pp_fonts_on') == 'yes') { ?> body { font-family: '<?php echo str_replace("+", " ", ot_get_option('pp_body_font')); ?> ', Helvetica, Arial, sans-serif; } #content h1, h2, h3, h4, h5, h6 { font-family: '<?php echo str_replace("+", " ", ot_get_option('pp_h_font')); ?> '; } <?php $bodysize = ot_get_option('pp_body_size'); if ($bodysize) { ?> body { font-size: <?php echo $bodysize[0] . $bodysize[1]; ?> } <?php } } ?> #logo { <?php if (isset($ltopmar[0]) && $ltopmar[1]) { echo 'margin-top:' . $ltopmar[0] . $ltopmar[1] . ';'; } ?> <?php if (isset($lbotmar[0]) && $lbotmar[1]) { echo 'margin-bottom:' . $lbotmar[0] . $lbotmar[1] . ';'; } ?> } .compact #logo { <?php if (isset($ltopmar[0]) && $ltopmar[1]) { echo 'margin-top:' . $ltopmarsticky[0] . $ltopmarsticky[1] . ';'; } ?> } #tagline { <?php if (isset($taglinemar[0]) && $taglinemar[1]) { echo 'margin-top:' . $taglinemar[0] . $taglinemar[1] . ';'; } ?> } <?php if (ot_get_option('pp_logofonts_on') == "yes") { ?> #logo h2 a, #logo h1 a { font-family: <?php echo str_replace("+", " ", $logofont['font-family']); ?> ; } #logo h2 a, #logo h1 a { color: <?php echo $logofont['font-color']; ?> ; font-family: <?php echo str_replace("+", " ", $logofont['font-family']); ?> ; font-style: <?php echo $logofont['font-style']; ?> ; font-variant: <?php echo $logofont['font-variant']; ?> ; font-weight: <?php echo $logofont['font-weight']; ?> ; font-size: <?php echo $logofont['font-size']; ?> ; } <?php } $custom_main_color = get_theme_mod('astrum_main_color', '#73b819'); $custom_rgb = hex2RGB($custom_main_color); if ($custom_rgb) { $red = $custom_rgb['red']; $green = $custom_rgb['green']; $blue = $custom_rgb['blue']; } ?> a,a:visited,#not-found i,.comment-by span.reply a:hover,.comment-by span.reply a:hover i,.categories a:hover,.testimonials-author,.happy-clients-author,.dropcap,.meta ul li a:hover,.list-1 li:before,.list-2 li:before,.list-3 li:before,.list-4 li:before, .widget li.current_page_item a, a.twitter-link, .widget li.twitter-item a {color:<?php echo $custom_main_color; ?> } #astrum_header_cart ul li img:hover, ul.product_list_widget li img:hover, .menu > ul > li.current-menu-item > a, .menu ul li.current-menu-ancestor > a,#current,.menu ul li a:hover,.menu ul > li:hover > a,.flickr-widget-blog a:hover,#footer .flickr-widget-blog a:hover, .widget .flickr-widget-blog li a:hover {border-color:<?php echo $custom_main_color; ?> } .menu ul ul {border-top-color:<?php echo $custom_main_color; ?> } #filters a:hover,.selected, ul.product_list_widget li img:hover, #astrum_header_cart ul li img:hover, .quantity.buttons_added .plus:hover, .quantity.buttons_added .minus:hover {background-color:<?php echo $custom_main_color; ?> !important} .premium .plan-price,.premium .plan-features a.button:hover, .cart_contents, .price_slider_wrapper .button:hover {background-color:<?php echo $custom_main_color; ?> } .featured-box:hover > .circle-2,.featured-box:hover > .circle-3 {box-shadow:0 0 0 8px rgba(<?php echo $red; ?> ,<?php echo $green; ?> ,<?php echo $blue; ?> ,0.3)} .menu > ul > li.current-menu-item > a:after, .current-menu-ancestor > a:after,.wp-pagenavi .current, .pagination .current,.pagination a:hover, .wp-pagenavi a:hover, .tagcloud a:hover,.button.gray:hover,.button.light:hover,.button.color,input[type=button],input[type=submit],input[type=button]:focus,input[type=submit]:focus, #footer .tabs-nav li.active a, .tabs-nav li.active a,.ui-accordion .ui-accordion-header-active:hover,.ui-accordion .ui-accordion-header-active,.trigger.active a,.trigger.active a:hover,.skill-bar-value,.highlight.color,.notice-box:hover {background:<?php echo $custom_main_color; ?> } .price_slider_wrapper .ui-widget-header,span.onsale, .tp-leftarrow:hover,.tp-rightarrow:hover,.flexslider .flex-next:hover,.flexslider .flex-prev:hover,.featured-box:hover > .circle,.featured-box:hover > .circle span,.featured-box:hover > .circle-2,.featured-box:hover > .circle-3,.portfolio-item:hover > figure > a .item-description,.sb-navigation-left:hover,.sb-navigation-right:hover,.widget_ns_mailchimp input.button, .newsletter-btn,.search-btn,.premium.plan h3,.premium .plan-features a.button,.pagination ul li a:hover {background-color:<?php echo $custom_main_color; ?> } <?php echo ot_get_option('pp_custom_css'); ?> </style> <?php // .bypostauthor > .comment > .comment-des { // border-bottom: 1px solid <?php echo $custom_main_color; // } }
function registerLineValue($atts, $content) { global $helper; extract(shortcode_atts(array("background" => "rgba(220,220,220,0.5)", "strokecolor" => "rgba(220,220,220,1)", "pointcolor" => "rgba(220,220,220,1)", "pointstrokecolor" => "#ffffff", "data" => "65,59,90,81,56,55"), $atts)); $lines = do_shortcode($content); $b = hex2RGB($background); $line = "<div class='line-val' data-fillcolor='rgba(" . $b['red'] . "," . $b['green'] . "," . $b['blue'] . ",0.75)' data-strokecolor='{$strokecolor}' data-pointcolor='{$pointcolor}' data-pointstrokecolor='{$pointstrokecolor}' data-values='{$data}' itemprop='spatial'>{$data}</div>"; return filterShortcodesP($line); }
$fpg_text_inset_dropshadow_color = 'rgba(' . hex2RGB($fpg_text_inset_dropshadow_color, true) . ',' . $fpg_text_inset_dropshadow_alpha . ')'; $fpg_item_text_color = "#" . $fpg_item_text_color; $fpg_item_excerpt_color = "#" . $fpg_item_excerpt_color; $fpg_images_bg_color = "#" . $fpg_images_bg_color; $fpg_inner_border_color = "#" . $fpg_inner_border_color; $fpg_item_author_color = "#" . $fpg_item_author_color; $fpg_item_date_color = "#" . $fpg_item_date_color; $fpg_text_border_top_color = "#" . $fpg_text_border_top_color; $fpg_text_border_bottom_color = "#" . $fpg_text_border_bottom_color; $fpg_text_border_left_color = "#" . $fpg_text_border_left_color; $fpg_text_border_right_color = "#" . $fpg_text_border_right_color; $fpg_item_border_top_color = "#" . $fpg_item_border_top_color; $fpg_item_border_bottom_color = "#" . $fpg_item_border_bottom_color; $fpg_item_border_left_color = "#" . $fpg_item_border_left_color; $fpg_item_border_right_color = "#" . $fpg_item_border_right_color; $fpg_item_text_bg_color_rgba = 'rgba(' . hex2RGB($fpg_item_text_bg_color, true) . ',' . $fpg_item_text_bg_alpha . ')'; $fpg_item_text_bg_color_hex = "#" . $fpg_item_text_bg_color; // Define box shadow if ($fpg_item_dropshadow_enable == '1') { $cell_shadow = $fpg_item_dropshadow_x . 'px ' . $fpg_item_dropshadow_y . 'px ' . $fpg_item_dropshadow_blur . 'px ' . $fpg_item_dropshadow_spread . 'px ' . $fpg_item_dropshadow_color; $cell_shadow_hover = $fpg_item_dropshadow_hover_x . 'px ' . $fpg_item_dropshadow_hover_y . 'px ' . $fpg_item_dropshadow_hover_blur . 'px ' . $fpg_item_dropshadow_hover_spread . 'px ' . $fpg_item_dropshadow_hover_color; } if ($fpg_text_dropshadow_enable == '1') { $text_shadow .= $fpg_text_dropshadow_x . 'px ' . $fpg_text_dropshadow_y . 'px ' . $fpg_text_dropshadow_blur . 'px ' . $fpg_text_dropshadow_spread . 'px ' . $fpg_text_dropshadow_color; if ($fpg_text_inset_dropshadow_enable == '1') { $text_shadow .= ', '; } } if ($fpg_text_inset_dropshadow_enable == '1') { $text_shadow .= $fpg_text_inset_dropshadow_x . 'px ' . $fpg_text_inset_dropshadow_y . 'px ' . $fpg_text_inset_dropshadow_blur . 'px ' . $fpg_text_inset_dropshadow_spread . 'px ' . $fpg_text_inset_dropshadow_color . ' inset'; }
function nature_css_colors() { $y = preg_replace("/[^a-zA-Z0-9]/", "", get_theme_mod('nature_link_color')); //remove # from color $x = hex2RGB($y); // convert hexadecimal to rgb color $n = preg_replace("/[^a-zA-Z0-9]/", "", get_theme_mod('nature_link_color_menu')); //remove # from color $m = hex2RGB($n); // convert hexadecimal to rgb color $top_bg = get_theme_mod('nature_top_menu_bg_color'); ?> <style type="text/css"> body { background-color: <?php echo get_theme_mod('nature_background_color'); ?> ; } a { color: <?php echo get_theme_mod('nature_link_color'); ?> ; } /* menu styles */ .navbar-default .navbar-nav>.active>a { background-color:rgba(<?php echo $x['r'] . ',' . $x['g'] . ',' . $x['b']; ?> ,0.01); color: <?php echo get_theme_mod('nature_link_color'); ?> ; color: <?php echo get_theme_mod('nature_link_color_menu'); ?> ; } .navbar-default .navbar-nav>li>a:hover, .navbar-default .navbar-nav>li>a:active{ color: <?php echo get_theme_mod('nature_link_color'); ?> ; color: <?php echo get_theme_mod('nature_link_color_menu'); ?> ; } .navbar-side-logo i{ color: <?php echo get_theme_mod('nature_link_color'); ?> ; color: <?php echo get_theme_mod('nature_link_color_menu'); ?> ; } div.navbar-brand.logo-nature a h2 { color: #fff; color: <?php echo get_theme_mod('nature_link_color'); ?> } .navbar-default, .navbar-default .navbar-nav>.active>a:focus, .navbar-default .navbar-nav>.active>a:hover, .shrink .navbar-default { background-color: <?php echo $top_bg; ?> ; color: <?php echo get_theme_mod('nature_link_color'); ?> ; <?php if (get_theme_mod('nature_solid_color') == 'yes') { echo 'background-image: none;'; } ?> } .navbar-default .navbar-toggle { border-color: <?php echo get_theme_mod('nature_link_color_menu'); ?> ; } .navbar-default .navbar-toggle .icon-bar { background-color: <?php echo get_theme_mod('nature_link_color_menu'); ?> ; } .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { background-color: rgba(<?php echo $m['r'] . ',' . $m['g'] . ',' . $m['b']; ?> ,0.8); } /* dropdown */ .navbar-default .navbar-nav>li>a, .dropdown-menu>li>a { color: <?php echo get_theme_mod('nature_link_color_menu_primary'); ?> ; } .dropdown-menu>.active>a, .dropdown-menu>.active>a:hover, .dropdown-menu>.active>a:focus { background: <?php echo get_theme_mod('nature_link_color'); ?> ; background: <?php echo get_theme_mod('nature_link_color_menu'); ?> ; } .dropdown-menu>li>a:hover{ background-color: <?php echo get_theme_mod('nature_link_color'); ?> ; background-color:rgba(<?php echo $x['r'] . ',' . $x['g'] . ',' . $x['b']; ?> ,0.8); background-color: <?php echo get_theme_mod('nature_link_color_menu'); ?> ; background-color:rgba(<?php echo $m['r'] . ',' . $m['g'] . ',' . $m['b']; ?> ,0.8); } .navbar-nav>li>.dropdown-menu{ border-top: 2px <?php echo get_theme_mod('nature_link_color'); ?> solid; border-top: 2px <?php echo get_theme_mod('nature_link_color_menu'); ?> solid; <?php if (get_theme_mod('nature_solid_color') == 'yes') { ?> background-image: none; background-color:<?php echo $top_bg; ?> <?php } ?> } <?php if (of_get_option('option_stylesheet') == get_stylesheet_directory_uri() . '/css/style-light.css') { ?> /* pagination */ .pagination>li>a, .pagination>li>span { color: <?php echo get_theme_mod('nature_link_color'); ?> ; } <?php } ?> /* buttons and progress bar */ .ghost-dark:hover, .ghost-dark:focus { background:#FFF; color:<?php echo get_theme_mod('nature_link_color'); ?> ; border:1px solid <?php echo get_theme_mod('nature_link_color'); ?> ; } .white a { color: <?php echo get_theme_mod('nature_link_color'); ?> ; } .ghost-color { border:1px solid <?php echo get_theme_mod('nature_link_color'); ?> ; color:<?php echo get_theme_mod('nature_link_color'); ?> ; } .ghost-color:hover, .ghost-color:focus{ background:<?php echo get_theme_mod('nature_link_color'); ?> ; } .solid-color { background:<?php echo get_theme_mod('nature_link_color'); ?> ; } .solid-color:hover, .solid-color:focus{ border:1px solid <?php echo get_theme_mod('nature_link_color'); ?> ; color:<?php echo get_theme_mod('nature_link_color'); ?> ; } .ghost-white-search:hover, .ghost-white-search:focus{ color:<?php echo get_theme_mod('nature_link_color'); ?> ; } .progress-bar-nature { background-color: <?php echo get_theme_mod('nature_link_color'); ?> ; } .panel-default>.panel-heading { background-color: <?php echo get_theme_mod('nature_link_color'); ?> ; border-color: <?php echo get_theme_mod('nature_link_color'); ?> ; } /* menu Mobile */ .navbar-default .navbar-toggle { border-color: <?php echo get_theme_mod('nature_link_color'); ?> ; } .navbar-default .navbar-toggle .icon-bar { background-color: <?php echo get_theme_mod('nature_link_color'); ?> ; } .navbar-default .navbar-toggle:hover, .navbar-default .navbar-toggle:focus { background-color: rgba(<?php echo $x['r'] . ',' . $x['g'] . ',' . $x['b']; ?> ,0.5); } /* map */ #mapContact h3{ color: <?php echo get_theme_mod('nature_link_color'); ?> ; } .icon-home i{ color: <?php echo get_theme_mod('nature_link_color'); ?> ; } .team-home .overlay-zoom { background: <?php echo get_theme_mod('nature_link_color'); ?> ; background:rgba(<?php echo $x['r'] . ',' . $x['g'] . ',' . $x['b']; ?> ,0.8); } /* banner */ .banner-full { border-top: 6px <?php echo get_theme_mod('nature_link_color'); ?> solid; border-bottom: 1px <?php echo get_theme_mod('nature_link_color'); ?> solid; border-left: 1px <?php echo get_theme_mod('nature_link_color'); ?> solid; border-right: 1px <?php echo get_theme_mod('nature_link_color'); ?> solid; background-color: #EBEBEB; } .banner-full span { color: <?php echo get_theme_mod('nature_link_color'); ?> ; } .icon-right{ color:<?php echo get_theme_mod('nature_link_color'); ?> ; } .grid figcaption{ background: <?php echo get_theme_mod('nature_link_color'); ?> ; /*ie color*/ background:rgba(<?php echo $x['r'] . ',' . $x['g'] . ',' . $x['b']; ?> ,0.8); } .overlay-zoom i{ color: <?php echo get_theme_mod('nature_link_color'); ?> ; } .close-overlay { background-color: <?php echo get_theme_mod('nature_link_color'); ?> ; } .icon-left{ color:<?php echo get_theme_mod('nature_link_color'); ?> ; } .icon-left input, .icon-left textarea{ color:<?php echo get_theme_mod('nature_link_color'); ?> ; border:1px solid <?php echo get_theme_mod('nature_link_color'); ?> ; } .navbar-form ::-webkit-input-placeholder, .icon-left ::-webkit-input-placeholder{ color:<?php echo get_theme_mod('nature_link_color'); ?> ; } .navbar-form :-moz-placeholder, .icon-left :-moz-placeholder{ /* Firefox 18- */ color:<?php echo get_theme_mod('nature_link_color'); ?> ; } .navbar-form ::-moz-placeholder, .icon-left ::-moz-placeholder{ /* Firefox 19+ */ color:<?php echo get_theme_mod('nature_link_color'); ?> ; } .navbar-form :-ms-input-placeholder, .icon-left :-ms-input-placeholder{ color:<?php echo get_theme_mod('nature_link_color'); ?> ; } .select-project h4{ color: <?php echo get_theme_mod('nature_link_color'); ?> ; } .fotorama__thumb-border{ border-color: <?php echo get_theme_mod('nature_link_color'); ?> ; } .raised-inside i{ color:<?php echo get_theme_mod('nature_link_color'); ?> ; } .sidebar .raised-inside { color: <?php echo get_theme_mod('nature_link_color'); ?> ; } /* footer */ .footer-wide, .full{ background-color: <?php echo get_theme_mod('nature_footer_bg_color'); ?> ; } .full .zoom-form { background-color: #474747; background-color: <?php echo get_theme_mod('nature_footer_bg_color'); ?> } <?php //banner parallax 01 $noimage = of_get_option('option_placeholder'); $banner_01 = rwmb_meta('custom_parallax_01', 'type=image'); foreach ($banner_01 as $image) { echo '.home-banner-1 { background: url('; if (!empty($image)) { echo $image['full_url']; } else { echo $noimage; } ?> <?php echo ') no-repeat; background-attachment: fixed ; background-repeat: no-repeat; background-size: cover; margin: 0 -15px; height: 300px; width: auto; }'; } ?> <?php //banner parallax 02 $banner_02 = rwmb_meta('custom_parallax_02', 'type=image'); foreach ($banner_02 as $image) { echo '.home-banner-2 { background: url('; if (!empty($image)) { echo $image['full_url']; } else { echo $noimage; } ?> <?php echo ') no-repeat; background-attachment: fixed ; background-repeat: no-repeat; background-size: cover; margin: 0 -15px; height: 300px; width: auto; }'; } ?> @media screen and (max-width: 768px){ .navbar-default .navbar-nav .open .dropdown-menu>li>a:hover, .navbar-default .navbar-nav .open .dropdown-menu>li>a:focus { color: <?php echo get_theme_mod('nature_link_color'); ?> ; } .container>.navbar-collapse, .container-fluid>.navbar-collapse { background-color: <?php echo $top_bg; ?> ; <?php if (get_theme_mod('nature_solid_color') == 'yes') { echo 'background-image: none;'; } ?> } } <?php $custom_css = of_get_option('option_custom_css'); if (!empty($custom_css)) { echo $custom_css; } ?> </style> <?php }
$ttbgrepeat = $ioa_options['ioa_titlearea_bgrepeat']; } if (isset($ioa_options['ioa_titlearea_bgpositionc'])) { $tbgpositionc = $ioa_options['ioa_titlearea_bgpositionc']; } if ($ttbgimage != "") { $ttbgimage = "url(" . $ttbgimage . ")"; } if (trim($tbgpositionc) != "") { $tbgposition = $tbgpositionc; } $ie_tbc = $tbc; $tbc = hex2RGB($tbc); $tbc = "rgba(" . $tbc['red'] . "," . $tbc['green'] . "," . $tbc['blue'] . "," . $tbco . ")"; $ie_stbc = $stbc; $stbc = hex2RGB($stbc); $stbc = "rgba(" . $stbc['red'] . "," . $stbc['green'] . "," . $stbc['blue'] . "," . $stbco . ")"; $use_gr = ''; if (isset($ioa_options['titlearea_gradient'])) { $use_gr = $ioa_options['titlearea_gradient']; } if (isset($ioa_options['title_font_size']) && $ioa_options['title_font_size'] != "36" && $ioa_options['title_font_size'] != "0") { $title_font_size = 'font-size:' . $ioa_options['title_font_size'] . 'px;'; } if (isset($ioa_options['title_font_weight']) && $ioa_options['title_font_size'] != "0") { $title_font_weight = 'font-weight:' . $ioa_options['title_font_weight'] . ';'; } if (isset($ioa_options['dominant_bg_color'])) { $dbg = $ioa_options['dominant_bg_color']; } $bg_cover = '';