Make WordPress Themes

Changeset 298819


Ignore:
Timestamp:
11/17/2025 11:33:13 AM (12 months ago)
Author:
themedropbox
Message:

New version of Charitable Non Profit - 0.3.8

Location:
charitable-non-profit/0.3.8
Files:
9 edited
1 copied

Legend:

Unmodified
Added
Removed
  • charitable-non-profit/0.3.8/archive.php

    r295325 r298819  
    131131        </div>
    132132        <div class="col-lg-4 col-md-4">
    133           <div class="sidebar-area <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
     133          <div class="sidebar-area <?php if( get_theme_mod('charitable_non_profit_enable_sticky_sidebar', false) == 1) { ?> sidebar-sticky <?php } else { ?> close-sticky <?php } ?>
     134           <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
    134135            <?php
    135136              dynamic_sidebar('sidebar-2');
    … …  
    166167        </div>
    167168        <div class="col-lg-3 col-md-3">
    168           <div class="sidebar-area <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
     169          <div class="sidebar-area <?php if( get_theme_mod('charitable_non_profit_enable_sticky_sidebar', false) == 1) { ?> sidebar-sticky <?php } else { ?> close-sticky <?php } ?>
     170            <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
    169171            <?php
    170172              dynamic_sidebar('sidebar-2');
    … …  
    173175        </div>
    174176        <div class="col-lg-3 col-md-3">
    175           <div class="sidebar-area sidebar-three <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
     177          <div class="sidebar-area sidebar-three <?php if( get_theme_mod('charitable_non_profit_enable_sticky_sidebar', false) == 1) { ?> sidebar-sticky <?php } else { ?> close-sticky <?php } ?>
     178            <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
    176179            <?php
    177180              dynamic_sidebar('sidebar-3');
  • charitable-non-profit/0.3.8/assets/js/script.js

    r295325 r298819  
    240240  }
    241241});
     242
     243/* ===============================================
     244   sticky sidebar
     245============================================= */
     246
     247window.addEventListener('scroll', function () {
     248  var charitable_non_profit_sidebar = document.querySelector('.sidebar-sticky');
     249  if (!charitable_non_profit_sidebar) return;
     250
     251  var charitable_non_profit_scrollTop = window.scrollY || document.documentElement.scrollTop;
     252  var charitable_non_profit_windowHeight = window.innerHeight;
     253  var charitable_non_profit_documentHeight = document.documentElement.scrollHeight;
     254
     255  var charitable_non_profit_isBottom = charitable_non_profit_scrollTop + charitable_non_profit_windowHeight >= charitable_non_profit_documentHeight - 100;
     256
     257  if (charitable_non_profit_scrollTop >= 100 && !charitable_non_profit_isBottom) {
     258    charitable_non_profit_sidebar.classList.add('sidebar-fixed');
     259  } else {
     260    charitable_non_profit_sidebar.classList.remove('sidebar-fixed');
     261  }
     262});
  • charitable-non-profit/0.3.8/includes/customizer.php

    r295325 r298819  
    920920                'type'        => 'custom',
    921921                'tab'      => 'general',
     922                'settings'    => 'charitable_non_profit_enable_sidebar_sticky_heading',
     923                'section'     => 'charitable_non_profit_additional_setting',
     924                        'default'         => '<h3 style="color: #2271b1; padding:10px; background:#fff; margin:0; border-left: solid 5px #2271b1; ">' . __( 'Sticky Sidebar', 'charitable-non-profit' ) . '</h3>',
     925                'priority'    => 10,
     926        ] );
     927
     928        Kirki::add_field( 'theme_config_id', [
     929                'type'        => 'toggle',
     930                'tab'      => 'general',
     931                'settings'    => 'charitable_non_profit_enable_sticky_sidebar',
     932                'label'       => esc_html__( 'Enable or Disable Sticky Sidebar', 'charitable-non-profit' ),
     933                'section'     => 'charitable_non_profit_additional_setting',
     934                'default'     => false,
     935                'priority'    => 10,
     936        ] );
     937
     938        Kirki::add_field( 'theme_config_id', [
     939                'type'        => 'custom',
     940                'tab'      => 'general',
    922941                'settings'    => 'charitable_non_profit_scroll_alignment_heading',
    923942                'section'     => 'charitable_non_profit_additional_setting',
    … …  
    15881607        ] );
    15891608
     1609        Kirki::add_field( 'theme_config_id', [
     1610                'type'        => 'custom',
     1611                'settings'    => 'charitable_non_profit_footer_sticky_heading',
     1612                'section'     => 'charitable_non_profit_footer_section',
     1613                        'default'         => '<h3 style="color: #2271b1; padding:10px; background:#fff; margin:0; border-left: solid 5px #2271b1; ">' . __( 'Footer Sticky Copyright', 'charitable-non-profit' ) . '</h3>',
     1614                'priority'    => 10,
     1615        ] );
     1616        Kirki::add_field( 'theme_config_id', [
     1617                'type'        => 'switch',
     1618                'settings'    => 'charitable_non_profit_sticky_copyright_enable',
     1619                'label'       => esc_html__( ' Sticky Copyright Section Enable / Disable', 'charitable-non-profit' ),
     1620                'section'     => 'charitable_non_profit_footer_section',
     1621                'default'     => '0',
     1622                'priority'    => 10,
     1623                'choices'     => [
     1624                        'on'  => esc_html__( 'Enable', 'charitable-non-profit' ),
     1625                        'off' => esc_html__( 'Disable', 'charitable-non-profit' ),
     1626                ],
     1627        ] );
     1628
     1629
    15901630    Kirki::add_field( 'theme_config_id', [
    15911631                'type'        => 'custom',
  • charitable-non-profit/0.3.8/index.php

    r295325 r298819  
    131131        </div>
    132132        <div class="col-lg-4 col-md-4">
    133           <div class="sidebar-area <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
     133          <div class="sidebar-area <?php if( get_theme_mod('charitable_non_profit_enable_sticky_sidebar', false) == 1) { ?> sidebar-sticky <?php } else { ?> close-sticky <?php } ?>
     134            <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
    134135            <?php
    135136              dynamic_sidebar('sidebar-2');
    … …  
    166167        </div>
    167168        <div class="col-lg-3 col-md-3">
    168           <div class="sidebar-area <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
     169          <div class="sidebar-area <?php if( get_theme_mod('charitable_non_profit_enable_sticky_sidebar', false) == 1) { ?> sidebar-sticky <?php } else { ?> close-sticky <?php } ?>
     170            <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
    169171            <?php
    170172              dynamic_sidebar('sidebar-2');
    … …  
    173175        </div>
    174176        <div class="col-lg-3 col-md-3">
    175           <div class="sidebar-area sidebar-three <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
     177          <div class="sidebar-area sidebar-three <?php if( get_theme_mod('charitable_non_profit_enable_sticky_sidebar', false) == 1) { ?> sidebar-sticky <?php } else { ?> close-sticky <?php } ?>
     178            <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
    176179            <?php
    177180              dynamic_sidebar('sidebar-3');
  • charitable-non-profit/0.3.8/page.php

    r295325 r298819  
    5151        <div class="row">
    5252          <div class="col-lg-4 col-md-4">
    53             <div class="sidebar-area <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
     53            <div class="sidebar-area <?php if( get_theme_mod('charitable_non_profit_enable_sticky_sidebar', false) == 1) { ?> sidebar-sticky <?php } else { ?> close-sticky <?php } ?>
     54              <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
    5455              <?php
    5556                dynamic_sidebar('sidebar-2');
    … …  
    9798          </div>
    9899          <div class="col-lg-4 col-md-4">
    99             <div class="sidebar-area <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
     100            <div class="sidebar-area <?php if( get_theme_mod('charitable_non_profit_enable_sticky_sidebar', false) == 1) { ?> sidebar-sticky <?php } else { ?> close-sticky <?php } ?>
     101              <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
    100102              <?php
    101103                dynamic_sidebar('sidebar-2');
  • charitable-non-profit/0.3.8/readme.txt

    r296475 r298819  
    22Contributors: wpelemento
    33Requires at least: 5.0
    4 Stable tag: 0.3.7
     4Stable tag: 0.3.8
    55Requires PHP: 5.6
    66Tested up to: 6.8
    … …  
    7373
    7474== Changelog ==
     75
     76= November-6-2025 :: 0.3.8
     77
     78* Added sticky sidebar.
     79* Remove unwanted css.
    7580
    7681= October-31-2025 :: 0.3.7
  • charitable-non-profit/0.3.8/search.php

    r295325 r298819  
    131131        </div>
    132132        <div class="col-lg-4 col-md-4">
    133           <div class="sidebar-area <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
     133          <div class="sidebar-area <?php if( get_theme_mod('charitable_non_profit_enable_sticky_sidebar', false) == 1) { ?> sidebar-sticky <?php } else { ?> close-sticky <?php } ?>
     134            <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
    134135            <?php
    135136              dynamic_sidebar('sidebar-2');
    … …  
    166167        </div>
    167168        <div class="col-lg-3 col-md-3">
    168           <div class="sidebar-area <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
     169          <div class="sidebar-area <?php if( get_theme_mod('charitable_non_profit_enable_sticky_sidebar', false) == 1) { ?> sidebar-sticky <?php } else { ?> close-sticky <?php } ?>
     170             <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
    169171            <?php
    170172              dynamic_sidebar('sidebar-2');
    … …  
    173175        </div>
    174176        <div class="col-lg-3 col-md-3">
    175           <div class="sidebar-area sidebar-three <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
     177          <div class="sidebar-area sidebar-three <?php if( get_theme_mod('charitable_non_profit_enable_sticky_sidebar', false) == 1) { ?> sidebar-sticky <?php } else { ?> close-sticky <?php } ?>
     178            <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
    176179            <?php
    177180              dynamic_sidebar('sidebar-3');
  • charitable-non-profit/0.3.8/sidebar.php

    r295325 r298819  
    99?>
    1010
    11 <div class="sidebar-area <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
     11<div class="sidebar-area <?php if( get_theme_mod('charitable_non_profit_enable_sticky_sidebar', false) == 1) { ?> sidebar-sticky <?php } else { ?> close-sticky <?php } ?>
     12  <?php echo esc_attr( get_theme_mod('charitable_non_profit_enable_sidebar_animation', true) ? 'zoomInRight wow' : '' ); ?>">
    1213  <?php if ( ! dynamic_sidebar( 'charitable-non-profit-sidebar' ) ) : ?>
    1314    <div role="complementary" aria-label="<?php echo esc_attr__( 'sidebar1', 'charitable-non-profit' ); ?>" id="Search" class="sidebar-widget">
  • charitable-non-profit/0.3.8/style.css

    r296475 r298819  
    55Theme URI: https://www.wpelemento.com/products/free-charitable-wordpress-theme
    66Author URI: https://www.wpelemento.com/
    7 Version: 0.3.7
     7Version: 0.3.8
    88Requires PHP: 5.6
    99Tested up to: 6.8
    … …  
    14571457  bottom: 0;
    14581458}
     1459/* Wide Block  */
     1460 
     1461 .alignwide {
     1462  margin-left  : -60px;
     1463  margin-right : -60px;
     1464}
     1465.alignfull {
     1466  margin-left  : calc( -100vw / 2 + 100% / 2 );
     1467  margin-right : calc( -100vw / 2 + 100% / 2 );
     1468  max-width    : 100vw;
     1469}
     1470
     1471/* Sticky Copyright */
     1472
     1473.sticky-copyright.footer-copyright{
     1474  position: fixed;
     1475  bottom:0;
     1476  left:0;
     1477  width: 100%;
     1478  z-index: 999;
     1479  transition: bottom 0.4s;
     1480  box-shadow: 0px 0px 8px #000000;
     1481}
     1482
     1483 /* ===============================================
     1484   Sticky Sidebar
     1485============================================= */
     1486
     1487.sidebar-sticky {
     1488  position: sticky;
     1489  top: 100px;
     1490  z-index: 999;
     1491}
    14591492/* ===============================================
    14601493   HOME PAGE CSS
    … …  
    15061539}
    15071540
    1508 /* Wide Block  */
    1509  
    1510  .alignwide {
    1511   margin-left  : -60px;
    1512   margin-right : -60px;
    1513 }
    1514 .alignfull {
    1515   margin-left  : calc( -100vw / 2 + 100% / 2 );
    1516   margin-right : calc( -100vw / 2 + 100% / 2 );
    1517   max-width    : 100vw;
    1518 }
    1519 
    1520 /* Sticky Copyright */
    1521 
    1522 .sticky-copyright.footer-copyright{
    1523   position: fixed;
    1524   bottom:0;
    1525   left:0;
    1526   width: 100%;
    1527   z-index: 999;
    1528   transition: bottom 0.4s;
    1529   box-shadow: 0px 0px 8px #000000;
    1530 }
    1531 .close-sticky {
    1532   position: static;
    1533 }
Note: See TracChangeset for help on using the changeset viewer.