Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
5a4824140c
|
|||
e085f5aee3
|
|||
aafbabb209
|
@ -6,37 +6,36 @@
|
||||
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
|
||||
*/
|
||||
|
||||
( function( $ ) {
|
||||
(($) => {
|
||||
const setText = (selector, text) => $(selector).text(text);
|
||||
|
||||
// Site title and description.
|
||||
wp.customize( 'blogname', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '.site-title a' ).text( to );
|
||||
} );
|
||||
} );
|
||||
wp.customize( 'blogdescription', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '.site-description' ).text( to );
|
||||
} );
|
||||
} );
|
||||
const setVisibility = (isVisible, color) => {
|
||||
const titleDesc = $('.site-title, .site-description');
|
||||
const titleLink = $('.site-title a, .site-description');
|
||||
|
||||
// Header text color.
|
||||
wp.customize( 'header_textcolor', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
if ( 'blank' === to ) {
|
||||
$( '.site-title, .site-description' ).css( {
|
||||
'clip': 'rect(1px, 1px, 1px, 1px)',
|
||||
'position': 'absolute'
|
||||
} );
|
||||
} else {
|
||||
$( '.site-title, .site-description' ).css( {
|
||||
'clip': 'auto',
|
||||
'position': 'relative'
|
||||
} );
|
||||
$( '.site-title a, .site-description' ).css( {
|
||||
'color': to
|
||||
} );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
} )( jQuery );
|
||||
if (!isVisible) {
|
||||
titleDesc.css({
|
||||
clip: 'rect(1px, 1px, 1px, 1px)',
|
||||
position: 'absolute'
|
||||
});
|
||||
} else {
|
||||
titleDesc.css({
|
||||
clip: 'auto',
|
||||
position: 'relative'
|
||||
});
|
||||
titleLink.css('color', color);
|
||||
}
|
||||
};
|
||||
|
||||
wp.customize('blogname', (value) => {
|
||||
value.bind((to) => setText('.site-title a', to));
|
||||
});
|
||||
|
||||
wp.customize('blogdescription', (value) => {
|
||||
value.bind((to) => setText('.site-description', to));
|
||||
});
|
||||
|
||||
wp.customize('header_textcolor', (value) => {
|
||||
value.bind((to) => setVisibility(to !== 'blank', to));
|
||||
});
|
||||
})(jQuery);
|
@ -1,73 +1,59 @@
|
||||
/**
|
||||
* Image up-loader functions
|
||||
* Image uploader functions
|
||||
*/
|
||||
var mtSelector;
|
||||
function upload_media_image(mtSelector){
|
||||
// ADD IMAGE LINK
|
||||
jQuery('body').on( 'click', mtSelector , function( event ){
|
||||
event.preventDefault();
|
||||
|
||||
var imgContainer = jQuery(this).closest('.attachment-media-view').find( '.thumbnail-image'),
|
||||
placeholder = jQuery(this).closest('.attachment-media-view').find( '.placeholder'),
|
||||
imgIdInput = jQuery(this).siblings('.upload-id');
|
||||
const initUploadMediaImage = (selector) => {
|
||||
jQuery('body').on('click', selector, function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
// Create a new media frame
|
||||
frame = wp.media({
|
||||
title: 'Select or Upload Image',
|
||||
button: {
|
||||
text: 'Use Image'
|
||||
},
|
||||
multiple: false // Set to true to allow multiple files to be selected
|
||||
const $button = jQuery(this);
|
||||
const $mediaView = $button.closest('.attachment-media-view');
|
||||
const $imgContainer = $mediaView.find('.thumbnail-image');
|
||||
const $placeholder = $mediaView.find('.placeholder');
|
||||
const $input = $button.siblings('.upload-id');
|
||||
|
||||
const frame = wp.media({
|
||||
title: 'Select or Upload Image',
|
||||
button: {
|
||||
text: 'Use Image'
|
||||
},
|
||||
multiple: false
|
||||
});
|
||||
|
||||
frame.on('select', () => {
|
||||
const attachment = frame.state().get('selection').first().toJSON();
|
||||
$imgContainer.html(`<img src="${attachment.url}" style="max-width:100%;" />`);
|
||||
$placeholder.addClass('hidden');
|
||||
$input.val(attachment.url).trigger('change');
|
||||
});
|
||||
|
||||
frame.open();
|
||||
});
|
||||
};
|
||||
|
||||
// When an image is selected in the media frame...
|
||||
frame.on( 'select', function() {
|
||||
const initDeleteMediaImage = (selector) => {
|
||||
jQuery('body').on('click', selector, function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
// Get media attachment details from the frame state
|
||||
var attachment = frame.state().get('selection').first().toJSON();
|
||||
const $button = jQuery(this);
|
||||
const $mediaView = $button.closest('.attachment-media-view');
|
||||
const $imgContainer = $mediaView.find('.thumbnail-image');
|
||||
const $placeholder = $mediaView.find('.placeholder');
|
||||
const $input = $button.siblings('.upload-id');
|
||||
|
||||
// Send the attachment URL to our custom image input field.
|
||||
imgContainer.html( '<img src="'+attachment.url+'" style="max-width:100%;"/>' );
|
||||
placeholder.addClass('hidden');
|
||||
imgIdInput.val( attachment.url ).trigger('change');
|
||||
$imgContainer.find('img').remove();
|
||||
$placeholder.removeClass('hidden');
|
||||
$input.val('').trigger('change');
|
||||
});
|
||||
};
|
||||
|
||||
// Finally, open the modal on click
|
||||
frame.open();
|
||||
|
||||
});
|
||||
}
|
||||
jQuery(($) => {
|
||||
'use strict';
|
||||
|
||||
function delete_media_image(mtSelector){
|
||||
// DELETE IMAGE LINK
|
||||
jQuery('body').on( 'click', mtSelector, function( event ){
|
||||
// Initialize jQuery UI buttonset for radio image controls
|
||||
$('.mt-meta-options-wrap .buttonset').buttonset();
|
||||
|
||||
event.preventDefault();
|
||||
var imgContainer = jQuery(this).closest('.attachment-media-view').find( '.thumbnail-image'),
|
||||
placeholder = jQuery(this).closest('.attachment-media-view').find( '.placeholder'),
|
||||
imgIdInput = jQuery(this).siblings('.upload-id');
|
||||
|
||||
// Clear out the preview image
|
||||
imgContainer.find('img').remove();
|
||||
placeholder.removeClass('hidden');
|
||||
|
||||
// Delete the image id from the hidden input
|
||||
imgIdInput.val( '' ).trigger('change');
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
jQuery(document).ready(function($){
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Radio Image control in metabox
|
||||
*/
|
||||
$( '.mt-meta-options-wrap .buttonset' ).buttonset();
|
||||
|
||||
/**
|
||||
* Image up-loader
|
||||
*/
|
||||
upload_media_image('.mt-upload-button');
|
||||
delete_media_image('.mt-delete-button');
|
||||
// Initialize image upload/delete functionality
|
||||
initUploadMediaImage('.mt-upload-button');
|
||||
initDeleteMediaImage('.mt-delete-button');
|
||||
});
|
@ -5,60 +5,54 @@ jQuery(document).ready(function($) {
|
||||
/**
|
||||
* Sophia After Dark Preloader
|
||||
*/
|
||||
if($('#preloader-background').length > 0) {
|
||||
setTimeout(function(){$('#preloader-background').hide();}, 600);
|
||||
if ($('#preloader-background').length) {
|
||||
setTimeout(function() {
|
||||
$('#preloader-background').hide();
|
||||
}, 600);
|
||||
}
|
||||
|
||||
var grid = document.querySelector(
|
||||
'.sophia-after-dark-content-masonry'
|
||||
),
|
||||
masonry;
|
||||
|
||||
if (
|
||||
grid &&
|
||||
typeof Masonry !== undefined &&
|
||||
typeof imagesLoaded !== undefined
|
||||
) {
|
||||
imagesLoaded( grid, function( instance ) {
|
||||
masonry = new Masonry( grid, {
|
||||
/**
|
||||
* Masonry grid initialization
|
||||
*/
|
||||
const grid = document.querySelector('.sophia-after-dark-content-masonry');
|
||||
if (grid && typeof Masonry !== 'undefined' && typeof imagesLoaded !== 'undefined') {
|
||||
imagesLoaded(grid, function() {
|
||||
new Masonry(grid, {
|
||||
itemSelector: '.hentry'
|
||||
} );
|
||||
} );
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Header Search script
|
||||
*/
|
||||
$('.mt-menu-search .mt-search-icon').click(function() {
|
||||
$('.mt-form-wrap').toggleClass('search-activate');
|
||||
$('.mt-form-wrap .search-field').focus();
|
||||
var element = document.querySelector( '.mt-form-wrap.search-activate' );
|
||||
if( element ) {
|
||||
const $searchIcon = $('.mt-menu-search .mt-search-icon');
|
||||
$searchIcon.click(function() {
|
||||
$('.mt-form-wrap').toggleClass('search-activate').find('.search-field').focus();
|
||||
const $element = $('.mt-form-wrap.search-activate');
|
||||
if ($element.length) {
|
||||
$(document).on('keydown', function(e) {
|
||||
var focusable = element.querySelectorAll( 'input, button, [href], select, textarea, [tabindex]:not([tabindex="-1"])');
|
||||
var firstFocusable = focusable[0];
|
||||
var lastFocusable = focusable[focusable.length - 1];
|
||||
sophia_after_dark_focus_trap( firstFocusable, lastFocusable, e );
|
||||
})
|
||||
const focusable = $element.find('input, button, [href], select, textarea, [tabindex]:not([tabindex="-1"])');
|
||||
const firstFocusable = focusable[0];
|
||||
const lastFocusable = focusable[focusable.length - 1];
|
||||
sophia_after_dark_focus_trap(firstFocusable, lastFocusable, e);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Focus trap in popup.
|
||||
*/
|
||||
var KEYCODE_TAB = 9;
|
||||
function sophia_after_dark_focus_trap( firstFocusable, lastFocusable, e ) {
|
||||
const KEYCODE_TAB = 9;
|
||||
|
||||
function sophia_after_dark_focus_trap(firstFocusable, lastFocusable, e) {
|
||||
if (e.key === 'Tab' || e.keyCode === KEYCODE_TAB) {
|
||||
if ( e.shiftKey ) /* shift + tab */ {
|
||||
if (document.activeElement === firstFocusable) {
|
||||
lastFocusable.focus();
|
||||
e.preventDefault();
|
||||
}
|
||||
} else /* tab */ {
|
||||
if ( document.activeElement === lastFocusable ) {
|
||||
firstFocusable.focus();
|
||||
e.preventDefault();
|
||||
}
|
||||
if (e.shiftKey && document.activeElement === firstFocusable) {
|
||||
lastFocusable.focus();
|
||||
e.preventDefault();
|
||||
} else if (!e.shiftKey && document.activeElement === lastFocusable) {
|
||||
firstFocusable.focus();
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -71,40 +65,30 @@ jQuery(document).ready(function($) {
|
||||
/**
|
||||
* Close popups on escape key.
|
||||
*/
|
||||
$( document ).on( 'keydown', function( event ) {
|
||||
if ( event.keyCode === 27 ) {
|
||||
$(document).on('keydown', function(event) {
|
||||
if (event.keyCode === 27) {
|
||||
event.preventDefault();
|
||||
//$( '.primary-menu-wrap' ).removeClass( 'menu-active' );
|
||||
$( '.mt-menu-search .mt-form-wrap' ).removeClass( 'search-activate' );
|
||||
$('.mt-menu-search .mt-form-wrap').removeClass('search-activate');
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Settings about WOW animation
|
||||
*/
|
||||
var wowOption = sophia_after_darkObject.wow_effect;
|
||||
if( wowOption === 'on' ) {
|
||||
if (sophia_after_darkObject.wow_effect === 'on') {
|
||||
new WOW().init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Settings about sticky menu
|
||||
*/
|
||||
var stickyOption = sophia_after_darkObject.menu_sticky;
|
||||
if( stickyOption === 'on' ) {
|
||||
var windowWidth = $( window ).width();
|
||||
if( windowWidth < 500 ) {
|
||||
var wpAdminBar = 0;
|
||||
} else {
|
||||
var wpAdminBar = $('#wpadminbar');
|
||||
}
|
||||
if ( wpAdminBar.length ) {
|
||||
$(".mt-social-menu-wrapper").sticky({topSpacing:wpAdminBar.height()});
|
||||
} else {
|
||||
$(".mt-social-menu-wrapper").sticky({topSpacing:0});
|
||||
}
|
||||
if (sophia_after_darkObject.menu_sticky === 'on') {
|
||||
const wpAdminBar = $('#wpadminbar').length ? $('#wpadminbar') : 0;
|
||||
$(".mt-social-menu-wrapper").sticky({
|
||||
topSpacing: wpAdminBar.length ? wpAdminBar.height() : 0
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Scroll To Top
|
||||
*/
|
||||
@ -115,71 +99,63 @@ jQuery(document).ready(function($) {
|
||||
$('#mt-scrollup').fadeOut('slow');
|
||||
}
|
||||
});
|
||||
|
||||
$('#mt-scrollup').click(function() {
|
||||
$("html, body").animate({
|
||||
scrollTop: 0
|
||||
}, 600);
|
||||
return false;
|
||||
});
|
||||
|
||||
/**
|
||||
* Slider scripts
|
||||
*/
|
||||
$('.front-slider').lightSlider({
|
||||
pager: false,
|
||||
auto: false,
|
||||
loop: true,
|
||||
item: 1,
|
||||
controls: true,
|
||||
slideMargin:0,
|
||||
rtl:true,
|
||||
nextHtml: '<span class="icon-prev"><i class="fa fa-angle-left"></i></span>',
|
||||
prevHtml: '<span class="icon-next"><i class="fa fa-angle-right"></i></span>',
|
||||
|
||||
onSliderLoad: function() {
|
||||
$('.front-slider').removeClass('cS-hidden');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Slider scripts
|
||||
*/
|
||||
$('.mt-gallery-slider').lightSlider({
|
||||
pager: false,
|
||||
auto: false,
|
||||
loop: true,
|
||||
item: 1,
|
||||
controls: true,
|
||||
});
|
||||
function initializeSlider(selector, rtl = true) {
|
||||
$(selector).lightSlider({
|
||||
pager: false,
|
||||
auto: false,
|
||||
loop: true,
|
||||
item: 1,
|
||||
controls: true,
|
||||
slideMargin: 0,
|
||||
rtl: rtl,
|
||||
nextHtml: '<span class="icon-prev"><i class="fa fa-angle-left"></i></span>',
|
||||
prevHtml: '<span class="icon-next"><i class="fa fa-angle-right"></i></span>',
|
||||
onSliderLoad: function() {
|
||||
$(selector).removeClass('cS-hidden');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
initializeSlider('.front-slider');
|
||||
initializeSlider('.mt-gallery-slider', false);
|
||||
|
||||
/**
|
||||
* Responsive menu
|
||||
*/
|
||||
|
||||
$('.mt-social-menu-wrapper .menu-toggle').click(function(event) {
|
||||
$('.mt-social-menu-wrapper #site-navigation').toggleClass( 'isActive' ).slideToggle('slow');
|
||||
var element = document.querySelector( '.mt-header-menu-wrap' );
|
||||
if( element ) {
|
||||
$('.mt-social-menu-wrapper .menu-toggle').click(function() {
|
||||
$('#site-navigation').toggleClass('isActive').slideToggle('slow');
|
||||
const $element = $('.mt-header-menu-wrap');
|
||||
if ($element.length) {
|
||||
$(document).on('keydown', function(e) {
|
||||
if( element.querySelectorAll( '.mt-social-menu-wrapper #site-navigation.isActive' ).length === 1 ) {
|
||||
var focusable = element.querySelectorAll( 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
||||
var firstFocusable = focusable[0];
|
||||
var lastFocusable = focusable[focusable.length - 1];
|
||||
sophia_after_dark_focus_trap( firstFocusable, lastFocusable, e );
|
||||
if ($('#site-navigation.isActive').length) {
|
||||
const focusable = $element.find('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
||||
const firstFocusable = focusable[0];
|
||||
const lastFocusable = focusable[focusable.length - 1];
|
||||
sophia_after_dark_focus_trap(firstFocusable, lastFocusable, e);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* responsive sub menu toggle
|
||||
* Responsive sub menu toggle
|
||||
*/
|
||||
$('<a href="javascript:void(0);" class="sub-toggle"><i class="fa fa-angle-right"></i></a>').insertAfter('#site-navigation .menu-item-has-children>a, #site-navigation .page_item_has_children>a');
|
||||
|
||||
$('#site-navigation .sub-toggle').click(function() {
|
||||
$(this).parent('.menu-item-has-children').children('ul.sub-menu').first().slideToggle('1000');
|
||||
jQuery(this).parent('.page_item_has_children').children('ul.children').first().slideToggle('1000');
|
||||
$(this).parent('.menu-item-has-children').children('ul.sub-menu').first().slideToggle(1000);
|
||||
$(this).parent('.page_item_has_children').children('ul.children').first().slideToggle(1000);
|
||||
$(this).children('.fa-angle-right').first().toggleClass('fa-angle-down');
|
||||
});
|
||||
|
||||
@ -189,9 +165,8 @@ jQuery(document).ready(function($) {
|
||||
$(window).on('load', function() {
|
||||
if ($(window).width() > 839) {
|
||||
$(".front-slider-wrapper").each(function() {
|
||||
var imageHeight = $(this).height();
|
||||
$(this).find(".slider-post-wrap").css('height', imageHeight);
|
||||
$(this).find(".front-slider ").css('height', imageHeight);
|
||||
const imageHeight = $(this).height();
|
||||
$(this).find(".slider-post-wrap, .front-slider").css('height', imageHeight);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -4,79 +4,85 @@
|
||||
* Handles toggling the navigation menu for small screens and enables TAB key
|
||||
* navigation support for dropdown menus.
|
||||
*/
|
||||
( function() {
|
||||
var container, button, menu, links, i, len;
|
||||
(function() {
|
||||
var container, button, menu, links, i, len;
|
||||
|
||||
container = document.getElementById( 'site-navigation' );
|
||||
if ( ! container ) {
|
||||
return;
|
||||
}
|
||||
container = document.getElementById('site-navigation');
|
||||
if (!container) {
|
||||
return;
|
||||
}
|
||||
|
||||
menu = container.getElementsByTagName( 'ul' )[0];
|
||||
menu.setAttribute( 'aria-expanded', 'false' );
|
||||
if ( -1 === menu.className.indexOf( 'nav-menu' ) ) {
|
||||
menu.className += ' nav-menu';
|
||||
}
|
||||
menu = container.getElementsByTagName('ul')[0];
|
||||
if (!menu) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Get all the link elements within the menu.
|
||||
links = menu.getElementsByTagName( 'a' );
|
||||
menu.setAttribute('aria-expanded', 'false');
|
||||
|
||||
// Each time a menu link is focused or blurred, toggle focus.
|
||||
for ( i = 0, len = links.length; i < len; i++ ) {
|
||||
links[i].addEventListener( 'focus', toggleFocus, true );
|
||||
links[i].addEventListener( 'blur', toggleFocus, true );
|
||||
}
|
||||
if (-1 === menu.className.indexOf('nav-menu')) {
|
||||
menu.className += ' nav-menu';
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets or removes .focus class on an element.
|
||||
*/
|
||||
function toggleFocus() {
|
||||
var self = this;
|
||||
// Get all the link elements within the menu.
|
||||
links = menu.getElementsByTagName('a');
|
||||
|
||||
// Move up through the ancestors of the current link until we hit .nav-menu.
|
||||
while ( -1 === self.className.indexOf( 'nav-menu' ) ) {
|
||||
// Each time a menu link is focused or blurred, toggle focus.
|
||||
for (i = 0, len = links.length; i < len; i++) {
|
||||
links[i].addEventListener('focus', toggleFocus, true);
|
||||
links[i].addEventListener('blur', toggleFocus, true);
|
||||
}
|
||||
|
||||
// On li elements toggle the class .focus.
|
||||
if ( 'li' === self.tagName.toLowerCase() ) {
|
||||
if ( -1 !== self.className.indexOf( 'focus' ) ) {
|
||||
self.className = self.className.replace( ' focus', '' );
|
||||
} else {
|
||||
self.className += ' focus';
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Sets or removes .focus class on an element.
|
||||
*/
|
||||
function toggleFocus() {
|
||||
var self = this;
|
||||
|
||||
self = self.parentElement;
|
||||
}
|
||||
}
|
||||
// Move up through the ancestors of the current link until we hit .nav-menu.
|
||||
while (self && -1 === self.className.indexOf('nav-menu')) {
|
||||
|
||||
/**
|
||||
* Toggles `focus` class to allow submenu access on tablets.
|
||||
*/
|
||||
( function( container ) {
|
||||
var touchStartFn, i,
|
||||
parentLink = container.querySelectorAll( '.menu-item-has-children > a, .page_item_has_children > a' );
|
||||
// On li elements toggle the class .focus.
|
||||
if ('li' === self.tagName.toLowerCase()) {
|
||||
if (-1 !== self.className.indexOf('focus')) {
|
||||
self.className = self.className.replace(' focus', '');
|
||||
} else {
|
||||
self.className += ' focus';
|
||||
}
|
||||
}
|
||||
|
||||
if ( 'ontouchstart' in window ) {
|
||||
touchStartFn = function( e ) {
|
||||
var menuItem = this.parentNode, i;
|
||||
self = self.parentElement;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! menuItem.classList.contains( 'focus' ) ) {
|
||||
e.preventDefault();
|
||||
for ( i = 0; i < menuItem.parentNode.children.length; ++i ) {
|
||||
if ( menuItem === menuItem.parentNode.children[i] ) {
|
||||
continue;
|
||||
}
|
||||
menuItem.parentNode.children[i].classList.remove( 'focus' );
|
||||
}
|
||||
menuItem.classList.add( 'focus' );
|
||||
} else {
|
||||
menuItem.classList.remove( 'focus' );
|
||||
}
|
||||
};
|
||||
/**
|
||||
* Toggles `focus` class to allow submenu access on tablets.
|
||||
*/
|
||||
(function(container) {
|
||||
var touchStartFn, i,
|
||||
parentLink = container.querySelectorAll('.menu-item-has-children > a, .page_item_has_children > a');
|
||||
|
||||
for ( i = 0; i < parentLink.length; ++i ) {
|
||||
parentLink[i].addEventListener( 'touchstart', touchStartFn, false );
|
||||
}
|
||||
}
|
||||
}( container ) );
|
||||
} )();
|
||||
if ('ontouchstart' in window) {
|
||||
touchStartFn = function(e) {
|
||||
var menuItem = this.parentNode,
|
||||
j;
|
||||
|
||||
if (!menuItem.classList.contains('focus')) {
|
||||
e.preventDefault();
|
||||
for (j = 0; j < menuItem.parentNode.children.length; ++j) {
|
||||
if (menuItem === menuItem.parentNode.children[j]) {
|
||||
continue;
|
||||
}
|
||||
menuItem.parentNode.children[j].classList.remove('focus');
|
||||
}
|
||||
menuItem.classList.add('focus');
|
||||
} else {
|
||||
menuItem.classList.remove('focus');
|
||||
}
|
||||
};
|
||||
|
||||
for (i = 0; i < parentLink.length; ++i) {
|
||||
parentLink[i].addEventListener('touchstart', touchStartFn, false);
|
||||
}
|
||||
}
|
||||
}(container));
|
||||
})();
|
@ -5,27 +5,27 @@
|
||||
*
|
||||
* Learn more: https://git.io/vWdr2
|
||||
*/
|
||||
( function() {
|
||||
var isIe = /(trident|msie)/i.test( navigator.userAgent );
|
||||
(function() {
|
||||
var isIe = /(trident|msie)/i.test(navigator.userAgent);
|
||||
|
||||
if ( isIe && document.getElementById && window.addEventListener ) {
|
||||
window.addEventListener( 'hashchange', function() {
|
||||
var id = location.hash.substring( 1 ),
|
||||
element;
|
||||
if (isIe && document.getElementById && window.addEventListener) {
|
||||
window.addEventListener('hashchange', function() {
|
||||
var id = location.hash.substring(1),
|
||||
element;
|
||||
|
||||
if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
|
||||
return;
|
||||
}
|
||||
if (!(/^[A-z0-9_-]+$/.test(id))) {
|
||||
return;
|
||||
}
|
||||
|
||||
element = document.getElementById( id );
|
||||
element = document.getElementById(id);
|
||||
|
||||
if ( element ) {
|
||||
if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
|
||||
element.tabIndex = -1;
|
||||
}
|
||||
if (element) {
|
||||
if (!(/^(?:a|select|input|button|textarea)$/i.test(element.tagName))) {
|
||||
element.tabIndex = -1;
|
||||
}
|
||||
|
||||
element.focus();
|
||||
}
|
||||
}, false );
|
||||
}
|
||||
} )();
|
||||
element.focus();
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
})();
|
@ -68,10 +68,11 @@ if ( ! function_exists( 'sophia_after_dark_setup' ) ) :
|
||||
) );
|
||||
|
||||
// Set up the WordPress core custom background feature.
|
||||
add_theme_support( 'custom-background', apply_filters( 'sophia_after_dark_custom_background_args', array(
|
||||
'default-color' => 'ffffff',
|
||||
'default-image' => '',
|
||||
) ) );
|
||||
// Disabled in V1.4.3
|
||||
//add_theme_support( 'custom-background', apply_filters( 'sophia_after_dark_custom_background_args', array(
|
||||
//'default-color' => 'ffffff',
|
||||
//'default-image' => '',
|
||||
//) ) );
|
||||
|
||||
// Add theme support for selective refresh for widgets.
|
||||
add_theme_support( 'customize-selective-refresh-widgets' );
|
||||
@ -146,8 +147,9 @@ add_filter( 'walker_nav_menu_start_el', 'sophia_after_dark_nav_description', 10,
|
||||
|
||||
/**
|
||||
* Implement the Custom Header feature.
|
||||
* Disabled in V1.4.3
|
||||
*/
|
||||
require get_template_directory() . '/inc/custom-header.php';
|
||||
//require get_template_directory() . '/inc/custom-header.php';
|
||||
|
||||
/**
|
||||
* Custom template tags for this theme.
|
||||
|
@ -71,7 +71,7 @@ do_action( 'sophia_after_dark_before_page' );
|
||||
|
||||
<?php
|
||||
// Top Header
|
||||
if ( get_theme_mod( 'sophia_after_dark_enable_top_header', true ) ) {
|
||||
if ( get_theme_mod( 'sophia_after_dark_enable_top_header', false ) ) {
|
||||
do_action( 'sophia_after_dark_top_header' );
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
*
|
||||
* @package Sophia After Dark
|
||||
* @since 1.0.0
|
||||
* @disabled 1.4.3
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -262,11 +262,11 @@ if ( ! function_exists( 'sophia_after_dark_register_custom_controls' ) ) :
|
||||
* Icon field
|
||||
*/
|
||||
case 'icon':
|
||||
$sophia_after_dark_font_awesome_icon_array = sophia_after_dark_font_awesome_icon_array();
|
||||
$sophia_after_dark_fork_awesome_icon_array = sophia_after_dark_fork_awesome_icon_array();
|
||||
echo '<div class="mt-repeater-selected-icon"><i class="'.esc_attr( $new_value ).'"></i><span><i class="fa fa-angle-down"></i></span></div><ul class="mt-repeater-icon-list mt-clearfix">';
|
||||
foreach ( $sophia_after_dark_font_awesome_icon_array as $sophia_after_dark_font_awesome_icon ) {
|
||||
$icon_class = $new_value == $sophia_after_dark_font_awesome_icon ? 'icon-active' : '';
|
||||
echo '<li class='.esc_attr( $icon_class ).'><i class="'.esc_attr( $sophia_after_dark_font_awesome_icon ).'"></i></li>';
|
||||
foreach ( $sophia_after_dark_fork_awesome_icon_array as $sophia_after_dark_fork_awesome_icon ) {
|
||||
$icon_class = $new_value == $sophia_after_dark_fork_awesome_icon ? 'icon-active' : '';
|
||||
echo '<li class='.esc_attr( $icon_class ).'><i class="'.esc_attr( $sophia_after_dark_fork_awesome_icon ).'"></i></li>';
|
||||
}
|
||||
echo '</ul><input data-default="'.esc_attr( $default ).'" type="hidden" value="'.esc_attr( $new_value ).'" data-name="'.esc_attr( $key ).'"/>';
|
||||
break;
|
||||
@ -275,11 +275,11 @@ if ( ! function_exists( 'sophia_after_dark_register_custom_controls' ) ) :
|
||||
* Social Icon field
|
||||
*/
|
||||
case 'social_icon':
|
||||
$sophia_after_dark_font_awesome_social_icon_array = sophia_after_dark_font_awesome_social_icon_array();
|
||||
$sophia_after_dark_fork_awesome_social_icon_array = sophia_after_dark_fork_awesome_social_icon_array();
|
||||
echo '<div class="mt-repeater-selected-icon"><i class="'.esc_attr( $new_value ).'"></i><span><i class="fa fa-angle-down"></i></span></div><ul class="mt-repeater-icon-list mt-clearfix">';
|
||||
foreach ( $sophia_after_dark_font_awesome_social_icon_array as $sophia_after_dark_font_awesome_icon ) {
|
||||
$icon_class = $new_value == $sophia_after_dark_font_awesome_icon ? 'icon-active' : '';
|
||||
echo '<li class='.esc_attr( $icon_class ).'><i class="'.esc_attr( $sophia_after_dark_font_awesome_icon ).'"></i></li>';
|
||||
foreach ( $sophia_after_dark_fork_awesome_social_icon_array as $sophia_after_dark_fork_awesome_icon ) {
|
||||
$icon_class = $new_value == $sophia_after_dark_fork_awesome_icon ? 'icon-active' : '';
|
||||
echo '<li class='.esc_attr( $icon_class ).'><i class="'.esc_attr( $sophia_after_dark_fork_awesome_icon ).'"></i></li>';
|
||||
}
|
||||
echo '</ul><input data-default="'.esc_attr( $default ).'" type="hidden" value="'.esc_attr( $new_value ).'" data-name="'.esc_attr( $key ).'"/>';
|
||||
break;
|
||||
|
@ -72,9 +72,9 @@ add_action( 'wp_head', 'sophia_after_dark_pingback_header' );
|
||||
if ( ! function_exists( 'sophia_after_dark_fonts_url' ) ) :
|
||||
|
||||
/**
|
||||
* Register Google fonts for Sophia After Dark.
|
||||
* Register Bunny fonts for Sophia After Dark.
|
||||
*
|
||||
* @return string Google fonts URL for the theme.
|
||||
* @return string Bunny fonts URL for the theme.
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function sophia_after_dark_fonts_url() {
|
||||
@ -132,56 +132,43 @@ function sophia_after_dark_admin_scripts( $hook ) {
|
||||
/**
|
||||
* Enqueue scripts and styles.
|
||||
*/
|
||||
function sophia_after_dark_scripts() {
|
||||
global $sophia_after_dark_theme_version;
|
||||
function sophia_after_dark_scripts(): void {
|
||||
$v = wp_get_theme()->get('Version');
|
||||
$dir = get_template_directory_uri();
|
||||
|
||||
wp_enqueue_style( 'sophia-after-dark-fonts', sophia_after_dark_fonts_url(), array(), null );
|
||||
wp_enqueue_style( 'lightslider-style', get_template_directory_uri() .'/assets/library/lightslider/css/lightslider.min.css', array(), '' );
|
||||
wp_enqueue_style( 'animate', get_template_directory_uri(). '/assets/library/animate/animate.min.css', array(), '3.5.1' );
|
||||
wp_enqueue_style( 'sophia-after-dark-style', get_stylesheet_uri(), array(), esc_attr( $sophia_after_dark_theme_version) );
|
||||
wp_enqueue_style( 'sophia-after-dark-responsive-style', get_template_directory_uri(). '/assets/css/mt-responsive.css', array(), esc_attr( $sophia_after_dark_theme_version ) );
|
||||
wp_enqueue_style('sophia-after-dark-fonts', sophia_after_dark_fonts_url(), [], null);
|
||||
wp_enqueue_style('lightslider-style', "$dir/assets/library/lightslider/css/lightslider.min.css", [], null);
|
||||
wp_enqueue_style('animate', "$dir/assets/library/animate/animate.min.css", [], '3.5.1');
|
||||
wp_enqueue_style('sophia-after-dark-style', get_stylesheet_uri(), [], $v);
|
||||
wp_enqueue_style('sophia-after-dark-responsive-style', "$dir/assets/css/mt-responsive.css", [], $v);
|
||||
|
||||
wp_enqueue_script( 'sophia-after-dark-combine-scripts', get_template_directory_uri() .'/assets/js/mt-combine-scripts.js', array('jquery'), esc_attr( $sophia_after_dark_theme_version ), true );
|
||||
wp_enqueue_script( 'sophia-after-dark-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array(), esc_attr( $sophia_after_dark_theme_version ), true );
|
||||
wp_enqueue_script( 'sophia-after-dark-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/skip-link-focus-fix.js', array(), esc_attr( $sophia_after_dark_theme_version ), true );
|
||||
wp_enqueue_script( 'sophia-after-dark-custom-scripts', get_template_directory_uri() .'/assets/js/mt-custom-scripts.js', array('jquery'), esc_attr( $sophia_after_dark_theme_version ), true );
|
||||
wp_enqueue_script('sophia-after-dark-combine-scripts', "$dir/assets/js/mt-combine-scripts.js", ['jquery'], $v, true);
|
||||
wp_enqueue_script('sophia-after-dark-navigation', "$dir/assets/js/navigation.js", [], $v, true);
|
||||
wp_enqueue_script('sophia-after-dark-skip-link-focus-fix', "$dir/assets/js/skip-link-focus-fix.js", [], $v, true);
|
||||
wp_enqueue_script('sophia-after-dark-custom-scripts', "$dir/assets/js/mt-custom-scripts.js", ['jquery'], $v, true);
|
||||
|
||||
$sophia_after_dark_enable_sticky_menu = get_theme_mod( 'sophia_after_dark_enable_sticky_menu', true );
|
||||
if ( true === $sophia_after_dark_enable_sticky_menu ) {
|
||||
$sticky_value = 'on';
|
||||
} else {
|
||||
$sticky_value = 'off';
|
||||
}
|
||||
wp_localize_script('sophia-after-dark-custom-scripts', 'sophia_after_darkObject', [
|
||||
'menu_sticky' => get_theme_mod('sophia_after_dark_enable_sticky_menu', true) ? 'on' : 'off',
|
||||
'wow_effect' => get_theme_mod('sophia_after_dark_enable_wow_animation', true) ? 'on' : 'off',
|
||||
]);
|
||||
|
||||
$sophia_after_dark_enable_wow_animation = get_theme_mod( 'sophia_after_dark_enable_wow_animation', true );
|
||||
if ( true === $sophia_after_dark_enable_wow_animation ) {
|
||||
$wow_value = 'on';
|
||||
} else {
|
||||
$wow_value = 'off';
|
||||
}
|
||||
|
||||
wp_localize_script( 'sophia-after-dark-custom-scripts', 'sophia_after_darkObject', array(
|
||||
'menu_sticky' => $sticky_value,
|
||||
'wow_effect' => $wow_value
|
||||
) );
|
||||
|
||||
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
||||
wp_enqueue_script( 'comment-reply' );
|
||||
if (is_singular() && comments_open() && get_option('thread_comments')) {
|
||||
wp_enqueue_script('comment-reply');
|
||||
}
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'sophia_after_dark_scripts' );
|
||||
add_action('wp_enqueue_scripts', 'sophia_after_dark_scripts');
|
||||
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
if ( ! function_exists( 'sophia_after_dark_font_awesome_social_icon_array' ) ) :
|
||||
if ( ! function_exists( 'sophia_after_dark_fork_awesome_social_icon_array' ) ) :
|
||||
|
||||
/**
|
||||
* Define font awesome social media icons
|
||||
* Define fork awesome social media icons
|
||||
*
|
||||
* @return array();
|
||||
* @since 1.0.0
|
||||
*/
|
||||
function sophia_after_dark_font_awesome_social_icon_array() {
|
||||
function sophia_after_dark_fork_awesome_social_icon_array() {
|
||||
return array(
|
||||
"fa fa-facebook-square","fa fa-facebook-f","fa fa-facebook","fa fa-facebook-official","fa fa-twitter-square","fa fa-twitter","fa fa-yahoo","fa fa-google","fa fa-google-wallet","fa fa-google-plus-circle","fa fa-google-plus-official","fa fa-instagram","fa fa-linkedin-square","fa fa-linkedin","fa fa-pinterest-p","fa fa-pinterest","fa fa-pinterest-square","fa fa-google-plus-square","fa fa-google-plus","fa fa-youtube-square","fa fa-youtube","fa fa-youtube-play","fa fa-vimeo","fa fa-vimeo-square",
|
||||
);
|
||||
|
@ -20,35 +20,43 @@ if ( ! is_active_sidebar( 'footer-sidebar' ) &&
|
||||
return;
|
||||
}
|
||||
|
||||
$sophia_after_dark_widget_area_layout = get_theme_mod( 'sophia_after_dark_widget_area_layout', 'column-three' );
|
||||
$layout = get_theme_mod( 'sophia_after_dark_widget_area_layout', 'column-three' );
|
||||
?>
|
||||
|
||||
<div id="top-footer" class="footer-widgets-wrapper footer-<?php echo esc_attr( $sophia_after_dark_widget_area_layout ); ?> mt-clearfix">
|
||||
<div class="mt-container">
|
||||
<div class="footer-widgets-area mt-clearfix">
|
||||
<div class="mt-footer-widget-wrapper mt-column-wrapper mt-clearfix">
|
||||
<div class="mt-footer-widget wow fadeInLeft" data-wow-duration="0.3s">
|
||||
<?php dynamic_sidebar( 'footer-sidebar' ); ?>
|
||||
</div>
|
||||
<div id="top-footer" class="footer-widgets-wrapper footer-<?php echo esc_attr( $layout ); ?> mt-clearfix">
|
||||
<div class="mt-container">
|
||||
<div class="footer-widgets-area mt-clearfix">
|
||||
<div class="mt-footer-widget-wrapper mt-column-wrapper mt-clearfix">
|
||||
|
||||
<?php if ( $sophia_after_dark_widget_area_layout != 'column-one' ){ ?>
|
||||
<div class="mt-footer-widget wow fadeInLeft" data-woww-duration="0.6s">
|
||||
<?php dynamic_sidebar( 'footer-sidebar-2' ); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
// Footer widget 1 (always shown)
|
||||
echo '<div class="mt-footer-widget wow fadeInLeft" data-wow-duration="0.3s">';
|
||||
dynamic_sidebar( 'footer-sidebar' );
|
||||
echo '</div>';
|
||||
|
||||
<?php if ( $sophia_after_dark_widget_area_layout == 'column-three' || $sophia_after_dark_widget_area_layout == 'column-four' ){ ?>
|
||||
<div class="mt-footer-widget wow fadeInLeft" data-wow-duration="0.9s">
|
||||
<?php dynamic_sidebar( 'footer-sidebar-3' ); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
// Footer widget 2 (shown in all but column-one layout)
|
||||
if ( $layout !== 'column-one' ) {
|
||||
echo '<div class="mt-footer-widget wow fadeInLeft" data-wow-duration="0.6s">';
|
||||
dynamic_sidebar( 'footer-sidebar-2' );
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
<?php if ( $sophia_after_dark_widget_area_layout == 'column-four' ){ ?>
|
||||
<div class="mt-footer-widget wow fadeInLeft" data-wow-duration="1.2s">
|
||||
<?php dynamic_sidebar( 'footer-sidebar-4' ); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
// Footer widget 3 (only for three or four column layouts)
|
||||
if ( in_array( $layout, [ 'column-three', 'column-four' ], true ) ) {
|
||||
echo '<div class="mt-footer-widget wow fadeInLeft" data-wow-duration="0.9s">';
|
||||
dynamic_sidebar( 'footer-sidebar-3' );
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
// Footer widget 4 (only for four column layout)
|
||||
if ( $layout === 'column-four' ) {
|
||||
echo '<div class="mt-footer-widget wow fadeInLeft" data-wow-duration="1.2s">';
|
||||
dynamic_sidebar( 'footer-sidebar-4' );
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
115
style.css
115
style.css
@ -3,7 +3,7 @@ Theme Name: Sophia After Dark
|
||||
Author: Sophia Atkinson, Mystery Themes
|
||||
Author URI: https://sophia.wtf
|
||||
Description: Sophia After Dark is a page builder based and colorful free blog style WordPress theme fit for writers and bloggers. With the help of live customizer option makes your site own and present your content in an attractive way. It comes up with an amazing creative blog layouts, fully RTL and translation ready, and also compatible with Gutenberg. The theme works perfectly with Elementor that helps to create a beautiful and unique website faster. As its name suggests, it added staggering variety of color and makes your site attractive and elegant.
|
||||
Version: 1.4.0
|
||||
Version: 1.4.3
|
||||
Requires at least: 4.7
|
||||
Tested up to: 6.8.1
|
||||
Requires PHP: 5.2.4
|
||||
@ -116,10 +116,6 @@ html {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
@ -231,6 +227,7 @@ h6 {
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 15px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
@ -443,7 +440,9 @@ input[type="submit"] {
|
||||
border: 1px solid #e1e1e1;
|
||||
background: none;
|
||||
}
|
||||
|
||||
button{
|
||||
padding: none!important;
|
||||
}
|
||||
.navigation .nav-links a:hover,
|
||||
.bttn:hover,
|
||||
button,
|
||||
@ -517,7 +516,7 @@ Links
|
||||
--------------------------------------------------------------*/
|
||||
|
||||
a {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
text-decoration: none;
|
||||
transition: all 0.3s ease-in-out;
|
||||
-webkit-transition: all 0.3s ease-in-out;
|
||||
@ -529,7 +528,7 @@ a:visited {}
|
||||
a:hover,
|
||||
a:focus,
|
||||
a:active {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
a:focus {
|
||||
@ -668,7 +667,7 @@ Posts and pages
|
||||
|
||||
h1.entry-title {
|
||||
color: #353535;
|
||||
font-weight: 700;
|
||||
font-weight: 600;
|
||||
padding-bottom: 0;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
@ -725,7 +724,7 @@ h1.entry-title a {
|
||||
.entry-cat a:hover,
|
||||
.byline a:hover,
|
||||
.posted-on a:hover {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
.cat-links {
|
||||
@ -748,7 +747,7 @@ h1.entry-title a {
|
||||
}
|
||||
|
||||
.edit-link .post-edit-link {
|
||||
background: #dd3333;
|
||||
background: #F5A9B8;
|
||||
padding: 4px 10px;
|
||||
color: #FFF !important;
|
||||
line-height: 1;
|
||||
@ -789,6 +788,7 @@ article.hentry .entry-footer>span {
|
||||
.page-header .page-title {
|
||||
color: #ffffff;
|
||||
padding-bottom: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.updated {
|
||||
@ -804,7 +804,7 @@ article.hentry .entry-footer>span {
|
||||
}
|
||||
|
||||
.entry-footer a:hover {
|
||||
color: #dd3333
|
||||
color: #F5A9B8
|
||||
}
|
||||
|
||||
.nav-links .meta-nav {
|
||||
@ -956,7 +956,7 @@ Comments
|
||||
|
||||
#comments h3 {
|
||||
margin: 0 0 10px;
|
||||
color: #141414;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
display: inline-block;
|
||||
line-height: 22px;
|
||||
@ -1032,7 +1032,7 @@ textarea#comment {
|
||||
}
|
||||
|
||||
.comment-author .fn .url:hover {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
.comment-author .says {
|
||||
@ -1052,7 +1052,7 @@ textarea#comment {
|
||||
}
|
||||
|
||||
.commentmetadata .comment-edit-link {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
.commentmetadata+.clear {
|
||||
@ -1060,7 +1060,7 @@ textarea#comment {
|
||||
}
|
||||
|
||||
.reply .comment-reply-link {
|
||||
background: none repeat scroll 0 0 #dd3333;
|
||||
background: none repeat scroll 0 0 #F5A9B8;
|
||||
color: #FFFFFF;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
@ -1082,7 +1082,7 @@ textarea#comment {
|
||||
|
||||
#cancel-comment-reply-link {
|
||||
font-style: italic;
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
#cancel-comment-reply-link:before {
|
||||
@ -1090,11 +1090,11 @@ textarea#comment {
|
||||
content: "\f057";
|
||||
margin: 0 5px 0 20px;
|
||||
font-style: normal;
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
.logged-in-as a {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
|
||||
@ -1339,7 +1339,7 @@ Default widget css
|
||||
.widget a:hover,
|
||||
.widget a:hover::before,
|
||||
.widget li:hover::before {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
.widget_archive a::before,
|
||||
@ -1409,8 +1409,8 @@ Default widget css
|
||||
.widget_search .search-submit {
|
||||
height: 36px;
|
||||
width: 25%;
|
||||
background: #dd3333;
|
||||
border-color: #dd3333;
|
||||
background: #F5A9B8;
|
||||
border-color: #F5A9B8;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
@ -1445,8 +1445,8 @@ Default widget css
|
||||
.widget_search .search-submit:hover {
|
||||
height: 36px;
|
||||
width: 25%;
|
||||
background: #dd3333;
|
||||
border-color: #dd3333;
|
||||
background: #F5A9B8;
|
||||
border-color: #F5A9B8;
|
||||
color: #ffffff;
|
||||
padding: 0;
|
||||
}
|
||||
@ -1464,9 +1464,9 @@ Default widget css
|
||||
|
||||
.widget_tag_cloud .tagcloud a:hover,
|
||||
.widget.widget_tag_cloud a:hover {
|
||||
background: #dd3333;
|
||||
background: #F5A9B8;
|
||||
color: #fff;
|
||||
border-color: #dd3333;
|
||||
border-color: #F5A9B8;
|
||||
}
|
||||
|
||||
.wp-block-search__button {
|
||||
@ -1475,6 +1475,7 @@ Default widget css
|
||||
width: 80px;
|
||||
margin: 0;
|
||||
height: 36px;
|
||||
padding: unset!important;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
@ -1671,7 +1672,7 @@ Header CSS
|
||||
}
|
||||
|
||||
#top-navigation ul li a:hover {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
#masthead .widget {
|
||||
@ -1754,7 +1755,7 @@ Header CSS
|
||||
}
|
||||
|
||||
.mt-social-icon-wrap li a:hover {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
.mt-header-extra-icons {
|
||||
@ -1791,7 +1792,6 @@ Header CSS
|
||||
.is-sticky .mt-social-menu-wrapper {
|
||||
background: #0B0B0B;
|
||||
z-index: 9999;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
#site-navigation {
|
||||
@ -1853,7 +1853,7 @@ Search CSS
|
||||
}
|
||||
|
||||
.mt-search-icon:hover {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
.mt-search-icon i {
|
||||
@ -1914,13 +1914,13 @@ Search CSS
|
||||
}
|
||||
|
||||
.mt-menu-search .mt-form-wrap .search-form .search-field:focus {
|
||||
outline: 2px solid #DD3333;
|
||||
outline: 2px solid #F5A9B8;
|
||||
}
|
||||
|
||||
.mt-menu-search .mt-form-wrap .search-form .search-submit {
|
||||
margin-top: 30px;
|
||||
padding: 16px 60px;
|
||||
background: #dd3333;
|
||||
background: #F5A9B8;
|
||||
border: none;
|
||||
color: #fff;
|
||||
font-size: 18px;
|
||||
@ -1930,11 +1930,6 @@ Search CSS
|
||||
transition: 0.3s ease;
|
||||
}
|
||||
|
||||
.mt-menu-search .mt-form-wrap .search-form .search-submit:hover {
|
||||
background: #dd3333;
|
||||
border-radius: 30px;
|
||||
}
|
||||
|
||||
.mt-form-close {
|
||||
position: absolute;
|
||||
right: 40px;
|
||||
@ -1949,7 +1944,7 @@ Search CSS
|
||||
}
|
||||
|
||||
.mt-form-close:hover {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
@ -1975,7 +1970,7 @@ Menu CSS
|
||||
}
|
||||
|
||||
.menu-toggle:hover {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
.menu-toggle i {
|
||||
@ -2050,7 +2045,7 @@ Menu CSS
|
||||
#site-navigation ul li.current_page_item>a,
|
||||
#site-navigation ul li.current-menu-parent>a,
|
||||
#site-navigation ul li.focus>a {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
#site-navigation ul li .sub-menu,
|
||||
@ -2157,7 +2152,7 @@ Menu CSS
|
||||
position: absolute;
|
||||
top: -15px;
|
||||
right: -20px;
|
||||
background: #dd3333;
|
||||
background: #F5A9B8;
|
||||
line-height: 24px;
|
||||
font-size: 12px;
|
||||
padding: 0 10px;
|
||||
@ -2174,7 +2169,7 @@ Menu CSS
|
||||
height: 0;
|
||||
border-style: solid;
|
||||
border-width: 3px 3px 0 0;
|
||||
border-color: #dd3333 transparent transparent transparent;
|
||||
border-color: #F5A9B8 transparent transparent transparent;
|
||||
-webkit-transition: all 0.3s ease;
|
||||
-o-transition: all 0.3s ease;
|
||||
transition: all 0.3s ease;
|
||||
@ -2306,7 +2301,7 @@ Slider CSS
|
||||
}
|
||||
|
||||
.post-cats-list a {
|
||||
background: #dd3333;
|
||||
background: #F5A9B8;
|
||||
font-size: 12px;
|
||||
color: #fff;
|
||||
padding: 1px 10px;
|
||||
@ -2348,7 +2343,7 @@ Slider CSS
|
||||
}
|
||||
|
||||
.front-slider-block .lSAction>a:hover {
|
||||
background: #dd3333;
|
||||
background: #F5A9B8;
|
||||
}
|
||||
|
||||
.features-post-title {
|
||||
@ -2398,7 +2393,7 @@ Slider CSS
|
||||
height: 25px;
|
||||
line-height: 25px;
|
||||
color: #fff;
|
||||
background: #dd3333;
|
||||
background: #F5A9B8;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@ -2439,7 +2434,7 @@ article {
|
||||
|
||||
.entry-title a:hover,
|
||||
.cat-links a:hover {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
.entry-meta a {
|
||||
@ -2449,7 +2444,7 @@ article {
|
||||
}
|
||||
|
||||
.entry-meta a:hover {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
.entry-content {
|
||||
@ -2483,7 +2478,7 @@ article {
|
||||
.entry-footer .mt-readmore-btn:hover,
|
||||
.btn-wrapper a:hover,
|
||||
.mt-readmore-btn:hover {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
.entry-footer .mt-readmore-btn:hover i,
|
||||
@ -2519,7 +2514,7 @@ article.sticky::before {
|
||||
display: block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: #dd3333;
|
||||
background: #F5A9B8;
|
||||
color: #fff;
|
||||
font-size: 15px;
|
||||
line-height: 40px;
|
||||
@ -2589,14 +2584,14 @@ article.page .post-thumbnail::before,
|
||||
|
||||
.navigation.pagination .nav-links .page-numbers.current,
|
||||
.navigation.pagination .nav-links a.page-numbers:hover {
|
||||
border: 1px solid #dd3333;
|
||||
border: 1px solid #F5A9B8;
|
||||
padding: 12px 15px;
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
margin: 0 5px;
|
||||
font-size: 14px;
|
||||
line-height: 13px;
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
.archive-grid-post-wrapper,
|
||||
@ -2651,7 +2646,7 @@ Sidebar CSS
|
||||
content: "";
|
||||
width: 25px;
|
||||
height: 3px;
|
||||
background: #dd3333;
|
||||
background: #F5A9B8;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
@ -2727,7 +2722,7 @@ Error 404 styles
|
||||
.error-404.not-found {
|
||||
text-align: center;
|
||||
width: 900px;
|
||||
border: 5px solid #dd3333;
|
||||
border: 5px solid #F5A9B8;
|
||||
margin: 0 auto;
|
||||
padding: 30px 0 40px 0;
|
||||
}
|
||||
@ -2760,7 +2755,7 @@ Custom Header styles
|
||||
background-attachment: fixed;
|
||||
margin-bottom: 50px;
|
||||
position: relative;
|
||||
border-top: 4px solid #dd3333;
|
||||
border-top: 4px solid #F5A9B8;
|
||||
background-position: center center;
|
||||
}
|
||||
|
||||
@ -2909,7 +2904,7 @@ Footer CSS
|
||||
}
|
||||
|
||||
#footer-menu li a:hover {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
#bottom-footer {
|
||||
@ -2934,7 +2929,7 @@ Footer CSS
|
||||
}
|
||||
|
||||
#top-footer a:hover {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
#top-footer .posted-on a::before {
|
||||
@ -3010,7 +3005,7 @@ sophia-after-dark Widget CSS
|
||||
}
|
||||
|
||||
.mt-latest-posts-wrapper .mt-post-title a:hover {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
.mt-latest-posts-wrapper .entry-cat {
|
||||
@ -3045,9 +3040,9 @@ sophia-after-dark Widget CSS
|
||||
}
|
||||
|
||||
.sophia-after-dark_social_media a:hover {
|
||||
background: #dd3333;
|
||||
background: #F5A9B8;
|
||||
color: #ffffff !important;
|
||||
border-color: #dd3333;
|
||||
border-color: #F5A9B8;
|
||||
}
|
||||
|
||||
.mt-single-related-posts {
|
||||
@ -3111,7 +3106,7 @@ Scroll To Top styles
|
||||
}
|
||||
|
||||
#mt-scrollup:hover {
|
||||
color: #dd3333;
|
||||
color: #F5A9B8;
|
||||
}
|
||||
|
||||
.single article .post-thumbnail:hover img {
|
||||
|
@ -8,55 +8,55 @@
|
||||
* @since 1.0.0
|
||||
*/
|
||||
$post_content_type = apply_filters( 'sophia_after_dark_archive_post_content_type', 'excerpt' );
|
||||
if ( has_post_thumbnail() ) {
|
||||
$post_class = 'has-thumbnail wow fadeInUp';
|
||||
} else {
|
||||
$post_class = 'no-thumbnail wow fadeInUp';
|
||||
}
|
||||
$post_class = has_post_thumbnail() ? 'has-thumbnail wow fadeInUp' : 'no-thumbnail wow fadeInUp';
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class( $post_class ); ?>>
|
||||
<?php
|
||||
echo '<div class="thumb-cat-wrap">';
|
||||
|
||||
<div class="thumb-cat-wrap">
|
||||
<?php
|
||||
sophia_after_dark_post_thumbnail();
|
||||
sophia_after_dark_article_categories_list();
|
||||
echo '</div>';
|
||||
if ( 'post' === get_post_type() ) {
|
||||
?>
|
||||
?>
|
||||
</div>
|
||||
|
||||
<?php if ( 'post' === get_post_type() ) : ?>
|
||||
<div class="entry-cat">
|
||||
<?php
|
||||
sophia_after_dark_posted_on();
|
||||
sophia_after_dark_posted_by();
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<header class="entry-header">
|
||||
<?php the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); ?>
|
||||
<?php the_title(
|
||||
sprintf(
|
||||
'<h2 class="entry-title"><a href="%s" rel="bookmark">',
|
||||
esc_url( get_permalink() )
|
||||
),
|
||||
'</a></h2>'
|
||||
); ?>
|
||||
</header>
|
||||
|
||||
<div class="entry-content">
|
||||
<?php
|
||||
if ( 'excerpt' === $post_content_type ) {
|
||||
the_excerpt();
|
||||
} elseif ( 'content' === $post_content_type ) {
|
||||
<?php if ( 'excerpt' === $post_content_type ) : ?>
|
||||
<?php the_excerpt(); ?>
|
||||
<?php elseif ( 'content' === $post_content_type ) : ?>
|
||||
<?php
|
||||
the_content( sprintf(
|
||||
wp_kses(
|
||||
/* translators: %s: Name of current post. Only visible to screen readers */
|
||||
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'sophia-after-dark' ),
|
||||
array(
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
[ 'span' => [ 'class' => [] ] ]
|
||||
),
|
||||
get_the_title()
|
||||
) );
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<footer class="entry-footer">
|
||||
<?php sophia_after_dark_entry_footer(); ?>
|
||||
</footer>
|
||||
</article>
|
||||
|
||||
</article>
|
||||
|
@ -8,55 +8,48 @@
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
if ( has_post_thumbnail() ) {
|
||||
$post_class = 'has-thumbnail';
|
||||
} else {
|
||||
$post_class = 'no-thumbnail';
|
||||
}
|
||||
$post_class = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class( $post_class ); ?>>
|
||||
<div class="post-thumbnail">
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail( 'full' );
|
||||
}
|
||||
?>
|
||||
<div class="post-info-wrap">
|
||||
<div class="post-cat"><?php sophia_after_dark_article_categories_list(); ?></div>
|
||||
<div class="entry-meta">
|
||||
<?php
|
||||
sophia_after_dark_posted_on();
|
||||
sophia_after_dark_posted_by();
|
||||
?>
|
||||
</div>
|
||||
<?php the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="entry-content">
|
||||
<?php
|
||||
the_content( sprintf(
|
||||
wp_kses(
|
||||
/* translators: %s: Name of current post. Only visible to screen readers */
|
||||
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'sophia-after-dark' ),
|
||||
array(
|
||||
'span' => array(
|
||||
'class' => array(),
|
||||
),
|
||||
)
|
||||
),
|
||||
get_the_title()
|
||||
) );
|
||||
wp_link_pages( array(
|
||||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'sophia-after-dark' ),
|
||||
'after' => '</div>',
|
||||
) );
|
||||
?>
|
||||
</div>
|
||||
<?php if ( has_post_thumbnail() ) : ?>
|
||||
<div class="post-thumbnail">
|
||||
<?php the_post_thumbnail( 'full' ); ?>
|
||||
<div class="post-info-wrap">
|
||||
<div class="post-cat"><?php sophia_after_dark_article_categories_list(); ?></div>
|
||||
<div class="entry-meta">
|
||||
<?php
|
||||
sophia_after_dark_posted_on();
|
||||
sophia_after_dark_posted_by();
|
||||
?>
|
||||
</div>
|
||||
<?php the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<footer class="entry-footer">
|
||||
<?php sophia_after_dark_entry_footer(); ?>
|
||||
</footer>
|
||||
<?php get_template_part( 'template-parts/author/post', 'author-box' ); ?>
|
||||
</article>
|
||||
<div class="entry-content">
|
||||
<?php
|
||||
the_content( sprintf(
|
||||
wp_kses(
|
||||
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'sophia-after-dark' ),
|
||||
[ 'span' => [ 'class' => [] ] ]
|
||||
),
|
||||
get_the_title()
|
||||
) );
|
||||
|
||||
wp_link_pages( [
|
||||
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'sophia-after-dark' ),
|
||||
'after' => '</div>',
|
||||
] );
|
||||
?>
|
||||
</div>
|
||||
|
||||
<footer class="entry-footer">
|
||||
<?php sophia_after_dark_entry_footer(); ?>
|
||||
</footer>
|
||||
|
||||
<?php get_template_part( 'template-parts/author/post', 'author-box' ); ?>
|
||||
|
||||
</article>
|
||||
|
Reference in New Issue
Block a user