|
Server IP : 10.131.40.8 / Your IP : 216.73.216.37 Web Server : Apache System : Linux webd008.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : ludmqhh ( 137773) PHP Version : 8.4.10 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/ludmqhh/www/guillaume/wp-content/themes/flexblog/framework/customizer/css/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
function infinity_dynamic_css() {
/**
* ----------------------------------------------------------------------------------------
* Background Image Function
* ----------------------------------------------------------------------------------------
*/
function infinity_bg_img_option( $infinity_selector, $bg_size, $bg_img, $bg_att ) {
$infinity_position = 'left top';
$infinity_size = 'auto';
$infinity_repeat = 'repeat';
if ( $bg_size === 'cover' ) {
$infinity_position = 'center center';
$infinity_size = 'cover';
$infinity_repeat = 'no-repeat';
}
$css = $infinity_selector .'{
background-image: url('. $bg_img .');
background-size: '. $infinity_size .';
background-repeat: '. $infinity_repeat .';
background-attachment: '. $bg_att .';
background-position: '. $infinity_position .';
}';
return $css;
}
/**
* ----------------------------------------------------------------------------------------
* Get Data
* ----------------------------------------------------------------------------------------
*/
$general_options = get_option( 'infinity_general' );
$header_options = get_option( 'infinity_header' );
$content_options = get_option( 'infinity_content' );
$carousel_options = get_option( 'infinity_carousel' );
$footer_options = get_option( 'infinity_footer' );
$header_color_options = get_option( 'infinity_header_color' );
$carousel_color_options = get_option( 'infinity_carousel_color' );
$general_color_options = get_option( 'infinity_general_color' );
$sidebar_color_options = get_option( 'infinity_sidebar_color' );
$footer_color_options = get_option( 'infinity_footer_color' );
// Add Dynamic Style
$css = '<style>';
/**
* ----------------------------------------------------------------------------------------
* General Section
* ----------------------------------------------------------------------------------------
*/
// site Width
$css .= '.center-width {
max-width:' .$general_options['width']. 'px;
}';
// Content Padding
$css .= '.main-container-outer {
padding:' .$general_options['padding']. 'px;
}';
/**
* ----------------------------------------------------------------------------------------
* Header Section
* ----------------------------------------------------------------------------------------
*/
// Top Bar Align
if ( has_nav_menu( 'top-menu' ) && !is_active_sidebar( 'sidebar-2' ) ) {
$css .= '.header-top {
text-align: right;
}';
}
// Logo Width
$css .= '.logo {
max-width:'. $header_options['logo_width'] .'px;
}';
// Logo Top Margin
$css .= '.header-center > .center-width {
padding-top:'. $header_options['logo_top_magin'] .'px;
height:'. $header_options['center_height'] .'px;
}';
// Logo Responsive Top anD Bottom Margin
$css .= '@media screen and ( max-width: 480px ) {
.header-center > .center-width {
padding:'. $header_options['logo_top_magin'] .'px 0;
height: auto;
}
}';
// Header Boxed
if ( $header_options['boxed'] ) {
$css .= '.header-top,
.header-center,
.header-bottom,
.fixed-header-bottom,
.infinity-breadcrumbs {
margin: 0 auto;
max-width:' .$general_options['width']. 'px;
}';
}
// Body background
$css .= infinity_bg_img_option('body', $general_options['bg_size'], $general_options['bg_img'], $general_options['bg_att']);
// Header Center background
$css .= infinity_bg_img_option('.header-center', $header_options['bg_size'], $header_options['bg_img'], $header_options['bg_att']);
/**
* ----------------------------------------------------------------------------------------
* Carousel Section
* ----------------------------------------------------------------------------------------
*/
$css .= '.infinity-carousel-wrap {
height: '.$carousel_options['height'].'px;
}';
// Carosuel Next/Prev Button Effect
if ( $carousel_options['navigation'] === 'on_hover' ) {
$css .= '.infinity-carousel .carousel-prev {
left: -60px;
}';
$css .= '.infinity-carousel .carousel-next {
right: -60px;
}';
}
// Carosuel Page
if ( $carousel_options['style'] === 'inner_content' ) {
$css .= '.page .infinity-carousel-wrap {
margin-bottom: 20px;
}';
}
/**
* ----------------------------------------------------------------------------------------
* Content Section
* ----------------------------------------------------------------------------------------
*/
$css .= '.main-post,
.infinity-carousel-wrap,
.info-area {
margin-bottom:' .$content_options['vertical_gutter']. 'px;
}';
$css .= '.infinity-pagination {
margin-top:' .$content_options['vertical_gutter']. 'px;
}';
$css .= '.entry-header,
.entry-content {
overflow: hidden;
}';
$css .= '.entry-content {
text-align:' .$content_options['post_description_align'].';
}';
if ( is_single() ) {
$css .= '.entry-content {
margin-bottom: 10px;
}';
}
$css .= '.list .entry-media {
float: left;
width:' .$content_options['list_thumb_width']. 'px;
margin-right: '.$content_options['horizontal_gutter'].'px;
margin-bottom:' .$content_options['vertical_gutter']. 'px;
}';
$css .= '.list .entry-media ~ .entry-footer {
padding-left: -calc('.$content_options['list_thumb_width'].'px + '.$content_options['horizontal_gutter'].'px);
padding-left: -webkit-calc('.$content_options['list_thumb_width'].'px + '.$content_options['horizontal_gutter'].'px);
clear: both;
}';
// Sidebar Gutter
$css .= '[data-sidebar="rsidebar"] .main-sidebar {
padding-left: ' . $content_options['horizontal_gutter'] . 'px;
}';
$css .= '[data-sidebar="lsidebar"] .main-sidebar {
padding-right: ' . $content_options['horizontal_gutter'] . 'px;
}';
// Two Column Layout
$css .= ' .col2 {
width: calc((100% - ' . ($content_options['horizontal_gutter'] ) . 'px ) /2);
width: -webkit-calc((100% - ' . ($content_options['horizontal_gutter'] ) . 'px ) /2);
margin-right: '.$content_options['horizontal_gutter'].'px;
}';
$css .= '.infinity-grid .col2:nth-of-type(2n+2) {
margin-right: 0;
}';
$css .= '.infinity-grid .col3:nth-of-type(3n+3) {
margin-right: 0;
}';
$css .= '.infinity-grid .col2:nth-last-child(-n+2) .main-post {
margin-bottom: 0;
}';
$css .= '.infinity-grid .col3:nth-last-child(-n+3) .main-post {
margin-bottom: 0;
}';
// Three Columns Layout
$css .= '.col3 {
width: calc((100% - 2 * ' . ($content_options['horizontal_gutter'] ) . 'px ) /3);
width: -webkit-calc((100% - 2 * ' . ($content_options['horizontal_gutter'] ) . 'px ) /3);
margin-right: '.$content_options['horizontal_gutter'].'px;
}';
// Home Pagination
if ( $content_options['pagination'] === 'expand-numbered' ) {
$css .= '.default-next,
.default-previous {
position: absolute;
top: 0;
}
.default-previous {
left: 0;
}
.default-next {
right: 0;
}';
}
$css .= '.main-sidebar .infinity-widget,
.fixed-sidebar .infinity-widget {
overflow: hidden;
margin-bottom: ' . $content_options['vertical_gutter'] . 'px;
}';
//Post Dropcup
if ( $content_options['dropcap'] && !is_single() && !is_page() ) {
$css .= '.entry-content > p:first-child:first-letter {
font-family: "Playfair Display";
float:left;
font-size: 76px;
line-height: 63px;
text-align: center;
margin: 0px 10px 0 0;
}';
$css .= '@-moz-document url-prefix() {
.entry-content > p:first-child:first-letter {
margin-top: 10px !important;
}
}';
}
// Single Post Dropcup
if ( $content_options['single_dropcap'] && ( is_single() || is_page() ) ) {
$css .= '.entry-content > p:first-child:first-letter {
font-family: "Playfair Display";
float:left;
font-size: 76px;
line-height: 63px;
text-align: center;
margin: 0px 10px 0 0;
}';
$css .= '@-moz-document url-prefix() {
.entry-content > p:first-child:first-letter {
margin-top: 10px !important;
}
}';
}
if ( !$content_options['boxed'] || !$content_options['single_boxed'] ) {
$css .= '.main-container-wrap {
padding: 0px 30px;
}';
}
/**
* ----------------------------------------------------------------------------------------
* Sidebar section
* ----------------------------------------------------------------------------------------
*/
// Sidebar Width
$css .= '.main-sidebar {
width: '. $content_options['sidebar_width'] .'px;
}';
$css .= '.fixed-sidebar {
width: '. $content_options['sidebar_width'] .'px;
right: -'. $content_options['sidebar_width'] .'px;
}';
$css .= '.main-container {
width: calc(100% - '. $content_options['sidebar_width'] .'px);
width: -webkit-calc(100% - '. $content_options['sidebar_width'] .'px);
}';
$css .= '[data-sidebar="nsidebar"] .main-container,
[data-no-sidebar="nsidebar"] {
width: 100%;
}';
/**
* ----------------------------------------------------------------------------------------
* Footer Section
* ----------------------------------------------------------------------------------------
*/
// Footer Styles
if ( $footer_options['boxed'] === 'boxed' ) {
$css .= '.footer-wrap {
margin: 0 auto;
max-width:' .$general_options['width']. 'px;
}';
}
if ( $footer_options['column'] === 'three' ) {
$css .= '.footer-widgets {
max-width: 30%;
margin-right: 5%;
}
.footer-widgets:nth-child(3) {
margin-right: 0;
}';
}
if ( $footer_options['column'] === 'four' ) {
$css .= '.footer-widgets {
max-width: 22%;
margin-right: 4%;
}
.footer-widgets:nth-child(4) {
margin-right: 0;
}';
}
/**
* ----------------------------------------------------------------------------------------
* Header Color
* ----------------------------------------------------------------------------------------
*/
// Top Bar Color
$css .= '.header-top {
background-color: '. $header_color_options['tb_bg'] .';
}';
$css .= '.top-nav > ul > li > a,
.header-social a,
.header-top .random-btn {
color: '. $header_color_options['tb_text'] .';
}';
$css .= '.top-nav > ul > li > a:hover,
.header-social a:hover,
.top-nav > ul > li.current-menu-item > a,
.top-nav > ul > li.current-menu-ancestor > a {
color: '. $header_color_options['tb_text_hv'] .';
}';
$css .= '.menu-btn,
.sidebar-btn span:before,
.sidebar-btn span:after {
background-color: '. $header_color_options['tb_text'] .';
}';
$css .= '.top-nav > ul > li.current-menu-item > a.menu-btn,
.top-nav > ul > li.current-menu-ancestor > a .menu-btn {
background-color: '. $header_color_options['tb_text_hv'] .';
}';
$css .= '.top-nav > ul > li > a:hover .menu-btn,
.top-nav > ul > li > a:hover .menu-btn:before,
.top-nav > ul > li > a:hover .menu-btn:after,
.sidebar-btn:hover span:before,
.sidebar-btn:hover span:after {
background-color: '. $header_color_options['tb_text_hv'] .';
}';
$css .= '.top-nav .sub-menu > li > a {
color: '. $header_color_options['tb_sub_text'] .';
background-color: '. $header_color_options['tb_sub_bg'] .';
border-color: '. $header_color_options['tb_sub_border'] .';
}';
$css .= '.top-nav .sub-menu > li > a:hover,
.top-nav .sub-menu > li.current-menu-item > a,
.top-nav .sub-menu > li.current-menu-ancestor > a {
color: '. $header_color_options['tb_sub_text_hv'] .';
background-color: '. $header_color_options['tb_sub_bg_hv'] .';
}';
// Main Menu Color
$css .= '.header-bottom,
.fixed-header-bottom,
.nav-mobile {
background-color: '. $header_color_options['mm_bg'] .';
}';
$css .= '.nav > ul > li > a,
.nav-mobile li a,
.nav-btn,
.sub-menu-btn-icon,
.random-btn,
.search-btn {
color: '. $header_color_options['mm_text'] .';
}';
$css .= '.nav > ul > li > a:hover,
.nav-mobile li a:hover,
.nav-btn:hover,
.nav li.current-menu-item > a,
.nav li.current-menu-ancestor > a,
.random-btn:hover,
.search-btn:hover {
color: '. $header_color_options['mm_text_hv'] .';
}';
$css .= '.nav .sub-menu > li > a {
color: '. $header_color_options['mm_sub_text'] .';
background-color: '. $header_color_options['mm_sub_bg'] .';
border-color: '. $header_color_options['mm_sub_border'] .';
}';
$css .= '.nav > ul > li:after {
background-color: '. $header_color_options['mm_sub_border'] .';
}';
$css .= '.nav .sub-menu > li > a:hover,
.nav .sub-menu > li.current-menu-item > a,
.nav .sub-menu > li.current-menu-ancestor > a {
color: '. $header_color_options['mm_sub_text_hv'] .';
background-color: '. $header_color_options['mm_sub_bg_hv'] .';
}';
$css .= '.nav .sub-menu {
border-color: '. $header_color_options['mm_sub_text_hv'] .';
}';
$css .= '.nav .sub-menu > li > a:before {
border-color: transparent transparent transparent '. $header_color_options['mm_sub_border'] .';
}';
$css .= '.nav .sub-menu > li > a:hover:before {
border-color: transparent transparent transparent '. $header_color_options['mm_sub_text_hv'] .';
}';
/**
* ----------------------------------------------------------------------------------------
* Carousel Color
* ----------------------------------------------------------------------------------------
*/
// Carousel Title Color
$css .= '.carousel-title a {
color:'. $carousel_color_options['title'] .';
}';
// Carousel Text Color
$css .= '.carousel-item-info,
.infinity-carousel,
.carousel-category a,
.carousel-like-comm a {
color:'. $carousel_color_options['text'] .';
}';
// Carousel Hover Color
$css .= '.carousel-category a:hover,
.carousel-like-comm a:hover {
color:'. $carousel_color_options['text_hv'] .';
}';
// Carousel Hover Color
$css .= '.carousel-pagination .active span {
background-color:'. $carousel_color_options['text_hv'] .';
color:'. $carousel_color_options['text_hv'] .';
}';
// Carousel Read More Color
$css .= '.carousel-read-more a {
color: '. $carousel_color_options['read_more'] .';
border-color: '. $carousel_color_options['read_more'] .';
}';
$css .= '.carousel-read-more a:hover {
background-color: '. $carousel_color_options['read_more'] .';
color: '. $carousel_color_options['read_more_hv'] .';
}';
/**
* ----------------------------------------------------------------------------------------
* General Color
* ----------------------------------------------------------------------------------------
*/
// Body Background color
$css .= 'body {
background-color: '. $general_color_options['body_bg'] .';
}';
// Content Background color
$css .= '.main-container-outer {
background-color:'. $general_color_options['content_bg'] .';
}';
$css .= '.entry-content hr {
color: '. $general_color_options['body_bg'] .';
background-color: '. $general_color_options['border'] .';
}';
// Accent Color
$css .= '.entry-content blockquote {
border-color: '. $general_color_options['accent'] .';
}';
// Accent Color
$css .= '.meta-categories,
.infinity-widget ul li > a:hover,
.infinity-widget ul li span a:hover,
a,
.infinity-breadcrumbs li:hover a,
.comment-author a:hover,
.meta-author-date a,
.meta-tags a:hover,
.page-links a,
.infinity-breadcrumbs li strong,
.related-posts h4 a:hover,
.post-pagination h4:hover,
.author-social a:hover,
.featured-item a:hover {
color:'. $general_color_options['accent'] .';
}';
// Accent Color
$css .= '.ps-container > .ps-scrollbar-y-rail > .ps-scrollbar-y,
.search-title:after {
background-color:'. $general_color_options['accent'] .' !important;
}';
// General Text
$css .= '.post-title,
.post-title a,
.info-area h4,
.widget-title,
.related-posts h3,
.related-posts h4 a,
.author-description h4,
.next-post-title a,
.prev-post-title a,
.comments-area h2,
.comment-reply-title,
.next-post-icon a,
.prev-post-icon a,
.comment-author a,
.comment-author,
.author-content h4 a,
.fixed-sidebar-close-btn,
.post-pagination h4,
.no-search-result h3,
.category-prefix {
color: '. $general_color_options['text'] .';
}';
// General Sub Text
$css .= 'body,
.infinity-widget,
.infinity-widget ul li > a,
#wp-calendar,
#wp-calendar a,
input,
select,
textarea,
.entry-content,
.meta-share a,
.author-content p,
.entry-comments,
#respond,
.fourzerofour p,
.page-links,
.meta-tags a,
.featured-item a {
color: '. $general_color_options['sub_text'] .';
}';
// Text Selection Color
$css .= '::selection {
background: '. $general_color_options['selection'] .';
}
::-moz-selection {
background: '. $general_color_options['selection'] .';
}';
// General Border color
$css .= '.widget-title h3:before,
.widget-title h3:after,
.widget_recent_entries ul li,
.widget_recent_comments li,
.widget_meta li,
.widget_recent_comments li,
.widget_pages li,
.widget_archive li,
.widget_categories li,
.children li,
#wp-calendar,
#wp-calendar tbody td,
.entry-comments,
.author-description,
.comment-title h2:before,
.comment-title h2:after,
.related-posts h3:before,
.related-posts h3:after,
.widget_nav_menu li a,
.wp-caption,
.entry-content table tr,
.entry-content table th,
.entry-content table td,
.entry-content abbr[title],
.entry-content pre,
input,
select,
textarea,
.meta-share a,
.entry-footer .meta-share:before,
.entry-footer .meta-share:after,
.meta-tags a,
.author-description,
.info-area,
.infinity-breadcrumbs,
.author-prefix,
.featured-item {
border-color:'. $general_color_options['border'] .';
}';
// Meta colors
$css .= '.info-area p,
.meta-author-date,
.meta-tags,
.post-date,
.comment-info,
.comment-info a,
.widget_recent_entries ul li span,
.comment-date a,
.widget_categories li,
.widget_archive li,
.wp-caption-text,
.infinity-breadcrumbs li a,
.infinity-breadcrumbs li,
.author-social a,
.featured-item-date {
color:'. $general_color_options['meta'] .';
}';
// Placeholder Color
$css .= '::-webkit-input-placeholder {
color: '. $general_color_options['meta'] .';
}';
$css .= ':-moz-placeholder {
color: '. $general_color_options['meta'] .';
}';
$css .= '::-moz-placeholder {
color: '. $general_color_options['meta'] .';
}';
$css .= ':-ms-input-placeholder {
color: '. $general_color_options['meta'] .';
}';
// Alt Colors
$css .= '.info-area,
.meta-share a,
.infinity-breadcrumbs,
.entry-comments,
input,
select,
textarea,
.meta-tags a,
.wp-caption-text {
background-color:'. $general_color_options['alt'] .';
}';
// General Button Colors
$css .= '.read-more a,
.infinity-pagination a,
.post-password-form input[type="submit"] {
background-color: '. $general_color_options['read_more_bg'] .';
color: '. $general_color_options['read_more'] .';
}';
// General Button Hover Colors
$css .= '.read-more a:hover,
.infinity-pagination a:hover,
.numbered-current,
.post-password-form input[type="submit"]:hover {
background-color: '. $general_color_options['read_more_bg_hv'] .';
border-color: '. $general_color_options['read_more_bg_hv'] .';
color: '. $general_color_options['read_more_hv'] .';
}';
// General Button Border Colors
$css .= '.read-more a,
.infinity-pagination a {
border-color: '. $general_color_options['read_more_border'] .';
}';
$css .= '.btn-info {
color: '. $general_color_options['btn_info'] .';
}';
$css .= '.btn-info {
background-color: '. $general_color_options['btn_info_bg'] .';
}';
$css .= '.btn-info:before {
border-top-color: '. $general_color_options['btn_info_bg'] .';
}';
// Sidebar Button Color
$css .= '.submit,
.tagcloud a,
#wp-calendar caption,
.reply a,
.infinity-widget input[type="submit"] {
color: '. $general_color_options['main_btn'] .';
background-color: '. $general_color_options['main_btn_bg'] .';
}';
// Sidebar Button Hover Color
$css .= '#s:focus + .submit,
#wp-calendar tbody td a:hover,
.tagcloud a:hover,
.submit:hover,
.reply a:hover,
.infinity-widget input[type="submit"]:hover {
color: '. $general_color_options['main_btn_hv'] .';
background-color: '. $general_color_options['main_btn_bg_hv'] .';
}';
$css .= '#wp-calendar tfoot #prev a:hover,
#wp-calendar tfoot #next a:hover {
color: '. $general_color_options['main_btn_bg_hv'] .';
}';
/**
* ----------------------------------------------------------------------------------------
* Footer Color
* ----------------------------------------------------------------------------------------
*/
// Footer Widget Background Colors
$css .= '.footer-widget-area {
background-color: '. $footer_color_options['widget_bg'] .';
}';
// Footer Widget Title
$css .= '.footer-widgets .widget-title,
.footer-widgets h1,
.footer-widgets h2,
.footer-widgets h3,
.footer-widgets h4,
.footer-widgets h5,
.footer-widgets h6 {
color: '. $footer_color_options['widget_title'] .';
}';
// Footer Widget Text
$css .= '.footer-widgets .infinity-widget,
.footer-widgets a,
.footer-widgets ul li > a,
.footer-widgets #wp-calendar,
.footer-widgets #wp-calendar a {
color: '. $footer_color_options['widget_text'] .';
}';
// Footer Widget Text Hover
$css .= '.footer-widgets a:hover,
.footer-widgets ul li > a:hover,
.footer-widgets ul li span a:hover {
color: '. $footer_color_options['widget_text_hv'] .';
}';
// Footer Widget Border
$css .= '.footer-widgets .widget-title h3:before,
.footer-widgets .widget-title h3:after,
.footer-widgets .widget_recent_entries ul li,
.footer-widgets .widget_recent_comments li,
.footer-widgets .widget_meta li,
.footer-widgets .widget_recent_comments li,
.footer-widgets .widget_pages li,
.footer-widgets .widget_archive li,
.footer-widgets .widget_categories li,
.footer-widgets .children li,
.footer-widgets .infinity-widget select,
.footer-widgets .featured-item {
border-color:'. $footer_color_options['widget_border'] .';
}';
// Copyright Background
$css .= '.footer-copyright {
background-color: '. $footer_color_options['copyright_bg'] .';
}';
// Copyright Color
$css .= '.copyright {
color: '. $footer_color_options['copyright_text'] .';
}';
$css .= '.footer-social a {
color: '. $footer_color_options['social_text'] .';
background-color: '. $footer_color_options['social_bg'] .';
}';
// Copyright Color
$css .= '.footer-social a:hover {
color: '. $footer_color_options['social_text_hv'] .';
background-color: '. $footer_color_options['social_bg_hv'] .';
}';
$css .= '.backtotop {
color: '. $footer_color_options['backtotop'] .';
}';
// Copyright Color
$css .= '.backtotop:hover {
color: '. $footer_color_options['backtotop_hv'] .';
}';
$css .= '</style>';
echo '' . $css;
}
add_action( 'wp_head', 'infinity_dynamic_css' );
?>