Version Description
- Added unsaved changes alert to menu item in Menus Panel
- Updated admin styles to work better in Firefox.
- Allow shortcodes, HTML in toggle content
- Added spacing in Menu Panel when settings panel is active
- Added non-transform option (disable "Shift Body")
- Fixed overflow scrolling and dragging on iOS
- Moved menu bars icon depending on whether panel is left or right
- Added Custom CSS Tweaks setting
- Added active hover state setting
- Removed disable menu option to avoid confusion (pro only)
- Added Scroll Lock independently for horizontal and both
Download this release
Release Info
Developer | sevenspark |
Plugin | ShiftNav – Responsive Mobile Menu |
Version | 1.0 |
Comparing to | |
See all releases |
Code changes from version 0.2 to 1.0
- admin/admin.php +11 -1
- admin/assets/admin.menu.css +37 -1
- admin/assets/admin.menu.js +30 -7
- admin/assets/admin.settings.css +202 -0
- admin/assets/admin.settings.js +27 -1
- admin/settings-api.class.php +11 -6
- admin/settings.config.php +88 -166
- assets/css/less/base.less +4 -1
- assets/css/less/misc.less +7 -0
- assets/css/less/panel.less +62 -7
- assets/css/less/toggle.less +11 -4
- assets/css/less/wrap.less +5 -6
- assets/css/shiftnav.css +83 -21
- assets/css/skins/light.css +17 -10
- assets/css/skins/standard-dark.css +3 -11
- assets/js/shiftnav.js +18 -3
- custom/custom-pro-sample.less +66 -0
- custom/custom-sample.css +98 -0
- includes/functions.php +33 -4
- includes/shiftnav.api.php +25 -4
- readme.txt +22 -1
- shiftnav-responsive-mobile-menu.php +5 -2
admin/admin.php
CHANGED
@@ -10,4 +10,14 @@ function shiftnav_plugin_settings_link( $links ) {
|
|
10 |
array_unshift( $links, $settings_link );
|
11 |
return $links;
|
12 |
}
|
13 |
-
add_filter( 'plugin_action_links_'.SHIFTNAV_BASENAME, 'shiftnav_plugin_settings_link' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
array_unshift( $links, $settings_link );
|
11 |
return $links;
|
12 |
}
|
13 |
+
add_filter( 'plugin_action_links_'.SHIFTNAV_BASENAME, 'shiftnav_plugin_settings_link' );
|
14 |
+
|
15 |
+
|
16 |
+
function shiftnav_pro_link(){
|
17 |
+
?>
|
18 |
+
<div class="shiftnav_pro_button_container">
|
19 |
+
<a target="_blank" href="http://goo.gl/rd12PP" class="shiftnav_pro_button"><i class="fa fa-rocket"></i> Go Pro</a>
|
20 |
+
</div>
|
21 |
+
<?php
|
22 |
+
}
|
23 |
+
if( !SHIFTNAV_PRO ) add_action( 'shiftnav_settings_before' , 'shiftnav_pro_link' );
|
admin/assets/admin.menu.css
CHANGED
@@ -2,7 +2,9 @@
|
|
2 |
padding-bottom:40px;
|
3 |
}
|
4 |
|
5 |
-
|
|
|
|
|
6 |
|
7 |
.shiftnav-settings-toggle{
|
8 |
font-size:10px;
|
@@ -24,6 +26,40 @@
|
|
24 |
visibility:visible;
|
25 |
}
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
/* Wrapper */
|
28 |
.shiftnav-menu-item-settings-wrapper,
|
29 |
.shiftnav-menu-item-settings-wrapper *,
|
2 |
padding-bottom:40px;
|
3 |
}
|
4 |
|
5 |
+
body.shiftnav-settings-panel-is-open #wpwrap{
|
6 |
+
padding-bottom:500px;
|
7 |
+
}
|
8 |
|
9 |
.shiftnav-settings-toggle{
|
10 |
font-size:10px;
|
26 |
visibility:visible;
|
27 |
}
|
28 |
|
29 |
+
.shiftnav-unsaved .shiftnav-settings-toggle{
|
30 |
+
opacity:1;
|
31 |
+
visibility:visible;
|
32 |
+
}
|
33 |
+
.shiftnav-unsaved-alert{
|
34 |
+
display:none;
|
35 |
+
margin-left:4px;
|
36 |
+
color: #FAC92C;
|
37 |
+
}
|
38 |
+
.shiftnav-unsaved .shiftnav-unsaved-alert{
|
39 |
+
display:inline;
|
40 |
+
}
|
41 |
+
.shiftnav-unsaved-alert-message{
|
42 |
+
max-width:0;
|
43 |
+
overflow:hidden;
|
44 |
+
visibility:hidden;
|
45 |
+
opacity:0;
|
46 |
+
-webkit-transition:all .2s ease-in;
|
47 |
+
transition:all .2s ease-in;
|
48 |
+
position:absolute;
|
49 |
+
background:#FAC92C;
|
50 |
+
color:#f9f9f9;
|
51 |
+
text-shadow:0px 0px 1px rgba(0,0,0,.3);
|
52 |
+
left:100%;
|
53 |
+
padding:3px 5px;
|
54 |
+
display:inline-block;
|
55 |
+
top:0;
|
56 |
+
}
|
57 |
+
.shiftnav-unsaved:hover .shiftnav-unsaved-alert-message{
|
58 |
+
max-width:100px;
|
59 |
+
visibility:visible;
|
60 |
+
opacity:1;
|
61 |
+
}
|
62 |
+
|
63 |
/* Wrapper */
|
64 |
.shiftnav-menu-item-settings-wrapper,
|
65 |
.shiftnav-menu-item-settings-wrapper *,
|
admin/assets/admin.menu.js
CHANGED
@@ -10,13 +10,14 @@ jQuery( document ).ready( function($){
|
|
10 |
//remove loading notice
|
11 |
$( '.shiftnav-js-check' ).remove();
|
12 |
|
13 |
-
|
14 |
$( '#menu-management' ).on( 'hover, touchEnd, MSPointerUp, pointerup' , '.menu-item:not(.shiftnav-processed)' , function(e){
|
15 |
$(this).addClass( 'shiftnav-processed' );
|
16 |
-
$(this).find( '.item-title' ).append( '<span class="shiftnav-settings-toggle" data-shift-toggle="' + $(this).attr('id') + '"><i class="fa fa-gear"></i> Shift</span>' );
|
17 |
//console.log( $(this).find( '.item-title' ).text() );
|
18 |
});
|
19 |
|
|
|
20 |
$( '#menu-management' ).on( 'mousedown' , '.shiftnav-settings-toggle' , function( e ){
|
21 |
e.preventDefault();
|
22 |
e.stopPropagation();
|
@@ -24,6 +25,7 @@ jQuery( document ).ready( function($){
|
|
24 |
return false;
|
25 |
});
|
26 |
|
|
|
27 |
$( '#menu-management' ).on( 'click' , '.shiftnav-settings-toggle' , function( e ){
|
28 |
|
29 |
var this_menu_item_id = $(this).attr( 'data-shift-toggle' );
|
@@ -34,10 +36,12 @@ jQuery( document ).ready( function($){
|
|
34 |
//This is already the current item
|
35 |
if( this_menu_item_id == current_menu_item_id ){
|
36 |
$settingswrap.toggleClass( 'shiftnav-menu-item-settings-open' );
|
|
|
37 |
}
|
38 |
//Switching to a different item
|
39 |
else{
|
40 |
$settingswrap.addClass( 'shiftnav-menu-item-settings-open' );
|
|
|
41 |
//$( '.shiftnav-menu-item-tab' ).click();
|
42 |
//Update
|
43 |
|
@@ -48,6 +52,7 @@ jQuery( document ).ready( function($){
|
|
48 |
$current_panel = $( '.shiftnav-menu-item-panel-negative' ).clone();
|
49 |
$current_panel.removeClass( 'shiftnav-menu-item-panel-negative' );
|
50 |
$current_panel.addClass( 'shiftnav-menu-item-panel-' + this_menu_item_id );
|
|
|
51 |
|
52 |
var hash = '#' + this_menu_item_id;
|
53 |
|
@@ -125,20 +130,28 @@ jQuery( document ).ready( function($){
|
|
125 |
return false;
|
126 |
});
|
127 |
|
|
|
128 |
$settingswrap.on( 'change' , '.shiftnav-menu-item-setting-input' , function( e ){
|
|
|
|
|
129 |
var $form = $(this).parents( 'form.shiftnav-menu-item-settings-form' );
|
130 |
$form.find( '.shiftnav-menu-item-status' ).attr( 'class' , 'shiftnav-menu-item-status shiftnav-menu-item-status-warning' );
|
131 |
$form.find( '.shiftnav-status-message' ).html( 'Settings have changed. Click <strong>Save Menu Item</strong> to preserve these changes.' );
|
|
|
|
|
|
|
|
|
132 |
});
|
133 |
|
134 |
|
|
|
135 |
$settingswrap.on( 'click' , '.shiftnav-menu-item-save-button', function( e ){
|
136 |
e.preventDefault();
|
137 |
e.stopPropagation();
|
138 |
|
139 |
var $form = $(this).parents('form.shiftnav-menu-item-settings-form' );
|
140 |
var serialized = $form.serialize();
|
141 |
-
console.log( 'serial: ' + serialized );
|
142 |
|
143 |
//return;
|
144 |
|
@@ -159,45 +172,55 @@ jQuery( document ).ready( function($){
|
|
159 |
if( response == -1 ){
|
160 |
$formStatus.attr( 'class', 'shiftnav-menu-item-status shiftnav-menu-item-status-error' );
|
161 |
$formStatusMessage.html( '<strong>Error encountered. Settings could not be saved.</strong> Your login/nonce may have expired. Please try refreshing the page.');
|
162 |
-
console.log( response );
|
163 |
}
|
164 |
else{
|
165 |
//$( '.shiftnav-menu-item-panel-' + response.menu_item_id )
|
166 |
$formStatus.attr( 'class', 'shiftnav-menu-item-status shiftnav-menu-item-status-success' );
|
167 |
$formStatusMessage.text( 'Settings Saved' );
|
168 |
shiftnav_meta.nonce = response.nonce; //update nonce
|
|
|
|
|
|
|
|
|
169 |
}
|
170 |
|
171 |
}, 'json' ).fail( function( d ){
|
172 |
$formStatus.attr( 'class', 'shiftnav-menu-item-status shiftnav-menu-item-status-error' );
|
173 |
$formStatusMessage.html( '<strong>Error encountered. Settings could not be saved.</strong> Response Text: <br/><textarea>' + d.responseText + '</textarea>');
|
174 |
//console.log( d.responseText );
|
175 |
-
console.log( d );
|
176 |
});
|
177 |
|
178 |
return false;
|
179 |
});
|
180 |
|
|
|
181 |
$settingswrap.on( 'click' , '.shiftnav-menu-item-settings-close' , function( e ){
|
182 |
e.preventDefault();
|
183 |
e.stopPropagation();
|
184 |
|
185 |
$settingswrap.removeClass( 'shiftnav-menu-item-settings-open' );
|
|
|
186 |
});
|
187 |
|
|
|
188 |
$settingswrap.on( 'click' , '.shiftnav-menu-item-id a' , function( e ){
|
189 |
var $item = $( $(this).attr( 'href' ) );
|
190 |
-
console.log( $item.offset() );
|
191 |
var y = $item.offset().top - 50;
|
192 |
$('html, body').animate({scrollTop:y}, 'normal');
|
193 |
return false;
|
194 |
});
|
195 |
|
|
|
196 |
$settingswrap.on( 'click' , '.shiftnav-icon-selected' , function( e ){
|
197 |
$icon_set = $( this ).parents( '.shiftnav-icon-settings-wrap' );
|
198 |
$icon_set.find( '.shiftnav-icons' ).fadeToggle();
|
199 |
$icon_set.find( '.shiftnav-icons-search' ).focus();
|
200 |
});
|
|
|
|
|
201 |
$settingswrap.on( 'click' , '.shiftnav-icon-settings-wrap .shiftnav-icon-wrap' , function( e ){
|
202 |
$icon = $( this ).find( '.shiftnav-icon' );
|
203 |
$icon_set = $( this ).parents( '.shiftnav-icon-settings-wrap' );
|
@@ -206,6 +229,7 @@ jQuery( document ).ready( function($){
|
|
206 |
$icon_set.find( 'select' ).val( $icon.data( 'shiftnav-icon' ) ).change();
|
207 |
$( this ).parents( '.shiftnav-icons' ).fadeOut();
|
208 |
});
|
|
|
209 |
/* Filter Icons */
|
210 |
$settingswrap.on( 'keyup' , '.shiftnav-icons-search' , function( e ){
|
211 |
$icon_set = $( this ).parents( '.shiftnav-icon-settings-wrap' ).find( '.shiftnav-icon-wrap' );
|
@@ -219,6 +243,5 @@ jQuery( document ).ready( function($){
|
|
219 |
}
|
220 |
});
|
221 |
|
222 |
-
//.find( '.item-title' );
|
223 |
|
224 |
});
|
10 |
//remove loading notice
|
11 |
$( '.shiftnav-js-check' ).remove();
|
12 |
|
13 |
+
//handle adding the "Shift" button on each menu item upon first interaction
|
14 |
$( '#menu-management' ).on( 'hover, touchEnd, MSPointerUp, pointerup' , '.menu-item:not(.shiftnav-processed)' , function(e){
|
15 |
$(this).addClass( 'shiftnav-processed' );
|
16 |
+
$(this).find( '.item-title' ).append( '<span class="shiftnav-settings-toggle" data-shift-toggle="' + $(this).attr('id') + '"><i class="fa fa-gear"></i> Shift <span class="shiftnav-unsaved-alert"><i class="fa fa-warning"></i> <span class="shiftnav-unsaved-alert-message">Unsaved</span></span></span>' );
|
17 |
//console.log( $(this).find( '.item-title' ).text() );
|
18 |
});
|
19 |
|
20 |
+
//Don't allow clicks to propagate when clicking the toggle button, to avoid drag-starts of the menu item
|
21 |
$( '#menu-management' ).on( 'mousedown' , '.shiftnav-settings-toggle' , function( e ){
|
22 |
e.preventDefault();
|
23 |
e.stopPropagation();
|
25 |
return false;
|
26 |
});
|
27 |
|
28 |
+
//Handle clicking the "Shift" button on each menu item - open settings
|
29 |
$( '#menu-management' ).on( 'click' , '.shiftnav-settings-toggle' , function( e ){
|
30 |
|
31 |
var this_menu_item_id = $(this).attr( 'data-shift-toggle' );
|
36 |
//This is already the current item
|
37 |
if( this_menu_item_id == current_menu_item_id ){
|
38 |
$settingswrap.toggleClass( 'shiftnav-menu-item-settings-open' );
|
39 |
+
$( 'body' ).toggleClass( 'shiftnav-settings-panel-is-open' );
|
40 |
}
|
41 |
//Switching to a different item
|
42 |
else{
|
43 |
$settingswrap.addClass( 'shiftnav-menu-item-settings-open' );
|
44 |
+
$( 'body' ).addClass( 'shiftnav-settings-panel-is-open' );
|
45 |
//$( '.shiftnav-menu-item-tab' ).click();
|
46 |
//Update
|
47 |
|
52 |
$current_panel = $( '.shiftnav-menu-item-panel-negative' ).clone();
|
53 |
$current_panel.removeClass( 'shiftnav-menu-item-panel-negative' );
|
54 |
$current_panel.addClass( 'shiftnav-menu-item-panel-' + this_menu_item_id );
|
55 |
+
$current_panel.attr( 'data-menu-item-target-id' , this_menu_item_id_num );
|
56 |
|
57 |
var hash = '#' + this_menu_item_id;
|
58 |
|
130 |
return false;
|
131 |
});
|
132 |
|
133 |
+
//When a setting is changed, set the flag on the settings panel and on the menu item itself
|
134 |
$settingswrap.on( 'change' , '.shiftnav-menu-item-setting-input' , function( e ){
|
135 |
+
|
136 |
+
//Flag Settings Panel
|
137 |
var $form = $(this).parents( 'form.shiftnav-menu-item-settings-form' );
|
138 |
$form.find( '.shiftnav-menu-item-status' ).attr( 'class' , 'shiftnav-menu-item-status shiftnav-menu-item-status-warning' );
|
139 |
$form.find( '.shiftnav-status-message' ).html( 'Settings have changed. Click <strong>Save Menu Item</strong> to preserve these changes.' );
|
140 |
+
|
141 |
+
//Flag Menu Item
|
142 |
+
var item_id = $form.parents( '.shiftnav-menu-item-panel' ).data( 'menu-item-target-id' );
|
143 |
+
$( '#menu-item-' + item_id ).addClass( 'shiftnav-unsaved' );
|
144 |
});
|
145 |
|
146 |
|
147 |
+
//Save Settings Button
|
148 |
$settingswrap.on( 'click' , '.shiftnav-menu-item-save-button', function( e ){
|
149 |
e.preventDefault();
|
150 |
e.stopPropagation();
|
151 |
|
152 |
var $form = $(this).parents('form.shiftnav-menu-item-settings-form' );
|
153 |
var serialized = $form.serialize();
|
154 |
+
//console.log( 'serial: ' + serialized );
|
155 |
|
156 |
//return;
|
157 |
|
172 |
if( response == -1 ){
|
173 |
$formStatus.attr( 'class', 'shiftnav-menu-item-status shiftnav-menu-item-status-error' );
|
174 |
$formStatusMessage.html( '<strong>Error encountered. Settings could not be saved.</strong> Your login/nonce may have expired. Please try refreshing the page.');
|
175 |
+
//console.log( response );
|
176 |
}
|
177 |
else{
|
178 |
//$( '.shiftnav-menu-item-panel-' + response.menu_item_id )
|
179 |
$formStatus.attr( 'class', 'shiftnav-menu-item-status shiftnav-menu-item-status-success' );
|
180 |
$formStatusMessage.text( 'Settings Saved' );
|
181 |
shiftnav_meta.nonce = response.nonce; //update nonce
|
182 |
+
|
183 |
+
//Remove flag on menu item
|
184 |
+
var item_id = $form.parents( '.shiftnav-menu-item-panel' ).data( 'menu-item-target-id' );
|
185 |
+
$( '#menu-item-' + item_id ).removeClass( 'shiftnav-unsaved' );
|
186 |
}
|
187 |
|
188 |
}, 'json' ).fail( function( d ){
|
189 |
$formStatus.attr( 'class', 'shiftnav-menu-item-status shiftnav-menu-item-status-error' );
|
190 |
$formStatusMessage.html( '<strong>Error encountered. Settings could not be saved.</strong> Response Text: <br/><textarea>' + d.responseText + '</textarea>');
|
191 |
//console.log( d.responseText );
|
192 |
+
//console.log( d );
|
193 |
});
|
194 |
|
195 |
return false;
|
196 |
});
|
197 |
|
198 |
+
//Close Settings Button
|
199 |
$settingswrap.on( 'click' , '.shiftnav-menu-item-settings-close' , function( e ){
|
200 |
e.preventDefault();
|
201 |
e.stopPropagation();
|
202 |
|
203 |
$settingswrap.removeClass( 'shiftnav-menu-item-settings-open' );
|
204 |
+
$( 'body' ).removeClass( 'shiftnav-settings-panel-is-open' );
|
205 |
});
|
206 |
|
207 |
+
//Scroll to the menu item when the ID is clicked
|
208 |
$settingswrap.on( 'click' , '.shiftnav-menu-item-id a' , function( e ){
|
209 |
var $item = $( $(this).attr( 'href' ) );
|
210 |
+
//console.log( $item.offset() );
|
211 |
var y = $item.offset().top - 50;
|
212 |
$('html, body').animate({scrollTop:y}, 'normal');
|
213 |
return false;
|
214 |
});
|
215 |
|
216 |
+
//Show Icon Selection panel when icon is clicked
|
217 |
$settingswrap.on( 'click' , '.shiftnav-icon-selected' , function( e ){
|
218 |
$icon_set = $( this ).parents( '.shiftnav-icon-settings-wrap' );
|
219 |
$icon_set.find( '.shiftnav-icons' ).fadeToggle();
|
220 |
$icon_set.find( '.shiftnav-icons-search' ).focus();
|
221 |
});
|
222 |
+
|
223 |
+
|
224 |
$settingswrap.on( 'click' , '.shiftnav-icon-settings-wrap .shiftnav-icon-wrap' , function( e ){
|
225 |
$icon = $( this ).find( '.shiftnav-icon' );
|
226 |
$icon_set = $( this ).parents( '.shiftnav-icon-settings-wrap' );
|
229 |
$icon_set.find( 'select' ).val( $icon.data( 'shiftnav-icon' ) ).change();
|
230 |
$( this ).parents( '.shiftnav-icons' ).fadeOut();
|
231 |
});
|
232 |
+
|
233 |
/* Filter Icons */
|
234 |
$settingswrap.on( 'keyup' , '.shiftnav-icons-search' , function( e ){
|
235 |
$icon_set = $( this ).parents( '.shiftnav-icon-settings-wrap' ).find( '.shiftnav-icon-wrap' );
|
243 |
}
|
244 |
});
|
245 |
|
|
|
246 |
|
247 |
});
|
admin/assets/admin.settings.css
ADDED
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.form-table th{
|
2 |
+
padding-left:15px;
|
3 |
+
}
|
4 |
+
h2.nav-tab-wrapper{
|
5 |
+
padding-left:0;
|
6 |
+
}
|
7 |
+
|
8 |
+
.shiftnav-settings-links{
|
9 |
+
float:right;
|
10 |
+
}
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
.shiftnav_instance_manager{
|
15 |
+
|
16 |
+
}
|
17 |
+
a.shiftnav_instance_toggle,
|
18 |
+
a.shiftnav_pro_button{
|
19 |
+
float:right;
|
20 |
+
}
|
21 |
+
.shiftnav_instance_container_wrap,
|
22 |
+
.shiftnav_instance_notice_wrap{
|
23 |
+
position:fixed;
|
24 |
+
z-index:999;
|
25 |
+
background:#444;
|
26 |
+
background:rgba(0,0,0,.7);
|
27 |
+
|
28 |
+
left:0;
|
29 |
+
top:0;
|
30 |
+
width:100%;
|
31 |
+
height:100%;
|
32 |
+
|
33 |
+
display:none;
|
34 |
+
}
|
35 |
+
.shiftnav_instance_container,
|
36 |
+
.shiftnav_instance_notice{
|
37 |
+
|
38 |
+
background:#e9e9e9;
|
39 |
+
padding:20px;
|
40 |
+
|
41 |
+
width: 50%;
|
42 |
+
height: auto;
|
43 |
+
max-height:150px;
|
44 |
+
overflow: auto;
|
45 |
+
margin: auto;
|
46 |
+
position: absolute;
|
47 |
+
top: 0;
|
48 |
+
left: 0;
|
49 |
+
bottom: 0;
|
50 |
+
right: 0;
|
51 |
+
}
|
52 |
+
|
53 |
+
.shiftnav_instance_container h3{
|
54 |
+
margin-top:0;
|
55 |
+
}
|
56 |
+
|
57 |
+
form.shiftnav_instance_form{
|
58 |
+
float:left;
|
59 |
+
width:100%;
|
60 |
+
margin:0 0 20px 0;
|
61 |
+
|
62 |
+
}
|
63 |
+
|
64 |
+
input.shiftnav_instance_input{
|
65 |
+
padding:10px;
|
66 |
+
height:40px;
|
67 |
+
|
68 |
+
-webkit-box-sizing:border-box;
|
69 |
+
-moz-box-sizing:border-box;
|
70 |
+
-o-box-sizing:border-box;
|
71 |
+
box-sizing:border-box;
|
72 |
+
|
73 |
+
display:block;
|
74 |
+
float:left;
|
75 |
+
width:80%;
|
76 |
+
margin:0;
|
77 |
+
|
78 |
+
border:none;
|
79 |
+
}
|
80 |
+
a.shiftnav_instance_button,
|
81 |
+
a.shiftnav_pro_button{
|
82 |
+
display:inline-block;
|
83 |
+
padding:10px;
|
84 |
+
height:40px;
|
85 |
+
|
86 |
+
-webkit-box-sizing:border-box;
|
87 |
+
-moz-box-sizing:border-box;
|
88 |
+
-o-box-sizing:border-box;
|
89 |
+
box-sizing:border-box;
|
90 |
+
|
91 |
+
margin:0;
|
92 |
+
background:#12B365;
|
93 |
+
text-align:center;
|
94 |
+
color:#fff;
|
95 |
+
font-weight:bold;
|
96 |
+
cursor:pointer;
|
97 |
+
text-decoration: none;
|
98 |
+
}
|
99 |
+
.shiftnav_instance_container a.shiftnav_instance_button{
|
100 |
+
float:left;
|
101 |
+
width:20%;
|
102 |
+
}
|
103 |
+
.shiftnav_instance_form_desc{
|
104 |
+
display:block;
|
105 |
+
clear:both;
|
106 |
+
margin:20px 0;
|
107 |
+
}
|
108 |
+
.shiftnav_instance_close{
|
109 |
+
position:absolute;
|
110 |
+
top:0;
|
111 |
+
right:0;
|
112 |
+
font-size:16px;
|
113 |
+
padding:10px 15px;
|
114 |
+
cursor:pointer;
|
115 |
+
}
|
116 |
+
.shiftnav_instance_close:hover{
|
117 |
+
background:#333;
|
118 |
+
color:#eee;
|
119 |
+
}
|
120 |
+
a.shiftnav_instance_button_delete{
|
121 |
+
background:#B31212;
|
122 |
+
}
|
123 |
+
|
124 |
+
code.shiftnav-highlight-code{
|
125 |
+
border-left:2px solid #12B365;
|
126 |
+
background:#eee; /*#C4E9D7;*/
|
127 |
+
padding:10px;
|
128 |
+
display:block;
|
129 |
+
float:left;
|
130 |
+
font-size:11px;
|
131 |
+
max-width:500px;
|
132 |
+
cursor:pointer;
|
133 |
+
|
134 |
+
transition:all .2s ease;
|
135 |
+
}
|
136 |
+
code.shiftnav-highlight-code:hover{
|
137 |
+
background:#ddd;
|
138 |
+
}
|
139 |
+
.shiftnav-highlight-code::selection{
|
140 |
+
background:#CA4C62;
|
141 |
+
color:#eee;
|
142 |
+
}
|
143 |
+
.shiftnav-highlight-code::-moz-selection{
|
144 |
+
background:#CA4C62;
|
145 |
+
color:#eee;
|
146 |
+
}
|
147 |
+
.form-table p.shiftnav-sub-desc{
|
148 |
+
clear:both;
|
149 |
+
display:block;
|
150 |
+
padding:10px 0;
|
151 |
+
}
|
152 |
+
.form-table p.shiftnav-desc-mini{
|
153 |
+
font-size:11px;
|
154 |
+
padding:5px 0 5px 80px;
|
155 |
+
}
|
156 |
+
|
157 |
+
.shiftnav-desc-row{
|
158 |
+
display:block;
|
159 |
+
float:left;
|
160 |
+
clear:both;
|
161 |
+
margin-bottom:10px;
|
162 |
+
}
|
163 |
+
.shiftnav-code-snippet-type{
|
164 |
+
float:left;
|
165 |
+
clear:both;
|
166 |
+
width:60px;
|
167 |
+
padding:10px;
|
168 |
+
font-size:11px;
|
169 |
+
text-transform: uppercase;
|
170 |
+
text-align:right;
|
171 |
+
}
|
172 |
+
|
173 |
+
h4.shiftnav-settings-section{
|
174 |
+
color:#666;
|
175 |
+
font-size:16px;
|
176 |
+
}
|
177 |
+
.shiftnav-desc-understated{
|
178 |
+
font-size:12px;
|
179 |
+
color:#999;
|
180 |
+
font-style:italic;
|
181 |
+
}
|
182 |
+
.image-setting-wrap{
|
183 |
+
float:left;
|
184 |
+
}
|
185 |
+
.image-setting-wrap img{
|
186 |
+
max-width:200px;
|
187 |
+
background:#eee;
|
188 |
+
}
|
189 |
+
.set-image-wrapper input.button{
|
190 |
+
clear:both;
|
191 |
+
float:left;
|
192 |
+
margin:10px 10px 10px 0;
|
193 |
+
}
|
194 |
+
.remove-button{
|
195 |
+
font-size:10px;
|
196 |
+
float:left;
|
197 |
+
padding:15px;
|
198 |
+
}
|
199 |
+
|
200 |
+
.shiftnav_pro_button i{
|
201 |
+
margin-right:3px;
|
202 |
+
}
|
admin/assets/admin.settings.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
jQuery( document ).ready( function($){
|
2 |
-
$( '.shiftnav_instance_notice_close' ).on( 'click' , function(){
|
3 |
$( '.shiftnav_instance_wrap' ).fadeOut();
|
4 |
});
|
5 |
$( '.shiftnav_instance_wrap' ).on( 'click' , function(e){
|
@@ -105,6 +105,10 @@ jQuery( document ).ready( function($){
|
|
105 |
else{
|
106 |
$( '.shiftnav_instance_container_wrap' ).fadeOut();
|
107 |
$( '.shiftnav_instance_delete_notice_success' ).fadeIn();
|
|
|
|
|
|
|
|
|
108 |
}
|
109 |
|
110 |
}, 'json' ).fail( function(){
|
@@ -115,6 +119,28 @@ jQuery( document ).ready( function($){
|
|
115 |
|
116 |
}
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
//Open Hash Tab
|
119 |
setTimeout( function(){
|
120 |
if( window.location.hash ){
|
1 |
jQuery( document ).ready( function($){
|
2 |
+
$( '.shiftnav_instance_notice_close, .shiftnav_instance_close' ).on( 'click' , function(){
|
3 |
$( '.shiftnav_instance_wrap' ).fadeOut();
|
4 |
});
|
5 |
$( '.shiftnav_instance_wrap' ).on( 'click' , function(e){
|
105 |
else{
|
106 |
$( '.shiftnav_instance_container_wrap' ).fadeOut();
|
107 |
$( '.shiftnav_instance_delete_notice_success' ).fadeIn();
|
108 |
+
|
109 |
+
var id = response.id;
|
110 |
+
$( '#shiftnav_'+id+', #shiftnav_'+id+'-tab' ).remove(); //delete tab and content
|
111 |
+
$( '.nav-tab-wrapper > a' ).first().click(); //switch to first tab
|
112 |
}
|
113 |
|
114 |
}, 'json' ).fail( function(){
|
119 |
|
120 |
}
|
121 |
|
122 |
+
function shift_selectText( element ) {
|
123 |
+
var doc = document
|
124 |
+
//, text = element //doc.getElementById(element)
|
125 |
+
, range, selection
|
126 |
+
;
|
127 |
+
if (doc.body.createTextRange) { //ms
|
128 |
+
range = doc.body.createTextRange();
|
129 |
+
range.moveToElementText( element );
|
130 |
+
range.select();
|
131 |
+
} else if (window.getSelection) { //all others
|
132 |
+
selection = window.getSelection();
|
133 |
+
range = doc.createRange();
|
134 |
+
range.selectNodeContents( element );
|
135 |
+
selection.removeAllRanges();
|
136 |
+
selection.addRange(range);
|
137 |
+
}
|
138 |
+
}
|
139 |
+
|
140 |
+
$( '.shiftnav-highlight-code' ).on( 'click' , function(e){
|
141 |
+
shift_selectText( $(this)[0] );
|
142 |
+
});
|
143 |
+
|
144 |
//Open Hash Tab
|
145 |
setTimeout( function(){
|
146 |
if( window.location.hash ){
|
admin/settings-api.class.php
CHANGED
@@ -256,7 +256,7 @@ class ShiftNav_Settings_API {
|
|
256 |
}
|
257 |
|
258 |
/**
|
259 |
-
* Displays a
|
260 |
*
|
261 |
* @param array $args settings field args
|
262 |
*/
|
@@ -365,10 +365,10 @@ class ShiftNav_Settings_API {
|
|
365 |
$html.= '<img src="'.$src[0].'" />';
|
366 |
}
|
367 |
$html.= '</span>';
|
368 |
-
$html.= sprintf( '<input type="hidden" class="%1$s-text image-url" id="%2$s
|
369 |
-
$html.= sprintf( '<input type="button" class="button" id="%2$s
|
370 |
$html .= sprintf( '<span class="description"> %s</span>', $args['desc'] );
|
371 |
-
$html.= '<a href="#" class="remove-button" data-target-id="'.$args['section'] .'
|
372 |
$html.= '</div>';
|
373 |
|
374 |
echo $html;
|
@@ -395,7 +395,7 @@ class ShiftNav_Settings_API {
|
|
395 |
$sanitize_callback = $this->get_sanitize_callback( $option_slug );
|
396 |
|
397 |
// If callback is set, call it
|
398 |
-
if ( $sanitize_callback ) {
|
399 |
$options[ $option_slug ] = call_user_func( $sanitize_callback, $option_value );
|
400 |
continue;
|
401 |
}
|
@@ -624,7 +624,12 @@ class ShiftNav_Settings_API {
|
|
624 |
jQuery( '.set-image-wrapper' ).on( 'click' , '.remove-button' , function(e){
|
625 |
var $wrap = $( this ).parents( '.set-image-wrapper' );
|
626 |
$wrap.find( '.image-setting-wrap' ).html( '' );
|
627 |
-
|
|
|
|
|
|
|
|
|
|
|
628 |
});
|
629 |
});
|
630 |
|
256 |
}
|
257 |
|
258 |
/**
|
259 |
+
* Displays a custom html for a settings field
|
260 |
*
|
261 |
* @param array $args settings field args
|
262 |
*/
|
365 |
$html.= '<img src="'.$src[0].'" />';
|
366 |
}
|
367 |
$html.= '</span>';
|
368 |
+
$html.= sprintf( '<input type="hidden" class="%1$s-text image-url" id="%2$s-%3$s" name="%2$s[%3$s]" value="%4$s"/>', $size, $args['section'], $args['id'], $value );
|
369 |
+
$html.= sprintf( '<input type="button" class="button" id="%2$s-%3$s_button" name="%2$s[%3$s]_button" value="Select"/>', $size, $args['section'], $args['id'] );
|
370 |
$html .= sprintf( '<span class="description"> %s</span>', $args['desc'] );
|
371 |
+
$html.= '<a href="#" class="remove-button" data-target-id="'.$args['section'] .'-'. $args['id'].'">remove</a>';
|
372 |
$html.= '</div>';
|
373 |
|
374 |
echo $html;
|
395 |
$sanitize_callback = $this->get_sanitize_callback( $option_slug );
|
396 |
|
397 |
// If callback is set, call it
|
398 |
+
if ( $sanitize_callback ) {
|
399 |
$options[ $option_slug ] = call_user_func( $sanitize_callback, $option_value );
|
400 |
continue;
|
401 |
}
|
624 |
jQuery( '.set-image-wrapper' ).on( 'click' , '.remove-button' , function(e){
|
625 |
var $wrap = $( this ).parents( '.set-image-wrapper' );
|
626 |
$wrap.find( '.image-setting-wrap' ).html( '' );
|
627 |
+
|
628 |
+
//ID contains [] so the brackets need to be escaped
|
629 |
+
var _id = $( this ).data( 'target-id' ).replace( '[' , '\\[' ).replace( ']' , '\\]' );
|
630 |
+
//console.log( _id );
|
631 |
+
$( '#' + _id ).val('');
|
632 |
+
return false;
|
633 |
});
|
634 |
});
|
635 |
|
admin/settings.config.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
function shiftnav_get_settings_fields(){
|
4 |
|
5 |
$prefix = SHIFTNAV_PREFIX;
|
@@ -66,14 +71,6 @@ function shiftnav_get_settings_fields(){
|
|
66 |
'default' => 'left'
|
67 |
),
|
68 |
|
69 |
-
array(
|
70 |
-
'name' => 'disable_menu',
|
71 |
-
'label' => __( 'Disable Menu' , 'shiftnav' ),
|
72 |
-
'desc' => __( 'Check this to disable the menu entirely; the panel can be used for custom content' , 'shiftnav' ),
|
73 |
-
'type' => 'checkbox',
|
74 |
-
'default' => 'off',
|
75 |
-
),
|
76 |
-
|
77 |
array(
|
78 |
'name' => 'skin',
|
79 |
'label' => __( 'Skin' , 'shiftnav' ),
|
@@ -149,6 +146,7 @@ function shiftnav_get_settings_fields(){
|
|
149 |
'desc' => __( '[shift_toggle_title]' , 'shiftnav' ),
|
150 |
'type' => 'textarea',
|
151 |
'default' => '[shift_toggle_title]', //get_bloginfo( 'title' )
|
|
|
152 |
),
|
153 |
array(
|
154 |
'name' => 'align',
|
@@ -213,6 +211,13 @@ function shiftnav_get_settings_fields(){
|
|
213 |
|
214 |
$fields[$prefix.'general'] = array(
|
215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
|
217 |
array(
|
218 |
'name' => 'target_size',
|
@@ -227,6 +232,52 @@ function shiftnav_get_settings_fields(){
|
|
227 |
),
|
228 |
'default' => 'default',
|
229 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
|
231 |
array(
|
232 |
'name' => 'admin_tips',
|
@@ -236,10 +287,18 @@ function shiftnav_get_settings_fields(){
|
|
236 |
'default' => 'on'
|
237 |
),
|
238 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
array(
|
240 |
'name' => 'lock_body',
|
241 |
'label' => __( 'Lock Scroll', 'shiftnav' ),
|
242 |
-
'desc' => __( '
|
243 |
'type' => 'checkbox',
|
244 |
'default' => 'on'
|
245 |
),
|
@@ -401,10 +460,19 @@ function shiftnav_settings_panel() {
|
|
401 |
|
402 |
$settings_api = _SHIFTNAV()->settings_api();
|
403 |
|
404 |
-
|
405 |
-
settings_errors();
|
406 |
|
407 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
408 |
|
409 |
do_action( 'shiftnav_settings_before' );
|
410 |
|
@@ -413,7 +481,11 @@ function shiftnav_settings_panel() {
|
|
413 |
|
414 |
do_action( 'shiftnav_settings_after' );
|
415 |
|
416 |
-
|
|
|
|
|
|
|
|
|
417 |
}
|
418 |
|
419 |
|
@@ -453,168 +525,18 @@ function shiftnav_get_instance_options( $instance ){
|
|
453 |
function shiftnav_admin_panel_styles(){
|
454 |
?>
|
455 |
<style>
|
456 |
-
.form-table th{
|
457 |
-
padding-left:15px;
|
458 |
-
}
|
459 |
-
h2.nav-tab-wrapper{
|
460 |
-
padding-left:0;
|
461 |
-
}
|
462 |
-
|
463 |
-
|
464 |
-
.shiftnav_instance_manager{
|
465 |
-
|
466 |
-
}
|
467 |
-
a.shiftnav_instance_toggle{
|
468 |
-
|
469 |
-
float:right;
|
470 |
-
}
|
471 |
-
.shiftnav_instance_container_wrap,
|
472 |
-
.shiftnav_instance_notice_wrap{
|
473 |
-
position:fixed;
|
474 |
-
z-index:999;
|
475 |
-
background:#444;
|
476 |
-
background:rgba(0,0,0,.7);
|
477 |
-
|
478 |
-
left:0;
|
479 |
-
top:0;
|
480 |
-
width:100%;
|
481 |
-
height:100%;
|
482 |
-
|
483 |
-
display:none;
|
484 |
-
}
|
485 |
-
.shiftnav_instance_container,
|
486 |
-
.shiftnav_instance_notice{
|
487 |
-
display:table;
|
488 |
-
height:auto;
|
489 |
-
|
490 |
-
background:#e9e9e9;
|
491 |
-
padding:20px;
|
492 |
-
|
493 |
-
width: 50%;
|
494 |
-
overflow: auto;
|
495 |
-
margin: auto;
|
496 |
-
position: absolute;
|
497 |
-
top: 0;
|
498 |
-
left: 0;
|
499 |
-
bottom: 0;
|
500 |
-
right: 0;
|
501 |
-
}
|
502 |
-
|
503 |
-
.shiftnav_instance_container h3{
|
504 |
-
margin-top:0;
|
505 |
-
}
|
506 |
-
|
507 |
-
form.shiftnav_instance_form{
|
508 |
-
float:left;
|
509 |
-
width:100%;
|
510 |
-
margin:0 0 20px 0;
|
511 |
|
512 |
-
}
|
513 |
-
|
514 |
-
input.shiftnav_instance_input{
|
515 |
-
padding:10px;
|
516 |
-
height:40px;
|
517 |
-
box-sizing:border-box;
|
518 |
-
display:block;
|
519 |
-
float:left;
|
520 |
-
width:80%;
|
521 |
-
margin:0;
|
522 |
-
|
523 |
-
border:none;
|
524 |
-
}
|
525 |
-
a.shiftnav_instance_button{
|
526 |
-
display:inline-block;
|
527 |
-
padding:10px;
|
528 |
-
height:40px;
|
529 |
-
|
530 |
-
box-sizing:border-box;
|
531 |
-
margin:0;
|
532 |
-
background:#12B365;
|
533 |
-
text-align:center;
|
534 |
-
color:#fff;
|
535 |
-
font-weight:bold;
|
536 |
-
cursor:pointer;
|
537 |
-
text-decoration: none;
|
538 |
-
}
|
539 |
-
.shiftnav_instance_container a.shiftnav_instance_button{
|
540 |
-
float:left;
|
541 |
-
width:20%;
|
542 |
-
}
|
543 |
-
.shiftnav_instance_form_desc{
|
544 |
-
display:block;
|
545 |
-
clear:both;
|
546 |
-
margin:20px 0;
|
547 |
-
}
|
548 |
-
a.shiftnav_instance_button_delete{
|
549 |
-
background:#B31212;
|
550 |
-
}
|
551 |
-
|
552 |
-
code.shiftnav-highlight-code{
|
553 |
-
border-left:2px solid #12B365;
|
554 |
-
background:#eee; /*#C4E9D7;*/
|
555 |
-
padding:10px;
|
556 |
-
display:block;
|
557 |
-
float:left;
|
558 |
-
font-size:11px;
|
559 |
-
max-width:500px;
|
560 |
-
}
|
561 |
-
.form-table p.shiftnav-sub-desc{
|
562 |
-
clear:both;
|
563 |
-
display:block;
|
564 |
-
padding:10px 0;
|
565 |
-
}
|
566 |
-
|
567 |
-
.shiftnav-desc-row{
|
568 |
-
display:block;
|
569 |
-
float:left;
|
570 |
-
clear:both;
|
571 |
-
margin-bottom:10px;
|
572 |
-
}
|
573 |
-
.shiftnav-code-snippet-type{
|
574 |
-
float:left;
|
575 |
-
clear:both;
|
576 |
-
width:60px;
|
577 |
-
padding:10px;
|
578 |
-
font-size:11px;
|
579 |
-
text-transform: uppercase;
|
580 |
-
text-align:right;
|
581 |
-
}
|
582 |
-
|
583 |
-
h4.shiftnav-settings-section{
|
584 |
-
color:#666;
|
585 |
-
font-size:16px;
|
586 |
-
}
|
587 |
-
.shiftnav-desc-understated{
|
588 |
-
font-size:12px;
|
589 |
-
color:#999;
|
590 |
-
font-style:italic;
|
591 |
-
}
|
592 |
-
.image-setting-wrap{
|
593 |
-
float:left;
|
594 |
-
}
|
595 |
-
.image-setting-wrap img{
|
596 |
-
max-width:200px;
|
597 |
-
background:#eee;
|
598 |
-
}
|
599 |
-
.set-image-wrapper input.button{
|
600 |
-
clear:both;
|
601 |
-
float:left;
|
602 |
-
margin:10px 10px 10px 0;
|
603 |
-
}
|
604 |
-
.remove-button{
|
605 |
-
font-size:10px;
|
606 |
-
float:left;
|
607 |
-
padding:15px;
|
608 |
-
}
|
609 |
</style>
|
610 |
<?php
|
611 |
}
|
612 |
-
add_action( 'admin_head-appearance_page_shiftnav-settings' , 'shiftnav_admin_panel_styles' );
|
613 |
|
614 |
function shiftnav_admin_panel_assets( $hook ){
|
615 |
|
616 |
if( $hook == 'appearance_page_shiftnav-settings' ){
|
617 |
wp_enqueue_script( 'shiftnav' , SHIFTNAV_URL . 'admin/assets/admin.settings.js' );
|
|
|
|
|
618 |
}
|
619 |
}
|
620 |
add_action( 'admin_enqueue_scripts' , 'shiftnav_admin_panel_assets' );
|
1 |
<?php
|
2 |
|
3 |
+
function shiftnav_settings_links(){
|
4 |
+
echo '<a target="_blank" class="button button-primary" href="http://sevenspark.com/docs/shiftnav"><i class="fa fa-book"></i> Knowledgebase</a> ';
|
5 |
+
}
|
6 |
+
add_action( 'shiftnav_settings_before_title' , 'shiftnav_settings_links' );
|
7 |
+
|
8 |
function shiftnav_get_settings_fields(){
|
9 |
|
10 |
$prefix = SHIFTNAV_PREFIX;
|
71 |
'default' => 'left'
|
72 |
),
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
array(
|
75 |
'name' => 'skin',
|
76 |
'label' => __( 'Skin' , 'shiftnav' ),
|
146 |
'desc' => __( '[shift_toggle_title]' , 'shiftnav' ),
|
147 |
'type' => 'textarea',
|
148 |
'default' => '[shift_toggle_title]', //get_bloginfo( 'title' )
|
149 |
+
'sanitize_callback' => 'shiftnav_allow_html',
|
150 |
),
|
151 |
array(
|
152 |
'name' => 'align',
|
211 |
|
212 |
$fields[$prefix.'general'] = array(
|
213 |
|
214 |
+
array(
|
215 |
+
'name' => 'css_tweaks',
|
216 |
+
'label' => __( 'CSS Tweaks' , 'shiftnav' ),
|
217 |
+
'desc' => __( 'Add custom CSS here, which will be printed in the site head.' , 'shiftnav' ),
|
218 |
+
'type' => 'textarea',
|
219 |
+
'sanitize_callback' => 'shiftnav_allow_html',
|
220 |
+
),
|
221 |
|
222 |
array(
|
223 |
'name' => 'target_size',
|
232 |
),
|
233 |
'default' => 'default',
|
234 |
),
|
235 |
+
|
236 |
+
array(
|
237 |
+
'name' => 'text_size',
|
238 |
+
'label' => __( 'Text Size', 'shiftnav' ),
|
239 |
+
'desc' => __( 'The size of the font on the links in the menu (will override all levels).', 'shiftnav' ),
|
240 |
+
'type' => 'radio',
|
241 |
+
'options' => array(
|
242 |
+
'default' => 'Default',
|
243 |
+
'small' => 'Small',
|
244 |
+
'medium' => 'Medium',
|
245 |
+
'large' => 'Large',
|
246 |
+
'enormous' => 'Enormous',
|
247 |
+
),
|
248 |
+
'default' => 'default',
|
249 |
+
),
|
250 |
+
|
251 |
+
array(
|
252 |
+
'name' => 'icon_size',
|
253 |
+
'label' => __( 'Icon Size', 'shiftnav' ),
|
254 |
+
'desc' => __( 'The size of the icons in the menu.', 'shiftnav' ),
|
255 |
+
'type' => 'radio',
|
256 |
+
'options' => array(
|
257 |
+
'default' => 'Default',
|
258 |
+
'small' => 'Small',
|
259 |
+
'medium' => 'Medium',
|
260 |
+
'large' => 'Large',
|
261 |
+
'enormous' => 'Enormous',
|
262 |
+
),
|
263 |
+
'default' => 'default',
|
264 |
+
),
|
265 |
+
|
266 |
+
array(
|
267 |
+
'name' => 'shift_body',
|
268 |
+
'label' => __( 'Shift Body', 'shiftnav' ),
|
269 |
+
'desc' => __( 'Shift the body of the site when the menu is revealed. For some themes, this may negatively affect the site content, so this can be disabled.', 'shiftnav' ),
|
270 |
+
'type' => 'checkbox',
|
271 |
+
'default' => 'on'
|
272 |
+
),
|
273 |
+
|
274 |
+
array(
|
275 |
+
'name' => 'active_on_hover',
|
276 |
+
'label' => __( 'Highlight Targets on Hover', 'shiftnav' ),
|
277 |
+
'desc' => __( 'With this setting enabled, the links will be highlighted when hovered or touched.', 'shiftnav' ),
|
278 |
+
'type' => 'checkbox',
|
279 |
+
'default' => 'on'
|
280 |
+
),
|
281 |
|
282 |
array(
|
283 |
'name' => 'admin_tips',
|
287 |
'default' => 'on'
|
288 |
),
|
289 |
|
290 |
+
array(
|
291 |
+
'name' => 'lock_body_x',
|
292 |
+
'label' => __( 'Lock Horizontal Scroll', 'shiftnav' ),
|
293 |
+
'desc' => __( 'Attempt to prevent the content from scrolling horizontally when the menu is active. On some themes, may also prevent vertical scrolling. May not prevent touch scrolling in Chrome. No effect if <strong>Shift Body</strong> is disabled.', 'shiftnav' ),
|
294 |
+
'type' => 'checkbox',
|
295 |
+
'default' => 'off'
|
296 |
+
),
|
297 |
+
|
298 |
array(
|
299 |
'name' => 'lock_body',
|
300 |
'label' => __( 'Lock Scroll', 'shiftnav' ),
|
301 |
+
'desc' => __( 'Lock both vertical and horizontal scrolling on site content when menu is active. No effect if <strong>Shift Body</strong> is disabled.', 'shiftnav' ),
|
302 |
'type' => 'checkbox',
|
303 |
'default' => 'on'
|
304 |
),
|
460 |
|
461 |
$settings_api = _SHIFTNAV()->settings_api();
|
462 |
|
463 |
+
?>
|
|
|
464 |
|
465 |
+
<div class="wrap">
|
466 |
+
|
467 |
+
<?php settings_errors(); ?>
|
468 |
+
|
469 |
+
<div class="shiftnav-settings-links">
|
470 |
+
<?php do_action( 'shiftnav_settings_before_title' ); ?>
|
471 |
+
</div>
|
472 |
+
|
473 |
+
<h2>ShiftNav <?php if( SHIFTNAV_PRO ) echo 'Pro <i class="fa fa-rocket"></i>'; ?></h2>
|
474 |
+
|
475 |
+
<?php
|
476 |
|
477 |
do_action( 'shiftnav_settings_before' );
|
478 |
|
481 |
|
482 |
do_action( 'shiftnav_settings_after' );
|
483 |
|
484 |
+
?>
|
485 |
+
|
486 |
+
</div>
|
487 |
+
|
488 |
+
<?php
|
489 |
}
|
490 |
|
491 |
|
525 |
function shiftnav_admin_panel_styles(){
|
526 |
?>
|
527 |
<style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
528 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
529 |
</style>
|
530 |
<?php
|
531 |
}
|
532 |
+
//add_action( 'admin_head-appearance_page_shiftnav-settings' , 'shiftnav_admin_panel_styles' );
|
533 |
|
534 |
function shiftnav_admin_panel_assets( $hook ){
|
535 |
|
536 |
if( $hook == 'appearance_page_shiftnav-settings' ){
|
537 |
wp_enqueue_script( 'shiftnav' , SHIFTNAV_URL . 'admin/assets/admin.settings.js' );
|
538 |
+
wp_enqueue_style( 'shiftnav-settings-styles' , SHIFTNAV_URL.'admin/assets/admin.settings.css' );
|
539 |
+
wp_enqueue_style( 'shiftnav-font-awesome' , SHIFTNAV_URL.'assets/css/fontawesome/css/font-awesome.min.css' );
|
540 |
}
|
541 |
}
|
542 |
add_action( 'admin_enqueue_scripts' , 'shiftnav_admin_panel_assets' );
|
assets/css/less/base.less
CHANGED
@@ -13,9 +13,12 @@
|
|
13 |
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
14 |
}
|
15 |
|
16 |
-
body.shiftnav-lock.shiftnav-enabled{
|
17 |
overflow-x:hidden;
|
18 |
}
|
|
|
|
|
|
|
19 |
body.shiftnav-open{
|
20 |
/*overflow:hidden;*/
|
21 |
}
|
13 |
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
14 |
}
|
15 |
|
16 |
+
body.shiftnav-lock-x.shiftnav-enabled{
|
17 |
overflow-x:hidden;
|
18 |
}
|
19 |
+
body.shiftnav-lock.shiftnav-open{
|
20 |
+
overflow:hidden;
|
21 |
+
}
|
22 |
body.shiftnav-open{
|
23 |
/*overflow:hidden;*/
|
24 |
}
|
assets/css/less/misc.less
CHANGED
@@ -1,3 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
.shiftnav-admin-tip{
|
2 |
background:#eee;
|
3 |
color:#333;
|
1 |
+
.shiftnav-content-wrap{
|
2 |
+
padding:25px;
|
3 |
+
}
|
4 |
+
.shiftnav-content-wrap-small{
|
5 |
+
padding:10px;
|
6 |
+
}
|
7 |
+
|
8 |
.shiftnav-admin-tip{
|
9 |
background:#eee;
|
10 |
color:#333;
|
assets/css/less/panel.less
CHANGED
@@ -11,8 +11,7 @@
|
|
11 |
background:white;
|
12 |
z-index:6000;
|
13 |
overflow-y:auto;
|
14 |
-
overflow-x:hidden;
|
15 |
-
-webkit-overflow-scrolling:touch;
|
16 |
|
17 |
-webkit-transition: -webkit-transform 0.5s;
|
18 |
-moz-transition: -moz-transform 0.5s;
|
@@ -20,6 +19,11 @@
|
|
20 |
-o-transition: -o-transform 0.5s;
|
21 |
transition: transform 0.5s;
|
22 |
}
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
.shiftnav.shiftnav-left-edge{
|
25 |
left:0;
|
@@ -84,8 +88,8 @@
|
|
84 |
|
85 |
|
86 |
/* Menu Image */
|
87 |
-
.shiftnav .shiftnav-menu-image{
|
88 |
-
padding:
|
89 |
}
|
90 |
.shiftnav .shiftnav-menu-image img{
|
91 |
max-width:100%;
|
@@ -96,6 +100,7 @@
|
|
96 |
/* Menu */
|
97 |
.shiftnav ul.shiftnav-menu{
|
98 |
position:relative;
|
|
|
99 |
}
|
100 |
.shiftnav ul.shiftnav-menu,
|
101 |
.shiftnav ul.shiftnav-menu ul.sub-menu{
|
@@ -117,6 +122,12 @@
|
|
117 |
text-decoration: none;
|
118 |
position:relative;
|
119 |
cursor:pointer;
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
}
|
121 |
.shiftnav ul.shiftnav-menu li.menu-item.shiftnav-has-icon > .shiftnav-target > i.shiftnav-icon{
|
122 |
margin-right:.8em;
|
@@ -126,6 +137,9 @@
|
|
126 |
width:1.2em;
|
127 |
text-align:center;
|
128 |
}
|
|
|
|
|
|
|
129 |
.shiftnav ul.shiftnav-menu li.menu-item.shiftnav-has-icon > .shiftnav-target > span.shiftnav-target-text{
|
130 |
vertical-align:middle;
|
131 |
display:inline-block;
|
@@ -152,20 +166,61 @@
|
|
152 |
left:0;
|
153 |
}
|
154 |
|
155 |
-
/* Medium */
|
156 |
.shiftnav ul.shiftnav-menu.shiftnav-targets-medium li.menu-item > .shiftnav-target{
|
157 |
padding-top:10px !important;
|
158 |
padding-bottom:10px !important;
|
159 |
}
|
160 |
|
161 |
-
/* Large */
|
162 |
.shiftnav ul.shiftnav-menu.shiftnav-targets-large li.menu-item > .shiftnav-target{
|
163 |
padding-top:16px !important;
|
164 |
padding-bottom:16px !important;
|
165 |
}
|
166 |
|
167 |
-
/* Enormous */
|
168 |
.shiftnav ul.shiftnav-menu.shiftnav-targets-enormous li.menu-item > .shiftnav-target{
|
169 |
padding-top:24px !important;
|
170 |
padding-bottom:24px !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
}
|
11 |
background:white;
|
12 |
z-index:6000;
|
13 |
overflow-y:auto;
|
14 |
+
overflow-x:hidden;
|
|
|
15 |
|
16 |
-webkit-transition: -webkit-transform 0.5s;
|
17 |
-moz-transition: -moz-transform 0.5s;
|
19 |
-o-transition: -o-transform 0.5s;
|
20 |
transition: transform 0.5s;
|
21 |
}
|
22 |
+
.shiftnav-inner{
|
23 |
+
-webkit-overflow-scrolling:touch;
|
24 |
+
height:100%;
|
25 |
+
overflow-y:scroll;
|
26 |
+
}
|
27 |
|
28 |
.shiftnav.shiftnav-left-edge{
|
29 |
left:0;
|
88 |
|
89 |
|
90 |
/* Menu Image */
|
91 |
+
.shiftnav .shiftnav-menu-image-padded{
|
92 |
+
padding:25px;
|
93 |
}
|
94 |
.shiftnav .shiftnav-menu-image img{
|
95 |
max-width:100%;
|
100 |
/* Menu */
|
101 |
.shiftnav ul.shiftnav-menu{
|
102 |
position:relative;
|
103 |
+
clear:both;
|
104 |
}
|
105 |
.shiftnav ul.shiftnav-menu,
|
106 |
.shiftnav ul.shiftnav-menu ul.sub-menu{
|
122 |
text-decoration: none;
|
123 |
position:relative;
|
124 |
cursor:pointer;
|
125 |
+
|
126 |
+
-webkit-transition:.2s all ease;
|
127 |
+
-moz-transition:.2s all ease;
|
128 |
+
-ms-transition:.2s all ease;
|
129 |
+
-o-transition:.2s all ease;
|
130 |
+
transition:.2s all ease;
|
131 |
}
|
132 |
.shiftnav ul.shiftnav-menu li.menu-item.shiftnav-has-icon > .shiftnav-target > i.shiftnav-icon{
|
133 |
margin-right:.8em;
|
137 |
width:1.2em;
|
138 |
text-align:center;
|
139 |
}
|
140 |
+
.shiftnav ul.shiftnav-menu li.menu-item.shiftnav-has-icon > .shiftnav-target > i.shiftnav-icon:before{
|
141 |
+
vertical-align:top;
|
142 |
+
}
|
143 |
.shiftnav ul.shiftnav-menu li.menu-item.shiftnav-has-icon > .shiftnav-target > span.shiftnav-target-text{
|
144 |
vertical-align:middle;
|
145 |
display:inline-block;
|
166 |
left:0;
|
167 |
}
|
168 |
|
169 |
+
/* Buttons Medium */
|
170 |
.shiftnav ul.shiftnav-menu.shiftnav-targets-medium li.menu-item > .shiftnav-target{
|
171 |
padding-top:10px !important;
|
172 |
padding-bottom:10px !important;
|
173 |
}
|
174 |
|
175 |
+
/* Buttons Large */
|
176 |
.shiftnav ul.shiftnav-menu.shiftnav-targets-large li.menu-item > .shiftnav-target{
|
177 |
padding-top:16px !important;
|
178 |
padding-bottom:16px !important;
|
179 |
}
|
180 |
|
181 |
+
/* Buttons Enormous */
|
182 |
.shiftnav ul.shiftnav-menu.shiftnav-targets-enormous li.menu-item > .shiftnav-target{
|
183 |
padding-top:24px !important;
|
184 |
padding-bottom:24px !important;
|
185 |
+
}
|
186 |
+
|
187 |
+
/* Text Small */
|
188 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-text-small li.menu-item > .shiftnav-target{
|
189 |
+
font-size:12px !important;
|
190 |
+
}
|
191 |
+
/* Text Medium */
|
192 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-text-medium li.menu-item > .shiftnav-target{
|
193 |
+
font-size:14px !important;
|
194 |
+
}
|
195 |
+
/* Text Large */
|
196 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-text-large li.menu-item > .shiftnav-target{
|
197 |
+
font-size:16px !important;
|
198 |
+
}
|
199 |
+
/* Text Enormous */
|
200 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-text-enormous li.menu-item > .shiftnav-target{
|
201 |
+
font-size:22px !important;
|
202 |
+
}
|
203 |
+
|
204 |
+
|
205 |
+
/* Icons Small */
|
206 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-icon-small li.menu-item > .shiftnav-target > i.shiftnav-icon{
|
207 |
+
font-size:100% !important;
|
208 |
+
}
|
209 |
+
/* Icons Medium */
|
210 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-icon-medium li.menu-item > .shiftnav-target > i.shiftnav-icon{
|
211 |
+
font-size:140% !important;
|
212 |
+
}
|
213 |
+
/* Icons Large */
|
214 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-icon-large li.menu-item > .shiftnav-target > i.shiftnav-icon{
|
215 |
+
font-size:180% !important;
|
216 |
+
}
|
217 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-icon-large li.menu-item.shiftnav-has-icon > .shiftnav-target > i.shiftnav-icon:before{
|
218 |
+
vertical-align:middle;
|
219 |
+
}
|
220 |
+
/* Icons Enormous */
|
221 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-icon-enormous li.menu-item > .shiftnav-target > i.shiftnav-icon{
|
222 |
+
font-size:250% !important;
|
223 |
+
}
|
224 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-icon-enormous li.menu-item.shiftnav-has-icon > .shiftnav-target > i.shiftnav-icon:before{
|
225 |
+
vertical-align:middle;
|
226 |
}
|
assets/css/less/toggle.less
CHANGED
@@ -41,12 +41,19 @@
|
|
41 |
#shiftnav-toggle-main:before{
|
42 |
position:absolute;
|
43 |
left:20px;
|
44 |
-
content: '\2261'
|
45 |
-
|
46 |
-
|
47 |
-
content: "\f0c9";
|
48 |
font-family: FontAwesome;
|
49 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
.shiftnav-force #shiftnav-toggle-main{
|
52 |
display:block !important;
|
41 |
#shiftnav-toggle-main:before{
|
42 |
position:absolute;
|
43 |
left:20px;
|
44 |
+
/*content: '\2261';*/
|
45 |
+
content: '\f0c9';
|
|
|
|
|
46 |
font-family: FontAwesome;
|
47 |
}
|
48 |
+
.shiftnav-open-right #shiftnav-toggle-main:before,
|
49 |
+
#shiftnav-toggle-main.shiftnav-toggle-edge-right:before{
|
50 |
+
left:auto;
|
51 |
+
right:20px;
|
52 |
+
}
|
53 |
+
.shiftnav-open-left #shiftnav-toggle-main.shiftnav-toggle-edge-right:before{
|
54 |
+
left:20px;
|
55 |
+
right:auto;
|
56 |
+
}
|
57 |
|
58 |
.shiftnav-force #shiftnav-toggle-main{
|
59 |
display:block !important;
|
assets/css/less/wrap.less
CHANGED
@@ -14,13 +14,12 @@
|
|
14 |
}
|
15 |
.shiftnav-open .shiftnav-wrap{
|
16 |
height:100%;
|
17 |
-
-webkit-overflow-scrolling: touch;
|
18 |
|
19 |
-
-webkit-transition-delay: .
|
20 |
-
-moz-transition-delay: .
|
21 |
-
-ms-transition-delay: .
|
22 |
-
-o-transition-delay: .
|
23 |
-
transition-delay: .
|
24 |
}
|
25 |
|
26 |
/* Shadow */
|
14 |
}
|
15 |
.shiftnav-open .shiftnav-wrap{
|
16 |
height:100%;
|
|
|
17 |
|
18 |
+
-webkit-transition-delay: .01s;
|
19 |
+
-moz-transition-delay: .01s;
|
20 |
+
-ms-transition-delay: .01s;
|
21 |
+
-o-transition-delay: .01s;
|
22 |
+
transition-delay: .01s;
|
23 |
}
|
24 |
|
25 |
/* Shadow */
|
assets/css/shiftnav.css
CHANGED
@@ -12,12 +12,14 @@
|
|
12 |
line-height: 1.3em;
|
13 |
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
14 |
}
|
15 |
-
body.shiftnav-lock.shiftnav-enabled {
|
16 |
overflow-x: hidden;
|
17 |
}
|
|
|
|
|
|
|
18 |
body.shiftnav-open {
|
19 |
/*overflow:hidden;*/
|
20 |
-
|
21 |
}
|
22 |
body.shiftnav-transition {
|
23 |
overflow: visible;
|
@@ -25,7 +27,6 @@ body.shiftnav-transition {
|
|
25 |
body.shiftnav-enabled.shiftnav-open.admin-bar,
|
26 |
body.shiftnav-enabled.shiftnav-transition.admin-bar {
|
27 |
/*margin-top:-28px;*/
|
28 |
-
|
29 |
}
|
30 |
/* TOGGLE */
|
31 |
.shiftnav-toggle {
|
@@ -55,7 +56,6 @@ body.shiftnav-enabled.shiftnav-transition.admin-bar {
|
|
55 |
}
|
56 |
#shiftnav-toggle-main {
|
57 |
/* dark skin */
|
58 |
-
|
59 |
background: #1D1D20;
|
60 |
color: #eee;
|
61 |
}
|
@@ -67,11 +67,19 @@ body.shiftnav-enabled.shiftnav-transition.admin-bar {
|
|
67 |
#shiftnav-toggle-main:before {
|
68 |
position: absolute;
|
69 |
left: 20px;
|
70 |
-
content: '\2261'
|
71 |
-
|
72 |
-
content: "\f0c9";
|
73 |
font-family: FontAwesome;
|
74 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
.shiftnav-force #shiftnav-toggle-main {
|
76 |
display: block !important;
|
77 |
}
|
@@ -129,12 +137,11 @@ body.admin-bar .shiftnav {
|
|
129 |
}
|
130 |
.shiftnav-open .shiftnav-wrap {
|
131 |
height: 100%;
|
132 |
-
-webkit-
|
133 |
-
-
|
134 |
-
-
|
135 |
-
-
|
136 |
-
|
137 |
-
transition-delay: .02s;
|
138 |
}
|
139 |
/* Shadow */
|
140 |
.shiftnav:after {
|
@@ -170,13 +177,17 @@ body.admin-bar .shiftnav {
|
|
170 |
z-index: 6000;
|
171 |
overflow-y: auto;
|
172 |
overflow-x: hidden;
|
173 |
-
-webkit-overflow-scrolling: touch;
|
174 |
-webkit-transition: -webkit-transform 0.5s;
|
175 |
-moz-transition: -moz-transform 0.5s;
|
176 |
-ms-transition: -ms-transform 0.5s;
|
177 |
-o-transition: -o-transform 0.5s;
|
178 |
transition: transform 0.5s;
|
179 |
}
|
|
|
|
|
|
|
|
|
|
|
180 |
.shiftnav.shiftnav-left-edge {
|
181 |
left: 0;
|
182 |
}
|
@@ -233,8 +244,8 @@ body.admin-bar .shiftnav {
|
|
233 |
text-decoration: none;
|
234 |
}
|
235 |
/* Menu Image */
|
236 |
-
.shiftnav .shiftnav-menu-image {
|
237 |
-
padding:
|
238 |
}
|
239 |
.shiftnav .shiftnav-menu-image img {
|
240 |
max-width: 100%;
|
@@ -243,6 +254,7 @@ body.admin-bar .shiftnav {
|
|
243 |
/* Menu */
|
244 |
.shiftnav ul.shiftnav-menu {
|
245 |
position: relative;
|
|
|
246 |
}
|
247 |
.shiftnav ul.shiftnav-menu,
|
248 |
.shiftnav ul.shiftnav-menu ul.sub-menu {
|
@@ -264,6 +276,11 @@ body.admin-bar .shiftnav {
|
|
264 |
text-decoration: none;
|
265 |
position: relative;
|
266 |
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
|
267 |
}
|
268 |
.shiftnav ul.shiftnav-menu li.menu-item.shiftnav-has-icon > .shiftnav-target > i.shiftnav-icon {
|
269 |
margin-right: .8em;
|
@@ -273,6 +290,9 @@ body.admin-bar .shiftnav {
|
|
273 |
width: 1.2em;
|
274 |
text-align: center;
|
275 |
}
|
|
|
|
|
|
|
276 |
.shiftnav ul.shiftnav-menu li.menu-item.shiftnav-has-icon > .shiftnav-target > span.shiftnav-target-text {
|
277 |
vertical-align: middle;
|
278 |
display: inline-block;
|
@@ -288,29 +308,65 @@ body.admin-bar .shiftnav {
|
|
288 |
/* Menu Items */
|
289 |
.shiftnav.shiftnav-sub-shift-active ul.shiftnav-menu > li.menu-item {
|
290 |
/*margin-left:100%;*/
|
291 |
-
|
292 |
left: 100%;
|
293 |
}
|
294 |
.shiftnav.shiftnav-sub-shift-active ul.shiftnav-menu > li.menu-item.shiftnav-active {
|
295 |
/*margin-left:0;*/
|
296 |
-
|
297 |
left: 0;
|
298 |
}
|
299 |
-
/* Medium */
|
300 |
.shiftnav ul.shiftnav-menu.shiftnav-targets-medium li.menu-item > .shiftnav-target {
|
301 |
padding-top: 10px !important;
|
302 |
padding-bottom: 10px !important;
|
303 |
}
|
304 |
-
/* Large */
|
305 |
.shiftnav ul.shiftnav-menu.shiftnav-targets-large li.menu-item > .shiftnav-target {
|
306 |
padding-top: 16px !important;
|
307 |
padding-bottom: 16px !important;
|
308 |
}
|
309 |
-
/* Enormous */
|
310 |
.shiftnav ul.shiftnav-menu.shiftnav-targets-enormous li.menu-item > .shiftnav-target {
|
311 |
padding-top: 24px !important;
|
312 |
padding-bottom: 24px !important;
|
313 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
314 |
/* RESPONSIVENESS */
|
315 |
@media only screen and (max-width: 960px) {
|
316 |
#shiftnav-toggle-main {
|
@@ -345,6 +401,12 @@ body.admin-bar .shiftnav {
|
|
345 |
margin: 0;
|
346 |
}
|
347 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
348 |
.shiftnav-admin-tip {
|
349 |
background: #eee;
|
350 |
color: #333;
|
12 |
line-height: 1.3em;
|
13 |
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
14 |
}
|
15 |
+
body.shiftnav-lock-x.shiftnav-enabled {
|
16 |
overflow-x: hidden;
|
17 |
}
|
18 |
+
body.shiftnav-lock.shiftnav-open {
|
19 |
+
overflow: hidden;
|
20 |
+
}
|
21 |
body.shiftnav-open {
|
22 |
/*overflow:hidden;*/
|
|
|
23 |
}
|
24 |
body.shiftnav-transition {
|
25 |
overflow: visible;
|
27 |
body.shiftnav-enabled.shiftnav-open.admin-bar,
|
28 |
body.shiftnav-enabled.shiftnav-transition.admin-bar {
|
29 |
/*margin-top:-28px;*/
|
|
|
30 |
}
|
31 |
/* TOGGLE */
|
32 |
.shiftnav-toggle {
|
56 |
}
|
57 |
#shiftnav-toggle-main {
|
58 |
/* dark skin */
|
|
|
59 |
background: #1D1D20;
|
60 |
color: #eee;
|
61 |
}
|
67 |
#shiftnav-toggle-main:before {
|
68 |
position: absolute;
|
69 |
left: 20px;
|
70 |
+
/*content: '\2261';*/
|
71 |
+
content: '\f0c9';
|
|
|
72 |
font-family: FontAwesome;
|
73 |
}
|
74 |
+
.shiftnav-open-right #shiftnav-toggle-main:before,
|
75 |
+
#shiftnav-toggle-main.shiftnav-toggle-edge-right:before {
|
76 |
+
left: auto;
|
77 |
+
right: 20px;
|
78 |
+
}
|
79 |
+
.shiftnav-open-left #shiftnav-toggle-main.shiftnav-toggle-edge-right:before {
|
80 |
+
left: 20px;
|
81 |
+
right: auto;
|
82 |
+
}
|
83 |
.shiftnav-force #shiftnav-toggle-main {
|
84 |
display: block !important;
|
85 |
}
|
137 |
}
|
138 |
.shiftnav-open .shiftnav-wrap {
|
139 |
height: 100%;
|
140 |
+
-webkit-transition-delay: .01s;
|
141 |
+
-moz-transition-delay: .01s;
|
142 |
+
-ms-transition-delay: .01s;
|
143 |
+
-o-transition-delay: .01s;
|
144 |
+
transition-delay: .01s;
|
|
|
145 |
}
|
146 |
/* Shadow */
|
147 |
.shiftnav:after {
|
177 |
z-index: 6000;
|
178 |
overflow-y: auto;
|
179 |
overflow-x: hidden;
|
|
|
180 |
-webkit-transition: -webkit-transform 0.5s;
|
181 |
-moz-transition: -moz-transform 0.5s;
|
182 |
-ms-transition: -ms-transform 0.5s;
|
183 |
-o-transition: -o-transform 0.5s;
|
184 |
transition: transform 0.5s;
|
185 |
}
|
186 |
+
.shiftnav-inner {
|
187 |
+
-webkit-overflow-scrolling: touch;
|
188 |
+
height: 100%;
|
189 |
+
overflow-y: scroll;
|
190 |
+
}
|
191 |
.shiftnav.shiftnav-left-edge {
|
192 |
left: 0;
|
193 |
}
|
244 |
text-decoration: none;
|
245 |
}
|
246 |
/* Menu Image */
|
247 |
+
.shiftnav .shiftnav-menu-image-padded {
|
248 |
+
padding: 25px;
|
249 |
}
|
250 |
.shiftnav .shiftnav-menu-image img {
|
251 |
max-width: 100%;
|
254 |
/* Menu */
|
255 |
.shiftnav ul.shiftnav-menu {
|
256 |
position: relative;
|
257 |
+
clear: both;
|
258 |
}
|
259 |
.shiftnav ul.shiftnav-menu,
|
260 |
.shiftnav ul.shiftnav-menu ul.sub-menu {
|
276 |
text-decoration: none;
|
277 |
position: relative;
|
278 |
cursor: pointer;
|
279 |
+
-webkit-transition: .2s all ease;
|
280 |
+
-moz-transition: .2s all ease;
|
281 |
+
-ms-transition: .2s all ease;
|
282 |
+
-o-transition: .2s all ease;
|
283 |
+
transition: .2s all ease;
|
284 |
}
|
285 |
.shiftnav ul.shiftnav-menu li.menu-item.shiftnav-has-icon > .shiftnav-target > i.shiftnav-icon {
|
286 |
margin-right: .8em;
|
290 |
width: 1.2em;
|
291 |
text-align: center;
|
292 |
}
|
293 |
+
.shiftnav ul.shiftnav-menu li.menu-item.shiftnav-has-icon > .shiftnav-target > i.shiftnav-icon:before {
|
294 |
+
vertical-align: top;
|
295 |
+
}
|
296 |
.shiftnav ul.shiftnav-menu li.menu-item.shiftnav-has-icon > .shiftnav-target > span.shiftnav-target-text {
|
297 |
vertical-align: middle;
|
298 |
display: inline-block;
|
308 |
/* Menu Items */
|
309 |
.shiftnav.shiftnav-sub-shift-active ul.shiftnav-menu > li.menu-item {
|
310 |
/*margin-left:100%;*/
|
|
|
311 |
left: 100%;
|
312 |
}
|
313 |
.shiftnav.shiftnav-sub-shift-active ul.shiftnav-menu > li.menu-item.shiftnav-active {
|
314 |
/*margin-left:0;*/
|
|
|
315 |
left: 0;
|
316 |
}
|
317 |
+
/* Buttons Medium */
|
318 |
.shiftnav ul.shiftnav-menu.shiftnav-targets-medium li.menu-item > .shiftnav-target {
|
319 |
padding-top: 10px !important;
|
320 |
padding-bottom: 10px !important;
|
321 |
}
|
322 |
+
/* Buttons Large */
|
323 |
.shiftnav ul.shiftnav-menu.shiftnav-targets-large li.menu-item > .shiftnav-target {
|
324 |
padding-top: 16px !important;
|
325 |
padding-bottom: 16px !important;
|
326 |
}
|
327 |
+
/* Buttons Enormous */
|
328 |
.shiftnav ul.shiftnav-menu.shiftnav-targets-enormous li.menu-item > .shiftnav-target {
|
329 |
padding-top: 24px !important;
|
330 |
padding-bottom: 24px !important;
|
331 |
}
|
332 |
+
/* Text Small */
|
333 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-text-small li.menu-item > .shiftnav-target {
|
334 |
+
font-size: 12px !important;
|
335 |
+
}
|
336 |
+
/* Text Medium */
|
337 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-text-medium li.menu-item > .shiftnav-target {
|
338 |
+
font-size: 14px !important;
|
339 |
+
}
|
340 |
+
/* Text Large */
|
341 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-text-large li.menu-item > .shiftnav-target {
|
342 |
+
font-size: 16px !important;
|
343 |
+
}
|
344 |
+
/* Text Enormous */
|
345 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-text-enormous li.menu-item > .shiftnav-target {
|
346 |
+
font-size: 22px !important;
|
347 |
+
}
|
348 |
+
/* Icons Small */
|
349 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-icon-small li.menu-item > .shiftnav-target > i.shiftnav-icon {
|
350 |
+
font-size: 100% !important;
|
351 |
+
}
|
352 |
+
/* Icons Medium */
|
353 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-icon-medium li.menu-item > .shiftnav-target > i.shiftnav-icon {
|
354 |
+
font-size: 140% !important;
|
355 |
+
}
|
356 |
+
/* Icons Large */
|
357 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-icon-large li.menu-item > .shiftnav-target > i.shiftnav-icon {
|
358 |
+
font-size: 180% !important;
|
359 |
+
}
|
360 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-icon-large li.menu-item.shiftnav-has-icon > .shiftnav-target > i.shiftnav-icon:before {
|
361 |
+
vertical-align: middle;
|
362 |
+
}
|
363 |
+
/* Icons Enormous */
|
364 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-icon-enormous li.menu-item > .shiftnav-target > i.shiftnav-icon {
|
365 |
+
font-size: 250% !important;
|
366 |
+
}
|
367 |
+
.shiftnav ul.shiftnav-menu.shiftnav-targets-icon-enormous li.menu-item.shiftnav-has-icon > .shiftnav-target > i.shiftnav-icon:before {
|
368 |
+
vertical-align: middle;
|
369 |
+
}
|
370 |
/* RESPONSIVENESS */
|
371 |
@media only screen and (max-width: 960px) {
|
372 |
#shiftnav-toggle-main {
|
401 |
margin: 0;
|
402 |
}
|
403 |
}
|
404 |
+
.shiftnav-content-wrap {
|
405 |
+
padding: 25px;
|
406 |
+
}
|
407 |
+
.shiftnav-content-wrap-small {
|
408 |
+
padding: 10px;
|
409 |
+
}
|
410 |
.shiftnav-admin-tip {
|
411 |
background: #eee;
|
412 |
color: #333;
|
assets/css/skins/light.css
CHANGED
@@ -1,9 +1,3 @@
|
|
1 |
-
.shiftnav-activated-style {
|
2 |
-
color: #ffffff;
|
3 |
-
background: #007aff;
|
4 |
-
border-top-color: transparent;
|
5 |
-
border-bottom-color: transparent;
|
6 |
-
}
|
7 |
.shiftnav.shiftnav-skin-light {
|
8 |
font-size: 13px;
|
9 |
line-height: 1.3em;
|
@@ -17,6 +11,12 @@
|
|
17 |
font-weight: normal;
|
18 |
color: #333333;
|
19 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
.shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item > .shiftnav-target {
|
21 |
color: #666666;
|
22 |
font-size: 13px;
|
@@ -38,18 +38,21 @@
|
|
38 |
background: rgba(0, 0, 0, 0.1);
|
39 |
color: #eeeeee;
|
40 |
}
|
41 |
-
.shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item.shiftnav-highlight > .shiftnav-target
|
|
|
42 |
color: #007aff;
|
43 |
background: transparent;
|
44 |
}
|
45 |
.shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item.shiftnav-active > .shiftnav-target,
|
46 |
-
.shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item.shiftnav-in-transition > .shiftnav-target
|
|
|
47 |
color: #ffffff;
|
48 |
background: #007aff;
|
49 |
border-top-color: transparent;
|
50 |
border-bottom-color: transparent;
|
51 |
}
|
52 |
-
.shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item.current-menu-item > .shiftnav-target
|
|
|
53 |
color: #ffffff;
|
54 |
background: #007aff;
|
55 |
}
|
@@ -69,8 +72,11 @@
|
|
69 |
}
|
70 |
.shiftnav.shiftnav-skin-light ul.shiftnav-menu ul.sub-menu li.menu-item > .shiftnav-target {
|
71 |
color: #999999;
|
|
|
72 |
border-top-color: transparent;
|
73 |
border-bottom-color: transparent;
|
|
|
|
|
74 |
}
|
75 |
.shiftnav.shiftnav-skin-light ul.shiftnav-menu.shiftnav-sub-always ul.sub-menu li.menu-item > .shiftnav-target {
|
76 |
padding-left: 50px;
|
@@ -87,7 +93,8 @@
|
|
87 |
.shiftnav.shiftnav-skin-light.shiftnav-right-edge {
|
88 |
border-left: none;
|
89 |
}
|
90 |
-
.shiftnav.shiftnav-skin-light.shiftnav-nojs ul.shiftnav-menu li.menu-item > .shiftnav-target:hover
|
|
|
91 |
color: #ffffff;
|
92 |
background: #007aff;
|
93 |
border-top-color: transparent;
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
.shiftnav.shiftnav-skin-light {
|
2 |
font-size: 13px;
|
3 |
line-height: 1.3em;
|
11 |
font-weight: normal;
|
12 |
color: #333333;
|
13 |
}
|
14 |
+
.shiftnav.shiftnav-skin-light .shiftnav-activated-style {
|
15 |
+
color: #ffffff;
|
16 |
+
background: #007aff;
|
17 |
+
border-top-color: transparent;
|
18 |
+
border-bottom-color: transparent;
|
19 |
+
}
|
20 |
.shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item > .shiftnav-target {
|
21 |
color: #666666;
|
22 |
font-size: 13px;
|
38 |
background: rgba(0, 0, 0, 0.1);
|
39 |
color: #eeeeee;
|
40 |
}
|
41 |
+
.shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item.shiftnav-highlight > .shiftnav-target,
|
42 |
+
.shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item ul.sub-menu .shiftnav-highlight > .shiftnav-target {
|
43 |
color: #007aff;
|
44 |
background: transparent;
|
45 |
}
|
46 |
.shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item.shiftnav-active > .shiftnav-target,
|
47 |
+
.shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item.shiftnav-in-transition > .shiftnav-target,
|
48 |
+
.shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item > .shiftnav-target:active {
|
49 |
color: #ffffff;
|
50 |
background: #007aff;
|
51 |
border-top-color: transparent;
|
52 |
border-bottom-color: transparent;
|
53 |
}
|
54 |
+
.shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item.current-menu-item > .shiftnav-target,
|
55 |
+
.shiftnav.shiftnav-skin-light ul.shiftnav-menu li.menu-item ul.sub-menu .current-menu-item .shiftnav-target {
|
56 |
color: #ffffff;
|
57 |
background: #007aff;
|
58 |
}
|
72 |
}
|
73 |
.shiftnav.shiftnav-skin-light ul.shiftnav-menu ul.sub-menu li.menu-item > .shiftnav-target {
|
74 |
color: #999999;
|
75 |
+
border-width: inherit;
|
76 |
border-top-color: transparent;
|
77 |
border-bottom-color: transparent;
|
78 |
+
font-weight: normal;
|
79 |
+
font-size: inherit;
|
80 |
}
|
81 |
.shiftnav.shiftnav-skin-light ul.shiftnav-menu.shiftnav-sub-always ul.sub-menu li.menu-item > .shiftnav-target {
|
82 |
padding-left: 50px;
|
93 |
.shiftnav.shiftnav-skin-light.shiftnav-right-edge {
|
94 |
border-left: none;
|
95 |
}
|
96 |
+
.shiftnav.shiftnav-skin-light.shiftnav-nojs ul.shiftnav-menu li.menu-item > .shiftnav-target:hover,
|
97 |
+
.shiftnav.shiftnav-skin-light ul.shiftnav-menu.shiftnav-active-on-hover li.menu-item > .shiftnav-target:hover {
|
98 |
color: #ffffff;
|
99 |
background: #007aff;
|
100 |
border-top-color: transparent;
|
assets/css/skins/standard-dark.css
CHANGED
@@ -19,29 +19,23 @@
|
|
19 |
border-bottom:1px solid #111;
|
20 |
border-top:1px solid #313131; /*rgba(255,255,255,.07);*/
|
21 |
text-shadow:0 1px 1px rgba(0,0,0,.5);
|
22 |
-
/*-webkit-box-shadow:inset 0 -1px 0px rgba(0,0,0,.3);
|
23 |
-
-moz-box-shadow:inset 0 -1px 0px rgba(0,0,0,.1);
|
24 |
-
-ms-box-shadow:inset 0 -1px 0px rgba(0,0,0,.1);
|
25 |
-
-o-box-shadow:inset 0 -1px 0px rgba(0,0,0,.1);
|
26 |
-
box-shadow:inset 0 -1px 0px rgba(0,0,0,.3);*/
|
27 |
-
|
28 |
}
|
29 |
|
30 |
.shiftnav.shiftnav-skin-standard-dark ul.shiftnav-menu > li.menu-item.shiftnav-highlight > .shiftnav-target{
|
31 |
color:#35AC6A;
|
32 |
}
|
33 |
.shiftnav.shiftnav-nojs.shiftnav-skin-standard-dark ul.shiftnav-menu li.menu-item > .shiftnav-target:hover,
|
|
|
34 |
.shiftnav.shiftnav-skin-standard-dark ul.shiftnav-menu li.menu-item.shiftnav-active > .shiftnav-target,
|
35 |
.shiftnav.shiftnav-skin-standard-dark ul.shiftnav-menu li.menu-item.shiftnav-in-transition > .shiftnav-target,
|
36 |
-
.shiftnav.shiftnav-skin-standard-dark ul.shiftnav-menu li.menu-item.current-menu-item > .shiftnav-target
|
|
|
37 |
color:#eee;
|
38 |
background:#35AC6A;
|
39 |
border-top-color:rgba(255,255,255,.4); /* 85cca5 */
|
40 |
border-bottom-color:rgba(0,0,0,.8);
|
41 |
}
|
42 |
|
43 |
-
|
44 |
-
|
45 |
.shiftnav.shiftnav-skin-standard-dark ul.shiftnav-menu > li.menu-item > .shiftnav-target{
|
46 |
text-transform: uppercase;
|
47 |
/*background:#12131A;
|
@@ -64,12 +58,10 @@
|
|
64 |
border-top:1px solid #313131;
|
65 |
}
|
66 |
.shiftnav.shiftnav-skin-standard-dark li.menu-item .shiftnav-submenu-activation:hover{
|
67 |
-
/*background:#35AC6A;*/
|
68 |
background:#2C2C2F;
|
69 |
}
|
70 |
|
71 |
|
72 |
-
|
73 |
.shiftnav.shiftnav-skin-standard-dark ul.shiftnav-menu li.shiftnav-retract .shiftnav-target{
|
74 |
background:rgba(0,0,0,.2);
|
75 |
color:#fff;
|
19 |
border-bottom:1px solid #111;
|
20 |
border-top:1px solid #313131; /*rgba(255,255,255,.07);*/
|
21 |
text-shadow:0 1px 1px rgba(0,0,0,.5);
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
}
|
23 |
|
24 |
.shiftnav.shiftnav-skin-standard-dark ul.shiftnav-menu > li.menu-item.shiftnav-highlight > .shiftnav-target{
|
25 |
color:#35AC6A;
|
26 |
}
|
27 |
.shiftnav.shiftnav-nojs.shiftnav-skin-standard-dark ul.shiftnav-menu li.menu-item > .shiftnav-target:hover,
|
28 |
+
.shiftnav.shiftnav-skin-standard-dark ul.shiftnav-menu.shiftnav-active-on-hover li.menu-item > .shiftnav-target:hover,
|
29 |
.shiftnav.shiftnav-skin-standard-dark ul.shiftnav-menu li.menu-item.shiftnav-active > .shiftnav-target,
|
30 |
.shiftnav.shiftnav-skin-standard-dark ul.shiftnav-menu li.menu-item.shiftnav-in-transition > .shiftnav-target,
|
31 |
+
.shiftnav.shiftnav-skin-standard-dark ul.shiftnav-menu li.menu-item.current-menu-item > .shiftnav-target,
|
32 |
+
.shiftnav.shiftnav-skin-standard-dark ul.shiftnav-menu li.menu-item > .shiftnav-target:active{
|
33 |
color:#eee;
|
34 |
background:#35AC6A;
|
35 |
border-top-color:rgba(255,255,255,.4); /* 85cca5 */
|
36 |
border-bottom-color:rgba(0,0,0,.8);
|
37 |
}
|
38 |
|
|
|
|
|
39 |
.shiftnav.shiftnav-skin-standard-dark ul.shiftnav-menu > li.menu-item > .shiftnav-target{
|
40 |
text-transform: uppercase;
|
41 |
/*background:#12131A;
|
58 |
border-top:1px solid #313131;
|
59 |
}
|
60 |
.shiftnav.shiftnav-skin-standard-dark li.menu-item .shiftnav-submenu-activation:hover{
|
|
|
61 |
background:#2C2C2F;
|
62 |
}
|
63 |
|
64 |
|
|
|
65 |
.shiftnav.shiftnav-skin-standard-dark ul.shiftnav-menu li.shiftnav-retract .shiftnav-target{
|
66 |
background:rgba(0,0,0,.2);
|
67 |
color:#fff;
|
assets/js/shiftnav.js
CHANGED
@@ -92,7 +92,10 @@
|
|
92 |
|
93 |
$body.addClass( 'shiftnav-enabled' );
|
94 |
if( shiftnav_data.lock_body == 'on' ) $body.addClass( 'shiftnav-lock' );
|
95 |
-
$body.
|
|
|
|
|
|
|
96 |
|
97 |
//Move elements outside of shifter
|
98 |
$( '#shiftnav-toggle-main, #wpadminbar' ).appendTo( 'body' );
|
@@ -100,6 +103,7 @@
|
|
100 |
//Pad top
|
101 |
var toggleHeight = $( '#shiftnav-toggle-main' ).outerHeight();
|
102 |
$( '.shiftnav-wrap' ).css( 'padding-top' , toggleHeight );
|
|
|
103 |
|
104 |
//Setup non-transform
|
105 |
if( !shift_supports( 'transform' ) ){
|
@@ -121,7 +125,7 @@
|
|
121 |
this.$shiftnav.find( '.shiftnav-submenu-activation' ).each( function(){
|
122 |
var length = $( this ).outerHeight();
|
123 |
$( this ).css( { 'height' : length , 'width' : length } );
|
124 |
-
|
125 |
//$( this ).css( 'height' , $( this ).parent( '.menu-item' ).height() );
|
126 |
});
|
127 |
|
@@ -129,6 +133,8 @@
|
|
129 |
|
130 |
initializeTargets: function(){
|
131 |
|
|
|
|
|
132 |
this.$shiftnav.on( 'click' , '.shiftnav-target' , function( e ){
|
133 |
var scrolltarget = $(this).data( 'shiftnav-scrolltarget' );
|
134 |
if( scrolltarget !== '' ){
|
@@ -136,7 +142,10 @@
|
|
136 |
if( $target.size() > 0 ){
|
137 |
$( 'html,body' ).animate({
|
138 |
scrollTop: $target.offset().top
|
139 |
-
}, 1000
|
|
|
|
|
|
|
140 |
return false; //don't follow any links if this scroll target is present
|
141 |
}
|
142 |
//if target isn't present here, redirect with hash
|
@@ -489,3 +498,9 @@ var shift_supports = (function() {
|
|
489 |
return false;
|
490 |
};
|
491 |
})();
|
|
|
|
|
|
|
|
|
|
|
|
92 |
|
93 |
$body.addClass( 'shiftnav-enabled' );
|
94 |
if( shiftnav_data.lock_body == 'on' ) $body.addClass( 'shiftnav-lock' );
|
95 |
+
if( shiftnav_data.lock_body_x == 'on' ) $body.addClass( 'shiftnav-lock-x' );
|
96 |
+
|
97 |
+
if( shiftnav_data.shift_body != 'off' ) $body.wrapInner( '<div class="shiftnav-wrap"></div>' ); //unique
|
98 |
+
else $body.addClass( 'shiftnav-disable-shift-body' );
|
99 |
|
100 |
//Move elements outside of shifter
|
101 |
$( '#shiftnav-toggle-main, #wpadminbar' ).appendTo( 'body' );
|
103 |
//Pad top
|
104 |
var toggleHeight = $( '#shiftnav-toggle-main' ).outerHeight();
|
105 |
$( '.shiftnav-wrap' ).css( 'padding-top' , toggleHeight );
|
106 |
+
if( shiftnav_data.shift_body == 'off' ) $body.css( 'padding-top' , toggleHeight );
|
107 |
|
108 |
//Setup non-transform
|
109 |
if( !shift_supports( 'transform' ) ){
|
125 |
this.$shiftnav.find( '.shiftnav-submenu-activation' ).each( function(){
|
126 |
var length = $( this ).outerHeight();
|
127 |
$( this ).css( { 'height' : length , 'width' : length } );
|
128 |
+
|
129 |
//$( this ).css( 'height' , $( this ).parent( '.menu-item' ).height() );
|
130 |
});
|
131 |
|
133 |
|
134 |
initializeTargets: function(){
|
135 |
|
136 |
+
var plugin = this;
|
137 |
+
|
138 |
this.$shiftnav.on( 'click' , '.shiftnav-target' , function( e ){
|
139 |
var scrolltarget = $(this).data( 'shiftnav-scrolltarget' );
|
140 |
if( scrolltarget !== '' ){
|
142 |
if( $target.size() > 0 ){
|
143 |
$( 'html,body' ).animate({
|
144 |
scrollTop: $target.offset().top
|
145 |
+
}, 1000 , 'swing' ,
|
146 |
+
function(){
|
147 |
+
plugin.closeShiftNav(); //close the menu after a successful scroll
|
148 |
+
});
|
149 |
return false; //don't follow any links if this scroll target is present
|
150 |
}
|
151 |
//if target isn't present here, redirect with hash
|
498 |
return false;
|
499 |
};
|
500 |
})();
|
501 |
+
|
502 |
+
/*
|
503 |
+
jQuery('body').on( 'touchstart' , '.shiftnav' , function(e){
|
504 |
+
//e.preventDefault();
|
505 |
+
});
|
506 |
+
*/
|
custom/custom-pro-sample.less
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
//This sample requires the Pro version to pull in the required LESS files
|
2 |
+
//Rename this file to custom.less, then compile to custom.css
|
3 |
+
|
4 |
+
@import "../pro/assets/css/skins/less/defaults.less";
|
5 |
+
|
6 |
+
@skinName: custom;
|
7 |
+
@accent: #007AFF; //#35AC6A;
|
8 |
+
|
9 |
+
@background:#1D1D20;
|
10 |
+
@color: #eee;
|
11 |
+
@edge-border: none;
|
12 |
+
|
13 |
+
@font-size:13px;
|
14 |
+
@line-height:1.3em;
|
15 |
+
|
16 |
+
|
17 |
+
@header-font-size: 30px;
|
18 |
+
@header-text-align: left;
|
19 |
+
@header-font-weight: normal;
|
20 |
+
@header-color: #eee;
|
21 |
+
|
22 |
+
@target-color: @color;
|
23 |
+
@target-font-weight: normal;
|
24 |
+
@target-border-top:1px solid #292929;
|
25 |
+
@target-border-bottom:1px solid #111;
|
26 |
+
|
27 |
+
@target-active-color:#eee;
|
28 |
+
@target-active-background: @accent;
|
29 |
+
|
30 |
+
@target-current-color:#eee;
|
31 |
+
@target-current-background: @accent;
|
32 |
+
|
33 |
+
@target-active-border-top-color: rgba(255,255,255,.2);
|
34 |
+
@target-active-border-bottom-color: rgba(0,0,0,.5);
|
35 |
+
|
36 |
+
@target-text-shadow:0 1px 1px rgba(0,0,0,.5);
|
37 |
+
|
38 |
+
@target-text-transform-l1: uppercase;
|
39 |
+
|
40 |
+
@activation-background: rgba(0,0,0,.1);
|
41 |
+
@activation-background-hover: rgba(0,0,0,.2);
|
42 |
+
@activation-color-hover: #eee;
|
43 |
+
@activation-color-active: #eee;
|
44 |
+
|
45 |
+
@highlight-color: @accent;
|
46 |
+
@highlight-background: transparent;
|
47 |
+
|
48 |
+
@retractor-background: rgba(0,0,0,.2);
|
49 |
+
@retractor-color: #fff;
|
50 |
+
@retractor-font-size:12px;
|
51 |
+
@retractor-text-align:right;
|
52 |
+
|
53 |
+
@submenu-color:#ccc;
|
54 |
+
@submenu-background:#25252A;
|
55 |
+
|
56 |
+
@submenu-target-color:#999;
|
57 |
+
|
58 |
+
@target-submenu-target-border-top-color: rgba(255,255,255,.05);
|
59 |
+
@target-submenu-target-border-bottom-color: rgba(0,0,0,.15);
|
60 |
+
|
61 |
+
@submenu-padding-l2: 50px;
|
62 |
+
@submenu-padding-l3: 75px;
|
63 |
+
@submenu-padding-l4: 100px;
|
64 |
+
|
65 |
+
|
66 |
+
@import "../pro/assets/css/skins/less/skin.less";
|
custom/custom-sample.css
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Custom ShiftNav Skin Sample */
|
2 |
+
|
3 |
+
.shiftnav.shiftnav-skin-custom {
|
4 |
+
font-size: 13px;
|
5 |
+
line-height: 1.3em;
|
6 |
+
background: #1d1d20;
|
7 |
+
color: #eeeeee;
|
8 |
+
}
|
9 |
+
.shiftnav.shiftnav-skin-custom .shiftnav-site-title {
|
10 |
+
font-size: 30px;
|
11 |
+
text-align: left;
|
12 |
+
padding: 40px 25px;
|
13 |
+
font-weight: normal;
|
14 |
+
color: #eeeeee;
|
15 |
+
}
|
16 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu li.menu-item > .shiftnav-target {
|
17 |
+
color: #eeeeee;
|
18 |
+
font-size: 13px;
|
19 |
+
font-weight: normal;
|
20 |
+
border-top: 1px solid #292929;
|
21 |
+
border-bottom: 1px solid #111111;
|
22 |
+
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
|
23 |
+
}
|
24 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu li.menu-item .shiftnav-submenu-activation {
|
25 |
+
background: rgba(0, 0, 0, 0.1);
|
26 |
+
color: #555555;
|
27 |
+
}
|
28 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu li.menu-item .shiftnav-submenu-activation:hover {
|
29 |
+
background: rgba(0, 0, 0, 0.2);
|
30 |
+
color: #eeeeee;
|
31 |
+
}
|
32 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu li.menu-item.shiftnav-active > .shiftnav-submenu-activation,
|
33 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu li.menu-item.shiftnav-in-transition > .shiftnav-submenu-activation {
|
34 |
+
background: rgba(0, 0, 0, 0.1);
|
35 |
+
color: #eeeeee;
|
36 |
+
}
|
37 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu li.menu-item.shiftnav-highlight > .shiftnav-target,
|
38 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu li.menu-item ul.sub-menu .shiftnav-highlight > .shiftnav-target {
|
39 |
+
color: #007aff;
|
40 |
+
background: transparent;
|
41 |
+
}
|
42 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu li.menu-item.shiftnav-active > .shiftnav-target,
|
43 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu li.menu-item.shiftnav-in-transition > .shiftnav-target,
|
44 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu li.menu-item > .shiftnav-target:active {
|
45 |
+
color: #eeeeee;
|
46 |
+
background: #007aff;
|
47 |
+
border-top-color: rgba(255, 255, 255, 0.2);
|
48 |
+
border-bottom-color: rgba(0, 0, 0, 0.5);
|
49 |
+
}
|
50 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu li.menu-item.current-menu-item > .shiftnav-target,
|
51 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu li.menu-item ul.sub-menu .current-menu-item .shiftnav-target {
|
52 |
+
color: #eeeeee;
|
53 |
+
background: #007aff;
|
54 |
+
}
|
55 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu > li.menu-item > .shiftnav-target {
|
56 |
+
text-transform: uppercase;
|
57 |
+
}
|
58 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu li.shiftnav-retract .shiftnav-target {
|
59 |
+
background: rgba(0, 0, 0, 0.2);
|
60 |
+
color: #ffffff;
|
61 |
+
text-transform: normal;
|
62 |
+
font-size: 12px;
|
63 |
+
text-align: right;
|
64 |
+
}
|
65 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu ul.sub-menu {
|
66 |
+
color: #cccccc;
|
67 |
+
background: #25252a;
|
68 |
+
}
|
69 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu ul.sub-menu li.menu-item > .shiftnav-target {
|
70 |
+
color: #999999;
|
71 |
+
border-width: inherit;
|
72 |
+
border-top-color: rgba(255, 255, 255, 0.05);
|
73 |
+
border-bottom-color: rgba(0, 0, 0, 0.15);
|
74 |
+
font-weight: normal;
|
75 |
+
font-size: inherit;
|
76 |
+
}
|
77 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu.shiftnav-sub-always ul.sub-menu li.menu-item > .shiftnav-target {
|
78 |
+
padding-left: 50px;
|
79 |
+
}
|
80 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu.shiftnav-sub-always ul.sub-menu ul.sub-menu ul.sub-menu li.menu-item > .shiftnav-target {
|
81 |
+
padding-left: 75px;
|
82 |
+
}
|
83 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu.shiftnav-sub-always ul.sub-menu ul.sub-menu ul.sub-menu ul.sub-menu li.menu-item > .shiftnav-target {
|
84 |
+
padding-left: 100px;
|
85 |
+
}
|
86 |
+
.shiftnav.shiftnav-skin-custom.shiftnav-left-edge {
|
87 |
+
border-right: none;
|
88 |
+
}
|
89 |
+
.shiftnav.shiftnav-skin-custom.shiftnav-right-edge {
|
90 |
+
border-left: none;
|
91 |
+
}
|
92 |
+
.shiftnav.shiftnav-skin-custom.shiftnav-nojs ul.shiftnav-menu li.menu-item > .shiftnav-target:hover,
|
93 |
+
.shiftnav.shiftnav-skin-custom ul.shiftnav-menu.shiftnav-active-on-hover li.menu-item > .shiftnav-target:hover {
|
94 |
+
color: #eeeeee;
|
95 |
+
background: #007aff;
|
96 |
+
border-top-color: rgba(255, 255, 255, 0.2);
|
97 |
+
border-bottom-color: rgba(0, 0, 0, 0.5);
|
98 |
+
}
|
includes/functions.php
CHANGED
@@ -23,6 +23,7 @@ function shiftnav_inject_css(){
|
|
23 |
if( $toggle_breakpoint != '' ){
|
24 |
$css.= "\t@media only screen and (min-width:{$toggle_breakpoint}px){ ";
|
25 |
$css.= "#shiftnav-toggle-main{ display:none; } .shiftnav-wrap { padding-top:0 !important; } ";
|
|
|
26 |
$css.= "}\n";
|
27 |
|
28 |
$hide_theme_menu = shiftnav_op( 'hide_theme_menu', 'togglebar' );
|
@@ -39,6 +40,11 @@ function shiftnav_inject_css(){
|
|
39 |
if( is_numeric( $font_size ) ) $font_size.= 'px';
|
40 |
$css.= "\t#shiftnav-toggle-main{ font-size: $font_size !important; }";
|
41 |
}
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
|
44 |
|
@@ -65,11 +71,20 @@ add_action( 'wp_head' , 'shiftnav_inject_css' );
|
|
65 |
function shiftnav_direct_injection(){
|
66 |
|
67 |
if( shiftnav_op( 'display_toggle' , 'togglebar' ) == 'on' ){
|
|
|
|
|
|
|
|
|
|
|
68 |
shiftnav_toggle( 'shiftnav-main' , shiftnav_main_toggle_content() , array(
|
69 |
'id' => 'shiftnav-toggle-main' ,
|
70 |
'el' => 'div',
|
71 |
'class' => 'shiftnav-toggle-main-align-'.shiftnav_op( 'align' , 'togglebar' ),
|
72 |
));
|
|
|
|
|
|
|
|
|
73 |
}
|
74 |
|
75 |
if( shiftnav_op( 'display_main' , 'shiftnav-main' ) == 'on' ){
|
@@ -116,8 +131,11 @@ function _shiftnav_toggle( $target_id , $content = '', $args = array() ){
|
|
116 |
'class' => '',
|
117 |
) ) );
|
118 |
|
119 |
-
|
120 |
-
|
|
|
|
|
|
|
121 |
if( $id ): ?>id="<?php echo $id; ?>"<?php endif;
|
122 |
?> class="shiftnav-toggle shiftnav-toggle-<?php echo $target_id; ?> <?php echo $class; ?>" data-shiftnav-target="<?php echo $target_id; ?>"><?php echo $content;
|
123 |
echo "</$el>"; ?>
|
@@ -168,14 +186,20 @@ function shiftnav_load_assets(){
|
|
168 |
|
169 |
//Load Required Skins
|
170 |
$skin = shiftnav_op( 'skin' , 'shiftnav-main' );
|
171 |
-
shiftnav_enqueue_skin( $skin );
|
|
|
|
|
|
|
|
|
172 |
|
173 |
|
174 |
wp_enqueue_script( 'jquery' );
|
175 |
wp_enqueue_script( 'shiftnav' , $assets.'js/shiftnav.js' , array( 'jquery' ) , SHIFTNAV_VERSION , true );
|
176 |
|
177 |
wp_localize_script( 'shiftnav' , 'shiftnav_data' , array(
|
178 |
-
'
|
|
|
|
|
179 |
) );
|
180 |
}
|
181 |
add_action( 'wp_enqueue_scripts' , 'shiftnav_load_assets' , 21 );
|
@@ -203,6 +227,11 @@ function shiftnav_register_skins(){
|
|
203 |
//shiftnav_register_skin( 'slate' , 'Slate' , $main.'slate.css' );
|
204 |
shiftnav_register_skin( 'light' , 'Standard Light' , $main.'light.css' );
|
205 |
}
|
|
|
|
|
|
|
|
|
|
|
206 |
function shiftnav_enqueue_skin( $skin ){
|
207 |
wp_enqueue_style( 'shiftnav-'.$skin );
|
208 |
}
|
23 |
if( $toggle_breakpoint != '' ){
|
24 |
$css.= "\t@media only screen and (min-width:{$toggle_breakpoint}px){ ";
|
25 |
$css.= "#shiftnav-toggle-main{ display:none; } .shiftnav-wrap { padding-top:0 !important; } ";
|
26 |
+
if( shiftnav_op( 'shift_body' , 'general' ) == 'off' ) $css.= "body.shiftnav-disable-shift-body{ padding-top:0 !important; } ";
|
27 |
$css.= "}\n";
|
28 |
|
29 |
$hide_theme_menu = shiftnav_op( 'hide_theme_menu', 'togglebar' );
|
40 |
if( is_numeric( $font_size ) ) $font_size.= 'px';
|
41 |
$css.= "\t#shiftnav-toggle-main{ font-size: $font_size !important; }";
|
42 |
}
|
43 |
+
|
44 |
+
$tweaks = shiftnav_op( 'css_tweaks' , 'general' );
|
45 |
+
if( $tweaks != '' ){
|
46 |
+
$css.= "\n\n\t/* Custom CSS Tweaks */\n\t".$tweaks;
|
47 |
+
}
|
48 |
|
49 |
|
50 |
|
71 |
function shiftnav_direct_injection(){
|
72 |
|
73 |
if( shiftnav_op( 'display_toggle' , 'togglebar' ) == 'on' ){
|
74 |
+
|
75 |
+
?>
|
76 |
+
<!-- ShiftNav Main Toggle -->
|
77 |
+
<?php
|
78 |
+
|
79 |
shiftnav_toggle( 'shiftnav-main' , shiftnav_main_toggle_content() , array(
|
80 |
'id' => 'shiftnav-toggle-main' ,
|
81 |
'el' => 'div',
|
82 |
'class' => 'shiftnav-toggle-main-align-'.shiftnav_op( 'align' , 'togglebar' ),
|
83 |
));
|
84 |
+
|
85 |
+
?>
|
86 |
+
|
87 |
+
<!-- /#shiftnav-toggle-main --> <?php
|
88 |
}
|
89 |
|
90 |
if( shiftnav_op( 'display_main' , 'shiftnav-main' ) == 'on' ){
|
131 |
'class' => '',
|
132 |
) ) );
|
133 |
|
134 |
+
$content = do_shortcode( $content );
|
135 |
+
|
136 |
+
if( $id && $id == 'shiftnav-toggle-main' ) $class = 'shiftnav-toggle-edge-'.shiftnav_op( 'edge' , 'shiftnav-main' ) . ' ' . $class;
|
137 |
+
|
138 |
+
echo "<$el ";
|
139 |
if( $id ): ?>id="<?php echo $id; ?>"<?php endif;
|
140 |
?> class="shiftnav-toggle shiftnav-toggle-<?php echo $target_id; ?> <?php echo $class; ?>" data-shiftnav-target="<?php echo $target_id; ?>"><?php echo $content;
|
141 |
echo "</$el>"; ?>
|
186 |
|
187 |
//Load Required Skins
|
188 |
$skin = shiftnav_op( 'skin' , 'shiftnav-main' );
|
189 |
+
if( $skin != 'none' ) shiftnav_enqueue_skin( $skin );
|
190 |
+
|
191 |
+
//Load custom.css
|
192 |
+
//$load_custom_css = shiftnav_op( 'load_custom_css' , 'general' );
|
193 |
+
//if( $load_custom_css == 'on' ) wp_enqueue_style( 'shiftnav-custom' , SHIFTNAV_URL . 'custom/custom.css' );
|
194 |
|
195 |
|
196 |
wp_enqueue_script( 'jquery' );
|
197 |
wp_enqueue_script( 'shiftnav' , $assets.'js/shiftnav.js' , array( 'jquery' ) , SHIFTNAV_VERSION , true );
|
198 |
|
199 |
wp_localize_script( 'shiftnav' , 'shiftnav_data' , array(
|
200 |
+
'shift_body' => shiftnav_op( 'shift_body' , 'general' ),
|
201 |
+
'lock_body' => shiftnav_op( 'lock_body' , 'general' ),
|
202 |
+
'lock_body_x' => shiftnav_op( 'lock_body_x' , 'general' ),
|
203 |
) );
|
204 |
}
|
205 |
add_action( 'wp_enqueue_scripts' , 'shiftnav_load_assets' , 21 );
|
227 |
//shiftnav_register_skin( 'slate' , 'Slate' , $main.'slate.css' );
|
228 |
shiftnav_register_skin( 'light' , 'Standard Light' , $main.'light.css' );
|
229 |
}
|
230 |
+
add_action( 'init' , 'shiftnav_pro_register_skin_none' , 20 );
|
231 |
+
function shiftnav_pro_register_skin_none(){
|
232 |
+
shiftnav_register_skin( 'custom' , 'Custom (custom.css)' , SHIFTNAV_URL.'custom/custom.css' );
|
233 |
+
shiftnav_register_skin( 'none' , 'None (Disable)' , '' );
|
234 |
+
}
|
235 |
function shiftnav_enqueue_skin( $skin ){
|
236 |
wp_enqueue_style( 'shiftnav-'.$skin );
|
237 |
}
|
includes/shiftnav.api.php
CHANGED
@@ -22,12 +22,17 @@ function shiftnav( $id , $settings = array() ){
|
|
22 |
$id_att = strpos( $id , 'shiftnav' ) !== 0 ? 'shiftnav-'.$id : $id;
|
23 |
|
24 |
?>
|
|
|
|
|
|
|
|
|
25 |
<div class="<?php echo $class; ?>" id="<?php echo $id_att; ?>" data-shiftnav-id="<?php echo $id; ?>">
|
26 |
-
|
|
|
27 |
|
28 |
do_action( 'shiftnav_before' , $id );
|
29 |
|
30 |
-
$disable_menu = shiftnav_op( 'disable_menu' , $id ) == 'on' ? true : false;
|
31 |
|
32 |
if( !$disable_menu ){
|
33 |
|
@@ -44,9 +49,18 @@ function shiftnav( $id , $settings = array() ){
|
|
44 |
//Target size
|
45 |
$args['menu_class'].= ' shiftnav-targets-'.shiftnav_op( 'target_size' , 'general' );
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
//Submenu indent
|
48 |
if( shiftnav_op( 'indent_submenus' , $id ) == 'on' ) $args['menu_class'].= ' shiftnav-indent-subs';
|
49 |
|
|
|
|
|
|
|
50 |
|
51 |
if( $menu != '_none' ){
|
52 |
$args['menu'] = $menu;
|
@@ -71,10 +85,17 @@ function shiftnav( $id , $settings = array() ){
|
|
71 |
|
72 |
}
|
73 |
|
|
|
|
|
|
|
|
|
74 |
do_action( 'shiftnav_after' , $id );
|
75 |
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
78 |
<?php
|
79 |
}
|
80 |
|
22 |
$id_att = strpos( $id , 'shiftnav' ) !== 0 ? 'shiftnav-'.$id : $id;
|
23 |
|
24 |
?>
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
<!-- ShiftNav #<?php echo $id; ?> -->
|
29 |
<div class="<?php echo $class; ?>" id="<?php echo $id_att; ?>" data-shiftnav-id="<?php echo $id; ?>">
|
30 |
+
<div class="shiftnav-inner">
|
31 |
+
<?php
|
32 |
|
33 |
do_action( 'shiftnav_before' , $id );
|
34 |
|
35 |
+
$disable_menu = shiftnav_op( 'disable_menu' , $id , 'off' ) == 'on' ? true : false;
|
36 |
|
37 |
if( !$disable_menu ){
|
38 |
|
49 |
//Target size
|
50 |
$args['menu_class'].= ' shiftnav-targets-'.shiftnav_op( 'target_size' , 'general' );
|
51 |
|
52 |
+
//Text size
|
53 |
+
$args['menu_class'].= ' shiftnav-targets-text-'.shiftnav_op( 'text_size' , 'general' );
|
54 |
+
|
55 |
+
//Icon size
|
56 |
+
$args['menu_class'].= ' shiftnav-targets-icon-'.shiftnav_op( 'icon_size' , 'general' );
|
57 |
+
|
58 |
//Submenu indent
|
59 |
if( shiftnav_op( 'indent_submenus' , $id ) == 'on' ) $args['menu_class'].= ' shiftnav-indent-subs';
|
60 |
|
61 |
+
//Active on hover
|
62 |
+
if( shiftnav_op( 'active_on_hover' , 'general' ) == 'on' ) $args['menu_class'].= ' shiftnav-active-on-hover';
|
63 |
+
|
64 |
|
65 |
if( $menu != '_none' ){
|
66 |
$args['menu'] = $menu;
|
85 |
|
86 |
}
|
87 |
|
88 |
+
else{
|
89 |
+
echo "\n\n\t\t<!-- ShiftNav Menu Disabled --> \n\n";
|
90 |
+
}
|
91 |
+
|
92 |
do_action( 'shiftnav_after' , $id );
|
93 |
|
94 |
+
?>
|
95 |
+
</div><!-- /.shiftnav-inner -->
|
96 |
+
</div><!-- /.shiftnav #<?php echo $id; ?> -->
|
97 |
+
|
98 |
+
|
99 |
<?php
|
100 |
}
|
101 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://shiftnav.io/pro
|
|
4 |
Tags: responsive, menu, navigation, mobile, off-canvas, app, slide, sidebar
|
5 |
Requires at least: 3.8.1
|
6 |
Tested up to: 3.8.1
|
7 |
-
Stable tag: 0
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -29,6 +29,8 @@ Beta release - please post any issues in the forum!
|
|
29 |
|
30 |
[Knowledgebase](http://sevenspark.com/docs/shiftnav) (in development, expanding soon)
|
31 |
|
|
|
|
|
32 |
== Installation ==
|
33 |
|
34 |
Install ShiftNav just like any other WordPress plugin.
|
@@ -42,6 +44,21 @@ None. Yet.
|
|
42 |
|
43 |
== Changelog ==
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
= 0.2 =
|
46 |
|
47 |
* Added Menu Bar Font Size Setting
|
@@ -58,6 +75,10 @@ Initial Beta Release
|
|
58 |
|
59 |
== Upgrade Notice ==
|
60 |
|
|
|
|
|
|
|
|
|
61 |
= 0.1 =
|
62 |
|
63 |
Initial Beta Release
|
4 |
Tags: responsive, menu, navigation, mobile, off-canvas, app, slide, sidebar
|
5 |
Requires at least: 3.8.1
|
6 |
Tested up to: 3.8.1
|
7 |
+
Stable tag: 1.0
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
29 |
|
30 |
[Knowledgebase](http://sevenspark.com/docs/shiftnav) (in development, expanding soon)
|
31 |
|
32 |
+
Want to take your menu to the next level? [Go Pro](http://shiftnav.io/pro)
|
33 |
+
|
34 |
== Installation ==
|
35 |
|
36 |
Install ShiftNav just like any other WordPress plugin.
|
44 |
|
45 |
== Changelog ==
|
46 |
|
47 |
+
= 1.0 =
|
48 |
+
|
49 |
+
* Added unsaved changes alert to menu item in Menus Panel
|
50 |
+
* Updated admin styles to work better in Firefox.
|
51 |
+
* Allow shortcodes, HTML in toggle content
|
52 |
+
* Added spacing in Menu Panel when settings panel is active
|
53 |
+
* Added non-transform option (disable "Shift Body")
|
54 |
+
* Fixed overflow scrolling and dragging on iOS
|
55 |
+
* Moved menu bars icon depending on whether panel is left or right
|
56 |
+
* Added Custom CSS Tweaks setting
|
57 |
+
* Added active hover state setting
|
58 |
+
* Removed disable menu option to avoid confusion (pro only)
|
59 |
+
* Added Scroll Lock independently for horizontal and both
|
60 |
+
|
61 |
+
|
62 |
= 0.2 =
|
63 |
|
64 |
* Added Menu Bar Font Size Setting
|
75 |
|
76 |
== Upgrade Notice ==
|
77 |
|
78 |
+
= 1.0 =
|
79 |
+
|
80 |
+
* Version 1.0 includes a lot of new features - update recommended for everyone
|
81 |
+
|
82 |
= 0.1 =
|
83 |
|
84 |
Initial Beta Release
|
shiftnav-responsive-mobile-menu.php
CHANGED
@@ -6,7 +6,7 @@ Description: An off-canvas mobile menu for WordPress
|
|
6 |
Author: Chris Mavricos, SevenSpark
|
7 |
Author URI: http://sevenspark.com
|
8 |
License: GPLv2
|
9 |
-
Version: 0
|
10 |
|
11 |
Copyright (C) 2014 Chris Mavricos, SevenSpark
|
12 |
*/
|
@@ -46,7 +46,7 @@ final class ShiftNav {
|
|
46 |
// Plugin version
|
47 |
|
48 |
if( ! defined( 'SHIFTNAV_VERSION' ) )
|
49 |
-
define( 'SHIFTNAV_VERSION', '0
|
50 |
|
51 |
if( ! defined( 'SHIFTNAV_PRO' ) )
|
52 |
define( 'SHIFTNAV_PRO', false );
|
@@ -69,6 +69,9 @@ final class ShiftNav {
|
|
69 |
if( ! defined( 'SHIFTNAV_MENU_ITEM_META_KEY' ) )
|
70 |
define( 'SHIFTNAV_MENU_ITEM_META_KEY' , '_shiftnav_settings' );
|
71 |
|
|
|
|
|
|
|
72 |
define( 'SHIFTNAV_PREFIX' , 'shiftnav_' );
|
73 |
}
|
74 |
|
6 |
Author: Chris Mavricos, SevenSpark
|
7 |
Author URI: http://sevenspark.com
|
8 |
License: GPLv2
|
9 |
+
Version: 1.0
|
10 |
|
11 |
Copyright (C) 2014 Chris Mavricos, SevenSpark
|
12 |
*/
|
46 |
// Plugin version
|
47 |
|
48 |
if( ! defined( 'SHIFTNAV_VERSION' ) )
|
49 |
+
define( 'SHIFTNAV_VERSION', '1.0' );
|
50 |
|
51 |
if( ! defined( 'SHIFTNAV_PRO' ) )
|
52 |
define( 'SHIFTNAV_PRO', false );
|
69 |
if( ! defined( 'SHIFTNAV_MENU_ITEM_META_KEY' ) )
|
70 |
define( 'SHIFTNAV_MENU_ITEM_META_KEY' , '_shiftnav_settings' );
|
71 |
|
72 |
+
if( ! defined( 'SHIFTNAV_EXTENDED' ) )
|
73 |
+
define( 'SHIFTNAV_EXTENDED', false );
|
74 |
+
|
75 |
define( 'SHIFTNAV_PREFIX' , 'shiftnav_' );
|
76 |
}
|
77 |
|