Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/babel/traverse-7.23.2
Browse files Browse the repository at this point in the history
  • Loading branch information
kurudrive authored Feb 2, 2024
2 parents a799f77 + bf26978 commit 7e9aa29
Show file tree
Hide file tree
Showing 42 changed files with 468 additions and 3,941 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ thumbs.db

/test-results/
/playwright-report/
/playwright/.cache/
/playwright/.cache/
.phpunit.result.cache
2 changes: 1 addition & 1 deletion _g2/assets/css/common.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _g2/assets/css/common_editor.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _g2/assets/js/lightning.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions _g2/inc/starter-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function lightning_add_starter_content() {
'text_custom' => array(
'text',
array(
'title' => get_bloginfo( 'name' ),
'title' => get_bloginfo( 'name', 'display' ),
'text' => '<b>Address</b><br>
123 Main Street<br>
New York, NY 10001<br>
Expand Down Expand Up @@ -227,7 +227,7 @@ function lightning_add_starter_content() {
'layout' => array(
'front-page' => 'col-one-no-subsection',
),
'theme_json' => true,
'theme_json' => true,
),
'lightning_theme_generation' => 'g2',
),
Expand Down
6 changes: 3 additions & 3 deletions _g2/inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ function lightning_get_print_headlogo() {
if ( ! empty( $options['head_logo'] ) ) {
$head_logo = apply_filters( 'lightning_head_logo_image_url', $options['head_logo'] );
if ( $head_logo ) {
return '<img src="' . esc_url( $head_logo ) . '" alt="' . esc_attr( get_bloginfo( 'name' ) ) . '" />';
return '<img src="' . esc_url( $head_logo ) . '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" />';
}
}
return get_bloginfo( 'name' );
return get_bloginfo( 'name', 'display' );
}
function lightning_print_headlogo() {
echo lightning_get_print_headlogo();
Expand Down Expand Up @@ -365,7 +365,7 @@ function lightning_the_footerCopyRight() {

// copyright
/*------------------*/
$lightning_footerCopyRight = '<p>' . sprintf( __( 'Copyright &copy; %s All Rights Reserved.', 'lightning' ), get_bloginfo( 'name' ) ) . '</p>';
$lightning_footerCopyRight = '<p>' . sprintf( __( 'Copyright &copy; %s All Rights Reserved.', 'lightning' ), get_bloginfo( 'name', 'display' ) ) . '</p>';
echo apply_filters( 'lightning_footerCopyRightCustom', $lightning_footerCopyRight );

// Powered
Expand Down
23 changes: 23 additions & 0 deletions _g2/inc/vk-components/package/_scss/_vk-post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ $xxl-min: 1400px;
/*-------------------------------------------*/
/* If exclude the .vk_posts that, when you select the .media don't work */
.vk_posts .vk_post-col {
// 5 と 7 は horizontal でのみ使用
// 他のように -30px でないのは そもそも -30px 自体が vk_post の独自仕様であるため
// horizontal では -30px をつける必要がないのでつけていない
&-5 {
width: 41.67%;
}
&-7 {
width: 58.33%;
}

&-xs-2 {
width: calc(16.66% - 30px);
}
Expand Down Expand Up @@ -325,6 +335,13 @@ $xxl-min: 1400px;
}

&.card-horizontal {
// テーマなどが bootstrap の grid を読み込むと、
// horizontal に残っている col-5/col-7 のクラスにpadding をつけられてしまうので打ち消し
// ( horizontal から col-5/col-7 のクラスを削除したらこちらも削除可 )
.vk_post-col-5,
.vk_post-col-7 {
padding: 0;
}
.vk_post_imgOuter {
height: 100%;
border-bottom: none;
Expand All @@ -338,8 +355,14 @@ $xxl-min: 1400px;
border-right:none;
border-left:$border_image;
}
.card-horizontal-inner-row {
flex-direction: row-reverse;
}
}
}
.card-horizontal-inner-row {
display: flex;
}
}

/*-------------------------------------------*/
Expand Down
10 changes: 6 additions & 4 deletions _g2/inc/vk-components/package/class-vk-component-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* VK Components Posts
*
* @package VK Component
* @version 1.5.0
* @version 1.6.0
*
* *********************** CAUTION ***********************
* The original of this file is located at:
Expand Down Expand Up @@ -840,17 +840,19 @@ public static function get_view_type_card( $post, $options ) {
public static function get_view_type_card_horizontal( $post, $options ) {
$html = '';
$html .= self::get_view_first_div( $post, $options );
$html .= '<div class="row no-gutters card-horizontal-inner-row">';
$html .= '<div class="card-horizontal-inner-row">';

if ( $options['display_image'] ) {
$html .= '<div class="col-5 card-img-outer">';
// col-5 は古いクラス名 / 現在は vk_post-col-5 にスタイルをあてている
$html .= '<div class="vk_post-col-5 col-5 card-img-outer">';
$attr = array(
'class_outer' => '',
'class_image' => 'card-img card-img-use-bg',
);
$html .= self::get_thumbnail_image( $post, $options, $attr );
$html .= '</div><!-- /.col -->';
$html .= '<div class="col-7">';
// col-7 は古いクラス名 / 現在は vk_post-col-7 にスタイルをあてている
$html .= '<div class="vk_post-col-7 col-7">';
}

$html .= self::get_view_body( $post, $options );
Expand Down
2 changes: 1 addition & 1 deletion _g2/inc/vk-components/package/css/vk-components.css

Large diffs are not rendered by default.

33 changes: 21 additions & 12 deletions _g2/inc/vk-mobile-nav/package/js/vk-mobile-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,17 @@ If you want to change this file that, you have to change original file.
/*-------------------------------------*/
// メニューを閉じる
function vk_mobile_nav_close(target){
// ※ fix nav の方を押される事もある
document.getElementById('vk-mobile-nav-menu-btn').classList.remove('menu-open')
// メニュー本体から .vk-mobile-nav-open を削除
document.getElementById('vk-mobile-nav').classList.remove('vk-mobile-nav-open')

let menuButton = document.getElementById('vk-mobile-nav-menu-btn');
if (menuButton) {
// ※ fix nav の方を押される事もある
menuButton.classList.remove('menu-open');
}
let mobileNav = document.getElementById('vk-mobile-nav');
if (mobileNav) {
// メニュー本体から .vk-mobile-nav-open を削除
mobileNav.classList.remove('vk-mobile-nav-open');
}
}

// 実行関数
Expand All @@ -47,14 +54,16 @@ If you want to change this file that, you have to change original file.
fontawesome のクラス名が返ってきて誤動作してしまうため、buttn に一旦格納
*/
let button = document.getElementById('vk-mobile-nav-menu-btn');
button.addEventListener('click', () => {
if( button.classList.contains('menu-open') ){
vk_mobile_nav_close(target);
}else{
addClass(target, 'menu-open')
document.getElementById('vk-mobile-nav').classList.add('vk-mobile-nav-open')
}
})
if (button) {
button.addEventListener('click', () => {
if( button.classList.contains('menu-open') ){
vk_mobile_nav_close(target);
}else{
addClass(target, 'menu-open')
document.getElementById('vk-mobile-nav').classList.add('vk-mobile-nav-open')
}
})
}

action('.vk-mobile-nav li > a', (elm) => {
elm.addEventListener('click', (e) => {
Expand Down
20 changes: 7 additions & 13 deletions _g3/assets/_js/_sidebar-fixed.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@
// サイドバー上端が画面上部にくるまでにスクロールしないといけない距離 = サイドバーの開始位置 - サイドバー上部に確保したい余白
let to_scroll_sidebar_top_stop = content_position_top - sidebar_top_margin();

// コンテンツエリア下端とウィンドウ下端の距離(スクロール量に応じて可変)
let content_position_bottom_from_window_bottom = window_height - ( content_position_bottom - window.pageYOffset );

// サイドバーがメインコンテンツよりも高い場合は処理しない
if ( sidebar_height > content_height ){ return; }

Expand Down Expand Up @@ -239,20 +242,10 @@

// コンテンツエリア下端が表示されたら
if ( is_content_bottom_display ){
sideSection.style.left = null;
parentSection.style.position = "relative";
sideSection.style.position = "absolute";
sideSection.style.top = null;
sideSection.style.bottom = 0;

// 右サイトバーの時は absolute になるので right = 0 を付与しないといけなくなる
if ( sideSection.classList.contains('sub-section--pos--left') != true ){
sideSection.style.right = "15px";
}
} else {
if ( sideSection.classList.contains('sub-section--pos--left') != true ){
sideSection.style.right = null;
}
// ウィンドウ下端からコンテンツエリア下端までの距離をサイドバーの bottom として指定
// ※下端が表示されるまで下部に 5px 余白が付与されているので、その分を引き続き付与
sideSection.style.bottom = content_position_bottom_from_window_bottom + 5 + "px";
}
} else {
sideFix_reset();
Expand All @@ -267,6 +260,7 @@
// console.log( 'is_content_bottom_display : ' + is_content_bottom_display);
// console.log( 'content_position_bottom : ' + content_position_bottom);
// console.log( 'content_position_bottom_to_scroll : ' + content_position_bottom_to_scroll);
// console.log( 'content_position_bottom_from_window_bottom : ' + content_position_bottom_from_window_bottom);
// console.log( 'sidebar_position_left_default : ' + sidebar_position_left_default);

}
Expand Down
4 changes: 3 additions & 1 deletion _g3/assets/_scss/_common-theme-json.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
.wp-block-column,
.vk_outer,
.swiper-wrapper,
.swiper-pagination
.swiper-pagination,
.is-content-justification-right,
.is-content-justification-left
)) {
max-width: calc( var(--vk-width-container) - var(--vk-width-container-padding) * 2 );
margin-left:auto;
Expand Down
5 changes: 5 additions & 0 deletions _g3/assets/_scss/_customize-shortcut.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@
// If this specific don't exist that become over flow hidden
.customize-partial-edit-shortcuts-shown .sub-section{
content-visibility:unset;
}
.alert.widget-area-description {
font-size:small;
line-height: 1.7;
margin-bottom:1.5em;
}
16 changes: 9 additions & 7 deletions _g3/assets/_scss/block/_block.scss
Original file line number Diff line number Diff line change
Expand Up @@ -344,13 +344,8 @@ body .wp-block-image figure {
@media (max-width: 600px){
.wp-block-media-text {
&.is-stacked-on-mobile{
.wp-block-media-text__media {
margin-bottom:1.6rem;
}
&.has-media-on-the-right {
.wp-block-media-text__media {
margin-top:1.6rem;
}
.wp-block-media-text__content {
// 縦積みだと画像とテキストがひっついてしまうが、本来スペーサーなどでユーザーが任意に指定するべき部分なのでテーマからは指定しない
}
}
}
Expand Down Expand Up @@ -471,4 +466,11 @@ hr.wp-block-separator {
img:not([style*='object-fit']) {
height: auto !important; // !important to override inline styles.
}
}
/*-------------------------------------------*/
/* Post Date Block
/*-------------------------------------------*/
// theme.json から指定可能になったらそちらに移行
.wp-block-post-date time{
white-space:nowrap;
}
4 changes: 2 additions & 2 deletions _g3/assets/_scss/block/_block_editor_width.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ body:not(.is-fullscreen-mode) .edit-post-layout.is-sidebar-opened{
--vk-width-editor-wide:calc( var( --vk-width-editor-container-body ) + ( 100vw - var( --vk-width-editor-container-body ) - var(--vk-width-editor-leftmenu) - var(--vk-width-editor-sidebar) ) / 2 );
}
// 左管理メニュー表示( 展開 ) / 右サイドバー非表示
body:not(.is-fullscreen-mode) .edit-post-layout:not(.is-sidebar-opened){
body:not(:is(.is-fullscreen-mode,.auto-fold)) .edit-post-layout:not(.is-sidebar-opened){
--vk-width-editor-container:calc( var(--vk-width-container) - var(--vk-width-editor-leftmenu) );
--vk-width-editor-container-body:calc( ( 100vw - 160px ) * 0.8 - 30px );
--vk-width-editor-full:calc( 100vw - var(--vk-width-editor-leftmenu) );
Expand All @@ -78,7 +78,7 @@ body.folded:not(.is-fullscreen-mode) .edit-post-layout:not(.is-sidebar-opened){
--vk-width-editor-wide:calc( var( --vk-width-editor-container-body ) + ( 100vw - var( --vk-width-editor-container-body ) - var(--vk-width-editor-leftmenu-folded) ) / 2 );
}
// 左管理メニュー表示( 縮小 ) / 右サイドバー展開
body.folded:not(.is-fullscreen-mode) .edit-post-layout.is-sidebar-opened{
body:is(.folded, .auto-fold ):not(.is-fullscreen-mode) .edit-post-layout.is-sidebar-opened{
--vk-width-editor-container:calc( var(--vk-width-container) - var(--vk-width-editor-leftmenu-folded) - var(--vk-width-editor-sidebar) );
--vk-width-editor-container-body:calc( ( 100vw - var(--vk-width-editor-sidebar) ) * 0.8 - 30px );
--vk-width-editor-full:calc( 100vw - var(--vk-width-editor-leftmenu-folded) - var(--vk-width-editor-sidebar) );
Expand Down
4 changes: 0 additions & 4 deletions _g3/assets/_scss/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
@import "common";
@import "common-theme-json";
font-family : var(--wp--preset--font-family--system-font);
&,
& p {
font-size : var(--vk-size-text);
}
}

@import "common-editor";
Expand Down
5 changes: 5 additions & 0 deletions _g3/assets/_scss/project/_site-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ $logo_bottom_margin:1rem;
}

.site-header--layout--center {
.site-header-logo {
width:fit-content;
margin-left:auto;
margin-right:auto;
}
@media ( min-width: $lg-min ){
.site-header-logo {
text-align: center;
Expand Down
2 changes: 1 addition & 1 deletion _g3/assets/css/editor.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _g3/assets/css/style-theme-json.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _g3/assets/css/style.css

Large diffs are not rendered by default.

Loading

0 comments on commit 7e9aa29

Please sign in to comment.