Make WordPress Themes

Changeset 153790


Ignore:
Timestamp:
08/25/2021 12:34:11 PM (4 years ago)
Author:
themedropbox
Message:

New version of Sydney - 1.79

Location:
sydney/1.79
Files:
116 added
3 deleted
22 edited
1 copied

Legend:

Unmodified
Added
Removed
  • sydney/1.79/archive-employees.php

    r139705 r153790  
    4141                    </div>
    4242                    <div class="pos"><?php echo esc_html($position); ?></div>
    43                                 <ul class="team-social">
    44                                     <?php if ($facebook != '') : ?>
    45                                         <li><a class="facebook" href="<?php echo esc_url($facebook); ?>" target="_blank"><i class="fa fa-facebook"></i></a></li>
    46                                     <?php endif; ?>
    47                                     <?php if ($twitter != '') : ?>
    48                                         <li><a class="twitter" href="<?php echo esc_url($twitter); ?>" target="_blank"><i class="fa fa-twitter"></i></a></li>
    49                                     <?php endif; ?>
    50                                     <?php if ($google != '') : ?>
    51                                         <li><a class="google" href="<?php echo esc_url($google); ?>" target="_blank"><i class="fa fa-google-plus"></i></a></li>
    52                                     <?php endif; ?>
    53                                 </ul>                   
     43
     44                        <?php
     45                        // Get fontawesome prefix
     46                        $fa_prefix = sydney_get_fontawesome_prefix( 'fab ' ); ?>
     47                           
     48                        <ul class="team-social">
     49                            <?php if ($facebook != '') : ?>
     50                                <li><a class="facebook" href="<?php echo esc_url($facebook); ?>" target="_blank"><i class="<?php echo esc_attr( $fa_prefix ); ?>fa-facebook"></i></a></li>
     51                            <?php endif; ?>
     52                            <?php if ($twitter != '') : ?>
     53                                <li><a class="twitter" href="<?php echo esc_url($twitter); ?>" target="_blank"><i class="<?php echo esc_attr( $fa_prefix ); ?>fa-twitter"></i></a></li>
     54                            <?php endif; ?>
     55                            <?php if ($google != '') : ?>
     56                                <li><a class="google" href="<?php echo esc_url($google); ?>" target="_blank"><i class="<?php echo esc_attr( $fa_prefix ); ?>fa-google-plus"></i></a></li>
     57                            <?php endif; ?>
     58                        </ul>                   
    5459                </div>
    5560            </div><!-- /.team-item -->
  • sydney/1.79/archive-services.php

    r139705 r153790  
    1313        <main id="main" class="post-wrap" role="main">
    1414
    15         <?php if ( have_posts() ) : ?>
     15        <?php
     16            // Get fontawesome prefix
     17            $fa_prefix = sydney_get_fontawesome_prefix( 'fab ' );
     18       
     19            if ( have_posts() ) :
     20                while ( have_posts() ) : the_post(); ?>
    1621
    17             <?php while ( have_posts() ) : the_post(); ?>
    1822                <?php $icon = get_post_meta( get_the_ID(), 'wpcf-service-icon', true ); ?>
    1923                <?php $servicelink = get_post_meta( get_the_ID(), 'wpcf-service-link', true ); ?>
     
    2327                        <div class="icon">
    2428                        <?php if ($servicelink) : ?>
    25                             <?php echo '<a href="' . esc_url( $servicelink ) . '"><i class="fa ' . esc_html( $icon ) . '"></i></a>'; ?>
     29                            <?php echo '<a href="' . esc_url( $servicelink ) . '"><i class="' . esc_html( $fa_prefix . $icon ) . '"></i></a>'; ?>
    2630                        <?php else : ?>
    27                             <?php echo '<i class="fa ' . esc_html( $icon ) . '"></i>'; ?>
     31                            <?php echo '<i class="' . esc_html( $fa_prefix . $icon ) . '"></i>'; ?>
    2832                        <?php endif; ?>
    2933                        </div>
  • sydney/1.79/css/bootstrap/bootstrap.css

    r139705 r153790  
    782782    width: 970px;
    783783  }
     784  .container-fluid {
     785    padding-right: 40px;
     786    padding-left: 40px;
     787  } 
    784788}
    785789@media (min-width: 1200px) {
  • sydney/1.79/css/bootstrap/bootstrap.min.css

    r139705 r153790  
    66 * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=1734aa9903466b6621ed)
    77 * Config saved to config.json and https://gist.github.com/1734aa9903466b6621ed
    8  *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{background:#ff0;color:#000}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}hr{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{background:0 0!important;color:#000!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{background-color:#fcf8e3;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container,.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.row{margin-left:-15px;margin-right:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.row:after,.row:before{content:" ";display:table}.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.row:after{clear:both}
     8 *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0}mark{background:#ff0;color:#000}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}hr{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{background:0 0!important;color:#000!important;-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}*,:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:transparent}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{background-color:#fcf8e3;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0;text-align:right}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container,.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}.container-fluid{padding-left:40px;padding-right:40px;}}@media (min-width:1200px){.container{width:1170px}}.row{margin-left:-15px;margin-right:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}table col[class*=col-]{position:static;float:none;display:table-column}table td[class*=col-],table th[class*=col-]{position:static;float:none;display:table-cell}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:dotted thin;outline:-webkit-focus-ring-color auto 5px;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:400;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.row:after,.row:before{content:" ";display:table}.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.row:after{clear:both}
  • sydney/1.79/footer.php

    r143293 r153790  
    1818    <?php endif; ?>
    1919
    20     <a on="tap:toptarget.scrollTo(duration=200)" class="go-top"><i class="sydney-svg-icon"><?php sydney_get_svg_icon( 'icon-chevron-up', true ); ?></i></a>
    21        
    22     <footer id="colophon" class="site-footer" role="contentinfo" <?php sydney_do_schema( 'footer' ); ?>>
    23         <div class="site-info container">
    24             <a href="<?php echo esc_url( __( 'https://wordpress.org/', 'sydney' ) ); ?>"><?php printf( __( 'Proudly powered by %s', 'sydney' ), 'WordPress' ); ?></a>
    25             <span class="sep"> | </span>
    26             <?php printf( __( 'Theme: %2$s by %1$s.', 'sydney' ), 'aThemes', '<a href="https://athemes.com/theme/sydney" rel="nofollow">Sydney</a>' ); ?>
     20    <?php $container    = get_theme_mod( 'footer_credits_container', 'container' ); ?>
     21    <?php $credits      = sydney_footer_credits(); ?>
     22
     23    <footer id="colophon" class="site-footer">
     24        <div class="<?php echo esc_attr( $container ); ?>">
     25            <div class="site-info">
     26                <div class="row">
     27                    <div class="col-md-6">
     28                        <?php echo wp_kses_post( $credits ); ?>
     29                    </div>
     30                    <div class="col-md-6">
     31                        <?php sydney_social_profile( 'social_profiles_footer' ); ?>
     32                    </div>                 
     33                </div>
     34            </div>
    2735        </div><!-- .site-info -->
    2836    </footer><!-- #colophon -->
  • sydney/1.79/functions.php

    r150497 r153790  
    112112
    113113    //Footer widget areas
    114     $widget_areas = get_theme_mod('footer_widget_areas', '3');
    115     for ($i=1; $i<=$widget_areas; $i++) {
     114    for ( $i=1; $i <= 4; $i++ ) {
    116115        register_sidebar( array(
    117116            'name'          => __( 'Footer ', 'sydney' ) . $i,
     
    172171
    173172/**
     173 * Enqueue scripts and styles.
     174 */
     175function sydney_admin_scripts() {
     176    if ( defined( 'SITEORIGIN_PANELS_VERSION' ) ) {
     177        wp_enqueue_script( 'sydney-admin-functions', get_template_directory_uri() . '/js/admin-functions.js', array('jquery'),'', true );
     178        wp_localize_script( 'sydney-admin-functions', 'sydneyadm', array(
     179            'fontawesomeUpdate' => array(
     180                'confirmMessage' => __( 'Are you sure? Keep in mind this is a global change and you will need update your icons class names in all theme widgets and post types that use Font Awesome 4 icons.', 'sydney' ),
     181                'errorMessage' => __( 'It was not possible complete the request, please reload the page and try again.', 'sydney' )
     182            )
     183        ) );
     184    }
     185}
     186add_action( 'admin_enqueue_scripts', 'sydney_admin_scripts' );
     187
     188/**
    174189 * Elementor editor scripts
    175190 */
     
    193208    }
    194209
    195     wp_enqueue_style( 'sydney-style', get_stylesheet_uri(), '', '20210526' );
     210    wp_enqueue_style( 'sydney-style', get_stylesheet_uri(), '', '20210823' );
    196211
    197212    wp_enqueue_style( 'sydney-ie9', get_template_directory_uri() . '/css/ie9.css', array( 'sydney-style' ) );
     
    199214
    200215    if ( !$is_amp ) {
    201         wp_enqueue_script( 'sydney-functions', get_template_directory_uri() . '/js/functions.min.js', array(), '20210120', true );
     216        wp_enqueue_script( 'sydney-functions', get_template_directory_uri() . '/js/functions.min.js', array(), '20210823', true );
    202217       
    203218        //Enqueue hero slider script only if the slider is in use
     
    223238        wp_enqueue_script( 'sydney-so-legacy-scripts', get_template_directory_uri() . '/js/so-legacy.js', array('jquery'),'', true );
    224239        wp_enqueue_script( 'sydney-so-legacy-main', get_template_directory_uri() . '/js/so-legacy-main.min.js', array('jquery'),'', true );
    225         wp_enqueue_style( 'sydney-font-awesome', get_template_directory_uri() . '/fonts/font-awesome.min.css' );
     240        if( get_option( 'sydney-fontawesome-v5' ) ) {
     241            wp_enqueue_style( 'sydney-font-awesome-v5', get_template_directory_uri() . '/fonts/font-awesome-v5/all.min.css' );
     242        } else {
     243            wp_enqueue_style( 'sydney-font-awesome', get_template_directory_uri() . '/fonts/font-awesome.min.css' );
     244        }
    226245    }
    227246
     
    311330/**
    312331 * Preloader
     332 * Hook into 'wp_body_open' to ensure compatibility with
     333 * header/footer builder plugins
    313334 */
    314335function sydney_preloader() {
     
    317338        return;
    318339    }
     340
    319341    ?>
    320342    <div class="preloader">
     
    326348    <?php
    327349}
    328 add_action('sydney_before_site', 'sydney_preloader');
     350add_action('wp_body_open', 'sydney_preloader');
     351add_action('elementor/theme/before_do_header', 'sydney_preloader'); // Elementor Pro Header Builder
    329352
    330353/**
     
    419442                'role'        => true,
    420443                'focusable'   => true,
     444                'fill'        => true,
    421445            ),
    422446            'path'    => array(
     
    425449                'd'         => true,
    426450                'transform' => true,
     451                'stroke'    => true,
     452                'stroke-width' => true,
     453                'stroke-linejoin' => true
    427454            ),
    428455            'polygon' => array(
     
    433460                'focusable' => true,
    434461            ),
     462            'rect'    => array(
     463                'x'      => true,
     464                'y'      => true,
     465                'width'  => true,
     466                'height' => true,
     467                'transform' => true
     468            ),
    435469        )
    436470    ); 
     
    461495 * Customizer additions.
    462496 */
    463 require get_template_directory() . '/inc/customizer.php';
     497require get_template_directory() . '/inc/customizer/customizer.php';
    464498
    465499/**
     
    519553 * Upsell
    520554 */
    521 require get_template_directory() . '/inc/upsell/class-customize.php';
     555require get_template_directory() . '/inc/customizer/upsell/class-customize.php';
    522556
    523557/**
     
    555589 */
    556590require get_template_directory() . '/inc/theme-dashboard-settings.php';
     591
     592/*
     593 * Enable fontawesome 5 on first time theme activation
     594 * Check if the old theme is sydney to avoid enable the fa5 automatic and break icons
     595 * Since this hook also run on theme updates
     596 */
     597function sydney_enable_fontawesome_latest_version( $old_theme_name ) {
     598    $old_theme_name = strtolower( $old_theme_name );
     599    if( !get_option( 'sydney-fontawesome-v5' ) && strpos( $old_theme_name, 'sydney' ) === FALSE ) {
     600        update_option( 'sydney-fontawesome-v5', true );
     601    }
     602}
     603add_action('after_switch_theme', 'sydney_enable_fontawesome_latest_version');
     604
     605/**
     606 * Sydney Toolbox and fontawesome update notice
     607 */
     608if ( defined( 'SITEORIGIN_PANELS_VERSION' ) && ( isset($pagenow) && $pagenow == 'themes.php' ) && isset( $_GET['page'] ) && $_GET['page'] == 'theme-dashboard' ) {
     609    function sydney_toolbox_fa_update_admin_notice(){
     610        $all_plugins    = get_plugins();
     611        $active_plugins = get_option( 'active_plugins' );
     612        $theme_version  = wp_get_theme( 'sydney' )->Version;
     613
     614        // Check if Sydney Toolbox plugin is active
     615        if( ! in_array( 'sydney-toolbox/sydney-toolbox.php', $active_plugins ) ) {
     616            return;
     617        }
     618
     619        if( version_compare( $all_plugins['sydney-toolbox/sydney-toolbox.php']['Version'], '1.16', '>=' ) ) {
     620            if( !get_option( 'sydney-fontawesome-v5' ) ) { ?>
     621                <div class="notice notice-success thd-theme-dashboard-notice-success is-dismissible">
     622                    <p>
     623                        <strong><?php esc_html_e( 'Sydney Font Awesome Update: ', 'sydney'); ?></strong> <?php esc_html_e( 'Your website is currently running the version 4. Click in the below button to update to version 5.', 'sydney' ); ?>
     624                        <br>
     625                        <strong><?php esc_html_e( 'Important: ', 'sydney'); ?></strong> <?php esc_html_e( 'This is a global change. That means this change will affect all website icons and you will need update the icons class names in all theme widgets and post types that use Font Awesome 4 icons. For example: "fa-android" to "fab fa-android".', 'sydney' ); ?>
     626                    </p>
     627                    <a href="#" class="button sydney-update-fontawesome" data-nonce="<?php echo esc_attr( wp_create_nonce( 'sydney-fa-updt-nonce' ) ); ?>" style="margin-bottom: 9px;"><?php esc_html_e( 'Update to v5', 'sydney' ); ?></a>
     628                    <br>
     629                </div>
     630            <?php
     631            }
     632            return;
     633        } ?>
     634
     635        <div class="notice notice-success thd-theme-dashboard-notice-success is-dismissible">
     636            <p>
     637                <?php echo wp_kses_post( sprintf( __( '<strong>Optional:</strong> Now <strong>Sydney</strong> is compatible with Font Awesome 5. For it is needed the latest version of <strong>Sydney Toolbox</strong> plugin. You can update the plugin <a href="%s">here</a>.', 'sydney' ), admin_url( 'plugins.php' ) ) ); ?><br>
     638                <strong><?php esc_html_e( 'Important: ', 'sydney'); ?></strong> <?php esc_html_e( 'This is a global change. That means this change will affect all website icons and you will need update the icons class names in all theme widgets and post types that use Font Awesome 4 icons. For example: "fa-android" to "fab fa-android".', 'sydney' ); ?>
     639            </p>
     640        </div>
     641<?php
     642    }
     643    add_action('admin_notices', 'sydney_toolbox_fa_update_admin_notice');
     644}
  • sydney/1.79/inc/classes/class-sydney-svg-icons.php

    r139705 r153790  
    3535            'icon-search'       => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"/></svg>',
    3636            'icon-compare'      => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M504.971 359.029c9.373 9.373 9.373 24.569 0 33.941l-80 79.984c-15.01 15.01-40.971 4.49-40.971-16.971V416h-58.785a12.004 12.004 0 0 1-8.773-3.812l-70.556-75.596 53.333-57.143L352 336h32v-39.981c0-21.438 25.943-31.998 40.971-16.971l80 79.981zM12 176h84l52.781 56.551 53.333-57.143-70.556-75.596A11.999 11.999 0 0 0 122.785 96H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12zm372 0v39.984c0 21.46 25.961 31.98 40.971 16.971l80-79.984c9.373-9.373 9.373-24.569 0-33.941l-80-79.981C409.943 24.021 384 34.582 384 56.019V96h-58.785a12.004 12.004 0 0 0-8.773 3.812L96 336H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h110.785c3.326 0 6.503-1.381 8.773-3.812L352 176h32z"/></svg>',
     37            'icon-down'         => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512.011 512.011"><path d="M505.755 123.592c-8.341-8.341-21.824-8.341-30.165 0L256.005 343.176 36.421 123.592c-8.341-8.341-21.824-8.341-30.165 0s-8.341 21.824 0 30.165l234.667 234.667a21.275 21.275 0 0015.083 6.251 21.275 21.275 0 0015.083-6.251l234.667-234.667c8.34-8.341 8.34-21.824-.001-30.165z"/></svg>',
     38            'icon-btt-icon1'    => '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5 15L12 8L19 15" stroke-width="1.5" stroke-linejoin="round"/></svg>',
     39            'icon-btt-icon2'    => '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5 15l7-7 7 7" stroke-width="3" stroke-linejoin="round"/></svg>',
     40            'icon-btt-icon3'    => '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7 12l5.5-5.5m0 0L18 12m-5.5-5.5V19" stroke-width="1.5" stroke-linejoin="round"/></svg>',
     41            'icon-btt-icon4'    => '<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7 12l5.5-5.5m0 0L18 12m-5.5-5.5V19" stroke-width="3" stroke-linejoin="round"/></svg>',                   
     42            'icon-facebook'     => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M504 256C504 119 393 8 256 8S8 119 8 256c0 123.78 90.69 226.38 209.25 245V327.69h-63V256h63v-54.64c0-62.15 37-96.48 93.67-96.48 27.14 0 55.52 4.84 55.52 4.84v61h-31.28c-30.8 0-40.41 19.12-40.41 38.73V256h68.78l-11 71.69h-57.78V501C413.31 482.38 504 379.78 504 256z"/></svg>',
     43            'icon-twitter'      => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"/></svg>',
     44            'icon-github'       => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg>',
     45            'icon-linkedin'     => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"/></svg>',
     46            'icon-youtube'      => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"/></svg>',
     47            'icon-xing'         => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M162.7 210c-1.8 3.3-25.2 44.4-70.1 123.5-4.9 8.3-10.8 12.5-17.7 12.5H9.8c-7.7 0-12.1-7.5-8.5-14.4l69-121.3c.2 0 .2-.1 0-.3l-43.9-75.6c-4.3-7.8.3-14.1 8.5-14.1H100c7.3 0 13.3 4.1 18 12.2l44.7 77.5zM382.6 46.1l-144 253v.3L330.2 466c3.9 7.1.2 14.1-8.5 14.1h-65.2c-7.6 0-13.6-4-18-12.2l-92.4-168.5c3.3-5.8 51.5-90.8 144.8-255.2 4.6-8.1 10.4-12.2 17.5-12.2h65.7c8 0 12.3 6.7 8.5 14.1z"/></svg>',
     48            'icon-instagram'    => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"/></svg>',
     49            'icon-flickr'       => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zM144.5 319c-35.1 0-63.5-28.4-63.5-63.5s28.4-63.5 63.5-63.5 63.5 28.4 63.5 63.5-28.4 63.5-63.5 63.5zm159 0c-35.1 0-63.5-28.4-63.5-63.5s28.4-63.5 63.5-63.5 63.5 28.4 63.5 63.5-28.4 63.5-63.5 63.5z"/></svg>',
     50            'icon-dribbble'     => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 8C119.252 8 8 119.252 8 256s111.252 248 248 248 248-111.252 248-248S392.748 8 256 8zm163.97 114.366c29.503 36.046 47.369 81.957 47.835 131.955-6.984-1.477-77.018-15.682-147.502-6.818-5.752-14.041-11.181-26.393-18.617-41.614 78.321-31.977 113.818-77.482 118.284-83.523zM396.421 97.87c-3.81 5.427-35.697 48.286-111.021 76.519-34.712-63.776-73.185-116.168-79.04-124.008 67.176-16.193 137.966 1.27 190.061 47.489zm-230.48-33.25c5.585 7.659 43.438 60.116 78.537 122.509-99.087 26.313-186.36 25.934-195.834 25.809C62.38 147.205 106.678 92.573 165.941 64.62zM44.17 256.323c0-2.166.043-4.322.108-6.473 9.268.19 111.92 1.513 217.706-30.146 6.064 11.868 11.857 23.915 17.174 35.949-76.599 21.575-146.194 83.527-180.531 142.306C64.794 360.405 44.17 310.73 44.17 256.323zm81.807 167.113c22.127-45.233 82.178-103.622 167.579-132.756 29.74 77.283 42.039 142.053 45.189 160.638-68.112 29.013-150.015 21.053-212.768-27.882zm248.38 8.489c-2.171-12.886-13.446-74.897-41.152-151.033 66.38-10.626 124.7 6.768 131.947 9.055-9.442 58.941-43.273 109.844-90.795 141.978z"/></svg>',
     51            'icon-vk'           => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M545 117.7c3.7-12.5 0-21.7-17.8-21.7h-58.9c-15 0-21.9 7.9-25.6 16.7 0 0-30 73.1-72.4 120.5-13.7 13.7-20 18.1-27.5 18.1-3.7 0-9.4-4.4-9.4-16.9V117.7c0-15-4.2-21.7-16.6-21.7h-92.6c-9.4 0-15 7-15 13.5 0 14.2 21.2 17.5 23.4 57.5v86.8c0 19-3.4 22.5-10.9 22.5-20 0-68.6-73.4-97.4-157.4-5.8-16.3-11.5-22.9-26.6-22.9H38.8c-16.8 0-20.2 7.9-20.2 16.7 0 15.6 20 93.1 93.1 195.5C160.4 378.1 229 416 291.4 416c37.5 0 42.1-8.4 42.1-22.9 0-66.8-3.4-73.1 15.4-73.1 8.7 0 23.7 4.4 58.7 38.1 40 40 46.6 57.9 69 57.9h58.9c16.8 0 25.3-8.4 20.4-25-11.2-34.9-86.9-106.7-90.3-111.5-8.7-11.2-6.2-16.2 0-26.2.1-.1 72-101.3 79.4-135.6z"/></svg>',
     52            'icon-weibo'        => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M407 177.6c7.6-24-13.4-46.8-37.4-41.7-22 4.8-28.8-28.1-7.1-32.8 50.1-10.9 92.3 37.1 76.5 84.8-6.8 21.2-38.8 10.8-32-10.3zM214.8 446.7C108.5 446.7 0 395.3 0 310.4c0-44.3 28-95.4 76.3-143.7C176 67 279.5 65.8 249.9 161c-4 13.1 12.3 5.7 12.3 6 79.5-33.6 140.5-16.8 114 51.4-3.7 9.4 1.1 10.9 8.3 13.1 135.7 42.3 34.8 215.2-169.7 215.2zm143.7-146.3c-5.4-55.7-78.5-94-163.4-85.7-84.8 8.6-148.8 60.3-143.4 116s78.5 94 163.4 85.7c84.8-8.6 148.8-60.3 143.4-116zM347.9 35.1c-25.9 5.6-16.8 43.7 8.3 38.3 72.3-15.2 134.8 52.8 111.7 124-7.4 24.2 29.1 37 37.4 12 31.9-99.8-55.1-195.9-157.4-174.3zm-78.5 311c-17.1 38.8-66.8 60-109.1 46.3-40.8-13.1-58-53.4-40.3-89.7 17.7-35.4 63.1-55.4 103.4-45.1 42 10.8 63.1 50.2 46 88.5zm-86.3-30c-12.9-5.4-30 .3-38 12.9-8.3 12.9-4.3 28 8.6 34 13.1 6 30.8.3 39.1-12.9 8-13.1 3.7-28.3-9.7-34zm32.6-13.4c-5.1-1.7-11.4.6-14.3 5.4-2.9 5.1-1.4 10.6 3.7 12.9 5.1 2 11.7-.3 14.6-5.4 2.8-5.2 1.1-10.9-4-12.9z"/></svg>',
     53            'icon-vimeo'        => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M403.2 32H44.8C20.1 32 0 52.1 0 76.8v358.4C0 459.9 20.1 480 44.8 480h358.4c24.7 0 44.8-20.1 44.8-44.8V76.8c0-24.7-20.1-44.8-44.8-44.8zM377 180.8c-1.4 31.5-23.4 74.7-66 129.4-44 57.2-81.3 85.8-111.7 85.8-18.9 0-34.8-17.4-47.9-52.3-25.5-93.3-36.4-148-57.4-148-2.4 0-10.9 5.1-25.4 15.2l-15.2-19.6c37.3-32.8 72.9-69.2 95.2-71.2 25.2-2.4 40.7 14.8 46.5 51.7 20.7 131.2 29.9 151 67.6 91.6 13.5-21.4 20.8-37.7 21.8-48.9 3.5-33.2-25.9-30.9-45.8-22.4 15.9-52.1 46.3-77.4 91.2-76 33.3.9 49 22.5 47.1 64.7z"/></svg',
     54            'icon-mix'          => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M0 64v348.9c0 56.2 88 58.1 88 0V174.3c7.9-52.9 88-50.4 88 6.5v175.3c0 57.9 96 58 96 0V240c5.3-54.7 88-52.5 88 4.3v23.8c0 59.9 88 56.6 88 0V64H0z"/></svg>',
     55            'icon-behance'      => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M232 237.2c31.8-15.2 48.4-38.2 48.4-74 0-70.6-52.6-87.8-113.3-87.8H0v354.4h171.8c64.4 0 124.9-30.9 124.9-102.9 0-44.5-21.1-77.4-64.7-89.7zM77.9 135.9H151c28.1 0 53.4 7.9 53.4 40.5 0 30.1-19.7 42.2-47.5 42.2h-79v-82.7zm83.3 233.7H77.9V272h84.9c34.3 0 56 14.3 56 50.6 0 35.8-25.9 47-57.6 47zm358.5-240.7H376V94h143.7v34.9zM576 305.2c0-75.9-44.4-139.2-124.9-139.2-78.2 0-131.3 58.8-131.3 135.8 0 79.9 50.3 134.7 131.3 134.7 61.3 0 101-27.6 120.1-86.3H509c-6.7 21.9-34.3 33.5-55.7 33.5-41.3 0-63-24.2-63-65.3h185.1c.3-4.2.6-8.7.6-13.2zM390.4 274c2.3-33.7 24.7-54.8 58.5-54.8 35.4 0 53.2 20.8 56.2 54.8H390.4z"/></svg>',
     56            'icon-spotify'      => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M248 8C111.1 8 0 119.1 0 256s111.1 248 248 248 248-111.1 248-248S384.9 8 248 8zm100.7 364.9c-4.2 0-6.8-1.3-10.7-3.6-62.4-37.6-135-39.2-206.7-24.5-3.9 1-9 2.6-11.9 2.6-9.7 0-15.8-7.7-15.8-15.8 0-10.3 6.1-15.2 13.6-16.8 81.9-18.1 165.6-16.5 237 26.2 6.1 3.9 9.7 7.4 9.7 16.5s-7.1 15.4-15.2 15.4zm26.9-65.6c-5.2 0-8.7-2.3-12.3-4.2-62.5-37-155.7-51.9-238.6-29.4-4.8 1.3-7.4 2.6-11.9 2.6-10.7 0-19.4-8.7-19.4-19.4s5.2-17.8 15.5-20.7c27.8-7.8 56.2-13.6 97.8-13.6 64.9 0 127.6 16.1 177 45.5 8.1 4.8 11.3 11 11.3 19.7-.1 10.8-8.5 19.5-19.4 19.5zm31-76.2c-5.2 0-8.4-1.3-12.9-3.9-71.2-42.5-198.5-52.7-280.9-29.7-3.6 1-8.1 2.6-12.9 2.6-13.2 0-23.3-10.3-23.3-23.6 0-13.6 8.4-21.3 17.4-23.9 35.2-10.3 74.6-15.2 117.5-15.2 73 0 149.5 15.2 205.4 47.8 7.8 4.5 12.9 10.7 12.9 22.6 0 13.6-11 23.3-23.2 23.3z"/></svg>',
     57            'icon-soundcloud'   => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><path d="M111.4 256.3l5.8 65-5.8 68.3c-.3 2.5-2.2 4.4-4.4 4.4s-4.2-1.9-4.2-4.4l-5.6-68.3 5.6-65c0-2.2 1.9-4.2 4.2-4.2 2.2 0 4.1 2 4.4 4.2zm21.4-45.6c-2.8 0-4.7 2.2-5 5l-5 105.6 5 68.3c.3 2.8 2.2 5 5 5 2.5 0 4.7-2.2 4.7-5l5.8-68.3-5.8-105.6c0-2.8-2.2-5-4.7-5zm25.5-24.1c-3.1 0-5.3 2.2-5.6 5.3l-4.4 130 4.4 67.8c.3 3.1 2.5 5.3 5.6 5.3 2.8 0 5.3-2.2 5.3-5.3l5.3-67.8-5.3-130c0-3.1-2.5-5.3-5.3-5.3zM7.2 283.2c-1.4 0-2.2 1.1-2.5 2.5L0 321.3l4.7 35c.3 1.4 1.1 2.5 2.5 2.5s2.2-1.1 2.5-2.5l5.6-35-5.6-35.6c-.3-1.4-1.1-2.5-2.5-2.5zm23.6-21.9c-1.4 0-2.5 1.1-2.5 2.5l-6.4 57.5 6.4 56.1c0 1.7 1.1 2.8 2.5 2.8s2.5-1.1 2.8-2.5l7.2-56.4-7.2-57.5c-.3-1.4-1.4-2.5-2.8-2.5zm25.3-11.4c-1.7 0-3.1 1.4-3.3 3.3L47 321.3l5.8 65.8c.3 1.7 1.7 3.1 3.3 3.1 1.7 0 3.1-1.4 3.1-3.1l6.9-65.8-6.9-68.1c0-1.9-1.4-3.3-3.1-3.3zm25.3-2.2c-1.9 0-3.6 1.4-3.6 3.6l-5.8 70 5.8 67.8c0 2.2 1.7 3.6 3.6 3.6s3.6-1.4 3.9-3.6l6.4-67.8-6.4-70c-.3-2.2-2-3.6-3.9-3.6zm241.4-110.9c-1.1-.8-2.8-1.4-4.2-1.4-2.2 0-4.2.8-5.6 1.9-1.9 1.7-3.1 4.2-3.3 6.7v.8l-3.3 176.7 1.7 32.5 1.7 31.7c.3 4.7 4.2 8.6 8.9 8.6s8.6-3.9 8.6-8.6l3.9-64.2-3.9-177.5c-.4-3-2-5.8-4.5-7.2zm-26.7 15.3c-1.4-.8-2.8-1.4-4.4-1.4s-3.1.6-4.4 1.4c-2.2 1.4-3.6 3.9-3.6 6.7l-.3 1.7-2.8 160.8s0 .3 3.1 65.6v.3c0 1.7.6 3.3 1.7 4.7 1.7 1.9 3.9 3.1 6.4 3.1 2.2 0 4.2-1.1 5.6-2.5 1.7-1.4 2.5-3.3 2.5-5.6l.3-6.7 3.1-58.6-3.3-162.8c-.3-2.8-1.7-5.3-3.9-6.7zm-111.4 22.5c-3.1 0-5.8 2.8-5.8 6.1l-4.4 140.6 4.4 67.2c.3 3.3 2.8 5.8 5.8 5.8 3.3 0 5.8-2.5 6.1-5.8l5-67.2-5-140.6c-.2-3.3-2.7-6.1-6.1-6.1zm376.7 62.8c-10.8 0-21.1 2.2-30.6 6.1-6.4-70.8-65.8-126.4-138.3-126.4-17.8 0-35 3.3-50.3 9.4-6.1 2.2-7.8 4.4-7.8 9.2v249.7c0 5 3.9 8.6 8.6 9.2h218.3c43.3 0 78.6-35 78.6-78.3.1-43.6-35.2-78.9-78.5-78.9zm-296.7-60.3c-4.2 0-7.5 3.3-7.8 7.8l-3.3 136.7 3.3 65.6c.3 4.2 3.6 7.5 7.8 7.5 4.2 0 7.5-3.3 7.5-7.5l3.9-65.6-3.9-136.7c-.3-4.5-3.3-7.8-7.5-7.8zm-53.6-7.8c-3.3 0-6.4 3.1-6.4 6.7l-3.9 145.3 3.9 66.9c.3 3.6 3.1 6.4 6.4 6.4 3.6 0 6.4-2.8 6.7-6.4l4.4-66.9-4.4-145.3c-.3-3.6-3.1-6.7-6.7-6.7zm26.7 3.4c-3.9 0-6.9 3.1-6.9 6.9L227 321.3l3.9 66.4c.3 3.9 3.1 6.9 6.9 6.9s6.9-3.1 6.9-6.9l4.2-66.4-4.2-141.7c0-3.9-3-6.9-6.9-6.9z"/></svg>',
     58            'icon-twitch'       => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M391.17,103.47H352.54v109.7h38.63ZM285,103H246.37V212.75H285ZM120.83,0,24.31,91.42V420.58H140.14V512l96.53-91.42h77.25L487.69,256V0ZM449.07,237.75l-77.22,73.12H294.61l-67.6,64v-64H140.14V36.58H449.07Z"/></svg>',
     59            'icon-bandcamp'     => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm48.2,326.1h-181L207.9,178h181Z"/></svg>',
     60            'icon-etsy'         => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M384 348c-1.75 10.75-13.75 110-15.5 132-117.879-4.299-219.895-4.743-368.5 0v-25.5c45.457-8.948 60.627-8.019 61-35.25 1.793-72.322 3.524-244.143 0-322-1.029-28.46-12.13-26.765-61-36v-25.5c73.886 2.358 255.933 8.551 362.999-3.75-3.5 38.25-7.75 126.5-7.75 126.5H332C320.947 115.665 313.241 68 277.25 68h-137c-10.25 0-10.75 3.5-10.75 9.75V241.5c58 .5 88.5-2.5 88.5-2.5 29.77-.951 27.56-8.502 40.75-65.251h25.75c-4.407 101.351-3.91 61.829-1.75 160.25H257c-9.155-40.086-9.065-61.045-39.501-61.5 0 0-21.5-2-88-2v139c0 26 14.25 38.25 44.25 38.25H263c63.636 0 66.564-24.996 98.751-99.75H384z"/></svg>',
     61            'icon-pinterest'    => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path d="M496 256c0 137-111 248-248 248-25.6 0-50.2-3.9-73.4-11.1 10.1-16.5 25.2-43.5 30.8-65 3-11.6 15.4-59 15.4-59 8.1 15.4 31.7 28.5 56.8 28.5 74.8 0 128.7-68.8 128.7-154.3 0-81.9-66.9-143.2-152.9-143.2-107 0-163.9 71.8-163.9 150.1 0 36.4 19.4 81.7 50.3 96.1 4.7 2.2 7.2 1.2 8.3-3.3.8-3.4 5-20.3 6.9-28.1.6-2.5.3-4.7-1.7-7.1-10.1-12.5-18.3-35.3-18.3-56.6 0-54.7 41.4-107.6 112-107.6 60.9 0 103.6 41.5 103.6 100.9 0 67.1-33.9 113.6-78 113.6-24.3 0-42.6-20.1-36.7-44.8 7-29.5 20.5-61.3 20.5-82.6 0-19-10.2-34.9-31.4-34.9-24.9 0-44.9 25.7-44.9 60.2 0 22 7.4 36.8 7.4 36.8s-24.5 103.8-29 123.2c-5 21.4-3 51.6-.9 71.2C65.4 450.9 0 361.1 0 256 0 119 111 8 248 8s248 111 248 248z"/></svg>',
    3762        );
    3863    }
  • sydney/1.79/inc/extras.php

    r143293 r153790  
    128128    return function_exists( 'amp_is_request' ) && amp_is_request();
    129129}
     130
     131/**
     132 * Update fontawesome ajax callback
     133 */
     134function sydney_update_fontawesome_callback() {
     135    check_ajax_referer( 'sydney-fa-updt-nonce', 'nonce' );
     136
     137    update_option( 'sydney-fontawesome-v5', true );
     138
     139    wp_send_json( array(
     140        'success' => true
     141    ) );
     142}
     143add_action( 'wp_ajax_sydney_update_fontawesome_callback', 'sydney_update_fontawesome_callback' );
     144
     145/**
     146 * Check which version of fontawesome is active
     147 * and return the needed class prefix
     148 */
     149function sydney_get_fontawesome_prefix( $v5_prefix = '' ) {
     150    $fa_prefix = 'fa '; // v4
     151    if( get_option( 'sydney-fontawesome-v5' ) ) {
     152        $fa_prefix = $v5_prefix;
     153    }
     154
     155    return $fa_prefix;
     156}
     157
     158/*
     159* Append gotop button html on footer
     160* Ensure compatibility with plugins that handle with footer like header/footer builders
     161*/
     162function sydney_append_gotop_html() {
     163   
     164    $enable = get_theme_mod( 'enable_scrolltop', 1 );
     165
     166    if ( !$enable ) {
     167        return;
     168    }
     169
     170    $type       = get_theme_mod( 'scrolltop_type', 'icon' );           
     171    $text       = get_theme_mod( 'scrolltop_text', esc_html__( 'Back to top', 'sydney' ) );
     172    $icon       = get_theme_mod( 'scrolltop_icon', 'icon2' );
     173    $visibility = get_theme_mod( 'scrolltop_visibility', 'all' );
     174    $position   = get_theme_mod( 'scrolltop_position', 'right' );
     175
     176    echo '<a on="tap:toptarget.scrollTo(duration=200)" class="go-top visibility-' . esc_attr( $visibility ) . ' position-' . esc_attr( $position ) . '">';
     177    if ( 'text' === $type ) {
     178        echo '<span>' . esc_html( $text ) . '</span>';
     179    }
     180    echo    '<i class="sydney-svg-icon">' . sydney_get_svg_icon( 'icon-btt-' . $icon, false ) . '</i>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     181    echo '</a>';
     182
     183}
     184add_action('wp_footer', 'sydney_append_gotop_html', 1);
     185
     186/**
     187 * Get social network
     188 */
     189function sydney_get_social_network( $social ) {
     190
     191    $networks = array( 'facebook', 'twitter', 'instagram', 'github', 'linkedin', 'youtube', 'xing', 'flickr', 'dribbble', 'vk', 'weibo', 'vimeo', 'mix', 'behance', 'spotify', 'soundcloud', 'twitch', 'bandcamp', 'etsy', 'pinterest' );
     192
     193    foreach ( $networks as $network ) {
     194        $found = strpos( $social, $network );
     195
     196        if ( $found !== false ) {
     197            return $network;
     198        }
     199    }
     200}
     201
     202/**
     203 * Social profile list
     204 */
     205function sydney_social_profile( $location ) {
     206       
     207    $social_links = get_theme_mod( $location );
     208
     209    if ( !$social_links ) {
     210        return;
     211    }
     212
     213    $social_links = explode( ',', $social_links );
     214
     215    $items = '<div class="social-profile">';
     216    foreach ( $social_links as $social ) {
     217        $network = sydney_get_social_network( $social );
     218        if ( $network ) {
     219            $items .= '<a target="_blank" href="' . esc_url( $social ) . '"><i class="sydney-svg-icon">' . sydney_get_svg_icon( 'icon-' . esc_html( $network ), false ) . '</i></a>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     220        }
     221    }
     222    $items .= '</div>';
     223
     224    echo $items; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     225}
     226
     227/**
     228 * Footer credits
     229 */
     230function sydney_footer_credits() {
     231
     232    /* translators: %1$1s, %2$2s theme copyright tags*/
     233    $credits    = get_theme_mod( 'footer_credits', sprintf( esc_html__( '%1$1s. Proudly powered by %2$2s', 'sydney' ), '{copyright} {year} {site_title}', '{theme_author}' ) );
     234
     235    $tags       = array( '{theme_author}', '{site_title}', '{copyright}', '{year}' );
     236    $replace    = array( '<a rel="nofollow" href="https://athemes.com/theme/sydney/">' . esc_html__( 'Sydney', 'sydney' ) . '</a>', get_bloginfo( 'name' ), '&copy;', date('Y') );
     237
     238    $credits    = str_replace( $tags, $replace, $credits );
     239
     240    $credits    = '<div class="sydney-credits">' . $credits . '</div>';
     241
     242    return $credits;
     243}
  • sydney/1.79/inc/styles.php

    r150497 r153790  
    11<?php
    22/**
    3  * @package Sydney
     3 * Class for dynamic CSS output
     4 *
    45 */
    56
    6 //Converts hex colors to rgba for the menu background color
    7 function sydney_hex2rgba($color, $opacity = false) {
    8 
    9         if ($color[0] == '#' ) {
    10             $color = substr( $color, 1 );
     7if ( !class_exists( 'Sydney_Custom_CSS' ) ) :
     8
     9    /**
     10     * Sydney_Custom_CSS
     11     */
     12    Class Sydney_Custom_CSS {
     13
     14        /**
     15         * Instance
     16         */     
     17        private static $instance;
     18
     19        /**
     20         * Initiator
     21         */
     22        public static function get_instance() {
     23            if ( ! isset( self::$instance ) ) {
     24                self::$instance = new self;
     25            }
     26            return self::$instance;
     27        }
     28
     29        /**
     30         * Constructor
     31         */
     32        public function __construct() {
     33            add_action( 'wp_enqueue_scripts', array( $this, 'print_styles' ) );
     34        }
     35
     36        /**
     37         * Output all custom CSS
     38         */
     39        public function output_css( $custom = false ) {
     40
     41            $is_amp = sydney_is_amp();
     42
     43            $custom = '';
     44       
     45            //Woocommerce
     46            $yith_buttons_visible = get_theme_mod( 'yith_buttons_visible', 0 );
     47            if ( $yith_buttons_visible ) {
     48                $custom .= ".yith-placeholder > * { opacity:1!important;left:0!important;}"."\n";
     49            }
     50       
     51            //Get thumbnails for shop and shop archives
     52            $shop_thumb = get_the_post_thumbnail_url( get_option( 'woocommerce_shop_page_id' ) );
     53            if ( class_exists( 'Woocommerce' ) && is_product_category() ) {
     54                global $wp_query;
     55                $cat            = $wp_query->get_queried_object();
     56                $thumbnail_id   = get_term_meta( $cat->term_id, 'thumbnail_id', true );
     57                $shop_archive_thumb = wp_get_attachment_url( $thumbnail_id );
     58            }
     59       
     60            if ( class_exists( 'Woocommerce' ) && is_shop() && $shop_thumb ) {
     61                $custom .= ".header-image { background-image:url(" . esc_url($shop_thumb) . ")!important;display:block;}"."\n";
     62                $custom .= ".site-header { background-color:transparent;}" . "\n";
     63                $custom .= "@media only screen and (max-width: 1024px) { .sydney-hero-area .header-image { height:300px!important; }}" . "\n";
     64                $shop_overlay = get_theme_mod( 'hide_overlay_shop' );
     65                if ( $shop_overlay ) {
     66                    $custom .= ".header-image .overlay { background-color:transparent;}" . "\n";
     67                }
     68            } elseif ( class_exists( 'Woocommerce' ) && is_product_category() && $shop_archive_thumb ) {
     69                $custom .= ".header-image { background-image:url(" . esc_url($shop_archive_thumb) . ")!important;display:block;}"."\n";
     70                if ( !$is_amp ) {
     71                    $custom .= ".site-header { background-color:transparent;}" . "\n";
     72                }
     73                $custom .= "@media only screen and (max-width: 1024px) { .sydney-hero-area .header-image { height:300px!important; }}" . "\n";
     74            } elseif ( $is_amp || (get_theme_mod('front_header_type','nothing') == 'nothing' && is_front_page()) || (get_theme_mod('site_header_type') == 'nothing' && !is_front_page()) ) {
     75                $menu_bg_color = get_theme_mod( 'menu_bg_color', '#263246' );
     76                $rgba   = $this->hex2rgba($menu_bg_color, 0.9);
     77                $custom .= ".site-header { background-color:" . esc_attr($rgba) . ";}" . "\n";
     78            }
     79       
     80            $wc_button_hover = get_theme_mod( 'wc_button_hover', 0 );
     81            if ( $wc_button_hover ) {
     82                $custom .= "
     83                @media only screen and (min-width: 1024px) {
     84                .loop-button-wrapper {position: absolute;bottom: 0;width: 100%;left: 0;opacity: 0;transition: all 0.3s;}
     85                .woocommerce ul.products li.product .woocommerce-loop-product__title,
     86                .woocommerce ul.products li.product .price {transition: all 0.3s;}
     87                .woocommerce ul.products li.product:hover .loop-button-wrapper {opacity: 1;bottom: 20px;}
     88                .woocommerce ul.products li.product:hover .woocommerce-loop-product__title,
     89                .woocommerce ul.products li.product:hover .price {opacity: 0;} }" . "\n";
     90            }
     91       
     92            global $post;
     93            if ( isset( $post ) ) {
     94                $elementor_page = get_post_meta( $post->ID, '_elementor_edit_mode', true );
     95                if ( !$elementor_page ) {
     96                    $custom .= "html { scroll-behavior: smooth;}" . "\n";
     97                }
     98            } else {
     99                $custom .= "html { scroll-behavior: smooth;}" . "\n";
     100            }   
     101       
     102            //Fonts
     103            $body_fonts     = get_theme_mod( 'body_font', 'Raleway' ); 
     104            $headings_fonts = get_theme_mod( 'headings_font', 'Raleway' );
     105            $custom .= "body, #mainnav ul ul a { font-family:" . $body_fonts . ";}"."\n";
     106            $custom .= "h1, h2, h3, h4, h5, h6, #mainnav ul li a, .portfolio-info, .roll-testimonials .name, .roll-team .team-content .name, .roll-team .team-item .team-pop .name, .roll-tabs .menu-tab li a, .roll-testimonials .name, .roll-project .project-filter li a, .roll-button, .roll-counter .name-count, .roll-counter .numb-count button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] { font-family:" . $headings_fonts . ";}"."\n";
     107           
     108                //Site title
     109            $site_title_size = get_theme_mod( 'site_title_size', '32' );
     110            if ($site_title_size) {
     111                $custom .= ".site-title { font-size:" . intval($site_title_size) . "px; }"."\n";
     112            }
     113            //Site description
     114            $site_desc_size = get_theme_mod( 'site_desc_size', '16' );
     115            if ($site_desc_size) {
     116                $custom .= ".site-description { font-size:" . intval($site_desc_size) . "px; }"."\n";
     117            }
     118            //Menu
     119            $menu_size = get_theme_mod( 'menu_size', '14' );
     120            if ($menu_size) {
     121                $custom .= "#mainnav ul li a { font-size:" . intval($menu_size) . "px; }"."\n";
     122            }               
     123            //H1 size
     124            $h1_size = get_theme_mod( 'h1_size','52' );
     125            if ($h1_size) {
     126                $custom .= "h1 { font-size:" . intval($h1_size) . "px; }"."\n";
     127            }
     128            //H2 size
     129            $h2_size = get_theme_mod( 'h2_size','42' );
     130            if ($h2_size) {
     131                $custom .= "h2 { font-size:" . intval($h2_size) . "px; }"."\n";
     132            }
     133            //H3 size
     134            $h3_size = get_theme_mod( 'h3_size','32' );
     135            if ($h3_size) {
     136                $custom .= "h3 { font-size:" . intval($h3_size) . "px; }"."\n";
     137            }
     138            //H4 size
     139            $h4_size = get_theme_mod( 'h4_size','25' );
     140            if ($h4_size) {
     141                $custom .= "h4 { font-size:" . intval($h4_size) . "px; }"."\n";
     142            }
     143            //H5 size
     144            $h5_size = get_theme_mod( 'h5_size','20' );
     145            if ($h5_size) {
     146                $custom .= "h5 { font-size:" . intval($h5_size) . "px; }"."\n";
     147            }
     148            //H6 size
     149            $h6_size = get_theme_mod( 'h6_size','18' );
     150            if ($h6_size) {
     151                $custom .= "h6 { font-size:" . intval($h6_size) . "px; }"."\n";
     152            }
     153            //Body size
     154            $body_size = get_theme_mod( 'body_size', '16' );
     155            if ($body_size) {
     156                $custom .= "body { font-size:" . intval($body_size) . "px; }"."\n";
     157            }
     158            //Single post title
     159            $single_post_title_size = get_theme_mod( 'single_post_title_size', '36' );
     160            if ($single_post_title_size) {
     161                $custom .= ".single .hentry .title-post { font-size:" . intval($single_post_title_size) . "px; }"."\n";
     162            }
     163            //Header image
     164            $header_bg_size = get_theme_mod('header_bg_size','cover'); 
     165            $header_height = get_theme_mod('header_height','300');
     166            $custom .= ".header-image { background-size:" . esc_attr($header_bg_size) . ";}"."\n";
     167            $custom .= ".header-image { height:" . intval($header_height) . "px; }"."\n";
     168       
     169            //Menu style
     170            $sticky_menu = get_theme_mod('sticky_menu','sticky');
     171            if ($sticky_menu == 'static') {
     172                $custom .= ".site-header.fixed { position: absolute;}"."\n";
     173            }
     174            $menu_style = get_theme_mod('menu_style','inline');
     175            if ($menu_style == 'centered') {
     176                $custom .= ".header-wrap .col-md-4, .header-wrap .col-md-8 { width: 100%; text-align: center;}"."\n";
     177                $custom .= "#mainnav { float: none;}"."\n";
     178                $custom .= "#mainnav li { float: none; display: inline-block;}"."\n";
     179                $custom .= "#mainnav ul ul li { display: block; text-align: left; float:left;}"."\n";
     180                if( get_bloginfo( 'description' ) || get_bloginfo( 'name' ) || get_theme_mod('site_logo') ) {
     181                    $custom .= ".site-logo, .header-wrap .col-md-4 { margin-bottom: 15px; }"."\n";
     182                }
     183                $custom .= ".btn-menu { margin: 0 auto; float: none; }"."\n";
     184                $custom .= ".header-wrap .container > .row { display: block; }"."\n";
     185            }   
     186       
     187            //AMP
     188            if ( 'sticky' == $sticky_menu && $is_amp ) {
     189                $custom .= ".site-header { position: -webkit-sticky;position: sticky;}"."\n";
     190            }
     191       
     192       
     193            //__COLORS
     194            //Primary color
     195            $primary_color = get_theme_mod( 'primary_color', '#d65050' );
     196            if ( $primary_color != '#d65050' ) {
     197            $custom .= ".llms-student-dashboard .llms-button-secondary:hover,.llms-button-action:hover,.read-more-gt,.widget-area .widget_fp_social a,#mainnav ul li a:hover, .sydney_contact_info_widget span, .roll-team .team-content .name,.roll-team .team-item .team-pop .team-social li:hover a,.roll-infomation li.address:before,.roll-infomation li.phone:before,.roll-infomation li.email:before,.roll-testimonials .name,.roll-button.border,.roll-button:hover,.roll-icon-list .icon i,.roll-icon-list .content h3 a:hover,.roll-icon-box.white .content h3 a,.roll-icon-box .icon i,.roll-icon-box .content h3 a:hover,.switcher-container .switcher-icon a:focus,.go-top:hover,.hentry .meta-post a:hover,#mainnav > ul > li > a.active, #mainnav > ul > li > a:hover, button:hover, input[type=\"button\"]:hover, input[type=\"reset\"]:hover, input[type=\"submit\"]:hover, .text-color, .social-menu-widget a, .social-menu-widget a:hover, .archive .team-social li a, a, h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,.classic-alt .meta-post a,.single .hentry .meta-post a, .content-area.modern .hentry .meta-post span:before, .content-area.modern .post-cat { color:" . esc_attr($primary_color) . "}"."\n";
     198            $custom .= ".llms-student-dashboard .llms-button-secondary,.llms-button-action,.reply,.woocommerce #respond input#submit,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.project-filter li a.active, .project-filter li a:hover,.preloader .pre-bounce1, .preloader .pre-bounce2,.roll-team .team-item .team-pop,.roll-progress .progress-animate,.roll-socials li a:hover,.roll-project .project-item .project-pop,.roll-project .project-filter li.active,.roll-project .project-filter li:hover,.roll-button.light:hover,.roll-button.border:hover,.roll-button,.roll-icon-box.white .icon,.owl-theme .owl-controls .owl-page.active span,.owl-theme .owl-controls.clickable .owl-page:hover span,.go-top,.bottom .socials li:hover a,.sidebar .widget:before,.blog-pagination ul li.active,.blog-pagination ul li:hover a,.content-area .hentry:after,.text-slider .maintitle:after,.error-wrap #search-submit:hover,#mainnav .sub-menu li:hover > a,#mainnav ul li ul:after, button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"], .panel-grid-cell .widget-title:after { background-color:" . esc_attr($primary_color) . "}"."\n";
     199            $custom .= ".llms-student-dashboard .llms-button-secondary,.llms-student-dashboard .llms-button-secondary:hover,.llms-button-action,.llms-button-action:hover,.roll-socials li a:hover,.roll-socials li a,.roll-button.light:hover,.roll-button.border,.roll-button,.roll-icon-list .icon,.roll-icon-box .icon,.owl-theme .owl-controls .owl-page span,.comment .comment-detail,.widget-tags .tag-list a:hover,.blog-pagination ul li,.hentry blockquote,.error-wrap #search-submit:hover,textarea:focus,input[type=\"text\"]:focus,input[type=\"password\"]:focus,input[type=\"datetime\"]:focus,input[type=\"datetime-local\"]:focus,input[type=\"date\"]:focus,input[type=\"month\"]:focus,input[type=\"time\"]:focus,input[type=\"week\"]:focus,input[type=\"number\"]:focus,input[type=\"email\"]:focus,input[type=\"url\"]:focus,input[type=\"search\"]:focus,input[type=\"tel\"]:focus,input[type=\"color\"]:focus, button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"], .archive .team-social li a { border-color:" . esc_attr($primary_color) . "}"."\n";
     200            }
     201            //Primary color SVGs
     202            $custom .= ".sydney_contact_info_widget span { fill:" . esc_attr( $primary_color ) . ";}" . "\n";
     203            $custom .= ".go-top:hover svg { stroke:" . esc_attr( $primary_color ) . ";}" . "\n";
     204       
     205            //Menu background
     206            $menu_bg_color = get_theme_mod( 'menu_bg_color', '#000000' );
     207            $rgba = $this->hex2rgba($menu_bg_color, 0.9);
     208            $custom .= ".site-header.float-header { background-color:" . esc_attr($rgba) . ";}" . "\n";
     209            $custom .= "@media only screen and (max-width: 1024px) { .site-header { background-color:" . esc_attr($menu_bg_color) . ";}}" . "\n";
     210            //Site title
     211            $site_title = get_theme_mod( 'site_title_color', '#ffffff' );
     212            $custom .= ".site-title a, .site-title a:hover { color:" . esc_attr($site_title) . "}"."\n";
     213            //Site desc
     214            $site_desc = get_theme_mod( 'site_desc_color', '#ffffff' );
     215            $custom .= ".site-description { color:" . esc_attr($site_desc) . "}"."\n";
     216            //Top level menu items color
     217            $top_items_color = get_theme_mod( 'top_items_color', '#ffffff' );
     218            $custom .= "#mainnav ul li a, #mainnav ul li::before { color:" . esc_attr($top_items_color) . "}"."\n";
     219            //Sub menu items color
     220            $submenu_items_color = get_theme_mod( 'submenu_items_color', '#ffffff' );
     221            $custom .= "#mainnav .sub-menu li a { color:" . esc_attr($submenu_items_color) . "}"."\n";
     222            //Sub menu background
     223            $submenu_background = get_theme_mod( 'submenu_background', '#1c1c1c' );
     224            $custom .= "#mainnav .sub-menu li a { background:" . esc_attr($submenu_background) . "}"."\n";
     225            //Header slider text
     226            $slider_text = get_theme_mod( 'slider_text', '#ffffff' );
     227            $custom .= ".text-slider .maintitle, .text-slider .subtitle { color:" . esc_attr($slider_text) . "}"."\n";
     228            //Body
     229            $body_text = get_theme_mod( 'body_text_color', '#47425d' );
     230            $custom .= "body { color:" . esc_attr($body_text) . "}"."\n";
     231            //Sidebar background
     232            $sidebar_background = get_theme_mod( 'sidebar_background', '#ffffff' );
     233            $custom .= "#secondary { background-color:" . esc_attr($sidebar_background) . "}"."\n";
     234            //Sidebar color
     235            $sidebar_color = get_theme_mod( 'sidebar_color', '#767676' );
     236            $custom .= "#secondary, #secondary a { color:" . esc_attr($sidebar_color) . "}"."\n";   
     237           
     238
     239            //Mobile menu icon
     240            $mobile_menu_color = get_theme_mod( 'mobile_menu_color', '#ffffff' );
     241            $custom .= ".btn-menu .sydney-svg-icon { fill:" . esc_attr($mobile_menu_color) . "}"."\n";
     242       
     243            //Menu items hover
     244            $menu_items_hover = get_theme_mod( 'menu_items_hover', '#d65050' );
     245            $custom .= "#mainnav ul li a:hover { color:" . esc_attr($menu_items_hover) . "}"."\n"; 
     246
     247            //Rows overlay
     248            $rows_overlay = get_theme_mod( 'rows_overlay', '#000000' );
     249            $custom .= ".overlay { background-color:" . esc_attr($rows_overlay) . "}"."\n";
     250       
     251            //Page wrapper padding
     252            $pw_top_padding = get_theme_mod( 'wrapper_top_padding', '83' );
     253            $pw_bottom_padding = get_theme_mod( 'wrapper_bottom_padding', '100' );
     254            $custom .= ".page-wrap { padding-top:" . intval($pw_top_padding) . "px;}"."\n";
     255            $custom .= ".page-wrap { padding-bottom:" . intval($pw_bottom_padding) . "px;}"."\n";   
     256       
     257       
     258            $text_slide = get_theme_mod('textslider_slide', 0);
     259            if ( $text_slide ) {
     260                $custom .= ".slide-inner { display:none;}"."\n";   
     261                $custom .= ".slide-inner.text-slider-stopped { display:block;}"."\n";   
     262            }
     263       
     264            $mobile_slider = get_theme_mod('mobile_slider', 'responsive');
     265            if ( $mobile_slider == 'responsive' ) {
     266                    $custom .= "@media only screen and (max-width: 1025px) {       
     267                    .mobile-slide {
     268                        display: block;
     269                    }
     270                    .slide-item {
     271                        background-image: none !important;
     272                    }
     273                    .header-slider {
     274                    }
     275                    .slide-item {
     276                        height: auto !important;
     277                    }
     278                    .slide-inner {
     279                        min-height: initial;
     280                    }
     281                }"."\n";       
     282            }
     283       
     284            //Small screens font sizes
     285            $custom .= "@media only screen and (max-width: 780px) {
     286                h1 { font-size: 32px;}
     287                h2 { font-size: 28px;}
     288                h3 { font-size: 22px;}
     289                h4 { font-size: 18px;}
     290                h5 { font-size: 16px;}
     291                h6 { font-size: 14px;}
     292            }" . "\n";
     293       
     294            if ( $is_amp ) {
     295                $custom .= ".go-top { bottom: 30px;opacity:1;visibility:visible;}" . "\n";
     296            }
     297       
     298            /* Start porting */
     299            /* Back to top */
     300            $scrolltop_radius           = get_theme_mod( 'scrolltop_radius', 2 );
     301            $scrolltop_side_offset      = get_theme_mod( 'scrolltop_side_offset', 20 );
     302            $scrolltop_bottom_offset    = get_theme_mod( 'scrolltop_bottom_offset', 10 );
     303            $scrolltop_icon_size        = get_theme_mod( 'scrolltop_icon_size', 16 );
     304            $scrolltop_padding          = get_theme_mod( 'scrolltop_padding', 15 );
     305
     306            $custom .= ".go-top.show { border-radius:" . esc_attr( $scrolltop_radius ) . "px;bottom:" . esc_attr( $scrolltop_bottom_offset ) . "px;}" . "\n";
     307            $custom .= ".go-top.position-right { right:" . esc_attr( $scrolltop_side_offset ) . "px;}" . "\n";
     308            $custom .= ".go-top.position-left { left:" . esc_attr( $scrolltop_side_offset ) . "px;}" . "\n";
     309            $custom .= $this->get_background_color_css( 'scrolltop_bg_color', '', '.go-top' );
     310            $custom .= $this->get_background_color_css( 'scrolltop_bg_color_hover', '', '.go-top:hover' );
     311            $custom .= $this->get_color_css( 'scrolltop_color', '', '.go-top' );
     312            $custom .= $this->get_stroke_css( 'scrolltop_color', '', '.go-top svg' );
     313            $custom .= $this->get_color_css( 'scrolltop_color_hover', '', '.go-top:hover' );
     314            $custom .= $this->get_stroke_css( 'scrolltop_color_hover', '', '.go-top:hover svg' );
     315            $custom .= ".go-top .sydney-svg-icon, .go-top .sydney-svg-icon svg { width:" . esc_attr( $scrolltop_icon_size ) . "px;height:" . esc_attr( $scrolltop_icon_size ) . "px;}" . "\n";
     316            $custom .= ".go-top { padding:" . esc_attr( $scrolltop_padding ) . "px;}" . "\n";
     317       
     318            /* Footer */
     319            $footer_widgets_divider         = get_theme_mod( 'footer_widgets_divider', 0 );
     320            $footer_widgets_divider_width   = get_theme_mod( 'footer_widgets_divider_width', 'contained' );
     321            $footer_widgets_divider_size    = get_theme_mod( 'footer_widgets_divider_size', 1 );
     322            $footer_widgets_divider_color   = get_theme_mod( 'footer_widgets_divider_color' );
     323
     324            if ( $footer_widgets_divider ) {
     325                if ( 'contained' === $footer_widgets_divider_width ) {
     326                    $custom .= ".footer-widgets-grid { border-top:" . esc_attr( $footer_widgets_divider_size ) . 'px solid ' . esc_attr( $footer_widgets_divider_color ) . ";}" . "\n";
     327                } else {
     328                    $custom .= ".footer-widgets { border-top:" . esc_attr( $footer_widgets_divider_size ) . 'px solid ' . esc_attr( $footer_widgets_divider_color ) . ";}" . "\n";
     329                }
     330            }
     331
     332            $footer_credits_divider         = get_theme_mod( 'footer_credits_divider', 0 );
     333            $footer_credits_divider_width   = get_theme_mod( 'footer_credits_divider_width', 'contained' );
     334            $footer_credits_divider_size    = get_theme_mod( 'footer_credits_divider_size', 1 );
     335            $footer_credits_divider_color   = get_theme_mod( 'footer_credits_divider_color', 'rgba(33,33,33,0.1)' );           
     336            if ( $footer_credits_divider ) {
     337                if ( 'contained' === $footer_credits_divider_width ) {
     338                    $custom .= ".site-info { border-top:" . esc_attr( $footer_credits_divider_size ) . 'px solid ' . esc_attr( $footer_credits_divider_color ) . ";}" . "\n";
     339                } else {
     340                    $custom .= ".site-footer { border-top:" . esc_attr( $footer_credits_divider_size ) . 'px solid ' . esc_attr( $footer_credits_divider_color ) . ";}" . "\n";
     341                }
     342            } else {
     343                $custom .= ".site-info { border-top:0;}" . "\n";
     344            }           
     345
     346            $footer_widgets_column_spacing_desktop = get_theme_mod( 'footer_widgets_column_spacing_desktop', 30 );
     347            $custom .= ".footer-widgets-grid { gap:" . esc_attr( $footer_widgets_column_spacing_desktop ) . "px;}" . "\n";
     348            $custom .= $this->get_top_bottom_padding_css( 'footer_widgets_padding', $defaults = array( 'desktop' => 95, 'tablet' => 60, 'mobile' => 60 ), '.footer-widgets-grid' );
     349            $custom .= $this->get_font_sizes_css( 'footer_widgets_title_size', $defaults = array( 'desktop' => 22, 'tablet' => 22, 'mobile' => 22 ), '.sidebar-column .widget .widget-title' );
     350
     351            $custom .= $this->get_background_color_css( 'footer_widgets_background', '', '.footer-widgets' );
     352            $custom .= $this->get_color_css( 'footer_widgets_title_color', '', '.sidebar-column .widget .widget-title' );
     353            $custom .= $this->get_color_css( 'footer_widgets_color', '', '.sidebar-column .widget' );
     354            $custom .= $this->get_color_css( 'footer_widgets_links_color', '', '.sidebar-column .widget a' );
     355            $custom .= $this->get_color_css( 'footer_widgets_links_hover_color', '', '.sidebar-column .widget a:hover' );
     356            $custom .= $this->get_background_color_css( 'footer_background', '', '.site-footer' );
     357            $custom .= $this->get_color_css( 'footer_color', '', '.site-info, .site-info a' );
     358            $custom .= $this->get_fill_css( 'footer_color', '', '.site-info .sydney-svg-icon svg' );
     359
     360            $footer_credits_padding = get_theme_mod( 'footer_credits_padding_desktop', 20 );
     361            $custom .= ".site-info { padding-top:" . esc_attr( $footer_credits_padding ) . 'px;padding-bottom:' . esc_attr( $footer_credits_padding ) . "px;}" . "\n";
     362
     363            /* End porting */
     364       
     365            $custom = apply_filters( 'sydney_custom_css', $custom );
     366
     367            $custom = $this->minify( $custom );
     368
     369            return $custom;
     370        }
     371
     372        /**
     373         * Print styles
     374         */
     375        public function print_styles() {
     376
     377            $custom = $this->output_css();
     378
     379            wp_add_inline_style( 'sydney-style', $custom );
     380        }
     381
     382        /**
     383         * CSS code minification.
     384         */
     385        private function minify( $css ) {
     386            $css = preg_replace( '/\s+/', ' ', $css );
     387            $css = preg_replace( '/\/\*[^\!](.*?)\*\//', '', $css );
     388            $css = preg_replace( '/(,|:|;|\{|}) /', '$1', $css );
     389            $css = preg_replace( '/ (,|;|\{|})/', '$1', $css );
     390            $css = preg_replace( '/(:| )0\.([0-9]+)(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}.${2}${3}', $css );
     391            $css = preg_replace( '/(:| )(\.?)0(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}0', $css );
     392
     393            return trim( $css );
     394        }
     395
     396        /**
     397         * Get color CSS
     398         */
     399        public static function get_background_color_css( $setting, $default, $selector ) {
     400            $mod = get_theme_mod( $setting, $default );
     401
     402            return $selector . '{ background-color:' . esc_attr( $mod ) . ';}' . "\n";
     403        }
     404
     405        /**
     406         * Get color CSS
     407         */
     408        public static function get_color_css( $setting, $default, $selector ) {
     409            $mod = get_theme_mod( $setting, $default );
     410
     411            return $selector . '{ color:' . esc_attr( $mod ) . ';}' . "\n";
     412        }   
     413       
     414        /**
     415         * Get fill CSS
     416         */
     417        public static function get_fill_css( $setting, $default, $selector ) {
     418            $mod = get_theme_mod( $setting, $default );
     419
     420            return $selector . '{ fill:' . esc_attr( $mod ) . ';}' . "\n";
     421        }   
     422       
     423        /**
     424         * Get stroke CSS
     425         */
     426        public static function get_stroke_css( $setting, $default, $selector ) {
     427            $mod = get_theme_mod( $setting, $default );
     428
     429            return $selector . '{ stroke:' . esc_attr( $mod ) . ';}' . "\n";
     430        }       
     431
     432        //Font sizes
     433        public static function get_font_sizes_css( $setting, $defaults = array(), $selector ) {
     434            $devices    = array(
     435                'desktop'   => '@media (min-width: 992px)',
     436                'tablet'    => '@media (min-width: 576px) and (max-width:  991px)',
     437                'mobile'    => '@media (max-width: 575px)'
     438            );
     439
     440            $css = '';
     441
     442            foreach ( $devices as $device => $media ) {
     443                $mod = get_theme_mod( $setting . '_' . $device, $defaults[$device] );
     444                $css .= $media . ' { ' . $selector . ' { font-size:' . intval( $mod ) . 'px;} }' . "\n";   
     445            }
     446
     447            return $css;
     448        }
     449       
     450        //Max width
     451        public static function get_max_width_css( $setting, $defaults = array(), $selector ) {
     452            $devices    = array(
     453                'desktop'   => '@media (min-width: 992px)',
     454                'tablet'    => '@media (min-width: 576px) and (max-width:  991px)',
     455                'mobile'    => '@media (max-width: 575px)'
     456            );
     457
     458            $css = '';
     459
     460            foreach ( $devices as $device => $media ) {
     461                $mod = get_theme_mod( $setting . '_' . $device, $defaults[$device] );
     462                $css .= $media . ' { ' . $selector . ' { max-width:' . intval( $mod ) . 'px;} }' . "\n";   
     463            }
     464
     465            return $css;
     466        }           
     467
     468        //Top bottom padding
     469        public static function get_top_bottom_padding_css( $setting, $defaults = array(), $selector ) {
     470            $devices    = array(
     471                'desktop'   => '@media (min-width: 992px)',
     472                'tablet'    => '@media (min-width: 576px) and (max-width:  991px)',
     473                'mobile'    => '@media (max-width: 575px)'
     474            );
     475
     476            $css = '';
     477
     478            foreach ( $devices as $device => $media ) {
     479                $mod = get_theme_mod( $setting . '_' . $device, $defaults[$device] );
     480                $css .= $media . ' { ' . $selector . ' { padding-top:' . intval( $mod ) . 'px;padding-bottom:' . intval( $mod ) . 'px;} }' . "\n"; 
     481            }
     482
     483            return $css;
     484        }   
     485
     486        //Left right padding
     487        public static function get_left_right_padding_css( $setting, $defaults = array(), $selector ) {
     488            $devices    = array(
     489                'desktop'   => '@media (min-width: 992px)',
     490                'tablet'    => '@media (min-width: 576px) and (max-width:  991px)',
     491                'mobile'    => '@media (max-width: 575px)'
     492            );
     493
     494            $css = '';
     495
     496            foreach ( $devices as $device => $media ) {
     497                $mod = get_theme_mod( $setting . '_' . $device, $defaults[$device] );
     498                $css .= $media . ' { ' . $selector . ' { padding-left:' . intval( $mod ) . 'px;padding-right:' . intval( $mod ) . 'px;} }' . "\n"; 
     499            }
     500
     501            return $css;
     502        }   
     503
     504        public function hex2rgba($color, $opacity = false) {
     505
     506            if ($color[0] == '#' ) {
     507                $color = substr( $color, 1 );
     508            }
     509            $hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] );
     510            $rgb =  array_map('hexdec', $hex);
     511            $opacity = 0.9;
     512            $output = 'rgba('.implode(",",$rgb).','.$opacity.')';
     513   
     514            return $output;
    11515        }
    12         $hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] );
    13         $rgb =  array_map('hexdec', $hex);
    14         $opacity = 0.9;
    15         $output = 'rgba('.implode(",",$rgb).','.$opacity.')';
    16 
    17         return $output;
    18 }
    19 
    20 //Dynamic styles
    21 function sydney_custom_styles($custom) {
    22 
    23     $is_amp = sydney_is_amp();
    24 
    25     $custom = '';
    26 
    27     //Woocommerce
    28     $yith_buttons_visible = get_theme_mod( 'yith_buttons_visible', 0 );
    29     if ( $yith_buttons_visible ) {
    30         $custom .= ".yith-placeholder > * { opacity:1!important;left:0!important;}"."\n";
     516
    31517    }
    32518
    33     //Get thumbnails for shop and shop archives
    34     $shop_thumb = get_the_post_thumbnail_url( get_option( 'woocommerce_shop_page_id' ) );
    35     if ( class_exists( 'Woocommerce' ) && is_product_category() ) {
    36         global $wp_query;
    37         $cat            = $wp_query->get_queried_object();
    38         $thumbnail_id   = get_term_meta( $cat->term_id, 'thumbnail_id', true );
    39         $shop_archive_thumb = wp_get_attachment_url( $thumbnail_id );
    40     }
    41 
    42     if ( class_exists( 'Woocommerce' ) && is_shop() && $shop_thumb ) {
    43         $custom .= ".header-image { background-image:url(" . esc_url($shop_thumb) . ")!important;display:block;}"."\n";
    44         $custom .= ".site-header { background-color:transparent;}" . "\n";
    45         $custom .= "@media only screen and (max-width: 1024px) { .sydney-hero-area .header-image { height:300px!important; }}" . "\n";
    46         $shop_overlay = get_theme_mod( 'hide_overlay_shop' );
    47         if ( $shop_overlay ) {
    48             $custom .= ".header-image .overlay { background-color:transparent;}" . "\n";
    49         }
    50     } elseif ( class_exists( 'Woocommerce' ) && is_product_category() && $shop_archive_thumb ) {
    51         $custom .= ".header-image { background-image:url(" . esc_url($shop_archive_thumb) . ")!important;display:block;}"."\n";
    52         if ( !$is_amp ) {
    53             $custom .= ".site-header { background-color:transparent;}" . "\n";
    54         }
    55         $custom .= "@media only screen and (max-width: 1024px) { .sydney-hero-area .header-image { height:300px!important; }}" . "\n";
    56     } elseif ( $is_amp || (get_theme_mod('front_header_type','nothing') == 'nothing' && is_front_page()) || (get_theme_mod('site_header_type') == 'nothing' && !is_front_page()) ) {
    57         $menu_bg_color = get_theme_mod( 'menu_bg_color', '#263246' );
    58         $rgba   = sydney_hex2rgba($menu_bg_color, 0.9);
    59         $custom .= ".site-header { background-color:" . esc_attr($rgba) . ";}" . "\n";
    60     }
    61 
    62     $wc_button_hover = get_theme_mod( 'wc_button_hover', 0 );
    63     if ( $wc_button_hover ) {
    64         $custom .= "
    65         @media only screen and (min-width: 1024px) {
    66         .loop-button-wrapper {position: absolute;bottom: 0;width: 100%;left: 0;opacity: 0;transition: all 0.3s;}
    67         .woocommerce ul.products li.product .woocommerce-loop-product__title,
    68         .woocommerce ul.products li.product .price {transition: all 0.3s;}
    69         .woocommerce ul.products li.product:hover .loop-button-wrapper {opacity: 1;bottom: 20px;}
    70         .woocommerce ul.products li.product:hover .woocommerce-loop-product__title,
    71         .woocommerce ul.products li.product:hover .price {opacity: 0;} }" . "\n";
    72     }
    73 
    74     global $post;
    75     if ( isset( $post ) ) {
    76         $elementor_page = get_post_meta( $post->ID, '_elementor_edit_mode', true );
    77         if ( !$elementor_page ) {
    78             $custom .= "html { scroll-behavior: smooth;}" . "\n";
    79         }
    80     } else {
    81         $custom .= "html { scroll-behavior: smooth;}" . "\n";
    82     }   
    83 
    84     //Fonts
    85     $body_fonts     = get_theme_mod( 'body_font', 'Raleway' ); 
    86     $headings_fonts = get_theme_mod( 'headings_font', 'Raleway' );
    87     $custom .= "body, #mainnav ul ul a { font-family:" . $body_fonts . ";}"."\n";
    88     $custom .= "h1, h2, h3, h4, h5, h6, #mainnav ul li a, .portfolio-info, .roll-testimonials .name, .roll-team .team-content .name, .roll-team .team-item .team-pop .name, .roll-tabs .menu-tab li a, .roll-testimonials .name, .roll-project .project-filter li a, .roll-button, .roll-counter .name-count, .roll-counter .numb-count button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"] { font-family:" . $headings_fonts . ";}"."\n";
    89    
    90         //Site title
    91     $site_title_size = get_theme_mod( 'site_title_size', '32' );
    92     if ($site_title_size) {
    93         $custom .= ".site-title { font-size:" . intval($site_title_size) . "px; }"."\n";
    94     }
    95     //Site description
    96     $site_desc_size = get_theme_mod( 'site_desc_size', '16' );
    97     if ($site_desc_size) {
    98         $custom .= ".site-description { font-size:" . intval($site_desc_size) . "px; }"."\n";
    99     }
    100     //Menu
    101     $menu_size = get_theme_mod( 'menu_size', '14' );
    102     if ($menu_size) {
    103         $custom .= "#mainnav ul li a { font-size:" . intval($menu_size) . "px; }"."\n";
    104     }               
    105     //H1 size
    106     $h1_size = get_theme_mod( 'h1_size','52' );
    107     if ($h1_size) {
    108         $custom .= "h1 { font-size:" . intval($h1_size) . "px; }"."\n";
    109     }
    110     //H2 size
    111     $h2_size = get_theme_mod( 'h2_size','42' );
    112     if ($h2_size) {
    113         $custom .= "h2 { font-size:" . intval($h2_size) . "px; }"."\n";
    114     }
    115     //H3 size
    116     $h3_size = get_theme_mod( 'h3_size','32' );
    117     if ($h3_size) {
    118         $custom .= "h3 { font-size:" . intval($h3_size) . "px; }"."\n";
    119     }
    120     //H4 size
    121     $h4_size = get_theme_mod( 'h4_size','25' );
    122     if ($h4_size) {
    123         $custom .= "h4 { font-size:" . intval($h4_size) . "px; }"."\n";
    124     }
    125     //H5 size
    126     $h5_size = get_theme_mod( 'h5_size','20' );
    127     if ($h5_size) {
    128         $custom .= "h5 { font-size:" . intval($h5_size) . "px; }"."\n";
    129     }
    130     //H6 size
    131     $h6_size = get_theme_mod( 'h6_size','18' );
    132     if ($h6_size) {
    133         $custom .= "h6 { font-size:" . intval($h6_size) . "px; }"."\n";
    134     }
    135     //Body size
    136     $body_size = get_theme_mod( 'body_size', '16' );
    137     if ($body_size) {
    138         $custom .= "body { font-size:" . intval($body_size) . "px; }"."\n";
    139     }
    140     //Single post title
    141     $single_post_title_size = get_theme_mod( 'single_post_title_size', '36' );
    142     if ($single_post_title_size) {
    143         $custom .= ".single .hentry .title-post { font-size:" . intval($single_post_title_size) . "px; }"."\n";
    144     }
    145     //Header image
    146     $header_bg_size = get_theme_mod('header_bg_size','cover'); 
    147     $header_height = get_theme_mod('header_height','300');
    148     $custom .= ".header-image { background-size:" . esc_attr($header_bg_size) . ";}"."\n";
    149     $custom .= ".header-image { height:" . intval($header_height) . "px; }"."\n";
    150 
    151     //Menu style
    152     $sticky_menu = get_theme_mod('sticky_menu','sticky');
    153     if ($sticky_menu == 'static') {
    154         $custom .= ".site-header.fixed { position: absolute;}"."\n";
    155     }
    156     $menu_style = get_theme_mod('menu_style','inline');
    157     if ($menu_style == 'centered') {
    158         $custom .= ".header-wrap .col-md-4, .header-wrap .col-md-8 { width: 100%; text-align: center;}"."\n";
    159         $custom .= "#mainnav { float: none;}"."\n";
    160         $custom .= "#mainnav li { float: none; display: inline-block;}"."\n";
    161         $custom .= "#mainnav ul ul li { display: block; text-align: left; float:left;}"."\n";
    162         if( get_bloginfo( 'description' ) || get_bloginfo( 'name' ) || get_theme_mod('site_logo') ) {
    163             $custom .= ".site-logo, .header-wrap .col-md-4 { margin-bottom: 15px; }"."\n";
    164         }
    165         $custom .= ".btn-menu { margin: 0 auto; float: none; }"."\n";
    166         $custom .= ".header-wrap .container > .row { display: block; }"."\n";
    167     }   
    168 
    169     //AMP
    170     if ( 'sticky' == $sticky_menu && $is_amp ) {
    171         $custom .= ".site-header { position: -webkit-sticky;position: sticky;}"."\n";
    172     }
    173 
    174 
    175     //__COLORS
    176     //Primary color
    177     $primary_color = get_theme_mod( 'primary_color', '#d65050' );
    178     if ( $primary_color != '#d65050' ) {
    179     $custom .= ".llms-student-dashboard .llms-button-secondary:hover,.llms-button-action:hover,.read-more-gt,.widget-area .widget_fp_social a,#mainnav ul li a:hover, .sydney_contact_info_widget span, .roll-team .team-content .name,.roll-team .team-item .team-pop .team-social li:hover a,.roll-infomation li.address:before,.roll-infomation li.phone:before,.roll-infomation li.email:before,.roll-testimonials .name,.roll-button.border,.roll-button:hover,.roll-icon-list .icon i,.roll-icon-list .content h3 a:hover,.roll-icon-box.white .content h3 a,.roll-icon-box .icon i,.roll-icon-box .content h3 a:hover,.switcher-container .switcher-icon a:focus,.go-top:hover,.hentry .meta-post a:hover,#mainnav > ul > li > a.active, #mainnav > ul > li > a:hover, button:hover, input[type=\"button\"]:hover, input[type=\"reset\"]:hover, input[type=\"submit\"]:hover, .text-color, .social-menu-widget a, .social-menu-widget a:hover, .archive .team-social li a, a, h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,.classic-alt .meta-post a,.single .hentry .meta-post a, .content-area.modern .hentry .meta-post span:before, .content-area.modern .post-cat { color:" . esc_attr($primary_color) . "}"."\n";
    180     $custom .= ".llms-student-dashboard .llms-button-secondary,.llms-button-action,.reply,.woocommerce #respond input#submit,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button,.project-filter li a.active, .project-filter li a:hover,.preloader .pre-bounce1, .preloader .pre-bounce2,.roll-team .team-item .team-pop,.roll-progress .progress-animate,.roll-socials li a:hover,.roll-project .project-item .project-pop,.roll-project .project-filter li.active,.roll-project .project-filter li:hover,.roll-button.light:hover,.roll-button.border:hover,.roll-button,.roll-icon-box.white .icon,.owl-theme .owl-controls .owl-page.active span,.owl-theme .owl-controls.clickable .owl-page:hover span,.go-top,.bottom .socials li:hover a,.sidebar .widget:before,.blog-pagination ul li.active,.blog-pagination ul li:hover a,.content-area .hentry:after,.text-slider .maintitle:after,.error-wrap #search-submit:hover,#mainnav .sub-menu li:hover > a,#mainnav ul li ul:after, button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"], .panel-grid-cell .widget-title:after { background-color:" . esc_attr($primary_color) . "}"."\n";
    181     $custom .= ".llms-student-dashboard .llms-button-secondary,.llms-student-dashboard .llms-button-secondary:hover,.llms-button-action,.llms-button-action:hover,.roll-socials li a:hover,.roll-socials li a,.roll-button.light:hover,.roll-button.border,.roll-button,.roll-icon-list .icon,.roll-icon-box .icon,.owl-theme .owl-controls .owl-page span,.comment .comment-detail,.widget-tags .tag-list a:hover,.blog-pagination ul li,.hentry blockquote,.error-wrap #search-submit:hover,textarea:focus,input[type=\"text\"]:focus,input[type=\"password\"]:focus,input[type=\"datetime\"]:focus,input[type=\"datetime-local\"]:focus,input[type=\"date\"]:focus,input[type=\"month\"]:focus,input[type=\"time\"]:focus,input[type=\"week\"]:focus,input[type=\"number\"]:focus,input[type=\"email\"]:focus,input[type=\"url\"]:focus,input[type=\"search\"]:focus,input[type=\"tel\"]:focus,input[type=\"color\"]:focus, button, input[type=\"button\"], input[type=\"reset\"], input[type=\"submit\"], .archive .team-social li a { border-color:" . esc_attr($primary_color) . "}"."\n";
    182     }
    183     //Primary color SVGs
    184     $custom .= ".go-top:hover svg,.sydney_contact_info_widget span { fill:" . esc_attr( $primary_color ) . ";}" . "\n";
    185     //Menu background
    186     $menu_bg_color = get_theme_mod( 'menu_bg_color', '#000000' );
    187     $rgba = sydney_hex2rgba($menu_bg_color, 0.9);
    188     $custom .= ".site-header.float-header { background-color:" . esc_attr($rgba) . ";}" . "\n";
    189     $custom .= "@media only screen and (max-width: 1024px) { .site-header { background-color:" . esc_attr($menu_bg_color) . ";}}" . "\n";
    190     //Site title
    191     $site_title = get_theme_mod( 'site_title_color', '#ffffff' );
    192     $custom .= ".site-title a, .site-title a:hover { color:" . esc_attr($site_title) . "}"."\n";
    193     //Site desc
    194     $site_desc = get_theme_mod( 'site_desc_color', '#ffffff' );
    195     $custom .= ".site-description { color:" . esc_attr($site_desc) . "}"."\n";
    196     //Top level menu items color
    197     $top_items_color = get_theme_mod( 'top_items_color', '#ffffff' );
    198     $custom .= "#mainnav ul li a, #mainnav ul li::before { color:" . esc_attr($top_items_color) . "}"."\n";
    199     //Sub menu items color
    200     $submenu_items_color = get_theme_mod( 'submenu_items_color', '#ffffff' );
    201     $custom .= "#mainnav .sub-menu li a { color:" . esc_attr($submenu_items_color) . "}"."\n";
    202     //Sub menu background
    203     $submenu_background = get_theme_mod( 'submenu_background', '#1c1c1c' );
    204     $custom .= "#mainnav .sub-menu li a { background:" . esc_attr($submenu_background) . "}"."\n";
    205     //Header slider text
    206     $slider_text = get_theme_mod( 'slider_text', '#ffffff' );
    207     $custom .= ".text-slider .maintitle, .text-slider .subtitle { color:" . esc_attr($slider_text) . "}"."\n";
    208     //Body
    209     $body_text = get_theme_mod( 'body_text_color', '#47425d' );
    210     $custom .= "body { color:" . esc_attr($body_text) . "}"."\n";
    211     //Sidebar background
    212     $sidebar_background = get_theme_mod( 'sidebar_background', '#ffffff' );
    213     $custom .= "#secondary { background-color:" . esc_attr($sidebar_background) . "}"."\n";
    214     //Sidebar color
    215     $sidebar_color = get_theme_mod( 'sidebar_color', '#767676' );
    216     $custom .= "#secondary, #secondary a { color:" . esc_attr($sidebar_color) . "}"."\n";   
    217     //Footer widget area background
    218     $footer_widgets_background = get_theme_mod( 'footer_widgets_background', '#252525' );
    219     $custom .= ".footer-widgets { background-color:" . esc_attr($footer_widgets_background) . "}"."\n";
    220     //Footer widget area color
    221     $footer_widgets_color = get_theme_mod( 'footer_widgets_color', '#767676' );
    222     if ( $footer_widgets_color != '#767676' ) {
    223         $custom .= "#sidebar-footer,#sidebar-footer a,.footer-widgets .widget-title { color:" . esc_attr($footer_widgets_color) . "}"."\n";
    224     }
    225     //Mobile menu icon
    226     $mobile_menu_color = get_theme_mod( 'mobile_menu_color', '#ffffff' );
    227     $custom .= ".btn-menu .sydney-svg-icon { fill:" . esc_attr($mobile_menu_color) . "}"."\n";
    228 
    229     //Menu items hover
    230     $menu_items_hover = get_theme_mod( 'menu_items_hover', '#d65050' );
    231     $custom .= "#mainnav ul li a:hover { color:" . esc_attr($menu_items_hover) . "}"."\n"; 
    232 
    233     //Footer background
    234     $footer_background = get_theme_mod( 'footer_background', '#1c1c1c' );
    235     $custom .= ".site-footer { background-color:" . esc_attr($footer_background) . "}"."\n";   
    236     //Footer color
    237     $footer_color = get_theme_mod( 'footer_color', '#666666' );
    238     $custom .= ".site-footer,.site-footer a { color:" . esc_attr($footer_color) . "}"."\n";
    239     //Rows overlay
    240     $rows_overlay = get_theme_mod( 'rows_overlay', '#000000' );
    241     $custom .= ".overlay { background-color:" . esc_attr($rows_overlay) . "}"."\n";
    242 
    243     //Page wrapper padding
    244     $pw_top_padding = get_theme_mod( 'wrapper_top_padding', '83' );
    245     $pw_bottom_padding = get_theme_mod( 'wrapper_bottom_padding', '100' );
    246     $custom .= ".page-wrap { padding-top:" . intval($pw_top_padding) . "px;}"."\n";
    247     $custom .= ".page-wrap { padding-bottom:" . intval($pw_bottom_padding) . "px;}"."\n";   
    248 
    249 
    250     $text_slide = get_theme_mod('textslider_slide', 0);
    251     if ( $text_slide ) {
    252         $custom .= ".slide-inner { display:none;}"."\n";   
    253         $custom .= ".slide-inner.text-slider-stopped { display:block;}"."\n";   
    254     }
    255 
    256     $mobile_slider = get_theme_mod('mobile_slider', 'responsive');
    257     if ( $mobile_slider == 'responsive' ) {
    258             $custom .= "@media only screen and (max-width: 1025px) {       
    259             .mobile-slide {
    260                 display: block;
    261             }
    262             .slide-item {
    263                 background-image: none !important;
    264             }
    265             .header-slider {
    266             }
    267             .slide-item {
    268                 height: auto !important;
    269             }
    270             .slide-inner {
    271                 min-height: initial;
    272             }
    273         }"."\n";       
    274     }
    275 
    276     //Small screens font sizes
    277     $custom .= "@media only screen and (max-width: 780px) {
    278         h1 { font-size: 32px;}
    279         h2 { font-size: 28px;}
    280         h3 { font-size: 22px;}
    281         h4 { font-size: 18px;}
    282         h5 { font-size: 16px;}
    283         h6 { font-size: 14px;}
    284     }" . "\n";
    285 
    286     if ( $is_amp ) {
    287         $custom .= ".go-top { bottom: 30px;opacity:1;visibility:visible;}" . "\n";
    288     }
    289 
    290     $custom = apply_filters( 'sydney_custom_css', $custom );
    291    
    292     //Output all the styles
    293     wp_add_inline_style( 'sydney-style', $custom );
    294 }
    295 add_action( 'wp_enqueue_scripts', 'sydney_custom_styles' );
     519    /**
     520     * Initialize class
     521     */
     522    Sydney_Custom_CSS::get_instance();
     523
     524endif;
  • sydney/1.79/inc/theme-dashboard-settings.php

    r148500 r153790  
    7373            <tr>
    7474                <td><?php esc_html_e( 'Footer credits', 'sydney' ); ?></td>
    75                 <td><span class="thd-badge thd-badge-warning"><i class="dashicons dashicons-no-alt"></i></span></td>
     75                <td><span class="thd-badge thd-badge-success"><i class="dashicons dashicons-saved"></i></span></td>
    7676                <td><span class="thd-badge thd-badge-success"><i class="dashicons dashicons-saved"></i></span></td>
    7777            </tr>
     
    173173                array(
    174174                    'name'          => esc_html__( 'Footer Credits', 'sydney' ),
    175                     'type'          => 'pro',
    176                     'customize_uri' => '/wp-admin/customize.php?autofocus[section]=sydney_footer_credits',
     175                    'type'          => 'free',
     176                    'customize_uri' => '/wp-admin/customize.php?autofocus[section]=sydney_section_footer_credits',
    177177                ),
    178178                array(
     
    242242    // Review.
    243243    $settings['review_link']       = 'https://wordpress.org/support/theme/sydney/reviews/';
    244     $settings['suggest_idea_link'] = 'https://athemes.circle.so/c/give-feedback';
     244    $settings['suggest_idea_link'] = 'https://forums.athemes.com/c/feature-requests/15';
    245245
    246246    // Support.
  • sydney/1.79/js/customize-controls.js

    r139705 r153790  
     1"use strict";
     2
    13jQuery( document ).ready( function() {
    24
     
    1921
    2022} ); // jQuery( document ).ready
     23
     24/* Typography */
     25jQuery(document).ready(function ($) {
     26  "use strict";
     27
     28  $('.google-fonts-list').each(function (i, obj) {
     29    if (!$(this).hasClass('select2-hidden-accessible')) {
     30      $(this).select2();
     31    }
     32  });
     33  $('.google-fonts-list').on('change', function () {
     34    var elementRegularWeight = $(this).parent().parent().find('.google-fonts-regularweight-style');
     35    var selectedFont = $(this).val();
     36    var customizerControlName = $(this).attr('control-name'); // Clear Weight/Style dropdowns
     37
     38    elementRegularWeight.empty(); // Make sure Italic & Bold dropdowns are enabled
     39    // Get the Google Fonts control object
     40
     41    var bodyfontcontrol = _wpCustomizeSettings.controls[customizerControlName]; // Find the index of the selected font
     42
     43    var indexes = $.map(bodyfontcontrol.sydneyfontslist, function (obj, index) {
     44      if (obj.family === selectedFont) {
     45        return index;
     46      }
     47    });
     48    var index = indexes[0]; // For the selected Google font show the available weight/style variants
     49
     50    $.each(bodyfontcontrol.sydneyfontslist[index].variants, function (val, text) {
     51      elementRegularWeight.append($('<option></option>').val(text).html(text)); //Set default value
     52
     53      if ($(elementRegularWeight).find('option[value="regular"]').length > 0) {
     54        $(elementRegularWeight).val('regular');
     55      } else if ($(elementRegularWeight).find('option[value="400"]').length > 0) {
     56        $(elementRegularWeight).val('400');
     57      } else if ($(elementRegularWeight).find('option[value="300"]').length > 0) {
     58        $(elementRegularWeight).val('300');
     59      }
     60    }); // Update the font category based on the selected font
     61
     62    $(this).parent().parent().find('.google-fonts-category').val(bodyfontcontrol.sydneyfontslist[index].category);
     63    sydneyGetAllSelects($(this).parent().parent().parent().parent());
     64  });
     65  $('.google_fonts_select_control select').on('change', function () {
     66    sydneyGetAllSelects($(this).parent().parent().parent().parent());
     67  });
     68
     69  function sydneyGetAllSelects($element) {
     70    var selectedFont = {
     71      font: $element.find('.google-fonts-list').val(),
     72      regularweight: $element.find('.google-fonts-regularweight-style').val(),
     73      category: $element.find('.google-fonts-category').val()
     74    }; // Important! Make sure to trigger change event so Customizer knows it has to save the field
     75
     76    $element.find('.customize-control-google-font-selection').val(JSON.stringify(selectedFont)).trigger('change');
     77  }
     78});
     79jQuery(document).ready(function ($) {
     80  "use strict";
     81
     82  $('.sydney-devices-preview').find('button').on('click', function (event) {
     83    if ($(this).hasClass('preview-desktop')) {
     84      $('.sydney-devices-preview').find('.preview-desktop').addClass('active');
     85      $('.sydney-devices-preview').find('.preview-tablet').removeClass('active');
     86      $('.sydney-devices-preview').find('.preview-mobile').removeClass('active');
     87      $('.font-size-desktop').addClass('active');
     88      $('.font-size-tablet').removeClass('active');
     89      $('.font-size-mobile').removeClass('active');
     90      $('.wp-full-overlay-footer .devices button[data-device="desktop"]').trigger('click');
     91    } else if ($(this).hasClass('preview-tablet')) {
     92      $('.sydney-devices-preview').find('.preview-tablet').addClass('active');
     93      $('.sydney-devices-preview').find('.preview-desktop').removeClass('active');
     94      $('.sydney-devices-preview').find('.preview-mobile').removeClass('active');
     95      $('.font-size-desktop').removeClass('active');
     96      $('.font-size-tablet').addClass('active');
     97      $('.font-size-mobile').removeClass('active');
     98      $('.wp-full-overlay-footer .devices button[data-device="tablet"]').trigger('click');
     99    } else {
     100      $('.sydney-devices-preview').find('.preview-mobile').addClass('active');
     101      $('.sydney-devices-preview').find('.preview-desktop').removeClass('active');
     102      $('.sydney-devices-preview').find('.preview-tablet').removeClass('active');
     103      $('.font-size-desktop').removeClass('active');
     104      $('.font-size-tablet').removeClass('active');
     105      $('.font-size-mobile').addClass('active');
     106      $('.wp-full-overlay-footer .devices button[data-device="mobile"]').trigger('click');
     107    }
     108  });
     109  $(' .wp-full-overlay-footer .devices button ').on('click', function () {
     110    var device = $(this).attr('data-device');
     111    $('.sydney-devices-preview').find('.preview-' + device).trigger('click');
     112  });
     113});
     114/**
     115 * Repeater
     116 */
     117
     118jQuery(document).ready(function ($) {
     119  "use strict"; // Update the values for all our input fields and initialise the sortable repeater
     120
     121  $('.sydney-sortable_repeater_control').each(function () {
     122    // If there is an existing customizer value, populate our rows
     123    var defaultValuesArray = $(this).find('.customize-control-sortable-repeater').val().split(',');
     124    var numRepeaterItems = defaultValuesArray.length;
     125
     126    if (numRepeaterItems > 0) {
     127      // Add the first item to our existing input field
     128      $(this).find('.repeater-input').val(defaultValuesArray[0]); // Create a new row for each new value
     129
     130      if (numRepeaterItems > 1) {
     131        var i;
     132
     133        for (i = 1; i < numRepeaterItems; ++i) {
     134          sydneyAppendRow($(this), defaultValuesArray[i]);
     135        }
     136      }
     137    }
     138  }); // Make our Repeater fields sortable
     139
     140  $(this).find('.sydney-sortable_repeater.sortable').sortable({
     141    update: function update(event, ui) {
     142      sydneyGetAllInputs($(this).parent());
     143    }
     144  }); // Remove item starting from it's parent element
     145
     146  $('.sydney-sortable_repeater.sortable').on('click', '.customize-control-sortable-repeater-delete', function (event) {
     147    event.preventDefault();
     148    var numItems = $(this).parent().parent().find('.repeater').length;
     149
     150    if (numItems > 1) {
     151      $(this).parent().slideUp('fast', function () {
     152        var parentContainer = $(this).parent().parent();
     153        $(this).remove();
     154        sydneyGetAllInputs(parentContainer);
     155      });
     156    } else {
     157      $(this).parent().find('.repeater-input').val('');
     158      sydneyGetAllInputs($(this).parent().parent().parent());
     159    }
     160  }); // Add new item
     161
     162  $('.customize-control-sortable-repeater-add').click(function (event) {
     163    event.preventDefault();
     164    sydneyAppendRow($(this).parent());
     165    sydneyGetAllInputs($(this).parent());
     166  }); // Refresh our hidden field if any fields change
     167
     168  $('.sydney-sortable_repeater.sortable').change(function () {
     169    sydneyGetAllInputs($(this).parent());
     170  }); // Add https:// to the start of the URL if it doesn't have it
     171
     172  $('.sydney-sortable_repeater.sortable').on('blur', '.repeater-input', function () {
     173    var url = $(this);
     174    var val = url.val();
     175
     176    if (val && !val.match(/^.+:\/\/.*/)) {
     177      // Important! Make sure to trigger change event so Customizer knows it has to save the field
     178      url.val('https://' + val).trigger('change');
     179    }
     180  }); // Append a new row to our list of elements
     181
     182  function sydneyAppendRow($element) {
     183    var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
     184    var newRow = '<div class="repeater" style="display:none"><input type="text" value="' + defaultValue + '" class="repeater-input" placeholder="https://" /><span class="dashicons dashicons-menu"></span><a class="customize-control-sortable-repeater-delete" href="#"><span class="dashicons dashicons-no-alt"></span></a></div>';
     185    $element.find('.sortable').append(newRow);
     186    $element.find('.sortable').find('.repeater:last').slideDown('slow', function () {
     187      $(this).find('input').focus();
     188    });
     189  } // Get the values from the repeater input fields and add to our hidden field
     190
     191
     192  function sydneyGetAllInputs($element) {
     193    var inputValues = $element.find('.repeater-input').map(function () {
     194      return $(this).val();
     195    }).toArray(); // Add all the values from our repeater fields to the hidden field (which is the one that actually gets saved)
     196
     197    $element.find('.customize-control-sortable-repeater').val(inputValues); // Important! Make sure to trigger change event so Customizer knows it has to save the field
     198
     199    $element.find('.customize-control-sortable-repeater').trigger('change');
     200  }
     201});
     202/**
     203 * Alpha color picker
     204 */
     205
     206jQuery(document).ready(function ($) {
     207  $('.alpha-color-control').each(function () {
     208    // Scope the vars.
     209    var $control, startingColor, paletteInput, showOpacity, defaultColor, palette, colorPickerOptions, $container, $alphaSlider, alphaVal, sliderOptions; // Store the control instance.
     210
     211    $control = $(this); // Get a clean starting value for the option.
     212
     213    startingColor = $control.val().replace(/\s+/g, ''); // Get some data off the control.
     214
     215    paletteInput = $control.attr('data-palette');
     216    showOpacity = $control.attr('data-show-opacity');
     217    defaultColor = $control.attr('data-default-color'); // Process the palette.
     218
     219    if (paletteInput.indexOf('|') !== -1) {
     220      palette = paletteInput.split('|');
     221    } else if ('false' == paletteInput) {
     222      palette = false;
     223    } else {
     224      palette = true;
     225    } // Set up the options that we'll pass to wpColorPicker().
     226
     227
     228    colorPickerOptions = {
     229      change: function change(event, ui) {
     230        var key, value, alpha, $transparency;
     231        key = $control.attr('data-customize-setting-link');
     232        value = $control.wpColorPicker('color'); // Set the opacity value on the slider handle when the default color button is clicked.
     233
     234        if (defaultColor == value) {
     235          alpha = acp_get_alpha_value_from_color(value);
     236          $alphaSlider.find('.ui-slider-handle').text(alpha);
     237        } // Send ajax request to wp.customize to trigger the Save action.
     238
     239
     240        wp.customize(key, function (obj) {
     241          obj.set(value);
     242        });
     243        $transparency = $container.find('.transparency'); // Always show the background color of the opacity slider at 100% opacity.
     244
     245        $transparency.css('background-color', ui.color.toString('no-alpha'));
     246      },
     247      palettes: palette // Use the passed in palette.
     248
     249    }; // Create the colorpicker.
     250
     251    $control.wpColorPicker(colorPickerOptions);
     252    $container = $control.parents('.wp-picker-container:first'); // Insert our opacity slider.
     253
     254    $('<div class="alpha-color-picker-container">' + '<div class="min-click-zone click-zone"></div>' + '<div class="max-click-zone click-zone"></div>' + '<div class="alpha-slider"></div>' + '<div class="transparency"></div>' + '</div>').appendTo($container.find('.wp-picker-holder'));
     255    $alphaSlider = $container.find('.alpha-slider'); // If starting value is in format RGBa, grab the alpha channel.
     256
     257    alphaVal = acp_get_alpha_value_from_color(startingColor); // Set up jQuery UI slider() options.
     258
     259    sliderOptions = {
     260      create: function create(event, ui) {
     261        var value = $(this).slider('value'); // Set up initial values.
     262
     263        $(this).find('.ui-slider-handle').text(value);
     264        $(this).siblings('.transparency ').css('background-color', startingColor);
     265      },
     266      value: alphaVal,
     267      range: 'max',
     268      step: 1,
     269      min: 0,
     270      max: 100,
     271      animate: 300
     272    }; // Initialize jQuery UI slider with our options.
     273
     274    $alphaSlider.slider(sliderOptions); // Maybe show the opacity on the handle.
     275
     276    if ('true' == showOpacity) {
     277      $alphaSlider.find('.ui-slider-handle').addClass('show-opacity');
     278    } // Bind event handlers for the click zones.
     279
     280
     281    $container.find('.min-click-zone').on('click', function () {
     282      acp_update_alpha_value_on_color_control(0, $control, $alphaSlider, true);
     283    });
     284    $container.find('.max-click-zone').on('click', function () {
     285      acp_update_alpha_value_on_color_control(100, $control, $alphaSlider, true);
     286    }); // Bind event handler for clicking on a palette color.
     287
     288    $container.find('.iris-palette').on('click', function () {
     289      var color, alpha;
     290      color = $(this).css('background-color');
     291      alpha = acp_get_alpha_value_from_color(color);
     292      acp_update_alpha_value_on_alpha_slider(alpha, $alphaSlider); // Sometimes Iris doesn't set a perfect background-color on the palette,
     293      // for example rgba(20, 80, 100, 0.3) becomes rgba(20, 80, 100, 0.298039).
     294      // To compensante for this we round the opacity value on RGBa colors here
     295      // and save it a second time to the color picker object.
     296
     297      if (alpha != 100) {
     298        color = color.replace(/[^,]+(?=\))/, (alpha / 100).toFixed(2));
     299      }
     300
     301      $control.wpColorPicker('color', color);
     302    }); // Bind event handler for clicking on the 'Clear' button.
     303
     304    $container.find('.button.wp-picker-clear').on('click', function () {
     305      var key = $control.attr('data-customize-setting-link'); // The #fff color is delibrate here. This sets the color picker to white instead of the
     306      // defult black, which puts the color picker in a better place to visually represent empty.
     307
     308      $control.wpColorPicker('color', '#ffffff'); // Set the actual option value to empty string.
     309
     310      wp.customize(key, function (obj) {
     311        obj.set('');
     312      });
     313      acp_update_alpha_value_on_alpha_slider(100, $alphaSlider);
     314    }); // Bind event handler for clicking on the 'Default' button.
     315
     316    $container.find('.button.wp-picker-default').on('click', function () {
     317      var alpha = acp_get_alpha_value_from_color(defaultColor);
     318      acp_update_alpha_value_on_alpha_slider(alpha, $alphaSlider);
     319    }); // Bind event handler for typing or pasting into the input.
     320
     321    $control.on('input', function () {
     322      var value = $(this).val();
     323      var alpha = acp_get_alpha_value_from_color(value);
     324      acp_update_alpha_value_on_alpha_slider(alpha, $alphaSlider);
     325    }); // Update all the things when the slider is interacted with.
     326
     327    $alphaSlider.slider().on('slide', function (event, ui) {
     328      var alpha = parseFloat(ui.value) / 100.0;
     329      acp_update_alpha_value_on_color_control(alpha, $control, $alphaSlider, false); // Change value shown on slider handle.
     330
     331      $(this).find('.ui-slider-handle').text(ui.value);
     332    });
     333  });
     334  /**
     335   * Override the stock color.js toString() method to add support for outputting RGBa or Hex.
     336   */
     337
     338  Color.prototype.toString = function (flag) {
     339    // If our no-alpha flag has been passed in, output RGBa value with 100% opacity.
     340    // This is used to set the background color on the opacity slider during color changes.
     341    if ('no-alpha' == flag) {
     342      return this.toCSS('rgba', '1').replace(/\s+/g, '');
     343    } // If we have a proper opacity value, output RGBa.
     344
     345
     346    if (1 > this._alpha) {
     347      return this.toCSS('rgba', this._alpha).replace(/\s+/g, '');
     348    } // Proceed with stock color.js hex output.
     349
     350
     351    var hex = parseInt(this._color, 10).toString(16);
     352
     353    if (this.error) {
     354      return '';
     355    }
     356
     357    if (hex.length < 6) {
     358      for (var i = 6 - hex.length - 1; i >= 0; i--) {
     359        hex = '0' + hex;
     360      }
     361    }
     362
     363    return '#' + hex;
     364  };
     365  /**
     366   * Given an RGBa, RGB, or hex color value, return the alpha channel value.
     367   */
     368
     369
     370  function acp_get_alpha_value_from_color(value) {
     371    var alphaVal; // Remove all spaces from the passed in value to help our RGBa regex.
     372
     373    value = value.replace(/ /g, '');
     374
     375    if (value.match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)) {
     376      alphaVal = parseFloat(value.match(/rgba\(\d+\,\d+\,\d+\,([^\)]+)\)/)[1]).toFixed(2) * 100;
     377      alphaVal = parseInt(alphaVal);
     378    } else {
     379      alphaVal = 100;
     380    }
     381
     382    return alphaVal;
     383  }
     384  /**
     385   * Force update the alpha value of the color picker object and maybe the alpha slider.
     386   */
     387
     388
     389  function acp_update_alpha_value_on_color_control(alpha, $control, $alphaSlider, update_slider) {
     390    var iris, colorPicker, color;
     391    iris = $control.data('a8cIris');
     392    colorPicker = $control.data('wpWpColorPicker'); // Set the alpha value on the Iris object.
     393
     394    iris._color._alpha = alpha; // Store the new color value.
     395
     396    color = iris._color.toString(); // Set the value of the input.
     397
     398    $control.val(color); // Update the background color of the color picker.
     399
     400    colorPicker.toggler.css({
     401      'background-color': color
     402    }); // Maybe update the alpha slider itself.
     403
     404    if (update_slider) {
     405      acp_update_alpha_value_on_alpha_slider(alpha, $alphaSlider);
     406    } // Update the color value of the color picker object.
     407
     408
     409    $control.wpColorPicker('color', color);
     410  }
     411  /**
     412   * Update the slider handle position and label.
     413   */
     414
     415
     416  function acp_update_alpha_value_on_alpha_slider(alpha, $alphaSlider) {
     417    $alphaSlider.slider('value', alpha);
     418    $alphaSlider.find('.ui-slider-handle').text(alpha.toString());
     419  }
     420});
     421/**
     422 * Tab control
     423 */
     424
     425jQuery(document).ready(function ($) {
     426  "use strict";
     427
     428  $('.customize-control-sydney-tab-control').each(function () {
     429    $(this).parent().find('li').not('.section-meta').not('.customize-control-sydney-tab-control').addClass('sydney-hide-control');
     430    var generals = $(this).find('.control-tab-general').data('connected');
     431    $.each(generals, function (i, v) {
     432      $(this).removeClass('sydney-hide-control'); //show
     433    });
     434    $(this).find('.control-tab').on('click', function () {
     435      var visibles = $(this).data('connected');
     436      $(this).addClass('active');
     437      $(this).siblings().removeClass('active');
     438      $(this).parent().parent().parent().find('li').not('.section-meta').not('.customize-control-sydney-tab-control').addClass('sydney-hide-control');
     439      $.each(visibles, function (i, v) {
     440        $(this).removeClass('sydney-hide-control'); //show
     441      });
     442    });
     443  });
     444});
     445/**
     446 * TinyMCE control
     447 */
     448
     449jQuery(document).ready(function ($) {
     450  "use strict";
     451
     452  $('.customize-control-tinymce-editor').each(function () {
     453    // Get the toolbar strings that were passed from the PHP Class
     454    var tinyMCEToolbar1String = _wpCustomizeSettings.controls[$(this).attr('id')].sydneytb1;
     455
     456    var tinyMCEToolbar2String = _wpCustomizeSettings.controls[$(this).attr('id')].sydneytb2;
     457
     458    var tinyMCEMediaButtons = _wpCustomizeSettings.controls[$(this).attr('id')].sydneytmb;
     459
     460    wp.editor.initialize($(this).attr('id'), {
     461      tinymce: {
     462        wpautop: true,
     463        toolbar1: tinyMCEToolbar1String,
     464        toolbar2: tinyMCEToolbar2String
     465      },
     466      quicktags: true,
     467      mediaButtons: true
     468    });
     469  });
     470  $(document).on('tinymce-editor-init', function (event, editor) {
     471    editor.on('change', function (e) {
     472      tinyMCE.triggerSave();
     473      $('#' + editor.id).trigger('change');
     474    });
     475  });
     476});
     477/**
     478 * Footer widget areas links
     479 */
     480
     481jQuery(document).ready(function ($) {
     482  var footerCols = $('#customize-control-footer_widget_areas').find('input:checked');
     483  toggleLinks(footerCols);
     484  $('#customize-control-footer_widget_areas').find('input').change(function () {
     485    toggleLinks($(this));
     486  });
     487
     488  function toggleLinks(el) {
     489    if ('3' === $(el).val() || 'col3-bigleft' === $(el).val() || 'col3-bigright' === $(el).val()) {
     490      $('.footer-widget-area-link-1, .footer-widget-area-link-2, .footer-widget-area-link-3').show();
     491      $('.footer-widget-area-link-4').hide();
     492    } else if ('4' === $(el).val() || 'col4-bigleft' === $(el).val() || 'col4-bigright' === $(el).val()) {
     493      $('.footer-widget-area-link-1, .footer-widget-area-link-2, .footer-widget-area-link-3, .footer-widget-area-link-4').show();
     494    } else if ('2' === $(el).val() || 'col2-bigleft' === $(el).val() || 'col2-bigright' === $(el).val()) {
     495      $('.footer-widget-area-link-1, .footer-widget-area-link-2').show();
     496      $('.footer-widget-area-link-4, .footer-widget-area-link-3').hide();
     497    } else if ('1' === $(el).val()) {
     498      $('.footer-widget-area-link-1').show();
     499      $('.footer-widget-area-link-4, .footer-widget-area-link-2, .footer-widget-area-link-3').hide();
     500    } else {
     501      $('.footer-widget-area-link-1, .footer-widget-area-link-2, .footer-widget-area-link-3, .footer-widget-area-link-4').hide();
     502    }
     503  }
     504});
     505/**
     506 * Palettes
     507 */
     508
     509wp.customize('color_palettes', function (control) {
     510  var palettes = jQuery('#customize-control-color_palettes').find('.radio-buttons').data('palettes');
     511  control.bind(function () {
     512    var palette = control.get(); //Color 1 Button color, Link color
     513
     514    var elements1 = ['custom_color1', 'scrolltop_bg_color', 'button_background_color', 'button_border_color', 'color_link_default'];
     515
     516    for (var _i = 0, _elements = elements1; _i < _elements.length; _i++) {
     517      var element = _elements[_i];
     518      wp.customize(element).set(palettes[palette][0]);
     519      jQuery('#customize-control-' + element).find('.wp-color-result').css('background-color', palettes[palette][0]);
     520    } //Color 2 Hover color for - Button, Headings, Titles, Text links, Nav links
     521
     522
     523    var elements2 = ['custom_color2', 'footer_widgets_links_hover_color', 'scrolltop_bg_color_hover', 'button_background_color_hover', 'button_border_color_hover', 'color_link_hover'];
     524
     525    for (var _i2 = 0, _elements2 = elements2; _i2 < _elements2.length; _i2++) {
     526      var _element = _elements2[_i2];
     527      wp.customize(_element).set(palettes[palette][1]);
     528      jQuery('#customize-control-' + _element).find('.wp-color-result').css('background-color', palettes[palette][1]);
     529    } //Color 3 Heading (1-6), Small text, Nav links, Site title,
     530
     531
     532    var elements3 = ['single_post_title_color', 'custom_color3', 'main_header_submenu_color', 'offcanvas_menu_color', 'mobile_header_color', 'footer_widgets_title_color', 'single_product_title_color', 'color_forms_text', 'shop_product_product_title', 'loop_post_meta_color', 'loop_post_title_color', 'main_header_color', 'site_title_color', 'site_description_color', 'color_heading_1', 'color_heading_2', 'color_heading_3', 'color_heading_4', 'color_heading_5', 'color_heading_6'];
     533
     534    for (var _i3 = 0, _elements3 = elements3; _i3 < _elements3.length; _i3++) {
     535      var _element2 = _elements3[_i3];
     536      wp.customize(_element2).set(palettes[palette][2]);
     537      jQuery('#customize-control-' + _element2).find('.wp-color-result').css('background-color', palettes[palette][2]);
     538    } //Color 4 Paragraph, Paragraph small, Breadcrums, Icons
     539
     540
     541    var elements4 = ['custom_color4', 'footer_widgets_links_color', 'footer_widgets_text_color', 'color_body_text', 'footer_credits_text_color', 'color_forms_placeholder'];
     542
     543    for (var _i4 = 0, _elements4 = elements4; _i4 < _elements4.length; _i4++) {
     544      var _element3 = _elements4[_i4];
     545      wp.customize(_element3).set(palettes[palette][3]);
     546      jQuery('#customize-control-' + _element3).find('.wp-color-result').css('background-color', palettes[palette][3]);
     547    } //Color 5 Input, tag borders
     548
     549
     550    var elements5 = ['custom_color5', 'color_forms_borders'];
     551
     552    for (var _i5 = 0, _elements5 = elements5; _i5 < _elements5.length; _i5++) {
     553      var _element4 = _elements5[_i5];
     554      wp.customize(_element4).set(palettes[palette][4]);
     555      jQuery('#customize-control-' + _element4).find('.wp-color-result').css('background-color', palettes[palette][4]);
     556    } //Color 6 Footer background, Subtle backgrounds
     557
     558
     559    var elements6 = ['custom_color6', 'footer_widgets_background', 'footer_credits_background', 'content_cards_background'];
     560
     561    for (var _i6 = 0, _elements6 = elements6; _i6 < _elements6.length; _i6++) {
     562      var _element5 = _elements6[_i6];
     563      wp.customize(_element5).set(palettes[palette][5]);
     564      jQuery('#customize-control-' + _element5).find('.wp-color-result').css('background-color', palettes[palette][5]);
     565    } //Color 7 Default background, Text on dark BG
     566
     567
     568    var elements7 = ['custom_color7', 'background_color', 'button_color', 'button_color_hover', 'scrolltop_color', 'scrolltop_color_hover', 'color_forms_background'];
     569
     570    for (var _i7 = 0, _elements7 = elements7; _i7 < _elements7.length; _i7++) {
     571      var _element6 = _elements7[_i7];
     572      wp.customize(_element6).set(palettes[palette][6]);
     573      jQuery('#customize-control-' + _element6).find('.wp-color-result').css('background-color', palettes[palette][6]);
     574    } //Color 8 header background
     575
     576
     577    var elements8 = ['custom_color8', 'main_header_submenu_background', 'main_header_background', 'main_header_bottom_background', 'mobile_header_background', 'offcanvas_menu_background'];
     578
     579    for (var _i8 = 0, _elements8 = elements8; _i8 < _elements8.length; _i8++) {
     580      var _element7 = _elements8[_i8];
     581      wp.customize(_element7).set(palettes[palette][7]);
     582      jQuery('#customize-control-' + _element7).find('.wp-color-result').css('background-color', palettes[palette][7]);
     583    }
     584  });
     585});
     586/**
     587 * Custom palette
     588 */
     589
     590wp.customize.bind('ready', function () {
     591  wp.customize('custom_color1', function (control) {
     592    control.bind(function (value) {
     593      var elements1 = ['scrolltop_bg_color', 'button_background_color', 'button_border_color', 'color_link_default'];
     594
     595      for (var _i9 = 0, _elements9 = elements1; _i9 < _elements9.length; _i9++) {
     596        var element = _elements9[_i9];
     597        wp.customize(element).set(value);
     598        jQuery('#customize-control-' + element).find('.wp-color-result').css('background-color', value);
     599      }
     600    });
     601  });
     602  wp.customize('custom_color2', function (control) {
     603    control.bind(function (value) {
     604      var elements2 = ['footer_widgets_links_hover_color', 'scrolltop_bg_color_hover', 'button_background_color_hover', 'button_border_color_hover', 'color_link_hover'];
     605
     606      for (var _i10 = 0, _elements10 = elements2; _i10 < _elements10.length; _i10++) {
     607        var element = _elements10[_i10];
     608        wp.customize(element).set(value);
     609        jQuery('#customize-control-' + element).find('.wp-color-result').css('background-color', value);
     610      }
     611    });
     612  });
     613  wp.customize('custom_color3', function (control) {
     614    control.bind(function (value) {
     615      var elements3 = ['main_header_submenu_color', 'offcanvas_menu_color', 'mobile_header_color', 'footer_widgets_title_color', 'single_product_title_color', 'color_forms_text', 'shop_product_product_title', 'loop_post_meta_color', 'loop_post_title_color', 'main_header_color', 'site_title_color', 'site_description_color', 'color_heading_1', 'color_heading_2', 'color_heading_3', 'color_heading_4', 'color_heading_5', 'color_heading_6'];
     616
     617      for (var _i11 = 0, _elements11 = elements3; _i11 < _elements11.length; _i11++) {
     618        var element = _elements11[_i11];
     619        wp.customize(element).set(value);
     620        jQuery('#customize-control-' + element).find('.wp-color-result').css('background-color', value);
     621      }
     622    });
     623  });
     624  wp.customize('custom_color4', function (control) {
     625    control.bind(function (value) {
     626      var elements4 = ['footer_widgets_links_color', 'footer_widgets_text_color', 'color_body_text', 'footer_credits_text_color', 'color_forms_placeholder'];
     627
     628      for (var _i12 = 0, _elements12 = elements4; _i12 < _elements12.length; _i12++) {
     629        var element = _elements12[_i12];
     630        wp.customize(element).set(value);
     631        jQuery('#customize-control-' + element).find('.wp-color-result').css('background-color', value);
     632      }
     633    });
     634  });
     635  wp.customize('custom_color5', function (control) {
     636    control.bind(function (value) {
     637      var elements5 = ['color_forms_borders'];
     638
     639      for (var _i13 = 0, _elements13 = elements5; _i13 < _elements13.length; _i13++) {
     640        var element = _elements13[_i13];
     641        wp.customize(element).set(value);
     642        jQuery('#customize-control-' + element).find('.wp-color-result').css('background-color', value);
     643      }
     644    });
     645  });
     646  wp.customize('custom_color6', function (control) {
     647    control.bind(function (value) {
     648      var elements6 = ['footer_widgets_background', 'footer_credits_background', 'content_cards_background'];
     649
     650      for (var _i14 = 0, _elements14 = elements6; _i14 < _elements14.length; _i14++) {
     651        var element = _elements14[_i14];
     652        wp.customize(element).set(value);
     653        jQuery('#customize-control-' + element).find('.wp-color-result').css('background-color', value);
     654      }
     655    });
     656  });
     657  wp.customize('custom_color7', function (control) {
     658    control.bind(function (value) {
     659      var elements7 = ['background_color', 'button_color', 'button_color_hover', 'scrolltop_color', 'scrolltop_color_hover', 'color_forms_background'];
     660
     661      for (var _i15 = 0, _elements15 = elements7; _i15 < _elements15.length; _i15++) {
     662        var element = _elements15[_i15];
     663        wp.customize(element).set(value);
     664        jQuery('#customize-control-' + element).find('.wp-color-result').css('background-color', value);
     665      }
     666    });
     667  });
     668  wp.customize('custom_color8', function (control) {
     669    control.bind(function (value) {
     670      var elements8 = ['main_header_submenu_background', 'main_header_background', 'main_header_bottom_background', 'mobile_header_background', 'offcanvas_menu_background'];
     671
     672      for (var _i16 = 0, _elements16 = elements8; _i16 < _elements16.length; _i16++) {
     673        var element = _elements16[_i16];
     674        wp.customize(element).set(value);
     675        jQuery('#customize-control-' + element).find('.wp-color-result').css('background-color', value);
     676      }
     677    });
     678  });
     679});
     680/* Non-refresh custom palette toggle */
     681
     682wp.customize.bind('ready', function () {
     683  wp.customize.control('custom_palette', function (control) {
     684    var setting = wp.customize('custom_palette_toggle');
     685    setting.bind(function (value) {
     686      control.active.set(value);
     687    });
     688  });
     689});
     690/**
     691 * Move color picker text field in popup
     692 */
     693
     694jQuery(document).ready(function ($) {
     695  $('.wp-picker-input-wrap').each(function () {
     696    $(this).prependTo($(this).next('.wp-picker-holder'));
     697  });
     698});
     699/**
     700 * Transform palettes radio into dropdown
     701 */
     702
     703jQuery(document).ready(function ($) {
     704  var saved = $('.saved-palette');
     705  $('.saved-palette').on('click', function () {
     706    $('.palette-radio-buttons').toggleClass('open');
     707  });
     708  $('.palette-radio-buttons').find('.palette').on('click', function () {
     709    saved.empty();
     710    $('.palette-radio-buttons').removeClass('open');
     711    var clone = $(this).parent().clone();
     712    clone.unwrap().appendTo(saved).find('input').remove();
     713  });
     714});
     715/**
     716 * Accordion control
     717 */
     718
     719jQuery(document).ready(function ($) {
     720  var Botiga_Accordion = {
     721    init: function init() {
     722      this.firstTime = true;
     723
     724      if (!this.initialized) {
     725        this.events();
     726      }
     727
     728      this.initialized = true;
     729    },
     730    events: function events() {
     731      var self = this; // Toggle accordion
     732
     733      $(document).on('click', '.sydney-accordion-title', function () {
     734        var $this = $(this);
     735
     736        if ($(this).hasClass('expanded')) {
     737          self.showOrHide($(this), 'hide');
     738          $(this).removeClass('expanded').addClass('collapse');
     739          setTimeout(function () {
     740            $this.removeClass('collapse');
     741          }, 300);
     742        }
     743
     744        if (!$(this).hasClass('collapse')) {
     745          // Open one accordion item per time
     746          $('.sydney-accordion-item').addClass('sydney-accordion-hide');
     747          $('.sydney-accordion-title').removeClass('expanded'); // Show accordion content
     748
     749          self.showOrHide($(this), 'show');
     750          $this.addClass('expanded');
     751        }
     752      }); // Mount the accordion when enter in the section (with accordions inside)
     753      // Also used to collapse all accordions when navigating between others tabs
     754
     755      $(document).on('click', '.control-section', function (e) {
     756        var $section = $('.control-section.open');
     757
     758        if (self.firstTime && $section.find('.sydney-accordion-title').length) {
     759          $section.find('.sydney-accordion-title').each(function () {
     760            self.showOrHide($(this), 'hide');
     761            $(this).removeClass('expanded');
     762            self.firstTime = false;
     763          });
     764        }
     765      }); // Reset the first time
     766
     767      $(document).on('click', '.customize-section-back', function () {
     768        self.firstTime = true;
     769      });
     770      return this;
     771    },
     772    showOrHide: function showOrHide($this, status) {
     773      var current = '';
     774      current = $this.closest('.customize-control').next();
     775      var elements = [];
     776
     777      if (current.attr('id') == 'customize-control-' + $this.data('until')) {
     778        elements.push(current[0].id);
     779      } else {
     780        while (current.attr('id') != 'customize-control-' + $this.data('until')) {
     781          elements.push(current[0].id);
     782          current = current.next();
     783        }
     784      }
     785
     786      if (elements.length >= 1) {
     787        elements.push(current[0].id);
     788      }
     789
     790      for (var i = 0; i < elements.length; i++) {
     791        // Identify accordion items
     792        $('#' + elements[i]).addClass('sydney-accordion-item active'); // Hide or show the accordion content
     793
     794        if (status == 'hide') {
     795          $('#' + elements[i]).addClass('sydney-accordion-hide');
     796        } else {
     797          $('#' + elements[i]).removeClass('sydney-accordion-hide');
     798        } // Identify first accordion item
     799
     800
     801        if (i == 0) {
     802          $('#' + elements[i]).addClass('sydney-accordion-first-item');
     803        } // Identify last accordion item
     804
     805
     806        if (i == elements.length - 1 && elements.length > 1 || elements.length == 1) {
     807          $('#' + elements[i]).addClass('sydney-accordion-last-item');
     808        }
     809      }
     810
     811      return this;
     812    }
     813  };
     814  $(document).ready(function () {
     815    Botiga_Accordion.init();
     816  });
     817});
  • sydney/1.79/js/customizer.js

    r139705 r153790  
    9393    wp.customize('footer_widgets_color',function( value ) {
    9494        value.bind( function( newval ) {
    95             $('#sidebar-footer,#sidebar-footer a,.footer-widgets .widget-title').css('color', newval );
    96         } );
    97     });
     95            $('.sidebar-column .widget').css('color', newval );
     96        } );
     97    });
     98    wp.customize('footer_widgets_links_color',function( value ) {
     99        value.bind( function( newval ) {
     100            $('.sidebar-column .widget a').css('color', newval );
     101        } );
     102    });     
    98103    //Footer background
    99104    wp.customize('footer_background',function( value ) {
     
    105110    wp.customize('footer_color',function( value ) {
    106111        value.bind( function( newval ) {
    107             $('.site-footer,.site-footer a').css('color', newval );
     112            $('.sydney-credits,.sydney-credits a').css('color', newval );
    108113        } );
    109114    });
     
    178183
    179184
     185    //Start port
     186    //Back to top
     187    wp.customize( 'scrolltop_radius', function( value ) {
     188        value.bind( function( to ) {
     189            $( '.go-top.show' ).css( 'border-radius', to + 'px' );
     190        } );
     191    } );
     192    wp.customize( 'scrolltop_side_offset', function( value ) {
     193        value.bind( function( to ) {
     194            $( '.go-top.position-right' ).css( 'right', to + 'px' );
     195            $( '.go-top.position-left' ).css( 'left', to + 'px' );
     196        } );
     197    } );
     198    wp.customize( 'scrolltop_bottom_offset', function( value ) {
     199        value.bind( function( to ) {
     200            $( '.go-top' ).css( 'bottom', to + 'px' );
     201        } );
     202    } );
     203    wp.customize( 'scrolltop_icon_size', function( value ) {
     204        value.bind( function( to ) {
     205            $( '.go-top .sydney-svg-icon, .go-top .sydney-svg-icon svg' ).css( 'width', to + 'px' );
     206            $( '.go-top .sydney-svg-icon, .go-top .sydney-svg-icon svg' ).css( 'height', to + 'px' );
     207        } );
     208    } );
     209    wp.customize( 'scrolltop_padding', function( value ) {
     210        value.bind( function( to ) {
     211            $( '.go-top' ).css( 'padding', to + 'px' );
     212        } );
     213    } );
     214
     215    //Background colors
     216    var $bg_color_options = { "scrolltop_bg_color":".go-top", };
     217
     218    $.each( $bg_color_options, function( option, selector ) {
     219        wp.customize( option, function( value ) {
     220            value.bind( function( to ) {
     221                $( selector ).css( 'background-color', to );
     222            } );
     223        } );
     224    });
     225
     226    //Colors
     227    var $color_options = { "scrolltop_color":".go-top", "footer_widgets_title_color":".sidebar-column .widget .widget-title" };
     228
     229    $.each( $color_options, function( option, selector ) {
     230        wp.customize( option, function( value ) {
     231            value.bind( function( to ) {
     232                $( selector ).css( 'color', to );
     233            } );
     234        } );
     235    });
     236
     237    //Stroke
     238    var $stroke_options = { "scrolltop_color":".go-top svg", };
     239
     240    $.each( $stroke_options, function( option, selector ) {
     241        wp.customize( option, function( value ) {
     242            value.bind( function( to ) {
     243                $( selector ).css( 'stroke', to );
     244            } );
     245        } );
     246    });     
     247
     248    //Background hover
     249    var $bg_hover_options = { "scrolltop_bg_color_hover":".go-top:hover" , };
     250
     251    $.each( $bg_hover_options, function( option, selector ) {
     252        wp.customize( option, function( value ) {
     253            value.bind( function( to ) {
     254       
     255                $( 'head' ).find( '#sydney-customizer-styles-' + option ).remove();
     256   
     257                var output = selector + ' { background-color:' + to + '!important; }';
     258   
     259                $( 'head' ).append( '<style id="sydney-customizer-styles-' + option + '">' + output + '</style>' );
     260   
     261            } );
     262        } );
     263    });     
     264
     265    //Stroke hover
     266    var $stroke_hover_options = { "scrolltop_color_hover":".go-top:hover svg", };
     267
     268    $.each( $stroke_hover_options, function( option, selector ) {
     269        wp.customize( option, function( value ) {
     270            value.bind( function( to ) {
     271       
     272                $( 'head' ).find( '#sydney-customizer-stroke-' + option ).remove();
     273   
     274                var output = selector + ' { stroke:' + to + '!important; }';
     275   
     276                $( 'head' ).append( '<style id="sydney-customizer-stroke-' + option + '">' + output + '</style>' );
     277   
     278            } );
     279        } );
     280    });     
     281
     282    //Color hover
     283    var $color_hover_options = { "scrolltop_color_hover":".go-top:hover", "footer_widgets_links_hover_color":".sidebar-column .widget a:hover"};
     284
     285    $.each( $color_hover_options, function( option, selector ) {
     286        wp.customize( option, function( value ) {
     287            value.bind( function( to ) {
     288       
     289                $( 'head' ).find( '#sydney-customizer-styles-' + option ).remove();
     290   
     291                var output = selector + ' { color:' + to + '!important; }';
     292   
     293                $( 'head' ).append( '<style id="sydney-customizer-styles-' + option + '">' + output + '</style>' );
     294   
     295            } );
     296        } );
     297    });
     298
     299    //Fill
     300    var $fill_options = {"footer_color":".site-info .sydney-svg-icon svg"};
     301
     302    $.each( $fill_options, function( option, selector ) {
     303        wp.customize( option, function( value ) {
     304            value.bind( function( to ) {
     305                $( selector ).css( 'fill', to );
     306            } );
     307        } );
     308    });
     309
     310    //Border color
     311    var $border_color_options = { "footer_credits_divider_color":".site-info,.site-footer","footer_widgets_divider_color":".footer-widgets,.footer-widgets-grid" };
     312
     313    $.each( $border_color_options, function( option, selector ) {
     314        wp.customize( option, function( value ) {
     315            value.bind( function( to ) {
     316                $( selector ).css( 'border-color', to );
     317            } );
     318        } );
     319    });     
     320
     321    //Responsive
     322    var $devices    = { "desktop": "(min-width: 992px)", "tablet": "(min-width: 576px) and (max-width: 991px)", "mobile": "(max-width: 575px)" };
     323   
     324    var $topBottPad = { "footer_widgets_padding":".footer-widgets-grid", };
     325    $.each( $topBottPad, function( option, selector ) {
     326        $.each( $devices, function( device, mediaSize ) {
     327            wp.customize( option + '_' + device, function( value ) {
     328                value.bind( function( to ) {
     329               
     330                    $( 'head' ).find( '#sydney-customizer-styles-' + option + '_' + device ).remove();
     331       
     332                    var output = '@media ' + mediaSize + ' {' + selector + ' { padding-top:' + to + 'px;padding-bottom:' + to + 'px; } }';
     333       
     334                    $( 'head' ).append( '<style id="sydney-customizer-styles-' + option + '_' + device + '">' + output + '</style>' );
     335                } );
     336            } );
     337        });
     338    });
     339    var $fontSizes  = { "footer_widgets_title_size":".sidebar-column .widget .widget-title", };
     340    $.each( $fontSizes, function( option, selector ) {
     341        $.each( $devices, function( device, mediaSize ) {
     342            wp.customize( option + '_' + device, function( value ) {
     343                value.bind( function( to ) {
     344               
     345                    $( 'head' ).find( '#botiga-customizer-styles-' + option + '_' + device ).remove();
     346       
     347                    var output = '@media ' + mediaSize + ' {' + selector + ' { font-size:' + to + 'px; } }';
     348       
     349                    $( 'head' ).append( '<style id="botiga-customizer-styles-' + option + '_' + device + '">' + output + '</style>' );
     350                } );
     351            } );
     352        });
     353    });     
     354   
     355   
     356
     357    //Footer
     358    wp.customize( 'footer_widgets_column_spacing_desktop', function( value ) {
     359        value.bind( function( to ) {
     360            $( '.footer-widgets-grid' ).css( 'gap', to + 'px' );
     361        } );
     362    } );
     363    wp.customize( 'footer_widgets_divider_size', function( value ) {
     364        value.bind( function( to ) {
     365            $( '.footer-widgets,.footer-widgets-grid' ).css( 'border-width', to );
     366        } );
     367    } );
     368    wp.customize( 'footer_credits_divider_size', function( value ) {
     369        value.bind( function( to ) {
     370            $( '.site-info,.site-footer' ).css( 'border-width', to );
     371        } );
     372    } );   
     373    wp.customize( 'footer_credits_padding_desktop', function( value ) {
     374        value.bind( function( to ) {
     375            $( '.site-info' ).css( {
     376                'padding-top': to + 'px',
     377                'padding-bottom': to + 'px'
     378            } );
     379        } );
     380    } );
     381
    180382} )( jQuery );
  • sydney/1.79/js/functions.js

    r150497 r153790  
    2323        const icon  = document.getElementsByClassName( 'go-top' )[0];
    2424
    25         var vertDist = window.pageYOffset;
    26 
    27         if ( vertDist > 800 ) {
    28             icon.classList.add( 'show' );
    29         } else {
    30             icon.classList.remove( 'show' );
     25        if ( typeof(icon) != 'undefined' && icon != null ) {
     26            var vertDist = window.pageYOffset;
     27
     28            if ( vertDist > 800 ) {
     29                icon.classList.add( 'show' );
     30            } else {
     31                icon.classList.remove( 'show' );
     32            }
     33       
     34            icon.addEventListener( 'click', function() {
     35                window.scrollTo({
     36                    top: 0,
     37                    left: 0,
     38                    behavior: 'smooth',
     39                });
     40            } );
    3141        }
    32    
    33         icon.addEventListener( 'click', function() {
    34             window.scrollTo({
    35                 top: 0,
    36                 left: 0,
    37                 behavior: 'smooth',
    38             });
    39         } );
    4042    },
    4143
    4244    displayButton: function() {
     45       
    4346        this.setup();
    4447
  • sydney/1.79/js/functions.min.js

    r150497 r153790  
    1 "use strict";window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(e,t){t=t||window;for(var n=0;n<this.length;n++)e.call(t,this[n],n,this)});var sydney=sydney||{};function sydneyDomReady(e){if("function"==typeof e)return"interactive"===document.readyState||"complete"===document.readyState?e():void document.addEventListener("DOMContentLoaded",e,!1)}sydney.backToTop={init:function(){this.displayButton()},setup:function(){const e=document.getElementsByClassName("go-top")[0];window.pageYOffset>800?e.classList.add("show"):e.classList.remove("show"),e.addEventListener("click",function(){window.scrollTo({top:0,left:0,behavior:"smooth"})})},displayButton:function(){this.setup(),window.addEventListener("scroll",function(){this.setup()}.bind(this))}},sydney.removePreloader={init:function(){this.remove()},remove:function(){const e=document.getElementsByClassName("preloader")[0];e.classList.add("disable"),setTimeout(function(){e.classList.add("hide")},600)}},sydney.stickyMenu={init:function(){this.headerClone(),window.addEventListener("resize",function(){this.headerClone()}.bind(this)),this.sticky(),window.addEventListener("scroll",function(){this.sticky()}.bind(this))},headerClone:function(){const e=document.getElementsByClassName("site-header")[0],t=document.getElementsByClassName("header-clone")[0];void 0===t&&null==t||void 0===e&&null==e||(t.style.height=e.offsetHeight+"px")},sticky:function(){const e=document.getElementsByClassName("site-header")[0];if(void 0!==e||null!=e){var t=window.pageYOffset;t>=e.offsetTop?(e.classList.add("fixed"),document.body.classList.add("siteScrolled")):(e.classList.remove("fixed"),document.body.classList.remove("siteScrolled")),t>=107?e.classList.add("float-header"):e.classList.remove("float-header")}}},sydney.mobileMenu={init:function(){this.menu(),window.addEventListener("resize",function(){this.menu()}.bind(this))},menu:function(){if(window.matchMedia("(max-width: 1024px)").matches){const t=document.getElementsByClassName("mainnav")[0],n=document.getElementsByClassName("btn-menu")[0];t.setAttribute("id","mainnav-mobi"),t.classList.add("syd-hidden");var e=t.querySelectorAll(".menu-item-has-children");const i='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z"/></svg>';e.forEach(function(e,t,n){e.getElementsByTagName("ul")[0].style.display="none",e.getElementsByTagName("a")[0].insertAdjacentHTML("beforeend",'<span class="btn-submenu">'+i+"</span>")},"myThisArg"),this.toggle(n,t),t.querySelectorAll(".btn-submenu").forEach(function(e,t,n){e.addEventListener("click",function(t){t.preventDefault(),e.parentNode.parentNode.getElementsByClassName("sub-menu")[0].classList.toggle("toggled")})},"myThisArg")}else{const e=document.getElementById("mainnav-mobi");if(void 0!==e&&null!=e){e.setAttribute("id","mainnav"),e.classList.remove("toggled"),e.querySelectorAll(".btn-submenu").forEach(function(e,t,n){e.remove()},"myThisArg")}}},toggle:function(e,t){e.addEventListener("click",function(e){e.preventDefault(),t.classList.contains("toggled")?t.classList.remove("toggled"):t.classList.add("toggled"),e.stopImmediatePropagation()})},submenuToggle:function(e){e.addEventListener("click",function(t){t.preventDefault(),e.parentNode.parentNode.getElementsByClassName("sub-menu")[0].classList.toggle("toggled")})}},sydneyDomReady(function(){sydney.backToTop.init(),sydney.removePreloader.init(),sydney.stickyMenu.init(),sydney.mobileMenu.init()}),window.addEventListener("load",function(){!function(e,t,n){var i=t.querySelectorAll(['iframe[src*="youtube.com"]','iframe[src*="vimeo.com"]'].join(","));if(i.length)for(var s=0;s<i.length;s++){var o=i[s],d=o.getAttribute("width"),a=o.getAttribute("height")/d,l=o.parentNode,c=t.createElement("div");c.className="fitVids-wrapper",c.style.paddingBottom=100*a+"%",l.insertBefore(c,o),o.remove(),c.appendChild(o),o.removeAttribute("height"),o.removeAttribute("width")}}(window,document)}),window.addEventListener("load",function(){if("undefined"!=typeof Isotope&&("undefined"!=typeof lazySizes||"undefined"!=typeof lazyLoadOptions||"undefined"!=typeof a3_lazyload_extend_params)){const e=document.querySelectorAll(".isotope-container");e.length&&e.forEach(function(e){const t=e.querySelectorAll(".isotope-item img[data-lazy-src], .isotope-item img[data-src]");t.length&&t.forEach(function(t){null!==t&&t.addEventListener("load",function(){jQuery(e).isotope("layout")})},"myThisArg")},"myThisArg")}});
     1"use strict";window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(a,b){b=b||window;for(var c=0;c<this.length;c++)a.call(b,this[c],c,this)});var sydney=sydney||{};sydney.backToTop={init:function(){this.displayButton()},setup:function(){const a=document.getElementsByClassName("go-top")[0];if("undefined"!=typeof a&&null!=a){var b=window.pageYOffset;800<b?a.classList.add("show"):a.classList.remove("show"),a.addEventListener("click",function(){window.scrollTo({top:0,left:0,behavior:"smooth"})})}},displayButton:function(){this.setup(),window.addEventListener("scroll",function(){this.setup()}.bind(this))}},sydney.removePreloader={init:function(){this.remove()},remove:function(){const a=document.getElementsByClassName("preloader")[0];a.classList.add("disable"),setTimeout(function(){a.classList.add("hide")},600)}},sydney.stickyMenu={init:function(){this.headerClone(),window.addEventListener("resize",function(){this.headerClone()}.bind(this)),this.sticky(),window.addEventListener("scroll",function(){this.sticky()}.bind(this))},headerClone:function(){const a=document.getElementsByClassName("site-header")[0],b=document.getElementsByClassName("header-clone")[0];"undefined"==typeof b&&null==b||"undefined"==typeof a&&null==a||(b.style.height=a.offsetHeight+"px")},sticky:function(){const a=document.getElementsByClassName("site-header")[0];if("undefined"!=typeof a||null!=a){var b=window.pageYOffset,c=a.offsetTop;b>=c?(a.classList.add("fixed"),document.body.classList.add("siteScrolled")):(a.classList.remove("fixed"),document.body.classList.remove("siteScrolled")),107<=b?a.classList.add("float-header"):a.classList.remove("float-header")}}},sydney.mobileMenu={init:function(){this.menu(),window.addEventListener("resize",function(){this.menu()}.bind(this))},menu:function(){if(window.matchMedia("(max-width: 1024px)").matches){const b=document.getElementsByClassName("mainnav")[0],c=document.getElementsByClassName("btn-menu")[0];b.setAttribute("id","mainnav-mobi"),b.classList.add("syd-hidden");var a=b.querySelectorAll(".menu-item-has-children");a.forEach(function(a){a.getElementsByTagName("ul")[0].style.display="none",a.getElementsByTagName("a")[0].insertAdjacentHTML("beforeend","<span class=\"btn-submenu\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><path d=\"M240.971 130.524l194.343 194.343c9.373 9.373 9.373 24.569 0 33.941l-22.667 22.667c-9.357 9.357-24.522 9.375-33.901.04L224 227.495 69.255 381.516c-9.379 9.335-24.544 9.317-33.901-.04l-22.667-22.667c-9.373-9.373-9.373-24.569 0-33.941L207.03 130.525c9.372-9.373 24.568-9.373 33.941-.001z\"/></svg></span>")},"myThisArg"),this.toggle(c,b);const d=b.querySelectorAll(".btn-submenu");d.forEach(function(a){a.addEventListener("click",function(b){b.preventDefault();var c=a.parentNode.parentNode;c.getElementsByClassName("sub-menu")[0].classList.toggle("toggled")})},"myThisArg")}else{const a=document.getElementById("mainnav-mobi");if("undefined"!=typeof a&&null!=a){a.setAttribute("id","mainnav"),a.classList.remove("toggled");const b=a.querySelectorAll(".btn-submenu");b.forEach(function(a){a.remove()},"myThisArg")}}},toggle:function(a,b){a.addEventListener("click",function(a){a.preventDefault(),b.classList.contains("toggled")?b.classList.remove("toggled"):b.classList.add("toggled"),a.stopImmediatePropagation()})},submenuToggle:function(a){a.addEventListener("click",function(b){b.preventDefault();var c=a.parentNode.parentNode;c.getElementsByClassName("sub-menu")[0].classList.toggle("toggled")})}};function sydneyDomReady(a){return"function"==typeof a?"interactive"===document.readyState||"complete"===document.readyState?a():void document.addEventListener("DOMContentLoaded",a,!1):void 0}sydneyDomReady(function(){sydney.backToTop.init(),sydney.removePreloader.init(),sydney.stickyMenu.init(),sydney.mobileMenu.init()}),window.addEventListener("load",function(){(function(a,b){"use strict";var c=b.querySelectorAll(["iframe[src*=\"youtube.com\"]","iframe[src*=\"vimeo.com\"]"].join(","));if(c.length)for(var d=0;d<c.length;d++){var e=c[d],f=e.getAttribute("width"),g=e.getAttribute("height"),h=e.parentNode,j=b.createElement("div");j.className="fitVids-wrapper",j.style.paddingBottom=100*(g/f)+"%",h.insertBefore(j,e),e.remove(),j.appendChild(e),e.removeAttribute("height"),e.removeAttribute("width")}})(window,document)}),window.addEventListener("load",function(){if("undefined"!=typeof Isotope&&("undefined"!=typeof lazySizes||"undefined"!=typeof lazyLoadOptions||"undefined"!=typeof a3_lazyload_extend_params)){const a=document.querySelectorAll(".isotope-container");a.length&&a.forEach(function(a){const b=a.querySelectorAll(".isotope-item img[data-lazy-src], .isotope-item img[data-src]");b.length&&b.forEach(function(b){null!==b&&b.addEventListener("load",function(){jQuery(a).isotope("layout")})},"myThisArg")},"myThisArg")}});
  • sydney/1.79/page-templates/page_fullwidth.php

    r139705 r153790  
    11<?php
     2/*
     3Template Name: Full width
     4*/
    25
    3 /*
    4 
    5 Template Name: Full width
    6 
    7 */
    8     get_header();
    9 ?>
    10 
    11 
     6get_header(); ?>
    127
    138    <div id="primary" class="content-area">
  • sydney/1.79/sidebar-footer.php

    r139705 r153790  
    44 * @package Sydney
    55 */
     6
     7//Footer widgets options
     8$container  = get_theme_mod( 'footer_container', 'container' );
     9$layout     = get_theme_mod( 'footer_widget_areas', '3' );
     10$alignment  = get_theme_mod( 'footer_widgets_alignment', 'top' );
     11$visibility = get_theme_mod( 'footer_widgets_visibility', 'all' );
     12
     13if ( !is_active_sidebar( 'footer-1' ) || 'disabled' === $layout ) {
     14    return;
     15}
     16
     17switch ($layout) {
     18
     19    case '4':
     20    case 'col4-bigleft':
     21    case 'col4-bigright':   
     22        $column_no  = 4;
     23        break;
     24
     25    case '3':
     26    case 'col3-bigleft':
     27    case 'col3-bigright':
     28        $column_no  = 3;
     29        break;
     30
     31    case '2':
     32    case 'col2-bigleft':
     33    case 'col2-bigright':
     34        $column_no  = 2;
     35        break;
     36
     37    default:
     38        $column_no  = 1;
     39        break;
     40}
     41
    642?>
    743
    8 
    9     <?php //Set widget areas classes based on user choice
    10         $widget_areas = get_theme_mod('footer_widget_areas', '3');
    11         if ($widget_areas == '3') {
    12             $cols = 'col-md-4';
    13         } elseif ($widget_areas == '4') {
    14             $cols = 'col-md-3';
    15         } elseif ($widget_areas == '2') {
    16             $cols = 'col-md-6';
    17         } else {
    18             $cols = 'col-md-12';
    19         }
    20     ?>
    21 
    22     <div id="sidebar-footer" class="footer-widgets widget-area" role="complementary">
    23         <div class="container">
    24             <?php if ( is_active_sidebar( 'footer-1' ) ) : ?>
    25                 <div class="sidebar-column <?php echo $cols; ?>">
    26                     <?php dynamic_sidebar( 'footer-1'); ?>
    27                 </div>
     44<div id="sidebar-footer" class="footer-widgets widget-area visibility-<?php echo esc_attr( $visibility ); ?>">
     45    <div class="<?php echo esc_attr( $container ); ?>">
     46        <div class="footer-widgets-grid footer-layout-<?php echo esc_attr( $layout ); ?> align-<?php echo esc_attr( $alignment ); ?>">
     47        <?php for ( $i = 1; $i <= $column_no; $i++ ) { ?>
     48            <?php if ( is_active_sidebar( 'footer-' . $i ) ) : ?>
     49            <div class="sidebar-column">
     50                <?php dynamic_sidebar( 'footer-' . $i); ?>
     51            </div>
    2852            <?php endif; ?>
    29             <?php if ( is_active_sidebar( 'footer-2' ) ) : ?>
    30                 <div class="sidebar-column <?php echo $cols; ?>">
    31                     <?php dynamic_sidebar( 'footer-2'); ?>
    32                 </div>
    33             <?php endif; ?>
    34             <?php if ( is_active_sidebar( 'footer-3' ) ) : ?>
    35                 <div class="sidebar-column <?php echo $cols; ?>">
    36                     <?php dynamic_sidebar( 'footer-3'); ?>
    37                 </div>
    38             <?php endif; ?>
    39             <?php if ( is_active_sidebar( 'footer-4' ) ) : ?>
    40                 <div class="sidebar-column <?php echo $cols; ?>">
    41                     <?php dynamic_sidebar( 'footer-4'); ?>
    42                 </div>
    43             <?php endif; ?>
    44         </div> 
     53        <?php } ?>
     54        </div>
    4555    </div>
     56</div> 
  • sydney/1.79/style.css

    r150497 r153790  
    55Author URI: https://athemes.com
    66Description: Sydney is a powerful business theme that provides a fast way for companies or freelancers to create an awesome online presence. As well as being fully compatible with Elementor, Sydney brings plenty of customization possibilities like access to all Google Fonts, full color control, layout control, logo upload, full screen slider, header image, sticky navigation and much more. Also, Sydney provides all the construction blocks you need to rapidly create an engaging front page. Looking for a quick start with Sydney? With just a few clicks, you can import one of our existing demos (https://athemes.com/sydney-demos/)
    7 Version: 1.78
     7Version: 1.79
    88License: GNU General Public License v2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4747.social-widget li a::before,
    4848.social-menu-widget a:before {
    49     font-family: FontAwesome;
     49    font-family: "FontAwesome", "Font Awesome 5 Brands";
    5050    color: inherit;
    5151}
     
    892892    /* Icons */
    893893    #mainnav ul li::before {
    894         font-family: Fontawesome;
     894        font-family: "Fontawesome", "Font Awesome 5 Free";
    895895        color: #fff;
    896896        float: left;
     
    15271527        margin-bottom: 55px;
    15281528    }
     1529    .sidebar-column .widget:last-of-type {
     1530        margin-bottom: 0;
     1531    }
    15291532    .widget-area .widget:before {
    15301533        content: "";
     
    18011804--------------------------------------------------------------*/
    18021805    .footer-widgets {
    1803         padding: 95px 0;
     1806        border: 0;
     1807        padding: 0;
    18041808        background-color: #252525;
    1805     }
    1806     .footer .copyr {
    1807         color: #a8a8a8;
    1808         margin-bottom: 0;
    18091809    }
    18101810    .footer-widgets .widget-title {
    18111811        text-transform: uppercase;
    1812         color: #c5c5c5;
     1812        color: #fff;
    18131813        line-height: normal;
    18141814        margin: 5px 0 0;
    18151815    }
     1816    .footer-widgets,
     1817    .footer-widgets a {
     1818        color: #666666;
     1819    }
     1820    .footer-widgets-grid {
     1821        padding: 95px 0;
     1822        display: grid;
     1823        gap: 30px;
     1824    }
     1825
     1826    .footer-widgets-grid.footer-layout-2 {
     1827        grid-template-columns: repeat(2, 1fr);
     1828    }
     1829
     1830    .footer-widgets-grid.footer-layout-col2-bigleft {
     1831        grid-template-columns: 2fr 1fr;
     1832    }
     1833
     1834    .footer-widgets-grid.footer-layout-col2-bigright {
     1835        grid-template-columns: 1fr 2fr;
     1836    }
     1837
     1838    .footer-widgets-grid.footer-layout-3 {
     1839        grid-template-columns: repeat(3, 1fr);
     1840    }
     1841
     1842    .footer-widgets-grid.footer-layout-col3-bigleft {
     1843        grid-template-columns: 3fr 1fr 1fr;
     1844    }
     1845
     1846    .footer-widgets-grid.footer-layout-col3-bigright {
     1847        grid-template-columns: 1fr 1fr 3fr;
     1848    }
     1849
     1850    .footer-widgets-grid.footer-layout-4 {
     1851        grid-template-columns: repeat(4, 1fr);
     1852    }
     1853
     1854    .footer-widgets-grid.footer-layout-col4-bigleft {
     1855        grid-template-columns: 2fr 1fr 1fr 1fr;
     1856    }
     1857
     1858    .footer-widgets-grid.footer-layout-col4-bigright {
     1859        grid-template-columns: 1fr 1fr 1fr 2fr;
     1860    }
     1861
     1862    .footer-widgets-grid.align-middle {
     1863    -webkit-box-align: center;
     1864        -ms-flex-align: center;
     1865            align-items: center;
     1866    }
     1867
     1868    .footer-widgets-grid.align-bottom {
     1869    -webkit-box-align: end;
     1870        -ms-flex-align: end;
     1871            align-items: end;
     1872    }
     1873
     1874    .visibility-mobile-only {
     1875    display: none;
     1876    }
     1877
     1878    @media (max-width: 991px) {
     1879        .visibility-desktop-only {
     1880            display: none;
     1881        }
     1882        .visibility-mobile-only {
     1883            display: block;
     1884        }
     1885    }
     1886
    18161887    /* widget info */
    18171888    .widget-info .logo-footer {
     
    18381909        top: 0;
    18391910        content: "\f041";
    1840         font-family: "FontAwesome";
     1911        font-family: "FontAwesome", "Font Awesome 5 Free";
     1912        font-weight: 900;
    18411913        font-size: 16px;
    18421914    }
     
    18681940Bottom
    18691941--------------------------------------------------------------*/
     1942    .site-info {
     1943        padding: 20px 0;
     1944    }
    18701945    .site-footer {
    18711946        background-color: #1c1c1c;
    1872         line-height: 35px;
    1873         padding: 15px 0;
    18741947    }
    18751948    .site-footer,
     
    19021975        color: #fff;
    19031976    }
     1977    .social-profile {
     1978        text-align: right;
     1979    }
     1980    .social-profile a {
     1981        margin-right: 20px;
     1982    }
     1983    .social-profile a:last-of-type {
     1984        margin-right: 0;
     1985    }
    19041986/*--------------------------------------------------------------
    19051987Preloader
     
    19932075        color: #fff;
    19942076        display: block;
    1995         font-size: 22px;
    1996         line-height: 35px;
     2077        line-height: 1;
    19972078        text-align: center;
    1998         width: 40px;
    1999         height: 40px;
     2079        padding: 15px;
    20002080        visibility: hidden;
    20012081        -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
     
    20042084        z-index: 9999;
    20052085        cursor: pointer;
     2086        font-size: 14px;
    20062087        -webkit-border-radius: 2px;
    20072088           -moz-border-radius: 2px;
     
    20142095                transition: all 0.5s;
    20152096    }
     2097    .go-top.position-left {
     2098        right: auto;
     2099        left: 20px;
     2100    }   
    20162101    .go-top:hover {
    20172102        background-color: #fff;
     
    20232108        visibility: visible;
    20242109        bottom : 11px;
     2110    }
     2111    .go-top span {
     2112        margin-right: 7px;
     2113        vertical-align: middle;
    20252114    }
    20262115
     
    22522341    .roll-list li:before {
    22532342        content: "\f006";
    2254         font-family: "FontAwesome";
     2343        content: "\f005";
     2344        font-family: "FontAwesome", "Font Awesome 5 Free";
    22552345        font-size: 15px;
    22562346        position: absolute;
     
    27152805        top: 4px;
    27162806        content: "\f041";
    2717         font-family: "FontAwesome";
     2807        font-family: "FontAwesome", "Font Awesome 5 Free";
     2808        font-weight: 900;
    27182809        font-size: 20px;
    27192810    }
     
    37953886}
    37963887.go-top svg {
    3797     fill: #fff;
     3888    stroke: #fff;
     3889    width: 18px;
     3890    height: 18px;
    37983891}
    37993892.go-top:hover svg {
    3800     fill: #d65050;
     3893    fill: none;
     3894    stroke: #d65050;
    38013895}
    38023896.meta-post .sydney-svg-icon {
     
    38383932/* Media Queries
    38393933-------------------------------------------------------------- */
     3934    .visibility-mobile-only {
     3935        display: none;
     3936    }
     3937    @media (max-width: 991px) {
     3938        .visibility-desktop-only {
     3939            display: none;
     3940        }
     3941        .visibility-mobile-only {
     3942            display: block;
     3943        }   
     3944    }
    38403945    @media only screen and (min-width: 1930px) {
    38413946        .parallax {
     
    39134018        .blog-post:nth-of-type(2n+1) {
    39144019            clear: left;
    3915         }               
     4020        }   
     4021        .footer-widgets {
     4022            padding-top: 50px;
     4023            padding-bottom: 50px;
     4024        }                   
    39164025    }
    39174026    @media only screen and (max-width: 1024px) {
     
    40874196            display: none;
    40884197        }
    4089     }
    4090     @media only screen and (max-width: 600px) {
     4198        .footer-widgets-grid {
     4199            grid-template-columns: 1fr !important;
     4200        }   
     4201        .site-info .sydney-credits,
     4202        .site-info .social-profile {
     4203            text-align: center;
     4204        }
     4205        .site-info .social-profile {
     4206            margin-top: 15px;;
     4207        }               
     4208    }
     4209    @media only screen and (max-width: 575px) {
    40914210        .roll-client .client-item {
    40924211            padding: 5px;
  • sydney/1.79/theme-dashboard/style.css

    r140723 r153790  
    556556      z-index: 19;
    557557    }
     558   
     559.notice.thd-theme-dashboard-notice-success {
     560  border-top: none;
     561  border-right: none;
     562  border-bottom: none;
     563  padding: 15px 20px;
     564}
  • sydney/1.79/widgets/fp-employees.php

    r139705 r153790  
    7777        echo $args['before_widget'];
    7878
     79        // Get fontawesome prefix
     80        $fa_prefix = sydney_get_fontawesome_prefix( 'fab ' );
     81
    7982        if ($r->have_posts()) :
    8083?>
     
    100103                                <ul class="team-social">
    101104                                    <?php if ($facebook != '') : ?>
    102                                         <li><a class="facebook" href="<?php echo esc_url($facebook); ?>" target="_blank"><i class="fa fa-facebook"></i></a></li>
     105                                        <li><a class="facebook" href="<?php echo esc_url($facebook); ?>" target="_blank"><i class="<?php echo esc_attr( $fa_prefix ); ?>fa-facebook"></i></a></li>
    103106                                    <?php endif; ?>
    104107                                    <?php if ($twitter != '') : ?>
    105                                         <li><a class="twitter" href="<?php echo esc_url($twitter); ?>" target="_blank"><i class="fa fa-twitter"></i></a></li>
     108                                        <li><a class="twitter" href="<?php echo esc_url($twitter); ?>" target="_blank"><i class="<?php echo esc_attr( $fa_prefix ); ?>fa-twitter"></i></a></li>
    106109                                    <?php endif; ?>
    107110                                    <?php if ($google != '') : ?>
    108                                         <li><a class="google" href="<?php echo esc_url($google); ?>" target="_blank"><i class="fa fa-google-plus"></i></a></li>
     111                                        <li><a class="google" href="<?php echo esc_url($google); ?>" target="_blank"><i class="<?php echo esc_attr( $fa_prefix ); ?>fa-google-plus"></i></a></li>
    109112                                    <?php endif; ?>
    110113                                </ul>
  • sydney/1.79/widgets/fp-facts.php

    r139705 r153790  
    2828        $fact_four_icon     = isset( $instance['fact_four_icon'] ) ? esc_html( $instance['fact_four_icon'] ) : ''; 
    2929    ?>
    30     <p><?php _e('You can find a list of the available icons ', 'sydney'); ?><a href="http://fortawesome.github.io/Font-Awesome/cheatsheet/" target="_blank"><?php _e('here.', 'sydney'); ?></a>&nbsp;<?php _e('Usage example: <strong>fa-android</strong>', 'sydney'); ?></p>
     30    <p><?php _e('You can find a list of the available icons ', 'sydney'); ?><a href="http://fortawesome.github.io/Font-Awesome/cheatsheet/" target="_blank"><?php _e('here.', 'sydney'); ?></a>&nbsp;
     31        <?php
     32        if( get_option( 'sydney-fontawesome-v5' ) ) {
     33            _e( 'Usage example: <strong>fas fa-cloud</strong> (solid). <strong>far fa-building</strong> (regular), <strong>fab fa-android</strong> (brands)', 'sydney' );
     34        } else {
     35            _e( 'Usage example: <strong>fa-android</strong>', 'sydney' );
     36        } ?>
     37    </p>
    3138    <p>
    3239    <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title', 'sydney'); ?></label>
     
    128135        extract($args);
    129136
     137        $icon_prefix = sydney_get_fontawesome_prefix();
     138
    130139        $title          = ( ! empty( $instance['title'] ) ) ? $instance['title'] : '';
    131140        $title          = apply_filters( 'widget_title', $title, $instance, $this->id_base );
    132141        $fact_one       = isset( $instance['fact_one'] ) ? esc_html( $instance['fact_one'] ) : '';
    133142        $fact_one_max   = isset( $instance['fact_one_max'] ) ? esc_html( $instance['fact_one_max'] ) : '';
    134         $fact_one_icon  = isset( $instance['fact_one_icon'] ) ? esc_html( $instance['fact_one_icon'] ) : '';
     143        $fact_one_icon  = isset( $instance['fact_one_icon'] ) ? esc_html( $icon_prefix . $instance['fact_one_icon'] ) : '';
    135144        $fact_two       = isset( $instance['fact_two'] ) ? esc_attr( $instance['fact_two'] ) : '';
    136145        $fact_two_max   = isset( $instance['fact_two_max'] ) ? esc_html( $instance['fact_two_max'] ) : '';
    137         $fact_two_icon  = isset( $instance['fact_two_icon'] ) ? esc_html( $instance['fact_two_icon'] ) : '';
     146        $fact_two_icon  = isset( $instance['fact_two_icon'] ) ? esc_html( $icon_prefix . $instance['fact_two_icon'] ) : '';
    138147        $fact_three     = isset( $instance['fact_three'] ) ? esc_attr( $instance['fact_three'] ) : '';
    139148        $fact_three_max = isset( $instance['fact_three_max'] ) ? esc_html( $instance['fact_three_max'] ) : '';
    140         $fact_three_icon= isset( $instance['fact_three_icon'] ) ? esc_html( $instance['fact_three_icon'] ) : '';
     149        $fact_three_icon= isset( $instance['fact_three_icon'] ) ? esc_html( $icon_prefix . $instance['fact_three_icon'] ) : '';
    141150        $fact_four      = isset( $instance['fact_four'] ) ? esc_attr( $instance['fact_four'] ) : '';       
    142151        $fact_four_max  = isset( $instance['fact_four_max'] ) ? esc_html( $instance['fact_four_max'] ) : '';
    143         $fact_four_icon = isset( $instance['fact_four_icon'] ) ? esc_html( $instance['fact_four_icon'] ) : '';     
     152        $fact_four_icon = isset( $instance['fact_four_icon'] ) ? esc_html( $icon_prefix . $instance['fact_four_icon'] ) : '';       
    144153
    145154        echo $args['before_widget'];
     
    151160        <div class="col-md-3 col-sm-3">
    152161            <div class="roll-counter">
    153                 <i class="fa <?php echo $fact_one_icon; ?>"></i>
     162                <i class="<?php echo $fact_one_icon; ?>"></i>
    154163                <div class="name-count"><?php echo $fact_one; ?></div>
    155164                <div class="numb-count" data-from="0" data-to="<?php echo $fact_one_max; ?>" data-speed="2000" data-waypoint-active="yes"><?php echo $fact_one_max; ?></div>
     
    160169        <div class="col-md-3 col-sm-3">
    161170            <div class="roll-counter">
    162                 <i class="fa <?php echo $fact_two_icon; ?>"></i>
     171                <i class="<?php echo $fact_two_icon; ?>"></i>
    163172                <div class="name-count"><?php echo $fact_two; ?></div>
    164173                <div class="numb-count" data-from="0" data-to="<?php echo $fact_two_max; ?>" data-speed="2000" data-waypoint-active="yes"><?php echo $fact_two_max; ?></div>
     
    169178        <div class="col-md-3 col-sm-3">
    170179            <div class="roll-counter">
    171                 <i class="fa <?php echo $fact_three_icon; ?>"></i>
     180                <i class="<?php echo $fact_three_icon; ?>"></i>
    172181                <div class="name-count"><?php echo $fact_three; ?></div>
    173182                <div class="numb-count" data-from="0" data-to="<?php echo $fact_three_max; ?>" data-speed="2000" data-waypoint-active="yes"><?php echo $fact_three_max; ?></div>
     
    178187        <div class="col-md-3 col-sm-3">
    179188            <div class="roll-counter">
    180                 <i class="fa <?php echo $fact_four_icon; ?>"></i>
     189                <i class="<?php echo $fact_four_icon; ?>"></i>
    181190                <div class="name-count"><?php echo $fact_four; ?></div>
    182191                <div class="numb-count" data-from="0" data-to="<?php echo $fact_four_max; ?>" data-speed="2000" data-waypoint-active="yes"><?php echo $fact_four_max; ?></div>
  • sydney/1.79/widgets/fp-services-type-a.php

    r139705 r153790  
    8080        $content_excerpt = isset( $instance['content_excerpt'] ) ? esc_html($instance['content_excerpt']) : 'fullcontent';
    8181
     82        $fa_prefix = sydney_get_fontawesome_prefix();
     83
    8284        $services = new WP_Query( array(
    8385            'no_found_rows'       => true,
     
    114116                                    <div class="icon">
    115117                                        <?php if ($link) : ?>
    116                                             <?php echo '<a href="' . esc_url($link) . '"><i class="fa ' . esc_html($icon) . '"></i></a>'; ?>
     118                                            <?php echo '<a href="' . esc_url($link) . '"><i class="' . esc_html($fa_prefix . $icon) . '"></i></a>'; ?>
    117119                                        <?php else : ?>
    118                                             <?php echo '<i class="fa ' . esc_html($icon) . '"></i>'; ?>
     120                                            <?php echo '<i class="' . esc_html($fa_prefix . $icon) . '"></i>'; ?>
    119121                                        <?php endif; ?>
    120122                                    </div>
  • sydney/1.79/widgets/fp-services-type-b.php

    r139705 r153790  
    107107        echo $args['before_widget'];
    108108
     109        $fa_prefix = sydney_get_fontawesome_prefix();
     110
    109111        if ($services->have_posts()) :
    110112?>
     
    128130                                    <div class="icon">
    129131                                        <?php if ($link) : ?>
    130                                             <?php echo '<a href="' . esc_url($link) . '"><i class="fa ' . esc_html($icon) . '"></i></a>'; ?>
     132                                            <?php echo '<a href="' . esc_url($link) . '"><i class="' . esc_html($fa_prefix . $icon) . '"></i></a>'; ?>
    131133                                        <?php else : ?>
    132                                             <?php echo '<i class="fa ' . esc_html($icon) . '"></i>'; ?>
     134                                            <?php echo '<i class="' . esc_html($fa_prefix . $icon) . '"></i>'; ?>
    133135                                        <?php endif; ?>
    134136                                    </div>
Note: See TracChangeset for help on using the changeset viewer.