Make WordPress Themes

Changeset 212388


Ignore:
Timestamp:
12/26/2023 02:30:44 PM (2 years ago)
Author:
themedropbox
Message:

New version of Medistore - 1.0.2

Location:
medistore/1.0.2
Files:
1 added
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • medistore/1.0.2/assets/js/customize-controls.js

    r158258 r212388  
    1 jQuery(document).ready(function($) {
     1/**
     2 * Scripts within the customizer controls window.
     3 *
     4 */
    25
    3     /*------------------------------------------------
    4                 DECLARATIONS
    5     ------------------------------------------------*/
    6    
    7         var loader = $('#loader');
    8         var loader_container = $('#preloader');
    9         var scroll = $(window).scrollTop(); 
    10         var scrollup = $('.backtotop');
    11         var menu_toggle = $('.menu-toggle');
    12         var dropdown_toggle = $('.main-navigation button.dropdown-toggle');
    13         var nav_menu = $('.main-navigation ul.nav-menu');
    14    
    15     /*------------------------------------------------
    16                 PRELOADER
    17     ------------------------------------------------*/
    18    
    19         loader_container.delay(1000).fadeOut();
    20         loader.delay(1000).fadeOut("slow");
    21    
    22     /*------------------------------------------------
    23                 BACK TO TOP
    24     ------------------------------------------------*/
    25    
    26         $(window).scroll(function() {
    27             if ($(this).scrollTop() > 1) {
    28                 scrollup.css({bottom:"25px"});
    29             }
    30             else {
    31                 scrollup.css({bottom:"-100px"});
    32             }
    33         });
    34    
    35         scrollup.click(function() {
    36             $('html, body').animate({scrollTop: '0px'}, 800);
    37             return false;
    38         });
    39    
    40     /*------------------------------------------------
    41                 MAIN NAVIGATION
    42     ------------------------------------------------*/
    43    
    44         $('#top-bar').click(function(){
    45             $('#top-bar .wrapper').slideToggle();
    46             $('#top-bar').toggleClass('top-menu-active');
    47         });
    48    
    49         menu_toggle.click(function(){
    50             nav_menu.slideToggle();
    51            $('.main-navigation').toggleClass('menu-open');
    52            $('.menu-overlay').toggleClass('active');
    53         });
    54    
    55         dropdown_toggle.click(function() {
    56             $(this).toggleClass('active');
    57            $(this).parent().find('.sub-menu').first().slideToggle();
    58         });
    59    
    60         $('.main-navigation ul li.search-menu a').click(function(event) {
    61             event.preventDefault();
    62             $(this).toggleClass('search-active');
    63             $('.main-navigation #search').fadeToggle();
    64             $('.main-navigation .search-field').focus();
    65         });
    66    
    67         $(window).scroll(function() {
    68             if ($(this).scrollTop() > 1) {
    69                 $('.menu-sticky #masthead').addClass('nav-shrink');
    70             }
    71             else {
    72                 $('.menu-sticky #masthead').removeClass('nav-shrink');
    73             }
    74         });
    75    
    76         $(document).click(function (e) {
    77             var container = $("#masthead");
    78             if (!container.is(e.target) && container.has(e.target).length === 0) {
    79                 $('#site-navigation').removeClass('menu-open');
    80                 $('#primary-menu').slideUp();
    81                 $('.menu-overlay').removeClass('active');
    82                 $('.main-navigation ul li.search-menu a').removeClass('search-active');
    83                 $('.main-navigation #search').fadeOut();
    84             }
    85         });
    86    
    87     /*------------------------------------------------
    88                 SLICK SLIDER
    89     ------------------------------------------------*/
    90    
    91     $('#featured-slider').slick();
    92    
    93    
    94     $('#team .team-slider').slick({
    95             responsive: [
    96             {
    97                 breakpoint: 1023,
    98                 settings: {
    99                 slidesToShow: 2
    100                 }
    101             },
    102             {
    103                 breakpoint: 767,
    104                 settings: {
    105                     slidesToShow: 1
    106                 }
    107             }
    108             ]
    109         });
    110    
    111    
    112      $('#testimonials .slider-for').slick({
    113             slidesToShow: 1,
    114             slidesToScroll: 1,
    115             arrows: false,
    116             dots: true,
    117             asNavFor: '.slider-nav'
    118         });
    119    
    120         $('#testimonials .slider-nav').slick({
    121             slidesToShow: 3,
    122             slidesToScroll: 1,
    123             arrows: false,
    124             dots: true,
    125             focusOnSelect: true,
    126             asNavFor: '.slider-for',
    127             responsive: [
    128             {
    129                 breakpoint: 1023,
    130                 settings: {
    131                 slidesToShow: 1
    132                 }
    133             }
    134             ]
    135         });
    136    
    137         $('#gallery .section-content').slick({
    138             responsive: [
    139             {
    140                 breakpoint: 1023,
    141                 settings: {
    142                 slidesToShow: 2
    143                 }
    144             },
    145             {
    146                 breakpoint: 767,
    147                 settings: {
    148                     slidesToShow: 1
    149                 }
    150             }
    151             ]
    152         });
    153    
    154         $('#our-services .section-content').slick({
    155             responsive: [{
    156                 breakpoint: 1024,
    157                     settings: {
    158                     slidesToShow: 2
    159                 }
    160             },
    161             {
    162                 breakpoint: 767,
    163                 settings: {
    164                     slidesToShow: 1
    165                 }
    166             }]
    167         });
    168    
    169         $('#our-services .read-more').append( $('#our-services .slick-next') );
    170         $('#our-services .read-more').prepend( $('#our-services .slick-prev') );
    171    
    172        
    173    
    174    
    175     /*------------------------------------------------
    176                 PRODUCTS FILTERING
    177     ------------------------------------------------*/
    178    
    179     $('ul.product-nav li a').click(function(event) {
    180         event.preventDefault();
    181    
    182         var tab_id = $(this).attr('data-tab');
    183    
    184         $('ul.product-nav li').removeClass('active');
    185         $(this).addClass('active');
    186    
    187         $('.tab-content').removeClass('active');
    188         $('.tab-content').hide();
    189    
    190         $("#"+tab_id).show();
    191    
     6 jQuery( document ).ready(function($) {
     7    //Chosen JS
     8    $(".medistore-chosen-select").chosen({
     9        width: "100%"
    19210    });
    19311
    194    
    195     /*--------------------------------------------------------------
    196  Keyboard Navigation
    197 ----------------------------------------------------------------*/
    198 if( $(window).width() < 1024 ) {
    199     $('#primary-menu').find("li").last().bind( 'keydown', function(e) {
    200         if( e.which === 9 ) {
    201             e.preventDefault();
    202             $('#masthead').find('.menu-toggle').focus();
     12    // icon picker
     13    $('.medistore-icon-picker').each( function() {
     14        $(this).iconpicker( '#' + this.id );
     15    } );
     16
     17    //Switch Control
     18    $('body').on('click', '.onoffswitch', function(){
     19        var $this = $(this);
     20        if($this.hasClass('switch-on')){
     21            $(this).removeClass('switch-on');
     22            $this.next('input').val( false ).trigger('change')
     23        }else{
     24            $(this).addClass('switch-on');
     25            $this.next('input').val( true ).trigger('change')
    20326        }
    20427    });
    20528
    206     $('#primary-menu > li:last-child button:not(.active)').bind( 'keydown', function(e) {
    207         if( e.which === 9 ) {
    208             e.preventDefault();
    209             $('#masthead').find('.menu-toggle').focus();
     29
     30    $( document ).on( 'click', '.customize_multi_add_field', medistore_customize_multi_add_field )
     31        .on( 'change', '.customize_multi_single_field', medistore_customize_multi_single_field )
     32        .on( 'click', '.customize_multi_remove_field', medistore_customize_multi_remove_field )
     33
     34    /********* Multi Input Custom control ***********/
     35    $( '.customize_multi_input' ).each(function() {
     36        var $this = $( this );
     37        var multi_saved_value = $this.find( '.customize_multi_value_field' ).val();
     38        if (multi_saved_value.length > 0) {
     39            var multi_saved_values = multi_saved_value.split( "|" );
     40            $this.find( '.customize_multi_fields' ).empty();
     41            var $control = $this.parents( '.customize_multi_input' );
     42            $.each(multi_saved_values, function( index, value ) {
     43                $this.find( '.customize_multi_fields' ).append( '<div class="set"><input type="text" value="' + value + '" class="customize_multi_single_field" /><span class="customize_multi_remove_field"><span class="dashicons dashicons-no-alt"></span></span></div>' );
     44            });
    21045        }
    21146    });
    212 }
    213 else {
    214     $('#primary-menu').find("li").unbind('keydown');
    215 }
    21647
    217 $(window).resize(function() {
    218     if( $(window).width() < 1024 ) {
    219         $('#primary-menu').find("li").last().bind( 'keydown', function(e) {
    220             if( e.which === 9 ) {
    221                 e.preventDefault();
    222                 $('#masthead').find('.menu-toggle').focus();
    223             }
     48    function medistore_customize_multi_add_field(e) {
     49        var $this = $( e.currentTarget );
     50        e.preventDefault();
     51            var $control = $this.parents( '.customize_multi_input' );
     52            $control.find( '.customize_multi_fields' ).append( '<div class="set"><input type="text" value="" class="customize_multi_single_field" /><span class="customize_multi_remove_field"><span class="dashicons dashicons-no-alt"></span></span></div>' );
     53            medistore_customize_multi_write( $control );
     54    }
     55
     56    function medistore_customize_multi_single_field() {
     57        var $control = $( this ).parents( '.customize_multi_input' );
     58        medistore_customize_multi_write( $control );
     59    }
     60
     61    function medistore_customize_multi_remove_field(e) {
     62        e.preventDefault();
     63        var $this = $( this );
     64        var $control = $this.parents( '.customize_multi_input' );
     65        $this.parent().remove();
     66        medistore_customize_multi_write( $control );
     67    }
     68
     69    function medistore_customize_multi_write( $element) {
     70        var customize_multi_val = '';
     71        $element.find( '.customize_multi_fields .customize_multi_single_field' ).each(function() {
     72            customize_multi_val += $( this ).val() + '|';
    22473        });
    225 
    226         $('#primary-menu > li:last-child button:not(.active)').bind( 'keydown', function(e) {
    227             if( e.which === 9 ) {
    228                 e.preventDefault();
    229                 $('#masthead').find('.menu-toggle').focus();
    230             }
    231         });
    232     }
    233     else {
    234         $('#primary-menu').find("li").unbind('keydown');
    235     }
     74        $element.find( '.customize_multi_value_field' ).val( customize_multi_val.slice( 0, -1 ) ).change();
     75    }       
    23676});
    23777
    238 menu_toggle.on('keydown', function (e) {
    239     tabKey = e.keyCode === 9;
    240     shiftKey = e.shiftKey;
     78jQuery(document).ready(function($) {
     79    // Sortable sections
     80   jQuery( 'ul.medistore-sortable-list' ).sortable({
     81        handle: '.medistore-drag-handle',
     82        axis: 'y',
     83        update: function( e, ui ){
     84            jQuery('input.medistore-sortable-input').trigger( 'change' );
     85        }
     86    });
    24187
    242     if( menu_toggle.hasClass('active') ) {
    243         if ( shiftKey && tabKey ) {
    244             e.preventDefault();
    245             nav_menu.slideUp();
    246             $('.main-navigation').removeClass('menu-open');
    247             $('.menu-overlay').removeClass('active');
    248             menu_toggle.removeClass('active');
    249         };
    250     }
     88
     89    /* On changing the value. */
     90    jQuery( "body" ).on( 'change', 'input.medistore-sortable-input', function() {
     91        /* Get the value, and convert to string. */
     92        this_checkboxes_values = jQuery( this ).parents( 'ul.medistore-sortable-list' ).find( 'input.medistore-sortable-input' ).map( function() {
     93            return this.value;
     94        }).get().join( ',' );
     95
     96        /* Add the value to hidden input. */
     97        jQuery( this ).parents( 'ul.medistore-sortable-list' ).find( 'input.medistore-sortable-value' ).val( this_checkboxes_values ).trigger( 'change' );
     98
     99    });
    251100});
    252101
    253 /*------------------------------------------------
    254                 END JQUERY
    255 ------------------------------------------------*/
     102/**
     103 * Add a listener to update other controls to new values/defaults.
     104 */
    256105
    257 });
     106( function( api ) {
     107
     108    const medistore_section_lists = ['slider_section','service_section','featured_post_section','popular_post_section','recent_post_section','promotion_section','course_section','team_section','counter_section','gallery_section','blog_section','featured_products_section','subscription_section','testimonial_section','two_column_section','sponsor_section','instagram_section'];
     109    medistore_section_lists.forEach( medistore_homepage_scroll );
     110
     111    function medistore_homepage_scroll(item, index) {
     112         // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly.
     113        wp.customize.section( 'medistore_'+item, function( section ) {
     114            section.expanded.bind( function( isExpanding ) {
     115                // Value of isExpanding will = true if you're entering the section, false if you're leaving it.
     116                wp.customize.previewer.send( item, { expanded: isExpanding });
     117            } );
     118        } );
     119    }
     120
     121
     122    // Only show the color hue control when there's a custom color scheme.
     123    wp.customize( 'medistore_theme_options[colorscheme]', function( setting ) {
     124        wp.customize.control( 'medistore_theme_options[colorscheme_hue]', function( control ) {
     125            var visibility = function() {
     126                if ( 'custom' === setting.get() ) {
     127                    control.container.slideDown( 180 );
     128                } else {
     129                    control.container.slideUp( 180 );
     130                }
     131            };
     132
     133            visibility();
     134            setting.bind( visibility );
     135        });
     136    });
     137
     138    wp.customize( 'medistore_theme_options[reset_options]', function( setting ) {
     139        setting.bind( function( value ) {
     140            var code = 'needs_refresh';
     141            if ( value ) {
     142                setting.notifications.add( code, new wp.customize.Notification(
     143                    code,
     144                    {
     145                        type: 'info',
     146                        message: medistore_reset_data.reset_message
     147                    }
     148                ) );
     149            } else {
     150                setting.notifications.remove( code );
     151            }
     152        } );
     153    } );
     154
     155    // Deep linking for menus
     156    wp.customize.bind('ready', function() {
     157        jQuery('a.topbar-menu-trigger').click(function(e) {
     158            e.preventDefault();
     159            wp.customize.section( 'menu_locations' ).focus()
     160        });
     161    });
     162} )( wp.customize );
  • medistore/1.0.2/functions.php

    r158258 r212388  
    325325    $options = medistore_get_theme_options();
    326326    // Add custom fonts, used in the main stylesheet.
    327     wp_enqueue_style( 'medistore-fonts', medistore_fonts_url(), array(), null );
     327    wp_enqueue_style( 'medistore-fonts', wptt_get_webfont_url(medistore_fonts_url()), array(), '1.0' );
    328328
    329329    // slick
     
    382382    wp_enqueue_style( 'medistore-block-editor-style', get_theme_file_uri( '/assets/css/editor-blocks' . medistore_min() . '.css' ) );
    383383    // Add custom fonts.
    384     wp_enqueue_style( 'medistore-fonts', medistore_fonts_url(), array(), null );
     384    wp_enqueue_style( 'medistore-fonts', wptt_get_webfont_url(medistore_fonts_url()), array(), '1.0' );
    385385}
    386386add_action( 'enqueue_block_editor_assets', 'medistore_block_editor_styles' );
  • medistore/1.0.2/inc/core.php

    r158258 r212388  
    9393
    9494/**
     95* Download webfonts locally.
     96*/
     97require get_template_directory() . '/inc/wptt-webfont-loader.php';
     98
     99/**
    95100 * Custom widget additions.
    96101 */
  • medistore/1.0.2/inc/customizer/sections/blog.php

    r158258 r212388  
    203203            'label'             => esc_html__( 'Show Appointment Date', 'medistore' ),
    204204            'section'           => 'medistore_blog_section',
     205            'active_callback'   => 'medistore_is_blog_section_enable',
    205206            'on_off_label'      => medistore_switch_options(),
    206207        )
  • medistore/1.0.2/inc/structure.php

    r158258 r212388  
    109109                            <?php
    110110                            if( in_array( $header_txt_logo_extra, array( 'show-all', 'title-only', 'logo-title' ) )  ) {
    111                                 if ( medistore_is_latest_posts() ) : ?>
     111                                if ( medistore_is_latest_posts() || medistore_is_frontpage() ) : ?>
    112112                                    <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
    113113                                <?php else : ?>
     
    176176                        ) );
    177177                       
    178                        
    179178                    ?>
    180179                    <?php if($enable_advertisement) echo '</div>'; ?>
  • medistore/1.0.2/readme.txt

    r158438 r212388  
    55Requires PHP: 5.6
    66Requires at least: 5.0
    7 Tested up to: 5.8
    8 Stable tag: 1.0.1
     7Tested up to: 6.4
     8Stable tag: 1.0.2
    99License: GPLv3 or later
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    7070== Changelog ==
    7171
     72= 1.0.2 - December 26 2023 =
     73* Fixed recent comment block spacing issue
     74* Fixed design issue on product page
     75* Load fonts locally
     76* Tested up to WordPress v6.4
     77
    7278= 1.0.1 - November 30 2021 =
    7379* Added Theme URI
  • medistore/1.0.2/style.css

    r158438 r212388  
    55Requires PHP: 5.6
    66Requires at least: 5.0
    7 Tested up to: 5.8
    8 Version: 1.0.1
     7Tested up to: 6.4
     8Version: 1.0.2
    99Author URI: https://themepalace.com
    1010Description: Medistore is one of the best pharmacy WordPress themes developed by Theme Palace. It is a multipurpose WordPress theme, fit for hospital, clinic services, ambulance solutions, medical shops, or any kind of medical website. The theme is visually clean, polished, sophisticated, easy to use with essential theme controls and elements. The theme is WooCommerce compatible too. You can launch your own e-store for selling health equipment, health care products &amp; services. Medistore Pro is translation ready too. You can download the theme and develop a website in any language you prefer. Additionally, the theme is super flexible, responsive, and cross-browser compatible. The website will look fabulous on all modern mobile devices, platforms, and browsers.
     
    21292129.single-post-wrapper article p.first-letter:first-letter {
    21302130    display: inline-block;
    2131     float: left;
    21322131    font-size: 90px;
    21332132    line-height: 0.6;
     
    26702669    vertical-align: top;
    26712670    width: 100%;
    2672     float: left;
    26732671    padding: 5px;
    26742672}
     
    30123010.team-slider .social-icons li a[href*="wordpress.org"] svg {
    30133011    fill: #0073AA;
    3014 }
    3015 .team-slider .social-icons li a[href*="wordpress.com"] svg {
    30163012}
    30173013
     
    32993295    min-height: auto;
    33003296    padding: 0;
    3301     background-color: #cc7c1a;
     3297    background-color: #299ff4;
    33023298    border-radius: 3px;
    33033299    line-height: 1.3;
     
    33463342}
    33473343.woocommerce ul.products li.product .price {
    3348     color: #cc7c1a;
     3344    color: #299ff4;
    33493345}
    33503346.woocommerce ul.products li.product .price {
    3351     color: #cc7c1a;
     3347    color: #299ff4;
    33523348    font-size: 18px;
    33533349    font-weight: 500;
     
    33763372    display: inline-block;
    33773373    text-align: center;
    3378     background-color: #cc7c1a;
     3374    background-color: #299ff4;
    33793375    border-radius: 5px;
    33803376    color: #fff;
     
    70927088    }
    70937089}
     7090
     7091.wp-block-latest-comments{
     7092    padding-left: 0px;
     7093}
     7094
     7095#secondary .wp-block-heading{
     7096    color: #000;
     7097    margin-bottom: 20px;
     7098    font-size: 22px;
     7099    font-weight: 600;
     7100    font-family: 'Roboto', sans-serif;
     7101}
     7102
     7103.products .product{
     7104    margin-right: 20px !important;
     7105}
     7106
     7107.woocommerce div.product form.cart{
     7108    margin-top: 20px;
     7109}
     7110
     7111.woocommerce .quantity .qty {
     7112    width: 4em;
     7113}
Note: See TracChangeset for help on using the changeset viewer.