Version Description
- [ Add function ] New Mobile Menu Release
Download this release
Release Info
Developer | kurudrive |
Plugin | Lightning Advanced Unit |
Version | 3.0.0 |
Comparing to | |
See all releases |
Code changes from version 2.6.3 to 3.0.0
- gulpfile.js +24 -14
- inc/navi-common.php +93 -0
- inc/navigation/js/navigation.js +94 -49
- inc/navigation/js/navigation.min.js +10 -0
- inc/navigation/navigation.php +16 -59
- inc/sidebar-fix/js/sidebar-fix.js +11 -2
- inc/sidebar-fix/sidebar-fix.php +0 -0
- inc/vk-mobile-nav-config.php +12 -0
- inc/vk-mobile-nav/_scss/_bg_dark.scss +28 -0
- inc/vk-mobile-nav/_scss/_bg_light.scss +28 -0
- inc/vk-mobile-nav/_scss/_bg_white.scss +28 -0
- inc/vk-mobile-nav/_scss/_common.scss +120 -0
- inc/vk-mobile-nav/_scss/_sub_item_accordion.scss +65 -0
- inc/vk-mobile-nav/_scss/vk-mobile-nav-bright.scss +47 -0
- inc/vk-mobile-nav/_scss/vk-mobile-nav-dark.scss +43 -0
- inc/vk-mobile-nav/_scss/vk-mobile-nav-light.scss +31 -0
- inc/vk-mobile-nav/_scss/vk-mobile-nav.scss +5 -0
- inc/vk-mobile-nav/class-vk-mobile-nav.php +136 -0
- inc/vk-mobile-nav/css/vk-mobile-nav-bright.css +1 -0
- inc/vk-mobile-nav/css/vk-mobile-nav-dark.css +1 -0
- inc/vk-mobile-nav/css/vk-mobile-nav-light.css +1 -0
- inc/vk-mobile-nav/css/vk-mobile-nav.css +1 -0
- inc/vk-mobile-nav/images/vk-menu-acc-icon-open-black.svg +9 -0
- inc/vk-mobile-nav/images/vk-menu-acc-icon-open-white.svg +9 -0
- inc/vk-mobile-nav/images/vk-menu-btn-close-black.svg +10 -0
- inc/vk-mobile-nav/images/vk-menu-btn-close-white.svg +10 -0
- inc/vk-mobile-nav/images/vk-menu-btn-close.svg +10 -0
- inc/vk-mobile-nav/images/vk-menu-btn.svg +13 -0
- inc/vk-mobile-nav/js/vk-mobile-nav.js +313 -0
- inc/widgets/widget-full-wide-title.php +1 -1
- js/lightning-adv-common.js +4 -0
- js/lightning-adv.js +5 -125
- js/lightning-adv.min.js +1 -9
- languages/lightning-adv-unit-ja.mo +0 -0
- languages/lightning-adv-unit-ja.po +64 -6
- lightning_advanced_unit.php +18 -18
- readme.txt +4 -1
gulpfile.js
CHANGED
@@ -15,18 +15,28 @@ var spritesmith = require('gulp.spritesmith');
|
|
15 |
|
16 |
// ファイル結合
|
17 |
gulp.task('concat', function() {
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
21 |
});
|
22 |
|
23 |
// js最小化
|
24 |
-
gulp.task('jsmin', function
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
});
|
31 |
|
32 |
|
@@ -42,11 +52,11 @@ gulp.task('jsmin', function () {
|
|
42 |
|
43 |
// Watch
|
44 |
gulp.task('watch', function() {
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
});
|
50 |
|
51 |
// gulp.task('default', ['scripts','watch','sprite']);
|
52 |
-
gulp.task('default', ['watch']);
|
15 |
|
16 |
// ファイル結合
|
17 |
gulp.task('concat', function() {
|
18 |
+
// return gulp.src(['./js/lightning-adv-common.js','./inc/navigation/js/navigation.js','./inc/sidebar-fix/js/sidebar-fix.js'])
|
19 |
+
return gulp.src(['./js/lightning-adv-common.js', './inc/sidebar-fix/js/sidebar-fix.js'])
|
20 |
+
.pipe(concat('lightning-adv.js'))
|
21 |
+
.pipe(gulp.dest('./js/'));
|
22 |
});
|
23 |
|
24 |
// js最小化
|
25 |
+
gulp.task('jsmin', function() {
|
26 |
+
gulp.src(['./js/lightning-adv.js'])
|
27 |
+
.pipe(plumber()) // エラーでも監視を続行
|
28 |
+
.pipe(jsmin())
|
29 |
+
.pipe(rename({
|
30 |
+
suffix: '.min'
|
31 |
+
}))
|
32 |
+
.pipe(gulp.dest('./js'));
|
33 |
+
gulp.src(['./inc/navigation/js/navigation.js'])
|
34 |
+
.pipe(plumber()) // エラーでも監視を続行
|
35 |
+
.pipe(jsmin())
|
36 |
+
.pipe(rename({
|
37 |
+
suffix: '.min'
|
38 |
+
}))
|
39 |
+
.pipe(gulp.dest('./inc/navigation/js/'));
|
40 |
});
|
41 |
|
42 |
|
52 |
|
53 |
// Watch
|
54 |
gulp.task('watch', function() {
|
55 |
+
gulp.watch('./js/lightning-adv-common.js', ['concat']);
|
56 |
+
gulp.watch('./inc/sidebar-fix/js/sidebar-fix.js', ['concat']);
|
57 |
+
gulp.watch('./js/lightning-adv.js', ['jsmin']);
|
58 |
+
gulp.watch('./inc/navigation/js/navigation.js', ['jsmin']);
|
59 |
});
|
60 |
|
61 |
// gulp.task('default', ['scripts','watch','sprite']);
|
62 |
+
gulp.task('default', ['watch']);
|
inc/navi-common.php
ADDED
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/* このプラグイン内では既に利用していないが、拡張スキンなどで利用されているかもしれないので一応保留 */
|
4 |
+
function ltg_adv_is_slide_menu() {
|
5 |
+
$options = get_option( 'lightning_theme_options' );
|
6 |
+
if ( ! isset( $options['menu_type'] ) || ( $options['menu_type'] == 'side_slide' ) ) {
|
7 |
+
return true;
|
8 |
+
} else {
|
9 |
+
return false;
|
10 |
+
}
|
11 |
+
}
|
12 |
+
|
13 |
+
|
14 |
+
$options = get_option( 'lightning_theme_options' );
|
15 |
+
|
16 |
+
if ( isset( $options['menu_type'] ) && ( $options['menu_type'] == 'vk_mobile_nav' ) ) {
|
17 |
+
|
18 |
+
/*-------------------------------------------*/
|
19 |
+
/* VK Mobile Nav の時
|
20 |
+
/*-------------------------------------------*/
|
21 |
+
|
22 |
+
// VK Mobile Nav 読み込み
|
23 |
+
require_once( LIGHTNING_ADVANCED_DIR . 'inc/vk-mobile-nav-config.php' );
|
24 |
+
|
25 |
+
// メニュー開閉ボタンや標準ナビの表示制御
|
26 |
+
add_action( 'wp_head', 'lightning_adv_unit_disable_default_menu_css', 4 );
|
27 |
+
function lightning_adv_unit_disable_default_menu_css() {
|
28 |
+
|
29 |
+
global $vk_mobile_nav;
|
30 |
+
add_action( 'lightning_header_before', array( $vk_mobile_nav, 'menu_set_html' ) );
|
31 |
+
// add_action( 'wp_footer', array( $vk_mobile_nav, 'menu_set_html' ) );
|
32 |
+
|
33 |
+
// Lightning標準のメニューボタンを消す
|
34 |
+
$dynamic_css = '.menuBtn { display:none; }';
|
35 |
+
|
36 |
+
// モバイルデバイスの時は幅が広くてもPCメニューを強制非表示
|
37 |
+
$dynamic_css .= 'body.mobile-device .gMenu_outer{ display:none; }';
|
38 |
+
|
39 |
+
// delete before after space
|
40 |
+
$dynamic_css = trim( $dynamic_css );
|
41 |
+
// convert tab and br to space
|
42 |
+
$dynamic_css = preg_replace( '/[\n\r\t]/', '', $dynamic_css );
|
43 |
+
// Change multiple spaces to single space
|
44 |
+
$dynamic_css = preg_replace( '/\s(?=\s)/', '', $dynamic_css );
|
45 |
+
|
46 |
+
wp_add_inline_style( 'lightning-design-style', $dynamic_css );
|
47 |
+
}
|
48 |
+
} elseif ( isset( $options['menu_type'] ) && ( $options['menu_type'] == 'side_slide' ) ) {
|
49 |
+
|
50 |
+
/*-------------------------------------------*/
|
51 |
+
/* 旧スライドメニューの時
|
52 |
+
/*-------------------------------------------*/
|
53 |
+
|
54 |
+
// スライドメニューをフックで解除に出来るように plugin_loaded を追加
|
55 |
+
add_action( 'plugins_loaded', 'lightning_adv_unit_load_slide_nav' );
|
56 |
+
function lightning_adv_unit_load_slide_nav() {
|
57 |
+
if ( apply_filters( 'lightning_slide_nav_load', true ) ) {
|
58 |
+
require_once( LIGHTNING_ADVANCED_DIR . 'inc/navigation/navigation.php' );
|
59 |
+
}
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
/*-------------------------------------------*/
|
64 |
+
/* Customizer
|
65 |
+
/*-------------------------------------------*/
|
66 |
+
add_action( 'customize_register', 'lightning_adv_unit_customize_register_menu_type' );
|
67 |
+
function lightning_adv_unit_customize_register_menu_type( $wp_customize ) {
|
68 |
+
$wp_customize->add_setting(
|
69 |
+
'lightning_theme_options[menu_type]', array(
|
70 |
+
'default' => 'vk_mobile_nav',
|
71 |
+
'type' => 'option',
|
72 |
+
'capability' => 'edit_theme_options',
|
73 |
+
'sanitize_callback' => 'lightning_sanitize_radio',
|
74 |
+
)
|
75 |
+
);
|
76 |
+
$choices_array = array(
|
77 |
+
'vk_mobile_nav' => __( 'VK Mobile Nav(Recommend)', LIGHTNING_ADVANCED_TEXTDOMAIN ),
|
78 |
+
'vertical_show_hide' => __( 'Vertical Show Hide (Lightning default)', LIGHTNING_ADVANCED_TEXTDOMAIN ),
|
79 |
+
'side_slide' => __( 'Side Slide(Not recommend)', LIGHTNING_ADVANCED_TEXTDOMAIN ),
|
80 |
+
);
|
81 |
+
$choices_array = apply_filters( 'lightning_menu_choices_array_custom', $choices_array );
|
82 |
+
$wp_customize->add_control(
|
83 |
+
'lightning_theme_options[menu_type]', array(
|
84 |
+
'label' => __( 'Menu Type ( Mobile mode )', LIGHTNING_ADVANCED_TEXTDOMAIN ),
|
85 |
+
'section' => 'lightning_design',
|
86 |
+
'settings' => 'lightning_theme_options[menu_type]',
|
87 |
+
'type' => 'radio',
|
88 |
+
'description' => '<p style="color:red">' . __( 'It will not take effect unless you save and reload the page.', LIGHTNING_ADVANCED_TEXTDOMAIN ) . '</p>',
|
89 |
+
'choices' => $choices_array,
|
90 |
+
'priority' => 600,
|
91 |
+
)
|
92 |
+
);
|
93 |
+
}
|
inc/navigation/js/navigation.js
CHANGED
@@ -1,9 +1,13 @@
|
|
1 |
-
jQuery(document).ready(function(){
|
2 |
-
if(
|
|
|
|
|
3 |
run_slide_menu_control();
|
4 |
});
|
5 |
-
jQuery(window).resize(function(){
|
6 |
-
if(
|
|
|
|
|
7 |
run_menuResize();
|
8 |
});
|
9 |
/*-------------------------------------------*/
|
@@ -13,17 +17,17 @@ jQuery(window).resize(function(){
|
|
13 |
/* position:fixed しているとウィンドウにfixしてしまってwrapを横にずらしてもついて来ないため
|
14 |
/*-------------------------------------------*/
|
15 |
|
16 |
-
function run_slide_menu_control(){
|
17 |
jQuery('.menuBtn').prependTo('#bodyInner');
|
18 |
-
jQuery('.menuBtn').each(function(){
|
19 |
-
jQuery(this).click(function(){
|
20 |
-
if (
|
21 |
var menuPosition = 'left';
|
22 |
} else {
|
23 |
var menuPosition = 'right';
|
24 |
}
|
25 |
// ※ この時点でLightning本体のmaster.jsによって既に menuOpenに新しく切り替わっている
|
26 |
-
if (
|
27 |
slide_menu_open(menuPosition);
|
28 |
} else {
|
29 |
slide_menu_close(menuPosition);
|
@@ -32,48 +36,60 @@ function run_slide_menu_control(){
|
|
32 |
});
|
33 |
}
|
34 |
|
35 |
-
function slide_menu_open(menuPosition){
|
36 |
var navSection_open_position = 'navSection_open_' + menuPosition;
|
37 |
jQuery('#navSection').addClass(navSection_open_position);
|
38 |
|
39 |
var wrap_width = jQuery('body').width();
|
40 |
-
jQuery('#bodyInner').css({
|
41 |
-
|
|
|
|
|
|
|
|
|
42 |
|
43 |
var menu_width = wrap_width - 60 + 'px';
|
44 |
|
45 |
jQuery('#headerTop').appendTo('#navSection');
|
46 |
jQuery('#gMenu_outer').appendTo('#navSection');
|
47 |
|
48 |
-
if (
|
49 |
jQuery('#wrap').stop().animate({
|
50 |
// 右にメニューを表示するために左に逃げる
|
51 |
"margin-left": "-" + menu_width,
|
52 |
-
},200);
|
53 |
jQuery('header.siteHeader').stop().animate({
|
54 |
-
"left":"-"+menu_width,
|
55 |
-
},200);
|
56 |
-
jQuery('#navSection').css({
|
57 |
-
"
|
58 |
-
|
|
|
|
|
|
|
|
|
59 |
|
60 |
-
} else if (
|
61 |
jQuery('#wrap').stop().animate({
|
62 |
-
"margin-left":menu_width,
|
63 |
-
},200);
|
64 |
jQuery('header.siteHeader').stop().animate({
|
65 |
-
"left":menu_width,
|
66 |
-
},200);
|
67 |
-
jQuery('#navSection').css({
|
68 |
-
"
|
69 |
-
|
70 |
-
|
|
|
|
|
|
|
71 |
}
|
72 |
}
|
73 |
-
function slide_menu_close(menuPosition){
|
74 |
|
75 |
-
|
76 |
-
|
|
|
|
|
77 |
menuPosition = 'right';
|
78 |
} else {
|
79 |
menuPosition = 'left';
|
@@ -81,45 +97,74 @@ function slide_menu_close(menuPosition){
|
|
81 |
}
|
82 |
|
83 |
var wrap_width = jQuery('body').width();
|
84 |
-
jQuery('#bodyInner').css({
|
85 |
-
|
|
|
|
|
|
|
|
|
86 |
|
87 |
var menu_width = wrap_width - 60 + 'px';
|
88 |
|
89 |
-
jQuery('#wrap').stop().animate({
|
90 |
-
|
|
|
|
|
|
|
|
|
91 |
|
92 |
-
if (
|
93 |
-
jQuery('
|
|
|
|
|
|
|
|
|
|
|
94 |
menuClose_common();
|
95 |
});
|
96 |
-
} else if (
|
97 |
-
jQuery('#navSection').stop().animate({
|
|
|
|
|
98 |
menuClose_common();
|
99 |
});
|
100 |
}
|
101 |
}
|
102 |
-
|
|
|
103 |
// アニメーションが終わってから実行
|
104 |
jQuery('#navSection').removeClass('navSection_open_right');
|
105 |
jQuery('#navSection').removeClass('navSection_open_left');
|
106 |
-
jQuery('#navSection').css({
|
|
|
|
|
|
|
|
|
107 |
jQuery('#headerTop').prependTo('header.siteHeader');
|
108 |
-
jQuery('#bodyInner').css({
|
109 |
-
|
|
|
|
|
|
|
|
|
110 |
// judge animate execution
|
111 |
-
if(jQuery('#navSection').is(':animated')){
|
112 |
jQuery('#gMenu_outer').insertAfter('.navbar-header');
|
113 |
}
|
114 |
}
|
115 |
-
|
|
|
116 |
var wrap_width = jQuery('body').width();
|
117 |
-
jQuery('#bodyInner').css({
|
|
|
|
|
118 |
// jQuery('#wrap').css({"width":wrap_width,"margin-left":"","margin-right":""});
|
119 |
// menuClose_common();
|
120 |
var headerHeight = jQuery('header.siteHeader').height;
|
121 |
-
jQuery('#top__fullcarousel').css({
|
122 |
-
|
|
|
|
|
123 |
slide_menu_close();
|
124 |
}
|
125 |
-
}
|
1 |
+
jQuery(document).ready(function() {
|
2 |
+
if (!jQuery('body').hasClass('menu-slide')) {
|
3 |
+
return;
|
4 |
+
}
|
5 |
run_slide_menu_control();
|
6 |
});
|
7 |
+
jQuery(window).resize(function() {
|
8 |
+
if (!jQuery('body').hasClass('menu-slide')) {
|
9 |
+
return;
|
10 |
+
}
|
11 |
run_menuResize();
|
12 |
});
|
13 |
/*-------------------------------------------*/
|
17 |
/* position:fixed しているとウィンドウにfixしてしまってwrapを横にずらしてもついて来ないため
|
18 |
/*-------------------------------------------*/
|
19 |
|
20 |
+
function run_slide_menu_control() {
|
21 |
jQuery('.menuBtn').prependTo('#bodyInner');
|
22 |
+
jQuery('.menuBtn').each(function() {
|
23 |
+
jQuery(this).click(function() {
|
24 |
+
if (jQuery(this).hasClass('menuBtn_left')) {
|
25 |
var menuPosition = 'left';
|
26 |
} else {
|
27 |
var menuPosition = 'right';
|
28 |
}
|
29 |
// ※ この時点でLightning本体のmaster.jsによって既に menuOpenに新しく切り替わっている
|
30 |
+
if (jQuery(this).hasClass('menuOpen')) {
|
31 |
slide_menu_open(menuPosition);
|
32 |
} else {
|
33 |
slide_menu_close(menuPosition);
|
36 |
});
|
37 |
}
|
38 |
|
39 |
+
function slide_menu_open(menuPosition) {
|
40 |
var navSection_open_position = 'navSection_open_' + menuPosition;
|
41 |
jQuery('#navSection').addClass(navSection_open_position);
|
42 |
|
43 |
var wrap_width = jQuery('body').width();
|
44 |
+
jQuery('#bodyInner').css({
|
45 |
+
"width": wrap_width
|
46 |
+
});
|
47 |
+
jQuery('#wrap').css({
|
48 |
+
"width": wrap_width
|
49 |
+
});
|
50 |
|
51 |
var menu_width = wrap_width - 60 + 'px';
|
52 |
|
53 |
jQuery('#headerTop').appendTo('#navSection');
|
54 |
jQuery('#gMenu_outer').appendTo('#navSection');
|
55 |
|
56 |
+
if (menuPosition == 'right') {
|
57 |
jQuery('#wrap').stop().animate({
|
58 |
// 右にメニューを表示するために左に逃げる
|
59 |
"margin-left": "-" + menu_width,
|
60 |
+
}, 200);
|
61 |
jQuery('header.siteHeader').stop().animate({
|
62 |
+
"left": "-" + menu_width,
|
63 |
+
}, 200);
|
64 |
+
jQuery('#navSection').css({
|
65 |
+
"display": "block",
|
66 |
+
"width": menu_width,
|
67 |
+
"right": "-" + menu_width
|
68 |
+
}).stop().animate({
|
69 |
+
"right": 0,
|
70 |
+
}, 200);
|
71 |
|
72 |
+
} else if (menuPosition == 'left') {
|
73 |
jQuery('#wrap').stop().animate({
|
74 |
+
"margin-left": menu_width,
|
75 |
+
}, 200);
|
76 |
jQuery('header.siteHeader').stop().animate({
|
77 |
+
"left": menu_width,
|
78 |
+
}, 200);
|
79 |
+
jQuery('#navSection').css({
|
80 |
+
"display": "block",
|
81 |
+
"width": menu_width,
|
82 |
+
"left": "-" + menu_width
|
83 |
+
}).stop().animate({
|
84 |
+
"left": 0,
|
85 |
+
}, 200, function() {});
|
86 |
}
|
87 |
}
|
|
|
88 |
|
89 |
+
function slide_menu_close(menuPosition) {
|
90 |
+
|
91 |
+
if (!menuPosition) {
|
92 |
+
if (jQuery('#navSection').hasClass('navSection_open_right')) {
|
93 |
menuPosition = 'right';
|
94 |
} else {
|
95 |
menuPosition = 'left';
|
97 |
}
|
98 |
|
99 |
var wrap_width = jQuery('body').width();
|
100 |
+
jQuery('#bodyInner').css({
|
101 |
+
"width": wrap_width
|
102 |
+
});
|
103 |
+
jQuery('#wrap').css({
|
104 |
+
"width": wrap_width
|
105 |
+
});
|
106 |
|
107 |
var menu_width = wrap_width - 60 + 'px';
|
108 |
|
109 |
+
jQuery('#wrap').stop().animate({
|
110 |
+
"margin-left": "0"
|
111 |
+
}, 200);
|
112 |
+
jQuery('header.siteHeader').stop().animate({
|
113 |
+
"left": "0"
|
114 |
+
}, 200);
|
115 |
|
116 |
+
if (menuPosition == 'right') {
|
117 |
+
jQuery('header.siteHeader').stop().animate({
|
118 |
+
"left": "0"
|
119 |
+
}, 200);
|
120 |
+
jQuery('#navSection').stop().animate({
|
121 |
+
"right": "-" + menu_width
|
122 |
+
}, 200, function() {
|
123 |
menuClose_common();
|
124 |
});
|
125 |
+
} else if (menuPosition == 'left') {
|
126 |
+
jQuery('#navSection').stop().animate({
|
127 |
+
"left": "-" + menu_width
|
128 |
+
}, 200, function() {
|
129 |
menuClose_common();
|
130 |
});
|
131 |
}
|
132 |
}
|
133 |
+
|
134 |
+
function menuClose_common() {
|
135 |
// アニメーションが終わってから実行
|
136 |
jQuery('#navSection').removeClass('navSection_open_right');
|
137 |
jQuery('#navSection').removeClass('navSection_open_left');
|
138 |
+
jQuery('#navSection').css({
|
139 |
+
"right": "",
|
140 |
+
"left": "",
|
141 |
+
"display": ""
|
142 |
+
});
|
143 |
jQuery('#headerTop').prependTo('header.siteHeader');
|
144 |
+
jQuery('#bodyInner').css({
|
145 |
+
"width": ""
|
146 |
+
});
|
147 |
+
jQuery('#wrap').css({
|
148 |
+
"width": ""
|
149 |
+
});
|
150 |
// judge animate execution
|
151 |
+
if (jQuery('#navSection').is(':animated')) {
|
152 |
jQuery('#gMenu_outer').insertAfter('.navbar-header');
|
153 |
}
|
154 |
}
|
155 |
+
|
156 |
+
function run_menuResize() {
|
157 |
var wrap_width = jQuery('body').width();
|
158 |
+
jQuery('#bodyInner').css({
|
159 |
+
"width": wrap_width
|
160 |
+
});
|
161 |
// jQuery('#wrap').css({"width":wrap_width,"margin-left":"","margin-right":""});
|
162 |
// menuClose_common();
|
163 |
var headerHeight = jQuery('header.siteHeader').height;
|
164 |
+
jQuery('#top__fullcarousel').css({
|
165 |
+
"margin-top": headerHeight
|
166 |
+
});
|
167 |
+
if (wrap_width > 991) {
|
168 |
slide_menu_close();
|
169 |
}
|
170 |
+
}
|
inc/navigation/js/navigation.min.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
jQuery(document).ready(function(){if(!jQuery('body').hasClass('menu-slide')){return;}
|
3 |
+
run_slide_menu_control();});jQuery(window).resize(function(){if(!jQuery('body').hasClass('menu-slide')){return;}
|
4 |
+
run_menuResize();});function run_slide_menu_control(){jQuery('.menuBtn').prependTo('#bodyInner');jQuery('.menuBtn').each(function(){jQuery(this).click(function(){if(jQuery(this).hasClass('menuBtn_left')){var menuPosition='left';}else{var menuPosition='right';}
|
5 |
+
if(jQuery(this).hasClass('menuOpen')){slide_menu_open(menuPosition);}else{slide_menu_close(menuPosition);}});});}
|
6 |
+
function slide_menu_open(menuPosition){var navSection_open_position='navSection_open_'+menuPosition;jQuery('#navSection').addClass(navSection_open_position);var wrap_width=jQuery('body').width();jQuery('#bodyInner').css({"width":wrap_width});jQuery('#wrap').css({"width":wrap_width});var menu_width=wrap_width-60+'px';jQuery('#headerTop').appendTo('#navSection');jQuery('#gMenu_outer').appendTo('#navSection');if(menuPosition=='right'){jQuery('#wrap').stop().animate({"margin-left":"-"+menu_width,},200);jQuery('header.siteHeader').stop().animate({"left":"-"+menu_width,},200);jQuery('#navSection').css({"display":"block","width":menu_width,"right":"-"+menu_width}).stop().animate({"right":0,},200);}else if(menuPosition=='left'){jQuery('#wrap').stop().animate({"margin-left":menu_width,},200);jQuery('header.siteHeader').stop().animate({"left":menu_width,},200);jQuery('#navSection').css({"display":"block","width":menu_width,"left":"-"+menu_width}).stop().animate({"left":0,},200,function(){});}}
|
7 |
+
function slide_menu_close(menuPosition){if(!menuPosition){if(jQuery('#navSection').hasClass('navSection_open_right')){menuPosition='right';}else{menuPosition='left';}}
|
8 |
+
var wrap_width=jQuery('body').width();jQuery('#bodyInner').css({"width":wrap_width});jQuery('#wrap').css({"width":wrap_width});var menu_width=wrap_width-60+'px';jQuery('#wrap').stop().animate({"margin-left":"0"},200);jQuery('header.siteHeader').stop().animate({"left":"0"},200);if(menuPosition=='right'){jQuery('header.siteHeader').stop().animate({"left":"0"},200);jQuery('#navSection').stop().animate({"right":"-"+menu_width},200,function(){menuClose_common();});}else if(menuPosition=='left'){jQuery('#navSection').stop().animate({"left":"-"+menu_width},200,function(){menuClose_common();});}}
|
9 |
+
function menuClose_common(){jQuery('#navSection').removeClass('navSection_open_right');jQuery('#navSection').removeClass('navSection_open_left');jQuery('#navSection').css({"right":"","left":"","display":""});jQuery('#headerTop').prependTo('header.siteHeader');jQuery('#bodyInner').css({"width":""});jQuery('#wrap').css({"width":""});if(jQuery('#navSection').is(':animated')){jQuery('#gMenu_outer').insertAfter('.navbar-header');}}
|
10 |
+
function run_menuResize(){var wrap_width=jQuery('body').width();jQuery('#bodyInner').css({"width":wrap_width});var headerHeight=jQuery('header.siteHeader').height;jQuery('#top__fullcarousel').css({"margin-top":headerHeight});if(wrap_width>991){slide_menu_close();}}
|
inc/navigation/navigation.php
CHANGED
@@ -1,50 +1,11 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
/*-------------------------------------------*/
|
4 |
-
/* Customizer
|
5 |
-
/*-------------------------------------------*/
|
6 |
-
add_action( 'customize_register', 'lightning_adv_unit_customize_register_menu_type' );
|
7 |
-
function lightning_adv_unit_customize_register_menu_type($wp_customize) {
|
8 |
-
$wp_customize->add_setting( 'lightning_theme_options[menu_type]', array(
|
9 |
-
'default' => 'side_slide',
|
10 |
-
'type' => 'option',
|
11 |
-
'capability' => 'edit_theme_options',
|
12 |
-
'sanitize_callback' => 'lightning_sanitize_radio',
|
13 |
-
));
|
14 |
-
$choices_array = array(
|
15 |
-
'side_slide' => __('Side Slide', LIGHTNING_ADVANCED_TEXTDOMAIN),
|
16 |
-
'vertical_show_hide' => __('Vertical Show Hide (Lightning default)', LIGHTNING_ADVANCED_TEXTDOMAIN),
|
17 |
-
);
|
18 |
-
$choices_array = apply_filters( 'ligthning_menu_choices_array_custom', $choices_array ); // 2017年3月になったら削除
|
19 |
-
$choices_array = apply_filters( 'lightning_menu_choices_array_custom', $choices_array );
|
20 |
-
$wp_customize->add_control( 'lightning_theme_options[menu_type]',array(
|
21 |
-
'label' => __('Menu Type ( Mobile mode )', LIGHTNING_ADVANCED_TEXTDOMAIN),
|
22 |
-
'section' => 'lightning_design',
|
23 |
-
'settings' => 'lightning_theme_options[menu_type]',
|
24 |
-
'type' => 'radio',
|
25 |
-
'choices' => $choices_array,
|
26 |
-
'priority' => 600,
|
27 |
-
));
|
28 |
-
}
|
29 |
-
|
30 |
-
function ltg_adv_is_slide_menu(){
|
31 |
-
$options = get_option('lightning_theme_options');
|
32 |
-
if ( !isset( $options['menu_type'] ) || ( $options['menu_type'] == 'side_slide' ) ) {
|
33 |
-
return true;
|
34 |
-
} else {
|
35 |
-
return false;
|
36 |
-
}
|
37 |
-
}
|
38 |
-
|
39 |
/*-------------------------------------------*/
|
40 |
/* add body class
|
41 |
/*-------------------------------------------*/
|
42 |
add_filter( 'body_class', 'ltg_adv_add_body_class_menu_slide' );
|
43 |
-
function ltg_adv_add_body_class_menu_slide( $class ){
|
44 |
-
if (
|
45 |
-
|
46 |
-
$class[] = 'menu-slide';
|
47 |
-
}
|
48 |
}
|
49 |
return $class;
|
50 |
}
|
@@ -52,34 +13,30 @@ function ltg_adv_add_body_class_menu_slide( $class ){
|
|
52 |
/*-------------------------------------------*/
|
53 |
/* Load js & CSS
|
54 |
/*-------------------------------------------*/
|
55 |
-
add_action( 'wp_enqueue_scripts','ltg_adv_nav_add_script',100 );
|
56 |
function ltg_adv_nav_add_script() {
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
}
|
61 |
|
62 |
/*-------------------------------------------*/
|
63 |
/* insert_header_before_html
|
64 |
/*-------------------------------------------*/
|
65 |
add_action( 'lightning_header_before', 'ltg_adv_insert_header_before_html' );
|
66 |
-
function ltg_adv_insert_header_before_html(){
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
echo '<div id="wrap" class="wrap">';
|
73 |
-
}
|
74 |
}
|
75 |
|
76 |
/*-------------------------------------------*/
|
77 |
/* insert_footer_after_html
|
78 |
/*-------------------------------------------*/
|
79 |
add_action( 'lightning_footer_after', 'ltg_adv_insert_footer_after_html' );
|
80 |
-
function ltg_adv_insert_footer_after_html(){
|
81 |
-
|
82 |
-
|
83 |
-
echo '</div><!-- [ /#bodyInner ] -->';
|
84 |
-
}
|
85 |
}
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
/*-------------------------------------------*/
|
3 |
/* add body class
|
4 |
/*-------------------------------------------*/
|
5 |
add_filter( 'body_class', 'ltg_adv_add_body_class_menu_slide' );
|
6 |
+
function ltg_adv_add_body_class_menu_slide( $class ) {
|
7 |
+
if ( apply_filters( 'lightning_slide_menu_enable', true ) ) {
|
8 |
+
$class[] = 'menu-slide';
|
|
|
|
|
9 |
}
|
10 |
return $class;
|
11 |
}
|
13 |
/*-------------------------------------------*/
|
14 |
/* Load js & CSS
|
15 |
/*-------------------------------------------*/
|
16 |
+
add_action( 'wp_enqueue_scripts', 'ltg_adv_nav_add_script', 100 );
|
17 |
function ltg_adv_nav_add_script() {
|
18 |
+
wp_enqueue_style( 'ltg_adv_nav_style_css', LIGHTNING_ADVANCED_URL . 'inc/navigation/css/navigation.css', array( 'lightning-design-style' ), LIGHTNING_ADVANCED_VERSION, 'all' );
|
19 |
+
wp_register_script( 'ltg_adv_unit_navi_script', LIGHTNING_ADVANCED_URL . 'inc/navigation/js/navigation.min.js', array( 'jquery', 'lightning-js' ), LIGHTNING_ADVANCED_VERSION );
|
20 |
+
wp_enqueue_script( 'ltg_adv_unit_navi_script' );
|
21 |
}
|
22 |
|
23 |
/*-------------------------------------------*/
|
24 |
/* insert_header_before_html
|
25 |
/*-------------------------------------------*/
|
26 |
add_action( 'lightning_header_before', 'ltg_adv_insert_header_before_html' );
|
27 |
+
function ltg_adv_insert_header_before_html() {
|
28 |
+
echo '<div id="bodyInner">';
|
29 |
+
echo '<section id="navSection" class="navSection">';
|
30 |
+
echo get_search_form();
|
31 |
+
echo '</section>';
|
32 |
+
echo '<div id="wrap" class="wrap">';
|
|
|
|
|
33 |
}
|
34 |
|
35 |
/*-------------------------------------------*/
|
36 |
/* insert_footer_after_html
|
37 |
/*-------------------------------------------*/
|
38 |
add_action( 'lightning_footer_after', 'ltg_adv_insert_footer_after_html' );
|
39 |
+
function ltg_adv_insert_footer_after_html() {
|
40 |
+
echo '</div><!-- [ /#wrap ] -->';
|
41 |
+
echo '</div><!-- [ /#bodyInner ] -->';
|
|
|
|
|
42 |
}
|
inc/sidebar-fix/js/sidebar-fix.js
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
/*-------------------------------------------*/
|
2 |
/* スクロール時のサイドバー位置固定処理
|
3 |
/*-------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
;(function($){
|
5 |
|
6 |
/* 読み込み / リサイズ時の処理
|
@@ -12,6 +18,11 @@
|
|
12 |
|
13 |
});
|
14 |
jQuery(window).scroll(function(){
|
|
|
|
|
|
|
|
|
|
|
15 |
sideFix_scroll();
|
16 |
});
|
17 |
|
@@ -28,8 +39,6 @@
|
|
28 |
/*-------------------------------------------*/
|
29 |
function sideFix_scroll(){
|
30 |
|
31 |
-
if( !$('body').hasClass('sidebar-fix') ){ return; }
|
32 |
-
|
33 |
// 画面の幅を取得
|
34 |
var wrap_width = $('body').width();
|
35 |
// 画面の高を取得
|
1 |
/*-------------------------------------------*/
|
2 |
/* スクロール時のサイドバー位置固定処理
|
3 |
/*-------------------------------------------*/
|
4 |
+
|
5 |
+
/*
|
6 |
+
このファイルのマスターは /inc/sidebar-fix/js/sidebar-fix.js になります。
|
7 |
+
gulpで /js/lightning-adv.js に出力しています。
|
8 |
+
*/
|
9 |
+
|
10 |
;(function($){
|
11 |
|
12 |
/* 読み込み / リサイズ時の処理
|
18 |
|
19 |
});
|
20 |
jQuery(window).scroll(function(){
|
21 |
+
if( !$('body').hasClass('sidebar-fix') ){ return; }
|
22 |
+
// サイドバーの位置を取得
|
23 |
+
var sidebar_position_now = jQuery('.sideSection').offset();
|
24 |
+
// サイドバーがなかったら処理中止
|
25 |
+
if ( !sidebar_position_now ) { return }
|
26 |
sideFix_scroll();
|
27 |
});
|
28 |
|
39 |
/*-------------------------------------------*/
|
40 |
function sideFix_scroll(){
|
41 |
|
|
|
|
|
42 |
// 画面の幅を取得
|
43 |
var wrap_width = $('body').width();
|
44 |
// 画面の高を取得
|
inc/sidebar-fix/sidebar-fix.php
CHANGED
File without changes
|
inc/vk-mobile-nav-config.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*-------------------------------------------*/
|
4 |
+
/* Load modules
|
5 |
+
/*-------------------------------------------*/
|
6 |
+
if ( ! class_exists( 'Vk_Mobile_Nav' ) ) {
|
7 |
+
require_once( 'vk-mobile-nav/class-vk-mobile-nav.php' );
|
8 |
+
|
9 |
+
global $vk_mobile_nav_textdomain;
|
10 |
+
$vk_mobile_nav_textdomain = 'lightning-adv-unit';
|
11 |
+
|
12 |
+
}
|
inc/vk-mobile-nav/_scss/_bg_dark.scss
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "utf-8";
|
2 |
+
|
3 |
+
$border_primary : 1px solid #666;
|
4 |
+
$color_font_default : rgba(255,255,255,0.8);
|
5 |
+
|
6 |
+
.vk-mobile-nav-menu-btn.menu-open {
|
7 |
+
border-color:$color_font_default;
|
8 |
+
background:url('../images/vk-menu-btn-close-white.svg') center 50% no-repeat;
|
9 |
+
}
|
10 |
+
|
11 |
+
.vk-mobile-nav {
|
12 |
+
background-color: #333;
|
13 |
+
nav > ul {
|
14 |
+
border-top:$border_primary;
|
15 |
+
}
|
16 |
+
nav ul li a {
|
17 |
+
color:$color_font_default;
|
18 |
+
border-bottom:$border_primary;
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
.vk-menu-acc .acc-btn {
|
23 |
+
border:1px solid $color_font_default;
|
24 |
+
background:url('../images/vk-menu-acc-icon-open-white.svg') center 50% no-repeat;
|
25 |
+
}
|
26 |
+
.vk-menu-acc .acc-btn-close{
|
27 |
+
background:url('../images/vk-menu-btn-close-white.svg') center 50% no-repeat;
|
28 |
+
}
|
inc/vk-mobile-nav/_scss/_bg_light.scss
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "utf-8";
|
2 |
+
|
3 |
+
$border_primary : 1px solid #ccc;
|
4 |
+
$color_font_default : #333;
|
5 |
+
|
6 |
+
.vk-mobile-nav-menu-btn.menu-open {
|
7 |
+
border-color:$color_font_default;
|
8 |
+
background:url('../images/vk-menu-btn-close-black.svg') center 50% no-repeat;
|
9 |
+
}
|
10 |
+
|
11 |
+
.vk-mobile-nav {
|
12 |
+
background-color: #fff;
|
13 |
+
nav > ul {
|
14 |
+
border-top:$border_primary;
|
15 |
+
}
|
16 |
+
nav ul li a {
|
17 |
+
color:$color_font_default;
|
18 |
+
border-bottom:$border_primary;
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
.vk-menu-acc .acc-btn {
|
23 |
+
border:1px solid $color_font_default;
|
24 |
+
background:url('../images/vk-menu-acc-icon-open-black.svg') center 50% no-repeat;
|
25 |
+
}
|
26 |
+
.vk-menu-acc .acc-btn-close{
|
27 |
+
background:url('../images/vk-menu-btn-close-black.svg') center 50% no-repeat;
|
28 |
+
}
|
inc/vk-mobile-nav/_scss/_bg_white.scss
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "utf-8";
|
2 |
+
|
3 |
+
$border_primary : 1px solid #ccc;
|
4 |
+
$color_font_default : #333;
|
5 |
+
|
6 |
+
.vk-mobile-nav-menu-btn.menu-open {
|
7 |
+
border-color:$color_font_default;
|
8 |
+
background:url('../images/vk-menu-btn-close-black.svg') center 50% no-repeat;
|
9 |
+
}
|
10 |
+
|
11 |
+
.vk-mobile-nav {
|
12 |
+
background-color: #fff;
|
13 |
+
nav > ul {
|
14 |
+
border-top:$border_primary;
|
15 |
+
}
|
16 |
+
nav ul li a {
|
17 |
+
color:$color_font_default;
|
18 |
+
border-bottom:$border_primary;
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
.vk-menu-acc .acc-btn {
|
23 |
+
border:1px solid $color_font_default;
|
24 |
+
background:url('../images/vk-menu-acc-icon-open-black.svg') center 50% no-repeat;
|
25 |
+
}
|
26 |
+
.vk-menu-acc .acc-btn-close{
|
27 |
+
background:url('../images/vk-menu-btn-close-black.svg') center 50% no-repeat;
|
28 |
+
}
|
inc/vk-mobile-nav/_scss/_common.scss
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "utf-8";
|
2 |
+
// @import "compass";
|
3 |
+
|
4 |
+
$border_primary : 1px solid #666;
|
5 |
+
$color_font_default : rgba(255,255,255,0.8);
|
6 |
+
$time_transition:0.5s;
|
7 |
+
$btn_radius:2px;
|
8 |
+
|
9 |
+
$admin_bar_height_pc:32px;
|
10 |
+
$admin_bar_height_mobile:46px;
|
11 |
+
|
12 |
+
$manu_btn_margin:10px;
|
13 |
+
|
14 |
+
body.admin-bar {
|
15 |
+
.vk-mobile-nav-menu-btn {
|
16 |
+
top:calc( #{$admin_bar_height_pc} + #{$manu_btn_margin} );
|
17 |
+
@media screen and (max-width: 782px){
|
18 |
+
top:calc( #{$admin_bar_height_mobile} + #{$manu_btn_margin} );
|
19 |
+
}
|
20 |
+
}
|
21 |
+
.vk-mobile-nav.vk-mobile-nav-open{
|
22 |
+
top:$admin_bar_height_pc;
|
23 |
+
@media screen and (max-width: 782px){
|
24 |
+
top:$admin_bar_height_mobile;
|
25 |
+
}
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
body.device-pc {
|
30 |
+
// PCで画面が広い時に非表示
|
31 |
+
@media ( min-width: 992px){
|
32 |
+
.vk-mobile-nav-menu-btn {
|
33 |
+
display: none;
|
34 |
+
}
|
35 |
+
.vk-mobile-nav {
|
36 |
+
display: none;
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
body.device-mobile {
|
41 |
+
/* モバイル端末では画面サイズ関係なく表示 */
|
42 |
+
.vk-mobile-nav-menu-btn {
|
43 |
+
display: block;
|
44 |
+
}
|
45 |
+
}
|
46 |
+
|
47 |
+
/*-------------------------------------------*/
|
48 |
+
/* .vk-mobile-nav-menu-btn
|
49 |
+
/*-------------------------------------------*/
|
50 |
+
.vk-mobile-nav-menu-btn {
|
51 |
+
position: fixed;
|
52 |
+
top:$manu_btn_margin;
|
53 |
+
left:$manu_btn_margin;
|
54 |
+
z-index: 2100;
|
55 |
+
overflow:hidden;
|
56 |
+
border:1px solid #333;
|
57 |
+
border-radius: 2px;
|
58 |
+
width:34px;
|
59 |
+
height:34px;
|
60 |
+
cursor: pointer;
|
61 |
+
text-indent: -9999px;
|
62 |
+
background:url('../images/vk-menu-btn.svg') center 50% no-repeat;
|
63 |
+
background-size: 24px 24px;
|
64 |
+
transition: border-color $time_transition ease-out;
|
65 |
+
}
|
66 |
+
.vk-mobile-nav-menu-btn.menu-open {
|
67 |
+
border:1px solid $color_font_default;
|
68 |
+
background:url('../images/vk-menu-btn-close.svg') center 50% no-repeat;
|
69 |
+
}
|
70 |
+
|
71 |
+
/*-------------------------------------------*/
|
72 |
+
/* .vk-mobile-nav
|
73 |
+
/*-------------------------------------------*/
|
74 |
+
$margin-section-bottom:1.5em;
|
75 |
+
// メニューボタンがタップされてたら
|
76 |
+
.vk-mobile-nav.vk-mobile-nav-open{
|
77 |
+
top:0;
|
78 |
+
}
|
79 |
+
|
80 |
+
.vk-mobile-nav {
|
81 |
+
position: fixed;
|
82 |
+
top:-2000px;
|
83 |
+
z-index: 2000;
|
84 |
+
width:100%;
|
85 |
+
height:100%;
|
86 |
+
display:block;
|
87 |
+
padding:60px 10px;
|
88 |
+
overflow:scroll;
|
89 |
+
transition: top $time_transition ease-out;
|
90 |
+
box-shadow:1px 1px 4px rgba(0,0,0,0.1);
|
91 |
+
.global-nav {
|
92 |
+
margin-bottom:$margin-section-bottom;
|
93 |
+
}
|
94 |
+
nav ul {
|
95 |
+
padding:0;
|
96 |
+
margin:0;
|
97 |
+
li {
|
98 |
+
list-style: none;
|
99 |
+
a {
|
100 |
+
padding: 0.7em 0.5em;
|
101 |
+
display:block; overflow:hidden;
|
102 |
+
&:hover {
|
103 |
+
text-decoration: none;
|
104 |
+
}
|
105 |
+
}
|
106 |
+
}
|
107 |
+
li li a { padding-left:1.5em;}
|
108 |
+
li li li a { padding-left:2.5em;}
|
109 |
+
li li li li a { padding-left:3.5em;}
|
110 |
+
}
|
111 |
+
}
|
112 |
+
.vk-mobile-nav-widget {
|
113 |
+
margin-bottom:$margin-section-bottom
|
114 |
+
}
|
115 |
+
|
116 |
+
.vk-mobile-nav .customize-partial-edit-shortcut button,
|
117 |
+
.vk-mobile-nav .widget .customize-partial-edit-shortcut button {
|
118 |
+
left:0px;
|
119 |
+
top:-30px;
|
120 |
+
}
|
inc/vk-mobile-nav/_scss/_sub_item_accordion.scss
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "utf-8";
|
2 |
+
/*-------------------------------------------*/
|
3 |
+
/* vk-menu-acc--common
|
4 |
+
/*-------------------------------------------*/
|
5 |
+
.vk-menu-acc {
|
6 |
+
position: relative;
|
7 |
+
.menu-parent > li {
|
8 |
+
position: relative;
|
9 |
+
z-index: 100;
|
10 |
+
a {
|
11 |
+
display: inline-block;
|
12 |
+
}
|
13 |
+
}
|
14 |
+
li {
|
15 |
+
position: relative;
|
16 |
+
}
|
17 |
+
.acc-btn {
|
18 |
+
position: absolute;
|
19 |
+
right:8px;
|
20 |
+
top:9px;
|
21 |
+
width:24px;
|
22 |
+
height:24px;
|
23 |
+
border:1px solid $color_font_default;
|
24 |
+
border-radius: 2px;
|
25 |
+
background:url('../images/vk-menu-acc-icon-open-white.svg') center 50% no-repeat;
|
26 |
+
background-size: 24px 24px;
|
27 |
+
cursor: pointer;
|
28 |
+
z-index: 1000;
|
29 |
+
transition: transform $time_transition ease-out;
|
30 |
+
}
|
31 |
+
.acc-btn:before{
|
32 |
+
position: relative;
|
33 |
+
top:-5px;
|
34 |
+
left:4px;
|
35 |
+
font-size:16px;
|
36 |
+
}
|
37 |
+
.acc-btn-open{
|
38 |
+
|
39 |
+
}
|
40 |
+
.acc-btn-close{
|
41 |
+
// transform: rotate(180deg);
|
42 |
+
background:url('../images/vk-menu-btn-close.svg') center 50% no-repeat;
|
43 |
+
}
|
44 |
+
ul.sub-menu {
|
45 |
+
max-height:0;
|
46 |
+
overflow:hidden;
|
47 |
+
transition: max-height $time_transition ease-in;
|
48 |
+
position: relative;
|
49 |
+
z-index: 1;
|
50 |
+
display:block;
|
51 |
+
li {
|
52 |
+
a {
|
53 |
+
display:block; overflow:hidden;
|
54 |
+
}
|
55 |
+
}
|
56 |
+
}
|
57 |
+
ul.acc-child-open {
|
58 |
+
transition: max-height $time_transition ease-in;
|
59 |
+
max-height:500px;
|
60 |
+
}
|
61 |
+
ul.acc-child-close {
|
62 |
+
transition: max-height $time_transition ease-out;
|
63 |
+
max-height:0;
|
64 |
+
}
|
65 |
+
}
|
inc/vk-mobile-nav/_scss/vk-mobile-nav-bright.scss
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "utf-8";
|
2 |
+
|
3 |
+
@import "common";
|
4 |
+
@import "sub_item_accordion";
|
5 |
+
|
6 |
+
$border_primary : 1px solid #ccc;
|
7 |
+
$color_font_default : #333;
|
8 |
+
|
9 |
+
.vk-mobile-nav-menu-btn {
|
10 |
+
background-color: rgba(255,255,255,0.8);
|
11 |
+
box-shadow:1px 1px 4px rgba(0,0,0,0.1);
|
12 |
+
}
|
13 |
+
.vk-mobile-nav-menu-btn.menu-open {
|
14 |
+
border-color:$color_font_default;
|
15 |
+
background:url('../images/vk-menu-btn-close-black.svg') center 50% no-repeat;
|
16 |
+
}
|
17 |
+
|
18 |
+
.vk-mobile-nav {
|
19 |
+
background-color: #fff;
|
20 |
+
border-bottom:1px solid #e5e5e5;
|
21 |
+
|
22 |
+
// WordPress標準のカスタムメニュー
|
23 |
+
.widget_nav_menu ul.menu {
|
24 |
+
border-top:$border_primary;
|
25 |
+
}
|
26 |
+
// VK Mobile Nav 標準の埋め込みメニュー
|
27 |
+
nav > ul {
|
28 |
+
border-top:$border_primary;
|
29 |
+
}
|
30 |
+
|
31 |
+
.widget_nav_menu,
|
32 |
+
nav {
|
33 |
+
ul li a {
|
34 |
+
color:$color_font_default;
|
35 |
+
border-bottom:$border_primary;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
}
|
40 |
+
|
41 |
+
.vk-menu-acc .acc-btn {
|
42 |
+
border:1px solid $color_font_default;
|
43 |
+
background:url('../images/vk-menu-acc-icon-open-black.svg') center 50% no-repeat;
|
44 |
+
}
|
45 |
+
.vk-menu-acc .acc-btn-close{
|
46 |
+
background:url('../images/vk-menu-btn-close-black.svg') center 50% no-repeat;
|
47 |
+
}
|
inc/vk-mobile-nav/_scss/vk-mobile-nav-dark.scss
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "utf-8";
|
2 |
+
|
3 |
+
@import "common";
|
4 |
+
@import "sub_item_accordion";
|
5 |
+
|
6 |
+
$border_primary : 1px solid #666;
|
7 |
+
$color_font_default : rgba(255,255,255,0.8);
|
8 |
+
|
9 |
+
.vk-mobile-nav-menu-btn.menu-open {
|
10 |
+
border-color:$color_font_default;
|
11 |
+
background:url('../images/vk-menu-btn-close-white.svg') center 50% no-repeat;
|
12 |
+
}
|
13 |
+
|
14 |
+
.vk-mobile-nav {
|
15 |
+
background-color: #333;
|
16 |
+
border-bottom:666;
|
17 |
+
|
18 |
+
// WordPress標準のカスタムメニュー
|
19 |
+
.widget_nav_menu ul.menu {
|
20 |
+
border-top:$border_primary;
|
21 |
+
}
|
22 |
+
// VK Mobile Nav 標準の埋め込みメニュー
|
23 |
+
nav > ul {
|
24 |
+
border-top:$border_primary;
|
25 |
+
}
|
26 |
+
|
27 |
+
.widget_nav_menu,
|
28 |
+
nav {
|
29 |
+
ul li a {
|
30 |
+
color:$color_font_default;
|
31 |
+
border-bottom:$border_primary;
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
+
}
|
36 |
+
|
37 |
+
.vk-menu-acc .acc-btn {
|
38 |
+
border:1px solid $color_font_default;
|
39 |
+
background:url('../images/vk-menu-acc-icon-open-white.svg') center 50% no-repeat;
|
40 |
+
}
|
41 |
+
.vk-menu-acc .acc-btn-close{
|
42 |
+
background:url('../images/vk-menu-btn-close-white.svg') center 50% no-repeat;
|
43 |
+
}
|
inc/vk-mobile-nav/_scss/vk-mobile-nav-light.scss
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "utf-8";
|
2 |
+
|
3 |
+
@import "common";
|
4 |
+
@import "sub_item_accordion";
|
5 |
+
|
6 |
+
$border_primary : 1px solid #ccc;
|
7 |
+
$color_font_default : #333;
|
8 |
+
|
9 |
+
.vk-mobile-nav-menu-btn.menu-open {
|
10 |
+
border-color:$color_font_default;
|
11 |
+
background:url('../images/vk-menu-btn-close-black.svg') center 50% no-repeat;
|
12 |
+
}
|
13 |
+
|
14 |
+
.vk-mobile-nav {
|
15 |
+
background-color: #fff;
|
16 |
+
nav > ul {
|
17 |
+
border-top:$border_primary;
|
18 |
+
}
|
19 |
+
nav ul li a {
|
20 |
+
color:$color_font_default;
|
21 |
+
border-bottom:$border_primary;
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
.vk-menu-acc .acc-btn {
|
26 |
+
border:1px solid $color_font_default;
|
27 |
+
background:url('../images/vk-menu-acc-icon-open-black.svg') center 50% no-repeat;
|
28 |
+
}
|
29 |
+
.vk-menu-acc .acc-btn-close{
|
30 |
+
background:url('../images/vk-menu-btn-close-black.svg') center 50% no-repeat;
|
31 |
+
}
|
inc/vk-mobile-nav/_scss/vk-mobile-nav.scss
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@charset "utf-8";
|
2 |
+
|
3 |
+
@import "common";
|
4 |
+
@import "sub_item_accordion";
|
5 |
+
@import "bg_dark";
|
inc/vk-mobile-nav/class-vk-mobile-nav.php
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
このファイルの元ファイルは
|
4 |
+
https://github.com/vektor-inc/vektor-wp-libraries
|
5 |
+
にあります。修正の際は上記リポジトリのデータを修正してください。
|
6 |
+
*/
|
7 |
+
|
8 |
+
if ( ! class_exists( 'Vk_Mobile_Nav' ) ) {
|
9 |
+
class Vk_Mobile_Nav {
|
10 |
+
|
11 |
+
public static $version = '0.0.0';
|
12 |
+
|
13 |
+
public function __construct() {
|
14 |
+
add_action( 'after_setup_theme', array( $this, 'setup_menu' ) );
|
15 |
+
add_action( 'widgets_init', array( $this, 'setup_widget' ) );
|
16 |
+
// add_action( 'wp_footer', array( $this, 'menu_set_html' ) );
|
17 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'add_script' ) );
|
18 |
+
add_filter( 'body_class', array( $this, 'add_body_class_mobile_device' ) );
|
19 |
+
}
|
20 |
+
public static function init() {
|
21 |
+
|
22 |
+
// add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* body class 端末識別クラス追加
|
27 |
+
* @return [type] [description]
|
28 |
+
*/
|
29 |
+
function add_body_class_mobile_device( $class ) {
|
30 |
+
if ( wp_is_mobile() ) {
|
31 |
+
$class[] = 'device-mobile';
|
32 |
+
} else {
|
33 |
+
$class[] = 'device-pc';
|
34 |
+
}
|
35 |
+
return $class;
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* モバイル用メニュー追加
|
40 |
+
* @return [type] [description]
|
41 |
+
*/
|
42 |
+
public static function setup_menu() {
|
43 |
+
register_nav_menus( array( 'vk-mobile-nav' => 'Mobile Navigation' ) );
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* モバイルメニュー用ウィジェットエリア追加
|
48 |
+
* @return [type] [description]
|
49 |
+
*/
|
50 |
+
static function setup_widget() {
|
51 |
+
global $vk_mobile_nav_textdomain;
|
52 |
+
register_sidebar(
|
53 |
+
array(
|
54 |
+
'name' => __( 'Mobile Nav Upper', $vk_mobile_nav_textdomain ),
|
55 |
+
'id' => 'vk-mobile-nav-upper',
|
56 |
+
'before_widget' => '<aside class="widget vk-mobile-nav-widget %2$s" id="%1$s">',
|
57 |
+
'after_widget' => '</aside>',
|
58 |
+
'before_title' => '<h1 class="widget-title subSection-title">',
|
59 |
+
'after_title' => '</h1>',
|
60 |
+
)
|
61 |
+
);
|
62 |
+
register_sidebar(
|
63 |
+
array(
|
64 |
+
'name' => __( 'Mobile Nav Bottom', $vk_mobile_nav_textdomain ),
|
65 |
+
'id' => 'vk-mobile-nav-bottom',
|
66 |
+
'before_widget' => '<aside class="widget vk-mobile-nav-widget %2$s" id="%1$s">',
|
67 |
+
'after_widget' => '</aside>',
|
68 |
+
'before_title' => '<h1 class="widget-title subSection-title">',
|
69 |
+
'after_title' => '</h1>',
|
70 |
+
)
|
71 |
+
);
|
72 |
+
}
|
73 |
+
|
74 |
+
public static function menu_set_html() {
|
75 |
+
|
76 |
+
global $vk_mobile_nav_textdomain;
|
77 |
+
|
78 |
+
echo '<div class="vk-mobile-nav-menu-btn">MENU</div>';
|
79 |
+
|
80 |
+
echo '<div class="vk-mobile-nav">';
|
81 |
+
if ( is_active_sidebar( 'vk-mobile-nav-upper' ) ) {
|
82 |
+
dynamic_sidebar( 'vk-mobile-nav-upper' );
|
83 |
+
} else {
|
84 |
+
echo '<div class="veu_adminEdit alert alert-info">';
|
85 |
+
echo '<p>' . sprintf( __( 'This is the widget area.<br>You can set widget item from [ <a href="%s">Appearance > Customize</a> ] Page -> "Widgets" panel -> "Mobile Nav Upper" Panel.', $vk_mobile_nav_textdomain ), admin_url( 'customize.php' ) ) . '</p>';
|
86 |
+
echo '<p>' . __( '* This message is displayed only to users with editing authority.', $vk_mobile_nav_textdomain ) . '</p>';
|
87 |
+
echo '</div>';
|
88 |
+
}
|
89 |
+
|
90 |
+
$menu = wp_nav_menu(
|
91 |
+
array(
|
92 |
+
'theme_location' => 'vk-mobile-nav',
|
93 |
+
'container' => '',
|
94 |
+
'items_wrap' => '<nav class="global-nav"><ul id="%1$s" class="vk-menu-acc %2$s">%3$s</ul></nav>',
|
95 |
+
'fallback_cb' => '',
|
96 |
+
'echo' => false,
|
97 |
+
// 'depth' => 1,
|
98 |
+
)
|
99 |
+
);
|
100 |
+
if ( $menu ) {
|
101 |
+
echo $menu;
|
102 |
+
} else {
|
103 |
+
if ( current_user_can( 'edit_theme_options' ) ) {
|
104 |
+
echo '<div class="veu_adminEdit alert alert-danger">';
|
105 |
+
echo '<p>' . sprintf( __( 'Menu is not set.<br>Please set menu from [ <a href="%s">Appearance > Customize</a> ] Page -> "Menus" panel -> Menu Locations "Mobile Navigation".', $vk_mobile_nav_textdomain ), admin_url( 'customize.php' ) ) . '</p>';
|
106 |
+
echo '<p>' . __( '* This message is displayed only to users with editing authority.', $vk_mobile_nav_textdomain ) . '</p>';
|
107 |
+
echo '</div>';
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
if ( is_active_sidebar( 'vk-mobile-nav-bottom' ) ) {
|
112 |
+
dynamic_sidebar( 'vk-mobile-nav-bottom' );
|
113 |
+
} else {
|
114 |
+
echo '<div class="veu_adminEdit alert alert-info">';
|
115 |
+
echo '<p>' . sprintf( __( 'This is the widget area.<br>You can set widget item from [ <a href="%s">Appearance > Customize</a> ] Page -> "Widgets" panel -> "Mobile Nav Bottom" Panel.', $vk_mobile_nav_textdomain ), admin_url( 'customize.php' ) ) . '</p>';
|
116 |
+
echo '<p>' . __( '* This message is displayed only to users with editing authority.', $vk_mobile_nav_textdomain ) . '</p>';
|
117 |
+
echo '</div>';
|
118 |
+
}
|
119 |
+
|
120 |
+
echo '</div>';
|
121 |
+
}
|
122 |
+
|
123 |
+
/*-------------------------------------------*/
|
124 |
+
/* Load js & CSS
|
125 |
+
/*-------------------------------------------*/
|
126 |
+
|
127 |
+
public static function add_script() {
|
128 |
+
wp_register_script( 'vk-mobile-nav-js', plugin_dir_url( __FILE__ ) . 'js/vk-mobile-nav.js', array( 'jquery' ), self::$version );
|
129 |
+
wp_enqueue_script( 'vk-mobile-nav-js' );
|
130 |
+
wp_enqueue_style( 'vk-mobile-nav-css', plugin_dir_url( __FILE__ ) . 'css/vk-mobile-nav-bright.css', array(), self::$version, 'all' );
|
131 |
+
}
|
132 |
+
|
133 |
+
} // class Vk_Mobile_Nav
|
134 |
+
|
135 |
+
$vk_mobile_nav = new Vk_Mobile_Nav();
|
136 |
+
}
|
inc/vk-mobile-nav/css/vk-mobile-nav-bright.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
body.admin-bar .vk-mobile-nav-menu-btn{top:calc(32px + 10px)}body.admin-bar .vk-mobile-nav.vk-mobile-nav-open{top:32px}body.device-mobile .vk-mobile-nav-menu-btn{display:block}.vk-mobile-nav-menu-btn{position:fixed;top:10px;left:10px;z-index:2100;overflow:hidden;border:1px solid #333;border-radius:2px;width:34px;height:34px;cursor:pointer;text-indent:-9999px;background:url(../images/vk-menu-btn.svg) center 50% no-repeat;background-size:24px 24px;-webkit-transition:border-color .5s ease-out;transition:border-color .5s ease-out}.vk-mobile-nav-menu-btn.menu-open{border:1px solid rgba(255,255,255,.8);background:url(../images/vk-menu-btn-close.svg) center 50% no-repeat}.vk-mobile-nav.vk-mobile-nav-open{top:0}.vk-mobile-nav{position:fixed;top:-2000px;z-index:2000;width:100%;height:100%;display:block;padding:60px 10px;overflow:scroll;-webkit-transition:top .5s ease-out;transition:top .5s ease-out;-webkit-box-shadow:1px 1px 4px rgba(0,0,0,.1);box-shadow:1px 1px 4px rgba(0,0,0,.1)}.vk-mobile-nav .global-nav{margin-bottom:1.5em}.vk-mobile-nav nav ul{padding:0;margin:0}.vk-mobile-nav nav ul li{list-style:none}.vk-mobile-nav nav ul li a{padding:.7em .5em;display:block;overflow:hidden}.vk-mobile-nav nav ul li a:hover{text-decoration:none}.vk-mobile-nav nav ul li li a{padding-left:1.5em}.vk-mobile-nav nav ul li li li a{padding-left:2.5em}.vk-mobile-nav nav ul li li li li a{padding-left:3.5em}.vk-mobile-nav-widget{margin-bottom:1.5em}.vk-mobile-nav .customize-partial-edit-shortcut button,.vk-mobile-nav .widget .customize-partial-edit-shortcut button{left:0;top:-30px}.vk-menu-acc{position:relative}.vk-menu-acc .menu-parent>li{position:relative;z-index:100}.vk-menu-acc .menu-parent>li a{display:inline-block}.vk-menu-acc li{position:relative}.vk-menu-acc .acc-btn{position:absolute;right:8px;top:9px;width:24px;height:24px;border:1px solid rgba(255,255,255,.8);border-radius:2px;background:url(../images/vk-menu-acc-icon-open-white.svg) center 50% no-repeat;background-size:24px 24px;cursor:pointer;z-index:1000;-webkit-transition:-webkit-transform .5s ease-out;transition:-webkit-transform .5s ease-out;transition:transform .5s ease-out;transition:transform .5s ease-out,-webkit-transform .5s ease-out}.vk-menu-acc .acc-btn:before{position:relative;top:-5px;left:4px;font-size:16px}.vk-menu-acc .acc-btn-close{background:url(../images/vk-menu-btn-close.svg) center 50% no-repeat}.vk-menu-acc ul.sub-menu{max-height:0;overflow:hidden;-webkit-transition:max-height .5s ease-in;transition:max-height .5s ease-in;position:relative;z-index:1;display:block}.vk-menu-acc ul.sub-menu li a{display:block;overflow:hidden}.vk-menu-acc ul.acc-child-open{-webkit-transition:max-height .5s ease-in;transition:max-height .5s ease-in;max-height:500px}.vk-menu-acc ul.acc-child-close{-webkit-transition:max-height .5s ease-out;transition:max-height .5s ease-out;max-height:0}.vk-mobile-nav-menu-btn{background-color:rgba(255,255,255,.8);-webkit-box-shadow:1px 1px 4px rgba(0,0,0,.1);box-shadow:1px 1px 4px rgba(0,0,0,.1)}.vk-mobile-nav-menu-btn.menu-open{border-color:#333;background:url(../images/vk-menu-btn-close-black.svg) center 50% no-repeat}.vk-mobile-nav{background-color:#fff;border-bottom:1px solid #e5e5e5}.vk-mobile-nav .widget_nav_menu ul.menu{border-top:1px solid #ccc}.vk-mobile-nav nav>ul{border-top:1px solid #ccc}.vk-mobile-nav .widget_nav_menu ul li a,.vk-mobile-nav nav ul li a{color:#333;border-bottom:1px solid #ccc}.vk-menu-acc .acc-btn{border:1px solid #333;background:url(../images/vk-menu-acc-icon-open-black.svg) center 50% no-repeat}.vk-menu-acc .acc-btn-close{background:url(../images/vk-menu-btn-close-black.svg) center 50% no-repeat}@media (min-width:992px){body.device-pc .vk-mobile-nav-menu-btn{display:none}body.device-pc .vk-mobile-nav{display:none}}@media screen and (max-width:782px){body.admin-bar .vk-mobile-nav-menu-btn{top:calc(46px + 10px)}body.admin-bar .vk-mobile-nav.vk-mobile-nav-open{top:46px}}
|
inc/vk-mobile-nav/css/vk-mobile-nav-dark.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
body.admin-bar .vk-mobile-nav-menu-btn{top:calc(32px + 10px)}body.admin-bar .vk-mobile-nav.vk-mobile-nav-open{top:32px}body.device-mobile .vk-mobile-nav-menu-btn{display:block}.vk-mobile-nav-menu-btn{position:fixed;top:10px;left:10px;z-index:2100;overflow:hidden;border:1px solid #333;border-radius:2px;width:34px;height:34px;cursor:pointer;text-indent:-9999px;background:url(../images/vk-menu-btn.svg) center 50% no-repeat;background-size:24px 24px;-webkit-transition:border-color .5s ease-out;transition:border-color .5s ease-out}.vk-mobile-nav-menu-btn.menu-open{border:1px solid rgba(255,255,255,.8);background:url(../images/vk-menu-btn-close.svg) center 50% no-repeat}.vk-mobile-nav.vk-mobile-nav-open{top:0}.vk-mobile-nav{position:fixed;top:-2000px;z-index:2000;width:100%;height:100%;display:block;padding:60px 10px;overflow:scroll;-webkit-transition:top .5s ease-out;transition:top .5s ease-out;-webkit-box-shadow:1px 1px 4px rgba(0,0,0,.1);box-shadow:1px 1px 4px rgba(0,0,0,.1)}.vk-mobile-nav .global-nav{margin-bottom:1.5em}.vk-mobile-nav nav ul{padding:0;margin:0}.vk-mobile-nav nav ul li{list-style:none}.vk-mobile-nav nav ul li a{padding:.7em .5em;display:block;overflow:hidden}.vk-mobile-nav nav ul li a:hover{text-decoration:none}.vk-mobile-nav nav ul li li a{padding-left:1.5em}.vk-mobile-nav nav ul li li li a{padding-left:2.5em}.vk-mobile-nav nav ul li li li li a{padding-left:3.5em}.vk-mobile-nav-widget{margin-bottom:1.5em}.vk-mobile-nav .customize-partial-edit-shortcut button,.vk-mobile-nav .widget .customize-partial-edit-shortcut button{left:0;top:-30px}.vk-menu-acc{position:relative}.vk-menu-acc .menu-parent>li{position:relative;z-index:100}.vk-menu-acc .menu-parent>li a{display:inline-block}.vk-menu-acc li{position:relative}.vk-menu-acc .acc-btn{position:absolute;right:8px;top:9px;width:24px;height:24px;border:1px solid rgba(255,255,255,.8);border-radius:2px;background:url(../images/vk-menu-acc-icon-open-white.svg) center 50% no-repeat;background-size:24px 24px;cursor:pointer;z-index:1000;-webkit-transition:-webkit-transform .5s ease-out;transition:-webkit-transform .5s ease-out;transition:transform .5s ease-out;transition:transform .5s ease-out,-webkit-transform .5s ease-out}.vk-menu-acc .acc-btn:before{position:relative;top:-5px;left:4px;font-size:16px}.vk-menu-acc .acc-btn-close{background:url(../images/vk-menu-btn-close.svg) center 50% no-repeat}.vk-menu-acc ul.sub-menu{max-height:0;overflow:hidden;-webkit-transition:max-height .5s ease-in;transition:max-height .5s ease-in;position:relative;z-index:1;display:block}.vk-menu-acc ul.sub-menu li a{display:block;overflow:hidden}.vk-menu-acc ul.acc-child-open{-webkit-transition:max-height .5s ease-in;transition:max-height .5s ease-in;max-height:500px}.vk-menu-acc ul.acc-child-close{-webkit-transition:max-height .5s ease-out;transition:max-height .5s ease-out;max-height:0}.vk-mobile-nav-menu-btn.menu-open{border-color:rgba(255,255,255,.8);background:url(../images/vk-menu-btn-close-white.svg) center 50% no-repeat}.vk-mobile-nav{background-color:#333;border-bottom:666}.vk-mobile-nav .widget_nav_menu ul.menu{border-top:1px solid #666}.vk-mobile-nav nav>ul{border-top:1px solid #666}.vk-mobile-nav .widget_nav_menu ul li a,.vk-mobile-nav nav ul li a{color:rgba(255,255,255,.8);border-bottom:1px solid #666}.vk-menu-acc .acc-btn{border:1px solid rgba(255,255,255,.8);background:url(../images/vk-menu-acc-icon-open-white.svg) center 50% no-repeat}.vk-menu-acc .acc-btn-close{background:url(../images/vk-menu-btn-close-white.svg) center 50% no-repeat}@media (min-width:992px){body.device-pc .vk-mobile-nav-menu-btn{display:none}body.device-pc .vk-mobile-nav{display:none}}@media screen and (max-width:782px){body.admin-bar .vk-mobile-nav-menu-btn{top:calc(46px + 10px)}body.admin-bar .vk-mobile-nav.vk-mobile-nav-open{top:46px}}
|
inc/vk-mobile-nav/css/vk-mobile-nav-light.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
body.admin-bar .vk-mobile-nav-menu-btn{top:56px}body.admin-bar .vk-mobile-nav.vk-mobile-nav-open{top:46px}.vk-mobile-nav-menu-btn{position:fixed;top:10px;left:10px;z-index:2000;overflow:hidden;border:1px solid #333;border-radius:2px;width:34px;height:34px;cursor:pointer;text-indent:-9999px;background:url(../images/vk-menu-btn.svg) center 50% no-repeat;background-size:24px 24px;-webkit-transition:border-color .5s ease-out;transition:border-color .5s ease-out}.vk-mobile-nav-menu-btn.menu-open{border:1px solid rgba(255,255,255,.8);background:url(../images/vk-menu-btn-close.svg) center 50% no-repeat}body.mobile-device .vk-mobile-nav-menu-btn{display:block}.vk-mobile-nav.vk-mobile-nav-open{top:0}.vk-mobile-nav{position:fixed;top:-2000px;z-index:1000;width:100%;height:100%;display:block;overflow:scroll;-webkit-transition:top .5s ease-out;transition:top .5s ease-out}.vk-mobile-nav .global-nav{margin-top:60px}.vk-mobile-nav nav ul{padding:0;margin:0}.vk-mobile-nav nav ul li{list-style:none}.vk-mobile-nav nav ul li a{padding:.7em 1em;display:block;overflow:hidden}.vk-mobile-nav nav ul li a:hover{text-decoration:none}.vk-mobile-nav nav ul li li a{padding-left:2em}.vk-mobile-nav nav ul li li li a{padding-left:3em}.vk-mobile-nav nav ul li li li li a{padding-left:4em}.vk-menu-acc{position:relative}.vk-menu-acc .menu-parent>li{position:relative;z-index:100}.vk-menu-acc .menu-parent>li a{display:inline-block}.vk-menu-acc li{position:relative}.vk-menu-acc .acc-btn{position:absolute;right:8px;top:9px;width:24px;height:24px;border:1px solid rgba(255,255,255,.8);border-radius:2px;background:url(../images/vk-menu-acc-icon-open-white.svg) center 50% no-repeat;background-size:24px 24px;cursor:pointer;z-index:1000;-webkit-transition:-webkit-transform .5s ease-out;transition:-webkit-transform .5s ease-out;transition:transform .5s ease-out;transition:transform .5s ease-out,-webkit-transform .5s ease-out}.vk-menu-acc .acc-btn:before{position:relative;top:-5px;left:4px;font-size:16px}.vk-menu-acc .acc-btn-close{background:url(../images/vk-menu-btn-close.svg) center 50% no-repeat}.vk-menu-acc ul.sub-menu{max-height:0;overflow:hidden;-webkit-transition:max-height .5s ease-in;transition:max-height .5s ease-in;position:relative;z-index:1;display:block}.vk-menu-acc ul.sub-menu li a{display:block;overflow:hidden}.vk-menu-acc ul.acc-child-open{-webkit-transition:max-height .5s ease-in;transition:max-height .5s ease-in;max-height:500px}.vk-menu-acc ul.acc-child-close{-webkit-transition:max-height .5s ease-out;transition:max-height .5s ease-out;max-height:0}.vk-mobile-nav-menu-btn.menu-open{border-color:rgba(255,255,255,.8);background:url(../images/vk-menu-btn-close.svg) center 50% no-repeat}.vk-mobile-nav{background-color:#333}.vk-mobile-nav nav>ul{border-top:1px solid #666}.vk-mobile-nav nav ul li a{color:rgba(255,255,255,.8);border-bottom:1px solid #666}.vk-menu-acc .acc-btn-close{background:url(../images/vk-menu-btn-close.svg) center 50% no-repeat}
|
inc/vk-mobile-nav/css/vk-mobile-nav.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
body.admin-bar .vk-mobile-nav-menu-btn{top:56px}body.admin-bar .vk-mobile-nav.vk-mobile-nav-open{top:46px}.vk-mobile-nav-menu-btn{position:fixed;top:10px;left:10px;z-index:2000;overflow:hidden;border:1px solid #333;border-radius:2px;width:34px;height:34px;cursor:pointer;text-indent:-9999px;background:url(../images/vk-menu-btn.svg) center 50% no-repeat;background-size:24px 24px;-webkit-transition:border-color .5s ease-out;transition:border-color .5s ease-out}.vk-mobile-nav-menu-btn.menu-open{border:1px solid rgba(255,255,255,.8);background:url(../images/vk-menu-btn-close.svg) center 50% no-repeat}body.mobile-device .vk-mobile-nav-menu-btn{display:block}.vk-mobile-nav.vk-mobile-nav-open{top:0}.vk-mobile-nav{position:fixed;top:-2000px;z-index:1000;width:100%;height:100%;display:block;overflow:scroll;-webkit-transition:top .5s ease-out;transition:top .5s ease-out}.vk-mobile-nav .global-nav{margin-top:60px}.vk-mobile-nav nav ul{padding:0;margin:0}.vk-mobile-nav nav ul li{list-style:none}.vk-mobile-nav nav ul li a{padding:.7em 1em;display:block;overflow:hidden}.vk-mobile-nav nav ul li a:hover{text-decoration:none}.vk-mobile-nav nav ul li li a{padding-left:2em}.vk-mobile-nav nav ul li li li a{padding-left:3em}.vk-mobile-nav nav ul li li li li a{padding-left:4em}.vk-menu-acc{position:relative}.vk-menu-acc .menu-parent>li{position:relative;z-index:100}.vk-menu-acc .menu-parent>li a{display:inline-block}.vk-menu-acc li{position:relative}.vk-menu-acc .acc-btn{position:absolute;right:8px;top:9px;width:24px;height:24px;border:1px solid rgba(255,255,255,.8);border-radius:2px;background:url(../images/vk-menu-acc-icon-open-white.svg) center 50% no-repeat;background-size:24px 24px;cursor:pointer;z-index:1000;-webkit-transition:-webkit-transform .5s ease-out;transition:-webkit-transform .5s ease-out;transition:transform .5s ease-out;transition:transform .5s ease-out,-webkit-transform .5s ease-out}.vk-menu-acc .acc-btn:before{position:relative;top:-5px;left:4px;font-size:16px}.vk-menu-acc .acc-btn-close{background:url(../images/vk-menu-btn-close.svg) center 50% no-repeat}.vk-menu-acc ul.sub-menu{max-height:0;overflow:hidden;-webkit-transition:max-height .5s ease-in;transition:max-height .5s ease-in;position:relative;z-index:1;display:block}.vk-menu-acc ul.sub-menu li a{display:block;overflow:hidden}.vk-menu-acc ul.acc-child-open{-webkit-transition:max-height .5s ease-in;transition:max-height .5s ease-in;max-height:500px}.vk-menu-acc ul.acc-child-close{-webkit-transition:max-height .5s ease-out;transition:max-height .5s ease-out;max-height:0}.vk-mobile-nav-menu-btn.menu-open{border-color:rgba(255,255,255,.8);background:url(../images/vk-menu-btn-close-white.svg) center 50% no-repeat}.vk-mobile-nav{background-color:#333}.vk-mobile-nav nav>ul{border-top:1px solid #666}.vk-mobile-nav nav ul li a{color:rgba(255,255,255,.8);border-bottom:1px solid #666}.vk-menu-acc .acc-btn{border:1px solid rgba(255,255,255,.8);background:url(../images/vk-menu-acc-icon-open-white.svg) center 50% no-repeat}.vk-menu-acc .acc-btn-close{background:url(../images/vk-menu-btn-close-white.svg) center 50% no-repeat}
|
inc/vk-mobile-nav/images/vk-menu-acc-icon-open-black.svg
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="レイヤー_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
4 |
+
y="0px" viewBox="0 0 48 48" style="enable-background:new 0 0 48 48;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#333333;}
|
7 |
+
</style>
|
8 |
+
<polygon class="st0" points="24,32.1 9.8,18 11.3,16.6 24,29.3 36.7,16.6 38.2,18 "/>
|
9 |
+
</svg>
|
inc/vk-mobile-nav/images/vk-menu-acc-icon-open-white.svg
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="レイヤー_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
4 |
+
y="0px" viewBox="0 0 48 48" style="enable-background:new 0 0 48 48;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#FFFFFF;}
|
7 |
+
</style>
|
8 |
+
<polygon class="st0" points="24,32.1 9.8,18 11.3,16.6 24,29.3 36.7,16.6 38.2,18 "/>
|
9 |
+
</svg>
|
inc/vk-mobile-nav/images/vk-menu-btn-close-black.svg
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="レイヤー_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
4 |
+
y="0px" viewBox="0 0 48 48" style="enable-background:new 0 0 48 48;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#333333;}
|
7 |
+
</style>
|
8 |
+
<rect x="9.8" y="23" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -9.9059 24.0144)" class="st0" width="28.5" height="2"/>
|
9 |
+
<rect x="23" y="9.8" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -9.9559 24.0351)" class="st0" width="2" height="28.5"/>
|
10 |
+
</svg>
|
inc/vk-mobile-nav/images/vk-menu-btn-close-white.svg
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="レイヤー_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
4 |
+
y="0px" viewBox="0 0 48 48" style="enable-background:new 0 0 48 48;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#FFFFFF;}
|
7 |
+
</style>
|
8 |
+
<rect x="9.8" y="23" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -9.9411 24)" class="st0" width="28.5" height="2"/>
|
9 |
+
<rect x="23" y="9.8" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -9.9411 24)" class="st0" width="2" height="28.5"/>
|
10 |
+
</svg>
|
inc/vk-mobile-nav/images/vk-menu-btn-close.svg
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="レイヤー_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
4 |
+
y="0px" viewBox="0 0 48 48" style="enable-background:new 0 0 48 48;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#333333;}
|
7 |
+
</style>
|
8 |
+
<rect x="9.8" y="23" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -9.9059 24.0144)" class="st0" width="28.5" height="2"/>
|
9 |
+
<rect x="23" y="9.8" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -9.9559 24.0351)" class="st0" width="2" height="28.5"/>
|
10 |
+
</svg>
|
inc/vk-mobile-nav/images/vk-menu-btn.svg
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<svg version="1.1" id="レイヤー_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
4 |
+
y="0px" viewBox="0 0 48 48" style="enable-background:new 0 0 48 48;" xml:space="preserve">
|
5 |
+
<style type="text/css">
|
6 |
+
.st0{fill:#333333;}
|
7 |
+
</style>
|
8 |
+
<g>
|
9 |
+
<rect x="9.8" y="13.2" class="st0" width="28.5" height="2"/>
|
10 |
+
<rect x="9.8" y="23" class="st0" width="28.5" height="2"/>
|
11 |
+
<rect x="9.8" y="32.8" class="st0" width="28.5" height="2"/>
|
12 |
+
</g>
|
13 |
+
</svg>
|
inc/vk-mobile-nav/js/vk-mobile-nav.js
ADDED
@@ -0,0 +1,313 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;
|
2 |
+
(function($) {
|
3 |
+
/*-------------------------------------*/
|
4 |
+
/*
|
5 |
+
/*-------------------------------------*/
|
6 |
+
jQuery(document).ready(function() {
|
7 |
+
/* ※ vk-mobile-menu の読み込みが遅いので document).ready(function() しないと動作しない */
|
8 |
+
// クリックされた時
|
9 |
+
jQuery('.vk-mobile-nav-menu-btn').click(function() {
|
10 |
+
// メニューボタンに .menu-open クラスがついていたら
|
11 |
+
if (jQuery(this).hasClass('menu-open')) {
|
12 |
+
// .menu-open を外す
|
13 |
+
jQuery(this).removeClass('menu-open');
|
14 |
+
// メニュー本体から .vk-mobile-nav-open を削除
|
15 |
+
jQuery('.vk-mobile-nav').removeClass('vk-mobile-nav-open');
|
16 |
+
} else {
|
17 |
+
jQuery(this).addClass('menu-open');
|
18 |
+
jQuery('.vk-mobile-nav').addClass('vk-mobile-nav-open');
|
19 |
+
}
|
20 |
+
});
|
21 |
+
});
|
22 |
+
|
23 |
+
})(jQuery);
|
24 |
+
|
25 |
+
/*-------------------------------------*/
|
26 |
+
/* sub item accordion
|
27 |
+
/*-------------------------------------*/
|
28 |
+
;
|
29 |
+
(function($) {
|
30 |
+
|
31 |
+
function vk_menu_acc_run() {
|
32 |
+
// var breakPoint = 767;
|
33 |
+
var breakPoint = 5000;
|
34 |
+
// var bodyWidth = jQuery(window).width();
|
35 |
+
/*
|
36 |
+
cssのメディアクエリがスクロールバーを含んだ幅になるので、
|
37 |
+
js側もスクロールバーを含んだ幅にするため window.innerWidth を使用
|
38 |
+
*/
|
39 |
+
var bodyWidth = window.innerWidth;
|
40 |
+
|
41 |
+
// ブレイクポイントより小さい場合
|
42 |
+
if (bodyWidth <= breakPoint) {
|
43 |
+
$.when(
|
44 |
+
vk_menu_acc_clear()
|
45 |
+
).done(function() {
|
46 |
+
vk_menu_acc_init();
|
47 |
+
vk_menu_acc_click();
|
48 |
+
});
|
49 |
+
} else {
|
50 |
+
vk_menu_acc_clear();
|
51 |
+
}
|
52 |
+
} // function vk_menu_acc_run(){
|
53 |
+
|
54 |
+
function vk_menu_acc_clear() {
|
55 |
+
jQuery('ul.vk-menu-acc').removeClass('vk-menu-acc-active');
|
56 |
+
jQuery('ul.vk-menu-acc li').removeClass('acc-parent-open');
|
57 |
+
jQuery('ul.vk-menu-acc li .acc-btn').remove();
|
58 |
+
jQuery('ul.vk-menu-acc li .acc-child-close').removeClass('acc-child-close');
|
59 |
+
jQuery('ul.vk-menu-acc li .acc-child-open').removeClass('acc-child-open');
|
60 |
+
}
|
61 |
+
|
62 |
+
function vk_menu_acc_init() {
|
63 |
+
// アクティブクラスを付与
|
64 |
+
jQuery('ul.vk-menu-acc').addClass('vk-menu-acc-active');
|
65 |
+
|
66 |
+
// 子階層毎の処理
|
67 |
+
jQuery('ul.vk-menu-acc li ul').each(function() {
|
68 |
+
// 子階層の直前の要素( <a> )の後に「開くボタン」を設置
|
69 |
+
jQuery(this).prev().after('<span class="acc-btn acc-btn-open"></span>');
|
70 |
+
// 下階層となるul要素には close クラス追加
|
71 |
+
jQuery(this).addClass("acc-child-close");
|
72 |
+
});
|
73 |
+
}
|
74 |
+
|
75 |
+
function vk_menu_acc_click() {
|
76 |
+
jQuery('ul.vk-menu-acc li .acc-btn').click(function() {
|
77 |
+
|
78 |
+
// クリックされたボタンが開くボタンだったら
|
79 |
+
if (jQuery(this).hasClass('acc-btn-open')) {
|
80 |
+
|
81 |
+
// 親である li に open クラス追加
|
82 |
+
jQuery(this).parent().addClass('acc-parent-open');
|
83 |
+
jQuery(this).removeClass('acc-btn-open').addClass('acc-btn-close');
|
84 |
+
jQuery(this).next().removeClass('acc-child-close').addClass('acc-child-open');
|
85 |
+
|
86 |
+
// 閉じるボタンがクリックされたら
|
87 |
+
} else {
|
88 |
+
// 親である li から open クラス除去
|
89 |
+
jQuery(this).parent().removeClass('acc-parent-open');
|
90 |
+
// クリックされた閉じるボタンから close クラスを除去して open クラス追加
|
91 |
+
jQuery(this).removeClass('acc-btn-close').addClass('acc-btn-open');
|
92 |
+
// 下階層となる ul 要素から open クラスを除去して close クラス追加
|
93 |
+
jQuery(this).next().removeClass('acc-child-open').addClass('acc-child-close');
|
94 |
+
}
|
95 |
+
});
|
96 |
+
}
|
97 |
+
|
98 |
+
function vk_menu_acc_resize() {
|
99 |
+
var timer = false;
|
100 |
+
// リサイズ前のウィンドウサイズ
|
101 |
+
var before_window_size = jQuery(window).width();
|
102 |
+
// リサイズを作動させない幅
|
103 |
+
var window_size_margin = 8;
|
104 |
+
|
105 |
+
$(window).resize(function() {
|
106 |
+
if (timer !== false) {
|
107 |
+
clearTimeout(timer);
|
108 |
+
}
|
109 |
+
timer = setTimeout(function() {
|
110 |
+
|
111 |
+
/*
|
112 |
+
スマートフォンにおいてスライドしてスクロールバー表示された時、
|
113 |
+
消える時でリサイズ判定されてしまうので、
|
114 |
+
スクロールバー相当の幅以上の変化があった時のみ実行する
|
115 |
+
*/
|
116 |
+
|
117 |
+
// リサイズ後のウィンドウサイズ
|
118 |
+
var after_window_size = jQuery(window).width();
|
119 |
+
|
120 |
+
// これより大きくなってたら実行するサイズ
|
121 |
+
var max_change_size = before_window_size + window_size_margin;
|
122 |
+
|
123 |
+
// これより小さくなってたら実行するサイズ
|
124 |
+
var min_change_size = before_window_size - window_size_margin;
|
125 |
+
|
126 |
+
if (after_window_size < min_change_size || max_change_size < after_window_size) {
|
127 |
+
vk_menu_acc_run();
|
128 |
+
// console.log( min_change_size + ' < ' + after_window_size + ' < ' + max_change_size);
|
129 |
+
// console.log('Resize run');
|
130 |
+
before_window_size = after_window_size;
|
131 |
+
// console.log('before_window_size : ' + before_window_size);
|
132 |
+
} else {
|
133 |
+
// console.log( min_change_size + ' < ' + after_window_size + ' < ' + max_change_size);
|
134 |
+
// console.log('Resize none');
|
135 |
+
}
|
136 |
+
}, 500);
|
137 |
+
});
|
138 |
+
}
|
139 |
+
|
140 |
+
vk_menu_acc_run();
|
141 |
+
vk_menu_acc_resize();
|
142 |
+
|
143 |
+
jQuery(document).ready(function() {
|
144 |
+
vk_menu_acc_run();
|
145 |
+
});
|
146 |
+
|
147 |
+
})(jQuery);
|
148 |
+
|
149 |
+
|
150 |
+
// jQuery(document).ready(function() {
|
151 |
+
// run_slide_menu_control();
|
152 |
+
// });
|
153 |
+
// jQuery(window).resize(function() {
|
154 |
+
// run_menuResize();
|
155 |
+
// });
|
156 |
+
// /*-------------------------------------------*/
|
157 |
+
// /* メニューの開閉
|
158 |
+
// /* <div id="menu" onclick="showHide('menu');" class="itemOpen">MENU</div>
|
159 |
+
// /* * header.siteHeader を left で制御しているのは Safariでは
|
160 |
+
// /* position:fixed しているとウィンドウにfixしてしまってwrapを横にずらしてもついて来ないため
|
161 |
+
// /*-------------------------------------------*/
|
162 |
+
//
|
163 |
+
// function run_slide_menu_control() {
|
164 |
+
// jQuery('.menuBtn').prependTo('#bodyInner');
|
165 |
+
// jQuery('.menuBtn').each(function() {
|
166 |
+
// jQuery(this).click(function() {
|
167 |
+
// if (jQuery(this).hasClass('menuBtn_left')) {
|
168 |
+
// var menuPosition = 'left';
|
169 |
+
// } else {
|
170 |
+
// var menuPosition = 'right';
|
171 |
+
// }
|
172 |
+
// // ※ この時点でLightning本体のmaster.jsによって既に menuOpenに新しく切り替わっている
|
173 |
+
// if (jQuery(this).hasClass('menuOpen')) {
|
174 |
+
// slide_menu_open(menuPosition);
|
175 |
+
// } else {
|
176 |
+
// slide_menu_close(menuPosition);
|
177 |
+
// }
|
178 |
+
// });
|
179 |
+
// });
|
180 |
+
// }
|
181 |
+
//
|
182 |
+
// function slide_menu_open(menuPosition) {
|
183 |
+
// var navSection_open_position = 'navSection_open_' + menuPosition;
|
184 |
+
// jQuery('#navSection').addClass(navSection_open_position);
|
185 |
+
//
|
186 |
+
// var wrap_width = jQuery('body').width();
|
187 |
+
// jQuery('#bodyInner').css({
|
188 |
+
// "width": wrap_width
|
189 |
+
// });
|
190 |
+
// jQuery('#wrap').css({
|
191 |
+
// "width": wrap_width
|
192 |
+
// });
|
193 |
+
//
|
194 |
+
// var menu_width = wrap_width - 60 + 'px';
|
195 |
+
//
|
196 |
+
// jQuery('#headerTop').appendTo('#navSection');
|
197 |
+
// jQuery('#gMenu_outer').appendTo('#navSection');
|
198 |
+
//
|
199 |
+
// if (menuPosition == 'right') {
|
200 |
+
// jQuery('#wrap').stop().animate({
|
201 |
+
// // 右にメニューを表示するために左に逃げる
|
202 |
+
// "margin-left": "-" + menu_width,
|
203 |
+
// }, 200);
|
204 |
+
// jQuery('header.siteHeader').stop().animate({
|
205 |
+
// "left": "-" + menu_width,
|
206 |
+
// }, 200);
|
207 |
+
// jQuery('#navSection').css({
|
208 |
+
// "display": "block",
|
209 |
+
// "width": menu_width,
|
210 |
+
// "right": "-" + menu_width
|
211 |
+
// }).stop().animate({
|
212 |
+
// "right": 0,
|
213 |
+
// }, 200);
|
214 |
+
//
|
215 |
+
// } else if (menuPosition == 'left') {
|
216 |
+
// jQuery('#wrap').stop().animate({
|
217 |
+
// "margin-left": menu_width,
|
218 |
+
// }, 200);
|
219 |
+
// jQuery('header.siteHeader').stop().animate({
|
220 |
+
// "left": menu_width,
|
221 |
+
// }, 200);
|
222 |
+
// jQuery('#navSection').css({
|
223 |
+
// "display": "block",
|
224 |
+
// "width": menu_width,
|
225 |
+
// "left": "-" + menu_width
|
226 |
+
// }).stop().animate({
|
227 |
+
// "left": 0,
|
228 |
+
// }, 200, function() {});
|
229 |
+
// }
|
230 |
+
// }
|
231 |
+
//
|
232 |
+
// function slide_menu_close(menuPosition) {
|
233 |
+
//
|
234 |
+
// if (!menuPosition) {
|
235 |
+
// if (jQuery('#navSection').hasClass('navSection_open_right')) {
|
236 |
+
// menuPosition = 'right';
|
237 |
+
// } else {
|
238 |
+
// menuPosition = 'left';
|
239 |
+
// }
|
240 |
+
// }
|
241 |
+
//
|
242 |
+
// var wrap_width = jQuery('body').width();
|
243 |
+
// jQuery('#bodyInner').css({
|
244 |
+
// "width": wrap_width
|
245 |
+
// });
|
246 |
+
// jQuery('#wrap').css({
|
247 |
+
// "width": wrap_width
|
248 |
+
// });
|
249 |
+
//
|
250 |
+
// var menu_width = wrap_width - 60 + 'px';
|
251 |
+
//
|
252 |
+
// jQuery('#wrap').stop().animate({
|
253 |
+
// "margin-left": "0"
|
254 |
+
// }, 200);
|
255 |
+
// jQuery('header.siteHeader').stop().animate({
|
256 |
+
// "left": "0"
|
257 |
+
// }, 200);
|
258 |
+
//
|
259 |
+
// if (menuPosition == 'right') {
|
260 |
+
// jQuery('header.siteHeader').stop().animate({
|
261 |
+
// "left": "0"
|
262 |
+
// }, 200);
|
263 |
+
// jQuery('#navSection').stop().animate({
|
264 |
+
// "right": "-" + menu_width
|
265 |
+
// }, 200, function() {
|
266 |
+
// menuClose_common();
|
267 |
+
// });
|
268 |
+
// } else if (menuPosition == 'left') {
|
269 |
+
// jQuery('#navSection').stop().animate({
|
270 |
+
// "left": "-" + menu_width
|
271 |
+
// }, 200, function() {
|
272 |
+
// menuClose_common();
|
273 |
+
// });
|
274 |
+
// }
|
275 |
+
// }
|
276 |
+
//
|
277 |
+
// function menuClose_common() {
|
278 |
+
// // アニメーションが終わってから実行
|
279 |
+
// jQuery('#navSection').removeClass('navSection_open_right');
|
280 |
+
// jQuery('#navSection').removeClass('navSection_open_left');
|
281 |
+
// jQuery('#navSection').css({
|
282 |
+
// "right": "",
|
283 |
+
// "left": "",
|
284 |
+
// "display": ""
|
285 |
+
// });
|
286 |
+
// jQuery('#headerTop').prependTo('header.siteHeader');
|
287 |
+
// jQuery('#bodyInner').css({
|
288 |
+
// "width": ""
|
289 |
+
// });
|
290 |
+
// jQuery('#wrap').css({
|
291 |
+
// "width": ""
|
292 |
+
// });
|
293 |
+
// // judge animate execution
|
294 |
+
// if (jQuery('#navSection').is(':animated')) {
|
295 |
+
// jQuery('#gMenu_outer').insertAfter('.navbar-header');
|
296 |
+
// }
|
297 |
+
// }
|
298 |
+
//
|
299 |
+
// function run_menuResize() {
|
300 |
+
// var wrap_width = jQuery('body').width();
|
301 |
+
// jQuery('#bodyInner').css({
|
302 |
+
// "width": wrap_width
|
303 |
+
// });
|
304 |
+
// // jQuery('#wrap').css({"width":wrap_width,"margin-left":"","margin-right":""});
|
305 |
+
// // menuClose_common();
|
306 |
+
// var headerHeight = jQuery('header.siteHeader').height;
|
307 |
+
// jQuery('#top__fullcarousel').css({
|
308 |
+
// "margin-top": headerHeight
|
309 |
+
// });
|
310 |
+
// if (wrap_width > 991) {
|
311 |
+
// slide_menu_close();
|
312 |
+
// }
|
313 |
+
// }
|
inc/widgets/widget-full-wide-title.php
CHANGED
@@ -223,7 +223,7 @@ var vk_title_bg_image_delete = function(e){
|
|
223 |
$instance = self::default_options( $instance );
|
224 |
echo $args ['before_widget'];
|
225 |
echo '<div class="widget_ltg_adv_full_wide_title_outer" style="'.esc_attr( $this->widget_outer_style($instance) ).'">';
|
226 |
-
echo '<h2 class="widget_ltg_adv_full_wide_title_title" style="'.esc_attr( $this->widget_font_style($instance) ).'">'.wp_kses_post( $instance['title'] ).'</
|
227 |
// サブテキストがある場合
|
228 |
if ( ! empty( $instance['text'] ) ){
|
229 |
echo '<p style="'.$this->widget_font_style($instance).'" class="widget_ltg_adv_full_wide_title_caption">'.wp_kses_post( $instance['text'] ).'</p>';
|
223 |
$instance = self::default_options( $instance );
|
224 |
echo $args ['before_widget'];
|
225 |
echo '<div class="widget_ltg_adv_full_wide_title_outer" style="'.esc_attr( $this->widget_outer_style($instance) ).'">';
|
226 |
+
echo '<h2 class="widget_ltg_adv_full_wide_title_title" style="'.esc_attr( $this->widget_font_style($instance) ).'">'.wp_kses_post( $instance['title'] ).'</h2>';
|
227 |
// サブテキストがある場合
|
228 |
if ( ! empty( $instance['text'] ) ){
|
229 |
echo '<p style="'.$this->widget_font_style($instance).'" class="widget_ltg_adv_full_wide_title_caption">'.wp_kses_post( $instance['text'] ).'</p>';
|
js/lightning-adv-common.js
CHANGED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Advanced Unit 共通のJS
|
3 |
+
( ligtning-adv.js は他のライブラリとの結合済み )
|
4 |
+
*/
|
js/lightning-adv.js
CHANGED
@@ -1,133 +1,13 @@
|
|
1 |
|
2 |
-
jQuery(document).ready(function(){
|
3 |
-
if( !jQuery('body').hasClass('menu-slide') ){ return; }
|
4 |
-
run_slide_menu_control();
|
5 |
-
});
|
6 |
-
jQuery(window).resize(function(){
|
7 |
-
if( !jQuery('body').hasClass('menu-slide') ){ return; }
|
8 |
-
run_menuResize();
|
9 |
-
});
|
10 |
/*-------------------------------------------*/
|
11 |
-
/*
|
12 |
-
/* <div id="menu" onclick="showHide('menu');" class="itemOpen">MENU</div>
|
13 |
-
/* * header.siteHeader を left で制御しているのは Safariでは
|
14 |
-
/* position:fixed しているとウィンドウにfixしてしまってwrapを横にずらしてもついて来ないため
|
15 |
/*-------------------------------------------*/
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
if ( jQuery(this).hasClass('menuBtn_left') ){
|
22 |
-
var menuPosition = 'left';
|
23 |
-
} else {
|
24 |
-
var menuPosition = 'right';
|
25 |
-
}
|
26 |
-
// ※ この時点でLightning本体のmaster.jsによって既に menuOpenに新しく切り替わっている
|
27 |
-
if ( jQuery(this).hasClass('menuOpen') ) {
|
28 |
-
slide_menu_open(menuPosition);
|
29 |
-
} else {
|
30 |
-
slide_menu_close(menuPosition);
|
31 |
-
}
|
32 |
-
});
|
33 |
-
});
|
34 |
-
}
|
35 |
-
|
36 |
-
function slide_menu_open(menuPosition){
|
37 |
-
var navSection_open_position = 'navSection_open_' + menuPosition;
|
38 |
-
jQuery('#navSection').addClass(navSection_open_position);
|
39 |
-
|
40 |
-
var wrap_width = jQuery('body').width();
|
41 |
-
jQuery('#bodyInner').css({"width":wrap_width});
|
42 |
-
jQuery('#wrap').css({"width":wrap_width});
|
43 |
-
|
44 |
-
var menu_width = wrap_width - 60 + 'px';
|
45 |
-
|
46 |
-
jQuery('#headerTop').appendTo('#navSection');
|
47 |
-
jQuery('#gMenu_outer').appendTo('#navSection');
|
48 |
-
|
49 |
-
if ( menuPosition == 'right' ){
|
50 |
-
jQuery('#wrap').stop().animate({
|
51 |
-
// 右にメニューを表示するために左に逃げる
|
52 |
-
"margin-left": "-" + menu_width,
|
53 |
-
},200);
|
54 |
-
jQuery('header.siteHeader').stop().animate({
|
55 |
-
"left":"-"+menu_width,
|
56 |
-
},200);
|
57 |
-
jQuery('#navSection').css({"display":"block","width":menu_width, "right" :"-"+menu_width }).stop().animate({
|
58 |
-
"right":0,
|
59 |
-
},200);
|
60 |
-
|
61 |
-
} else if ( menuPosition == 'left' ){
|
62 |
-
jQuery('#wrap').stop().animate({
|
63 |
-
"margin-left":menu_width,
|
64 |
-
},200);
|
65 |
-
jQuery('header.siteHeader').stop().animate({
|
66 |
-
"left":menu_width,
|
67 |
-
},200);
|
68 |
-
jQuery('#navSection').css({"display":"block","width":menu_width, "left" :"-"+menu_width }).stop().animate({
|
69 |
-
"left":0,
|
70 |
-
},200,function(){
|
71 |
-
});
|
72 |
-
}
|
73 |
-
}
|
74 |
-
function slide_menu_close(menuPosition){
|
75 |
-
|
76 |
-
if ( !menuPosition ){
|
77 |
-
if ( jQuery('#navSection').hasClass('navSection_open_right') ){
|
78 |
-
menuPosition = 'right';
|
79 |
-
} else {
|
80 |
-
menuPosition = 'left';
|
81 |
-
}
|
82 |
-
}
|
83 |
|
84 |
-
var wrap_width = jQuery('body').width();
|
85 |
-
jQuery('#bodyInner').css({"width":wrap_width});
|
86 |
-
jQuery('#wrap').css({"width":wrap_width});
|
87 |
-
|
88 |
-
var menu_width = wrap_width - 60 + 'px';
|
89 |
-
|
90 |
-
jQuery('#wrap').stop().animate({ "margin-left":"0" },200);
|
91 |
-
jQuery('header.siteHeader').stop().animate({ "left":"0" },200);
|
92 |
-
|
93 |
-
if ( menuPosition == 'right' ) {jQuery('header.siteHeader').stop().animate({ "left":"0" },200);
|
94 |
-
jQuery('#navSection').stop().animate({ "right":"-"+menu_width },200,function(){
|
95 |
-
menuClose_common();
|
96 |
-
});
|
97 |
-
} else if ( menuPosition == 'left' ){
|
98 |
-
jQuery('#navSection').stop().animate({ "left":"-"+menu_width },200,function(){
|
99 |
-
menuClose_common();
|
100 |
-
});
|
101 |
-
}
|
102 |
-
}
|
103 |
-
function menuClose_common(){
|
104 |
-
// アニメーションが終わってから実行
|
105 |
-
jQuery('#navSection').removeClass('navSection_open_right');
|
106 |
-
jQuery('#navSection').removeClass('navSection_open_left');
|
107 |
-
jQuery('#navSection').css({ "right":"", "left":"", "display":"" });
|
108 |
-
jQuery('#headerTop').prependTo('header.siteHeader');
|
109 |
-
jQuery('#bodyInner').css({"width":""});
|
110 |
-
jQuery('#wrap').css({"width":""});
|
111 |
-
// judge animate execution
|
112 |
-
if(jQuery('#navSection').is(':animated')){
|
113 |
-
jQuery('#gMenu_outer').insertAfter('.navbar-header');
|
114 |
-
}
|
115 |
-
}
|
116 |
-
function run_menuResize(){
|
117 |
-
var wrap_width = jQuery('body').width();
|
118 |
-
jQuery('#bodyInner').css({"width":wrap_width});
|
119 |
-
// jQuery('#wrap').css({"width":wrap_width,"margin-left":"","margin-right":""});
|
120 |
-
// menuClose_common();
|
121 |
-
var headerHeight = jQuery('header.siteHeader').height;
|
122 |
-
jQuery('#top__fullcarousel').css({"margin-top":headerHeight});
|
123 |
-
if ( wrap_width > 991 ) {
|
124 |
-
slide_menu_close();
|
125 |
-
}
|
126 |
-
}
|
127 |
-
|
128 |
-
/*-------------------------------------------*/
|
129 |
-
/* スクロール時のサイドバー位置固定処理
|
130 |
-
/*-------------------------------------------*/
|
131 |
;(function($){
|
132 |
|
133 |
/* 読み込み / リサイズ時の処理
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
/*-------------------------------------------*/
|
3 |
+
/* スクロール時のサイドバー位置固定処理
|
|
|
|
|
|
|
4 |
/*-------------------------------------------*/
|
5 |
|
6 |
+
/*
|
7 |
+
このファイルのマスターは /inc/sidebar-fix/js/sidebar-fix.js になります。
|
8 |
+
gulpで /js/lightning-adv.js に出力しています。
|
9 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
;(function($){
|
12 |
|
13 |
/* 読み込み / リサイズ時の処理
|
js/lightning-adv.min.js
CHANGED
@@ -1,13 +1,5 @@
|
|
1 |
|
2 |
-
jQuery(document).ready(function(){
|
3 |
-
run_slide_menu_control();});jQuery(window).resize(function(){if(!jQuery('body').hasClass('menu-slide')){return;}
|
4 |
-
run_menuResize();});function run_slide_menu_control(){jQuery('.menuBtn').prependTo('#bodyInner');jQuery('.menuBtn').each(function(){jQuery(this).click(function(){if(jQuery(this).hasClass('menuBtn_left')){var menuPosition='left';}else{var menuPosition='right';}
|
5 |
-
if(jQuery(this).hasClass('menuOpen')){slide_menu_open(menuPosition);}else{slide_menu_close(menuPosition);}});});}
|
6 |
-
function slide_menu_open(menuPosition){var navSection_open_position='navSection_open_'+menuPosition;jQuery('#navSection').addClass(navSection_open_position);var wrap_width=jQuery('body').width();jQuery('#bodyInner').css({"width":wrap_width});jQuery('#wrap').css({"width":wrap_width});var menu_width=wrap_width-60+'px';jQuery('#headerTop').appendTo('#navSection');jQuery('#gMenu_outer').appendTo('#navSection');if(menuPosition=='right'){jQuery('#wrap').stop().animate({"margin-left":"-"+menu_width,},200);jQuery('header.siteHeader').stop().animate({"left":"-"+menu_width,},200);jQuery('#navSection').css({"display":"block","width":menu_width,"right":"-"+menu_width}).stop().animate({"right":0,},200);}else if(menuPosition=='left'){jQuery('#wrap').stop().animate({"margin-left":menu_width,},200);jQuery('header.siteHeader').stop().animate({"left":menu_width,},200);jQuery('#navSection').css({"display":"block","width":menu_width,"left":"-"+menu_width}).stop().animate({"left":0,},200,function(){});}}
|
7 |
-
function slide_menu_close(menuPosition){if(!menuPosition){if(jQuery('#navSection').hasClass('navSection_open_right')){menuPosition='right';}else{menuPosition='left';}}
|
8 |
-
var wrap_width=jQuery('body').width();jQuery('#bodyInner').css({"width":wrap_width});jQuery('#wrap').css({"width":wrap_width});var menu_width=wrap_width-60+'px';jQuery('#wrap').stop().animate({"margin-left":"0"},200);jQuery('header.siteHeader').stop().animate({"left":"0"},200);if(menuPosition=='right'){jQuery('header.siteHeader').stop().animate({"left":"0"},200);jQuery('#navSection').stop().animate({"right":"-"+menu_width},200,function(){menuClose_common();});}else if(menuPosition=='left'){jQuery('#navSection').stop().animate({"left":"-"+menu_width},200,function(){menuClose_common();});}}
|
9 |
-
function menuClose_common(){jQuery('#navSection').removeClass('navSection_open_right');jQuery('#navSection').removeClass('navSection_open_left');jQuery('#navSection').css({"right":"","left":"","display":""});jQuery('#headerTop').prependTo('header.siteHeader');jQuery('#bodyInner').css({"width":""});jQuery('#wrap').css({"width":""});if(jQuery('#navSection').is(':animated')){jQuery('#gMenu_outer').insertAfter('.navbar-header');}}
|
10 |
-
function run_menuResize(){var wrap_width=jQuery('body').width();jQuery('#bodyInner').css({"width":wrap_width});var headerHeight=jQuery('header.siteHeader').height;jQuery('#top__fullcarousel').css({"margin-top":headerHeight});if(wrap_width>991){slide_menu_close();}};(function($){jQuery(document).ready(function(){});jQuery(window).resize(function(){});jQuery(window).scroll(function(){if(!$('body').hasClass('sidebar-fix')){return;}
|
11 |
var sidebar_position_now=jQuery('.sideSection').offset();if(!sidebar_position_now){return}
|
12 |
sideFix_scroll();});function sideFix_reset(){jQuery('.sideSection').css({"margin-top":""});}
|
13 |
function sideFix_scroll(){var wrap_width=$('body').width();var window_height=document.documentElement.clientHeight;if(wrap_width<992){sideFix_reset()}else{var sidebar_position_now=jQuery('.sideSection').offset();var content_position_now=jQuery('.mainSection').offset();var sidebar_height=jQuery('.sideSection').outerHeight();var content_height=jQuery('.mainSection').outerHeight();var height_difference=content_height-sidebar_height;var sidebar_bottom_position_default=content_position_now['top']+sidebar_height;var content_bottom_position_default=content_position_now['top']+content_height;var sidebar_bottom_position_now=sidebar_position_now['top']+sidebar_height;var content_bottom_position_now=content_position_now['top']+content_height;if(window_height<sidebar_bottom_position_default){var sidebar_over_size=sidebar_bottom_position_default-window_height;var sidebar_over_size_start=sidebar_height-window_height;if(sidebar_height>window_height){var move_position_start=content_position_now['top']+sidebar_over_size_start+30;var move_position_end=height_difference+content_position_now['top']+sidebar_over_size_start+30;}else{var move_position_start=content_position_now['top'];var move_position_end=height_difference+content_position_now['top'];}}else{var move_position_start=content_position_now['top'];var move_position_end=height_difference+content_position_now['top'];}
|
1 |
|
2 |
+
;(function($){jQuery(document).ready(function(){});jQuery(window).resize(function(){});jQuery(window).scroll(function(){if(!$('body').hasClass('sidebar-fix')){return;}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
var sidebar_position_now=jQuery('.sideSection').offset();if(!sidebar_position_now){return}
|
4 |
sideFix_scroll();});function sideFix_reset(){jQuery('.sideSection').css({"margin-top":""});}
|
5 |
function sideFix_scroll(){var wrap_width=$('body').width();var window_height=document.documentElement.clientHeight;if(wrap_width<992){sideFix_reset()}else{var sidebar_position_now=jQuery('.sideSection').offset();var content_position_now=jQuery('.mainSection').offset();var sidebar_height=jQuery('.sideSection').outerHeight();var content_height=jQuery('.mainSection').outerHeight();var height_difference=content_height-sidebar_height;var sidebar_bottom_position_default=content_position_now['top']+sidebar_height;var content_bottom_position_default=content_position_now['top']+content_height;var sidebar_bottom_position_now=sidebar_position_now['top']+sidebar_height;var content_bottom_position_now=content_position_now['top']+content_height;if(window_height<sidebar_bottom_position_default){var sidebar_over_size=sidebar_bottom_position_default-window_height;var sidebar_over_size_start=sidebar_height-window_height;if(sidebar_height>window_height){var move_position_start=content_position_now['top']+sidebar_over_size_start+30;var move_position_end=height_difference+content_position_now['top']+sidebar_over_size_start+30;}else{var move_position_start=content_position_now['top'];var move_position_end=height_difference+content_position_now['top'];}}else{var move_position_start=content_position_now['top'];var move_position_end=height_difference+content_position_now['top'];}
|
languages/lightning-adv-unit-ja.mo
CHANGED
Binary file
|
languages/lightning-adv-unit-ja.po
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: \n"
|
4 |
-
"POT-Creation-Date:
|
5 |
"PO-Revision-Date: \n"
|
6 |
"Last-Translator: Kurudrive <kurudrive@gmail.com>\n"
|
7 |
"Language-Team: Vektor translate Team <info@vektor-inc.co.jp>\n"
|
@@ -27,18 +27,26 @@ msgstr "左"
|
|
27 |
msgid "Right"
|
28 |
msgstr "右"
|
29 |
|
30 |
-
#: ../inc/
|
31 |
-
msgid "
|
32 |
-
msgstr "
|
33 |
|
34 |
-
#: ../inc/
|
35 |
msgid "Vertical Show Hide (Lightning default)"
|
36 |
msgstr "縦展開(Ligthning標準)"
|
37 |
|
38 |
-
#: ../inc/
|
|
|
|
|
|
|
|
|
39 |
msgid "Menu Type ( Mobile mode )"
|
40 |
msgstr "メニュータイプ(モバイル端末時)"
|
41 |
|
|
|
|
|
|
|
|
|
42 |
#: ../inc/sidebar-child-list-hidden.php:14
|
43 |
msgid "Sidebar menu hide list children"
|
44 |
msgstr ""
|
@@ -53,6 +61,53 @@ msgstr "サイドバーを固定しない"
|
|
53 |
msgid "Sidebar position ( PC mode )"
|
54 |
msgstr "サイドバーの位置(PC閲覧時)"
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
#: ../inc/widgets/widget-full-wide-title.php:16
|
57 |
msgid "Full Wide Title"
|
58 |
msgstr "全幅見出し"
|
@@ -182,6 +237,9 @@ msgstr "リンク先URL:"
|
|
182 |
msgid "Notation text:"
|
183 |
msgstr "表記テキスト:"
|
184 |
|
|
|
|
|
|
|
185 |
#~ msgid "Order by"
|
186 |
#~ msgstr "表示順"
|
187 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: \n"
|
4 |
+
"POT-Creation-Date: 2018-01-31 12:15+0900\n"
|
5 |
"PO-Revision-Date: \n"
|
6 |
"Last-Translator: Kurudrive <kurudrive@gmail.com>\n"
|
7 |
"Language-Team: Vektor translate Team <info@vektor-inc.co.jp>\n"
|
27 |
msgid "Right"
|
28 |
msgstr "右"
|
29 |
|
30 |
+
#: ../inc/navi-common.php:77
|
31 |
+
msgid "VK Mobile Nav(Recommend)"
|
32 |
+
msgstr "VK Mobile Nav(推奨)"
|
33 |
|
34 |
+
#: ../inc/navi-common.php:78
|
35 |
msgid "Vertical Show Hide (Lightning default)"
|
36 |
msgstr "縦展開(Ligthning標準)"
|
37 |
|
38 |
+
#: ../inc/navi-common.php:79
|
39 |
+
msgid "Side Slide(Not recommend)"
|
40 |
+
msgstr "Side Slide(非推奨)"
|
41 |
+
|
42 |
+
#: ../inc/navi-common.php:84
|
43 |
msgid "Menu Type ( Mobile mode )"
|
44 |
msgstr "メニュータイプ(モバイル端末時)"
|
45 |
|
46 |
+
#: ../inc/navi-common.php:88
|
47 |
+
msgid "It will not take effect unless you save and reload the page."
|
48 |
+
msgstr "保存してページを再読込しないと反映されません。"
|
49 |
+
|
50 |
#: ../inc/sidebar-child-list-hidden.php:14
|
51 |
msgid "Sidebar menu hide list children"
|
52 |
msgstr ""
|
61 |
msgid "Sidebar position ( PC mode )"
|
62 |
msgstr "サイドバーの位置(PC閲覧時)"
|
63 |
|
64 |
+
#: ../inc/vk-mobile-nav/class-vk-mobile-nav.php:54
|
65 |
+
msgid "Mobile Nav Upper"
|
66 |
+
msgstr "モバイルナビ上部"
|
67 |
+
|
68 |
+
#: ../inc/vk-mobile-nav/class-vk-mobile-nav.php:64
|
69 |
+
msgid "Mobile Nav Bottom"
|
70 |
+
msgstr "モバイルナビ下部"
|
71 |
+
|
72 |
+
#: ../inc/vk-mobile-nav/class-vk-mobile-nav.php:85
|
73 |
+
#, php-format
|
74 |
+
msgid ""
|
75 |
+
"This is the widget area.<br>You can set widget item from [ <a href=\"%s"
|
76 |
+
"\">Appearance > Customize</a> ] Page -> \"Widgets\" panel -> \"Mobile Nav "
|
77 |
+
"Upper\" Panel."
|
78 |
+
msgstr ""
|
79 |
+
"ここはウィジェットエリアです。<br>[ <a href=%s>外観 > カスタマイズ</a> ] 画面"
|
80 |
+
"の “ウィジェット” パネルの “モバイルナビ上部” パネルから設定する事ができま"
|
81 |
+
"す。"
|
82 |
+
|
83 |
+
#: ../inc/vk-mobile-nav/class-vk-mobile-nav.php:86
|
84 |
+
#: ../inc/vk-mobile-nav/class-vk-mobile-nav.php:106
|
85 |
+
#: ../inc/vk-mobile-nav/class-vk-mobile-nav.php:116
|
86 |
+
msgid "* This message is displayed only to users with editing authority."
|
87 |
+
msgstr "* このメッセージは編集権限のあるユーザーにのみ表示されています。"
|
88 |
+
|
89 |
+
#: ../inc/vk-mobile-nav/class-vk-mobile-nav.php:105
|
90 |
+
#, php-format
|
91 |
+
msgid ""
|
92 |
+
"Menu is not set.<br>Please set menu from [ <a href=\"%s\">Appearance > "
|
93 |
+
"Customize</a> ] Page -> \"Menus\" panel -> Menu Locations \"Mobile Navigation"
|
94 |
+
"\"."
|
95 |
+
msgstr ""
|
96 |
+
"メニューが設定されていません。<br>[ <a href=%s>外観 > カスタマイズ</a> ] 画面"
|
97 |
+
"の “メニュー” パネル から “Mobile Navigation” の位置にメニューを設定してくだ"
|
98 |
+
"さい。"
|
99 |
+
|
100 |
+
#: ../inc/vk-mobile-nav/class-vk-mobile-nav.php:115
|
101 |
+
#, php-format
|
102 |
+
msgid ""
|
103 |
+
"This is the widget area.<br>You can set widget item from [ <a href=\"%s"
|
104 |
+
"\">Appearance > Customize</a> ] Page -> \"Widgets\" panel -> \"Mobile Nav "
|
105 |
+
"Bottom\" Panel."
|
106 |
+
msgstr ""
|
107 |
+
"ここはウィジェットエリアです。<br>[ <a href=%s>外観 > カスタマイズ</a> ] 画面"
|
108 |
+
"の “ウィジェット” パネルの “モバイルナビ下部” パネルから設定する事ができま"
|
109 |
+
"す。"
|
110 |
+
|
111 |
#: ../inc/widgets/widget-full-wide-title.php:16
|
112 |
msgid "Full Wide Title"
|
113 |
msgstr "全幅見出し"
|
237 |
msgid "Notation text:"
|
238 |
msgstr "表記テキスト:"
|
239 |
|
240 |
+
#~ msgid "Side Slide"
|
241 |
+
#~ msgstr "横スライド"
|
242 |
+
|
243 |
#~ msgid "Order by"
|
244 |
#~ msgstr "表示順"
|
245 |
|
lightning_advanced_unit.php
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Lightning Advanced Unit
|
4 |
* Plugin URI: http://lightning.vektor-inc.co.jp/
|
5 |
-
* Version:
|
6 |
* Author: Vektor,Inc.
|
7 |
-
* Author URI:
|
8 |
* Description: This is a plug-ins that extend the functionality of the theme "Lightning".
|
9 |
* Text Domain: lightning-adv-unit
|
10 |
* Domain Path: /languages
|
@@ -12,11 +12,18 @@
|
|
12 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
13 |
*/
|
14 |
|
15 |
-
$template = get_option('template');
|
16 |
|
17 |
-
if ( ! ( $template == 'lightning' || $template == 'Lightning' ) )
|
|
|
|
|
18 |
|
19 |
-
$data = get_file_data(
|
|
|
|
|
|
|
|
|
|
|
20 |
define( 'LIGHTNING_ADVANCED_VERSION', $data['version'] );
|
21 |
define( 'LIGHTNING_ADVANCED_TEXTDOMAIN', $data['textdomain'] );
|
22 |
define( 'LIGHTNING_ADVANCED_BASENAME', plugin_basename( __FILE__ ) );
|
@@ -24,15 +31,8 @@ define( 'LIGHTNING_ADVANCED_URL', plugin_dir_url( __FILE__ ) );
|
|
24 |
define( 'LIGHTNING_ADVANCED_DIR', plugin_dir_path( __FILE__ ) );
|
25 |
define( 'LIGHTNING_ADVANCED_SHORT_NAME', 'LTG' );
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
*/
|
30 |
-
add_action('plugins_loaded', 'lightning_adv_unit_setup');
|
31 |
-
function lightning_adv_unit_setup(){
|
32 |
-
if ( apply_filters( 'lightning_slide_nav_load', true ) ){
|
33 |
-
require_once( LIGHTNING_ADVANCED_DIR . 'inc/navigation/navigation.php' );
|
34 |
-
}
|
35 |
-
}
|
36 |
|
37 |
require_once( LIGHTNING_ADVANCED_DIR . 'inc/widgets/widget-new-posts.php' );
|
38 |
require_once( LIGHTNING_ADVANCED_DIR . 'inc/menu-btn-position.php' );
|
@@ -45,15 +45,15 @@ require_once( LIGHTNING_ADVANCED_DIR . 'inc/sidebar-fix/sidebar-fix.php' );
|
|
45 |
/* translations
|
46 |
/*-------------------------------------------*/
|
47 |
function lightning_adv_unit_textdomain() {
|
48 |
-
load_plugin_textdomain( LIGHTNING_ADVANCED_TEXTDOMAIN, false, dirname(plugin_basename(__FILE__)).'/languages/' );
|
49 |
}
|
50 |
add_action( 'plugins_loaded', 'lightning_adv_unit_textdomain' );
|
51 |
|
52 |
/*-------------------------------------------*/
|
53 |
/* Load js & CSS
|
54 |
/*-------------------------------------------*/
|
55 |
-
add_action( 'wp_enqueue_scripts','lightning_adv_unit_script',100 );
|
56 |
function lightning_adv_unit_script() {
|
57 |
-
|
58 |
-
|
59 |
}
|
2 |
/**
|
3 |
* Plugin Name: Lightning Advanced Unit
|
4 |
* Plugin URI: http://lightning.vektor-inc.co.jp/
|
5 |
+
* Version: 3.0.0
|
6 |
* Author: Vektor,Inc.
|
7 |
+
* Author URI: https://www.vektor-inc.co.jp
|
8 |
* Description: This is a plug-ins that extend the functionality of the theme "Lightning".
|
9 |
* Text Domain: lightning-adv-unit
|
10 |
* Domain Path: /languages
|
12 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
13 |
*/
|
14 |
|
15 |
+
$template = get_option( 'template' );
|
16 |
|
17 |
+
if ( ! ( $template == 'lightning' || $template == 'Lightning' ) ) {
|
18 |
+
return;
|
19 |
+
}
|
20 |
|
21 |
+
$data = get_file_data(
|
22 |
+
__FILE__, array(
|
23 |
+
'version' => 'Version',
|
24 |
+
'textdomain' => 'Text Domain',
|
25 |
+
)
|
26 |
+
);
|
27 |
define( 'LIGHTNING_ADVANCED_VERSION', $data['version'] );
|
28 |
define( 'LIGHTNING_ADVANCED_TEXTDOMAIN', $data['textdomain'] );
|
29 |
define( 'LIGHTNING_ADVANCED_BASENAME', plugin_basename( __FILE__ ) );
|
31 |
define( 'LIGHTNING_ADVANCED_DIR', plugin_dir_path( __FILE__ ) );
|
32 |
define( 'LIGHTNING_ADVANCED_SHORT_NAME', 'LTG' );
|
33 |
|
34 |
+
// ナビゲーションの切り替え処理・カスタマイザー
|
35 |
+
require_once( LIGHTNING_ADVANCED_DIR . 'inc/navi-common.php' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
require_once( LIGHTNING_ADVANCED_DIR . 'inc/widgets/widget-new-posts.php' );
|
38 |
require_once( LIGHTNING_ADVANCED_DIR . 'inc/menu-btn-position.php' );
|
45 |
/* translations
|
46 |
/*-------------------------------------------*/
|
47 |
function lightning_adv_unit_textdomain() {
|
48 |
+
load_plugin_textdomain( LIGHTNING_ADVANCED_TEXTDOMAIN, false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
49 |
}
|
50 |
add_action( 'plugins_loaded', 'lightning_adv_unit_textdomain' );
|
51 |
|
52 |
/*-------------------------------------------*/
|
53 |
/* Load js & CSS
|
54 |
/*-------------------------------------------*/
|
55 |
+
add_action( 'wp_enqueue_scripts', 'lightning_adv_unit_script', 100 );
|
56 |
function lightning_adv_unit_script() {
|
57 |
+
wp_register_script( 'lightning_adv_unit_script', LIGHTNING_ADVANCED_URL . 'js/lightning-adv.min.js', array( 'jquery', 'lightning-js' ), LIGHTNING_ADVANCED_VERSION );
|
58 |
+
wp_enqueue_script( 'lightning_adv_unit_script' );
|
59 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: Lightning,
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 4.9.1
|
7 |
-
Stable tag:
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -44,6 +44,9 @@ e.g.
|
|
44 |
|
45 |
== Changelog ==
|
46 |
|
|
|
|
|
|
|
47 |
= 2.6.1 =
|
48 |
* [ bug fix ] Add processing when there is no sidebar.
|
49 |
|
4 |
Tags: Lightning,
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 4.9.1
|
7 |
+
Stable tag: 3.0.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
44 |
|
45 |
== Changelog ==
|
46 |
|
47 |
+
= 3.0.0 =
|
48 |
+
* [ Add function ] New Mobile Menu Release
|
49 |
+
|
50 |
= 2.6.1 =
|
51 |
* [ bug fix ] Add processing when there is no sidebar.
|
52 |
|