diff --git a/skins/skin-made-in-heaven/assets/css/admin.css b/skins/skin-made-in-heaven/assets/css/admin.css index 0b9e8acec..115d75a83 100644 --- a/skins/skin-made-in-heaven/assets/css/admin.css +++ b/skins/skin-made-in-heaven/assets/css/admin.css @@ -21,39 +21,63 @@ /******************************************************************************* -** スライドオプション +** ラジオボタン *******************************************************************************/ #customize-control-hvn_header_fade_setting, -#customize-control-hvn_header_animation_setting { +#customize-control-hvn_header_animation_setting, +#customize-control-hvn_numeric_list_set2_setting, +#customize-control-hvn_icon_box_set1_setting, +#customize-control-hvn_tab_box_set1_setting, +#customize-control-hvn_faq_set1_setting { display: flex; flex-wrap: wrap; } #customize-control-hvn_header_fade_setting .description, -#customize-control-hvn_header_animation_setting .description { +#customize-control-hvn_header_animation_setting .description, +#customize-control-hvn_numeric_list_set2_setting .description, +#customize-control-hvn_icon_box_set1_setting .description, +#customize-control-hvn_tab_box_set1_setting .description, +#customize-control-hvn_faq_set1_setting .description { width: 100%; } #customize-control-hvn_header_fade_setting .customize-inside-control-row, -#customize-control-hvn_header_animation_setting .customize-inside-control-row { +#customize-control-hvn_header_animation_setting .customize-inside-control-row, +#customize-control-hvn_numeric_list_set2_setting .customize-inside-control-row, +#customize-control-hvn_icon_box_set1_setting .customize-inside-control-row, +#customize-control-hvn_tab_box_set1_setting .customize-inside-control-row, +#customize-control-hvn_faq_set1_setting .customize-inside-control-row { margin: 0; } #customize-control-hvn_header_fade_setting input, -#customize-control-hvn_header_animation_setting input { +#customize-control-hvn_header_animation_setting input, +#customize-control-hvn_numeric_list_set2_setting input, +#customize-control-hvn_icon_box_set1_setting input, +#customize-control-hvn_tab_box_set1_setting input, +#customize-control-hvn_faq_set1_setting input { display: none; } #customize-control-hvn_header_fade_setting label, -#customize-control-hvn_header_animation_setting label { +#customize-control-hvn_header_animation_setting label, +#customize-control-hvn_numeric_list_set2_setting label, +#customize-control-hvn_icon_box_set1_setting label, +#customize-control-hvn_tab_box_set1_setting label, +#customize-control-hvn_faq_set1_setting label { + box-shadow: inset 1px 1px 0 0 #007cba, 1px 1px 0 0 #007cba, 1px 0 0 0 #007cba, 0 1px 0 0 #007cba; color: #007cba; padding: 5px 10px; - box-shadow: inset 1px 1px 0 0 #007cba, 1px 1px 0 0 #007cba, 1px 0 0 0 #007cba, 0 1px 0 0 #007cba; } #customize-control-hvn_header_fade_setting input:checked ~ label, -#customize-control-hvn_header_animation_setting input:checked ~ label { +#customize-control-hvn_header_animation_setting input:checked ~ label, +#customize-control-hvn_numeric_list_set2_setting input:checked ~ label, +#customize-control-hvn_icon_box_set1_setting input:checked ~ label, +#customize-control-hvn_tab_box_set1_setting input:checked ~ label, +#customize-control-hvn_faq_set1_setting input:checked ~ label { background-color: #007cba; color: #fff; } @@ -118,28 +142,7 @@ ** 見出し *******************************************************************************/ - -/* 基本カラー */ - -#customize-control-hvn_main_color_setting:before, -#customize-control-header_background_color:before, -#customize-control-hvn_h2_css_setting:before, - -/* 拡張 */ - -#customize-control-hvn_front_loading_setting:before, -#customize-control-entry_card_type:before, -#customize-control-hvn_button_more_setting:before, -#customize-control-hvn_index_new_setting:before, -#customize-control-hvn_prof_setting:before, - -/* 動画・スライドヘッダー */ - -#customize-control-the_site_logo_url:before, -#customize-control-hvn_header_setting:before, -#customize-control-hvn_header_fade_setting:before, -#customize-control-hvn_header_filter_setting:before, -#customize-control-hvn_header_color_setting:before { +.customize-control-hidden label { background-color: #fff; border-bottom: 1px solid #dcdcde; border-top: 1px solid #dcdcde; @@ -151,56 +154,15 @@ width: 100%; } -#customize-control-hvn_main_color_setting:before { - content: '■ 基本カラー'; -} - -#customize-control-header_background_color:before { - content: '■ 個別カラー'; -} -#customize-control-hvn_h2_css_setting:before { - content: '■ 見出しデザイン'; -} - -#customize-control-hvn_front_loading_setting:before { - content: '■ ローディング画面'; -} - -#customize-control-entry_card_type:before { - content: '■ フロントページ'; -} - -#customize-control-hvn_button_more_setting:before { - content: '■ ボタン'; -} - -#customize-control-hvn_index_new_setting:before { - content: '■ オプション'; -} - -#customize-control-hvn_prof_setting:before { - content: '■ プロフィール'; -} - -#customize-control-the_site_logo_url:before { - content: '■ ヘッダーロゴ'; -} - -#customize-control-hvn_header_setting:before { - content: '■ メインビジュアル'; -} - -#customize-control-hvn_header_fade_setting:before { - content: '■ スライドオプション'; -} - -#customize-control-hvn_header_filter_setting:before { - content: '■ フィルター'; -} +/******************************************************************************* +** エディター +*******************************************************************************/ -#customize-control-hvn_header_color_setting:before { - content: '■ オーバーレイ'; +[id*="customize-control-hvn_marker_color"], +[id*="customize-control-hvn_inline_button_color"] { + display: flex; + gap: 15px; } @@ -414,12 +376,15 @@ /* おすすめカード */ -#tab-recommended-content tr:nth-child(3), #tab-recommended-content tr:nth-child(4), -#tab-recommended-content tr:nth-child(5) { + #tab-recommended-content tr:nth-child(5) { display: none; } +#tab-recommended-content tr:nth-child(3) li:nth-child(n+3) { + display:none; +} + /* エディター */ diff --git a/skins/skin-made-in-heaven/assets/css/h2/h2-1.css b/skins/skin-made-in-heaven/assets/css/h2/h2-1.css index 346701361..6f763434b 100644 --- a/skins/skin-made-in-heaven/assets/css/h2/h2-1.css +++ b/skins/skin-made-in-heaven/assets/css/h2/h2-1.css @@ -7,5 +7,12 @@ .main .under-entry-content h2 { background-color: var(--hover-color); border-left: 10px solid var(--main-color); + color: #333; padding: 20px 15px!important; +} + +.hvn-dark .article h2, +.hvn-dark .main .article .widget-title, +.hvn-dark .main .under-entry-content h2 { + color: var(--cocoon-text-color); } \ No newline at end of file diff --git a/skins/skin-made-in-heaven/assets/css/h2/h2-11.css b/skins/skin-made-in-heaven/assets/css/h2/h2-11.css index 868ba3fda..4bd860f83 100644 --- a/skins/skin-made-in-heaven/assets/css/h2/h2-11.css +++ b/skins/skin-made-in-heaven/assets/css/h2/h2-11.css @@ -6,5 +6,6 @@ .main .article .widget-title, .main .under-entry-content h2 { background-image: repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 2px), repeating-linear-gradient(#fff 0 1px, var(--main-color) 1px 2px); + color: #333; padding: 20px 25px!important; } \ No newline at end of file diff --git a/skins/skin-made-in-heaven/assets/css/h2/h2-12.css b/skins/skin-made-in-heaven/assets/css/h2/h2-12.css index b66383adb..2a0f03f0a 100644 --- a/skins/skin-made-in-heaven/assets/css/h2/h2-12.css +++ b/skins/skin-made-in-heaven/assets/css/h2/h2-12.css @@ -11,6 +11,7 @@ .article h2 { border: 1px solid var(--main-color); border-left-width: 50px; + color: #333; counter-increment: number; } @@ -35,6 +36,12 @@ padding: 20px 20px 20px 10px!important; } +.hvn-dark .article h2, +.hvn-dark .main .article .widget-title, +.hvn-dark .main .under-entry-content h2 { + color: var(--cocoon-text-color); +} + .toc-list > li { counter-increment: toc-number 1; padding-left: 1.8em; diff --git a/skins/skin-made-in-heaven/assets/css/h2/h2-13.css b/skins/skin-made-in-heaven/assets/css/h2/h2-13.css index 1a1950081..1781f4823 100644 --- a/skins/skin-made-in-heaven/assets/css/h2/h2-13.css +++ b/skins/skin-made-in-heaven/assets/css/h2/h2-13.css @@ -21,6 +21,10 @@ padding: 0px 20px 5px; } +.hvn-dark .article h2 { + border-color: #696969; +} + .article h2::before { font-family: Arial; bottom: -28px; diff --git a/skins/skin-made-in-heaven/assets/css/h2/h2-14.css b/skins/skin-made-in-heaven/assets/css/h2/h2-14.css new file mode 100644 index 000000000..b658ca490 --- /dev/null +++ b/skins/skin-made-in-heaven/assets/css/h2/h2-14.css @@ -0,0 +1,20 @@ +@charset "UTF-8"; + +/* 塗りつぶし(アクセント) */ + +.article h2, +.main .article .widget-title, +.main .under-entry-content h2 { + background-color: var(--hover-color); + border: 2px solid #333; + box-shadow: 6px 6px #333; + color: #333; + outline: 4px solid var(--white-bgcolor); + padding: 18px 23px!important; +} + +.hvn-dark .article h2, +.hvn-dark .main .article .widget-title, +.hvn-dark .main .under-entry-content h2 { + color : var(--cocoon-text-color); +} \ No newline at end of file diff --git a/skins/skin-made-in-heaven/assets/css/h2/h2-2.css b/skins/skin-made-in-heaven/assets/css/h2/h2-2.css index 49e7793ca..fd4a7f332 100644 --- a/skins/skin-made-in-heaven/assets/css/h2/h2-2.css +++ b/skins/skin-made-in-heaven/assets/css/h2/h2-2.css @@ -10,4 +10,4 @@ border-top: 4px double var(--white-bgcolor); color: var(--text-color)!important; padding: 16px 25px!important; -} +} \ No newline at end of file diff --git a/skins/skin-made-in-heaven/assets/css/h2/h2-3.css b/skins/skin-made-in-heaven/assets/css/h2/h2-3.css index 2cabb21ed..036615a2b 100644 --- a/skins/skin-made-in-heaven/assets/css/h2/h2-3.css +++ b/skins/skin-made-in-heaven/assets/css/h2/h2-3.css @@ -8,4 +8,4 @@ background-color: var(--main-color); color: var(--text-color)!important; padding: 20px 25px!important; -} +} \ No newline at end of file diff --git a/skins/skin-made-in-heaven/assets/css/h2/h2-4.css b/skins/skin-made-in-heaven/assets/css/h2/h2-4.css index 262164d09..8a72c53d5 100644 --- a/skins/skin-made-in-heaven/assets/css/h2/h2-4.css +++ b/skins/skin-made-in-heaven/assets/css/h2/h2-4.css @@ -24,4 +24,4 @@ right: auto; top: 4px; width: calc(100% - 8px); -} +} \ No newline at end of file diff --git a/skins/skin-made-in-heaven/assets/css/h2/h2-5.css b/skins/skin-made-in-heaven/assets/css/h2/h2-5.css index 34cad800d..e461d95a9 100644 --- a/skins/skin-made-in-heaven/assets/css/h2/h2-5.css +++ b/skins/skin-made-in-heaven/assets/css/h2/h2-5.css @@ -15,11 +15,11 @@ .main .under-entry-content h2:before { background-color: var(--main-color); bottom: -10px; - clip-path: polygon(0 0,100% 0, 50% 100%); + clip-path: polygon(0 0, 100% 0, 50% 100%); content: ''; height: 11px; left: 30px; position: absolute; transform: translateX(-50%); width: 22px; -} +} \ No newline at end of file diff --git a/skins/skin-made-in-heaven/assets/css/h2/h2-8.css b/skins/skin-made-in-heaven/assets/css/h2/h2-8.css index 2fa5b2626..61ad57651 100644 --- a/skins/skin-made-in-heaven/assets/css/h2/h2-8.css +++ b/skins/skin-made-in-heaven/assets/css/h2/h2-8.css @@ -8,5 +8,12 @@ background: linear-gradient(135deg, transparent 25%, var(--hover-color) 26%, var(--hover-color) 50%, transparent 51%, transparent 75%, var(--hover-color) 76%, var(--hover-color)); background-size: 4px 4px; border-left: 10px solid var(--main-color); + color: #333; padding: 20px 15px!important; +} + +.hvn-dark .article h2, +.hvn-dark .main .article .widget-title, +.hvn-dark .main .under-entry-content h2 { + color: var(--cocoon-text-color); } \ No newline at end of file diff --git a/skins/skin-made-in-heaven/assets/css/h2/h2-9.css b/skins/skin-made-in-heaven/assets/css/h2/h2-9.css index 97d29f7d0..9156196a5 100644 --- a/skins/skin-made-in-heaven/assets/css/h2/h2-9.css +++ b/skins/skin-made-in-heaven/assets/css/h2/h2-9.css @@ -6,15 +6,22 @@ .main .article .widget-title, .main .under-entry-content h2 { background-color: var(--hover-color); + color: #333; padding: 20px 25px!important; } +.hvn-dark .article h2, +.hvn-dark .main .article .widget-title, +.hvn-dark .main .under-entry-content h2 { + color: var(--cocoon-text-color); +} + .article h2::before, .main .article .widget-title::before, .main .under-entry-content h2::before { border: dashed 1px var(--main-color); - inset: 4px auto auto 4px; box-sizing: border-box; + inset: 4px auto auto 4px; content: ''; display: block; height: calc(100% - 8px); diff --git a/skins/skin-made-in-heaven/assets/css/h2/h2.csv b/skins/skin-made-in-heaven/assets/css/h2/h2.csv index 74da7db2e..0205b0b6a 100644 --- a/skins/skin-made-in-heaven/assets/css/h2/h2.csv +++ b/skins/skin-made-in-heaven/assets/css/h2/h2.csv @@ -6,6 +6,7 @@ 2,帯 3,塗りつぶし 11,塗りつぶし(薄) +14,塗りつぶし(アクセント) 4,ステッチ 9,ステッチ(薄) 5,吹き出し diff --git a/skins/skin-made-in-heaven/assets/css/h3/h3-8.css b/skins/skin-made-in-heaven/assets/css/h3/h3-8.css new file mode 100644 index 000000000..d203c31d9 --- /dev/null +++ b/skins/skin-made-in-heaven/assets/css/h3/h3-8.css @@ -0,0 +1,14 @@ +@charset "UTF-8"; + +/* 塗りつぶし(下線) */ + +.article h3 { + background-color: var(--hover-color); + border-bottom: 2px solid var(--main-color); + color: #333; + padding: 15px 23px 15px 25px; +} + +.hvn-dark .article h3 { + color: var(--cocoon-text-color); +} \ No newline at end of file diff --git a/skins/skin-made-in-heaven/assets/css/h3/h3.csv b/skins/skin-made-in-heaven/assets/css/h3/h3.csv index d255ddfa4..402d0ad30 100644 --- a/skins/skin-made-in-heaven/assets/css/h3/h3.csv +++ b/skins/skin-made-in-heaven/assets/css/h3/h3.csv @@ -6,3 +6,4 @@ 3,下線(グラデーション) 4,下線(サイトカラー・グレー) 5,下線(サイトカラー・薄) +8,塗りつぶし(下線) diff --git a/skins/skin-made-in-heaven/assets/css/original.css b/skins/skin-made-in-heaven/assets/css/original.css index c580aeae4..5ab5eba59 100644 --- a/skins/skin-made-in-heaven/assets/css/original.css +++ b/skins/skin-made-in-heaven/assets/css/original.css @@ -203,21 +203,64 @@ ** タイムライン(ミニ) *******************************************************************************/ -.is-style-hvn-timeline-mini .timeline-item-content:before { +.editor-styles-wrapper .is-style-hvn-timeline-mini, +.is-style-hvn-timeline-mini { + --cocoon-custom-point-color: var(--main-color); +} + +.is-style-hvn-timeline-mini .timeline-item:before { + background-color: var(--white-bgcolor)!important; + border: 3px solid var(--cocoon-custom-point-color); content: ''; - display: block; + height: 10px; width: 10px; +} + + +/******************************************************************************* +** タイムライン(ライン) +*******************************************************************************/ + +.editor-styles-wrapper .is-style-hvn-timeline-line, +.is-style-hvn-timeline-line { + --cocoon-custom-point-color: var(--main-color); +} + +.is-style-hvn-timeline-line .timeline-item::before { + background-color: var(--cocoon-custom-point-color); height: 10px; - left: 106px; + left: 112px; top: 23px; - background-color: var(--white-bgcolor); + width: 10px; +} + +.is-style-hvn-timeline-line .timeline-item-content:before { + background-color: var(--cocoon-custom-point-color); + content: ''; + display: block; + height: 1px; + left: 122px; position: absolute; - border-radius: 100%; + top: 27px; + width: 15px; +} + +.is-style-hvn-timeline-line .timeline-item-content { + border-left: 14px solid var(--hover-color); } @media (width <=480px) { - .is-style-hvn-timeline-mini .timeline-item-content:before { - left: -7px; + .is-style-hvn-timeline-line .timeline > li.timeline-item { + border-left: 14px solid var(--hover-color) + } + .is-style-hvn-timeline-line .timeline-item-content { + border: 0; + } + .is-style-hvn-timeline-line .timeline-item::before { + left: -12px; + } + .is-style-hvn-timeline-line .timeline-item-content:before { + left: -2px; } } @@ -226,14 +269,19 @@ ** タイムライン(スケジュール) *******************************************************************************/ +.editor-styles-wrapper .hvn-timeline, +.hvn-timeline { + --cocoon-custom-point-color: var(--main-color); +} + .hvn-timeline .timeline-item { display: list-item; } .hvn-timeline .timeline-item:before { background-color: var(--white-bgcolor)!important; - border: 2px solid var(--main-color); - color: var(--main-color); + border: 2px solid var(--cocoon-custom-point-color); + color: var(--cocoon-custom-point-color); font-family: 'Font Awesome 5 Free'; font-size: 12px; font-weight: 900; @@ -340,4 +388,45 @@ pre { .body .widget-entry-cards .like { display: none; -} \ No newline at end of file +} + + +/******************************************************************************* +** タブ(吹き出し) +*******************************************************************************/ + +.is-style-hvn-tab-balloon.tab-block .tab-label-group { + column-gap: var(--padding15); +} + +.is-style-hvn-tab-balloon .tab-label-group .tab-label { + border: 1px solid var(--main-color); + box-shadow: var(--shadow-color); +} + +.is-style-hvn-tab-balloon .tab-label-group .tab-label.is-active:before { + background-color: var(--main-color); + bottom: -11px; + clip-path: polygon(0 0, 100% 0, 50% 100%); + content: ''; + height: 11px; + left: 50%; + position: absolute; + transform: translateX(-50%); + width: 22px; +} + + +/******************************************************************************* +** タブ(ライン) +*******************************************************************************/ + +.is-style-hvn-tab-line .tab-label-group .tab-label { + border-bottom:1px solid var(--border-color); +} + +.is-style-hvn-tab-line .tab-label-group .tab-label.is-active { + background-color: transparent; + border-bottom: 2px solid var(--main-color); + color:var(--main-color); +} diff --git a/skins/skin-made-in-heaven/assets/css/w/w-2.css b/skins/skin-made-in-heaven/assets/css/w/w-2.css index b689f692b..5e1bf2708 100644 --- a/skins/skin-made-in-heaven/assets/css/w/w-2.css +++ b/skins/skin-made-in-heaven/assets/css/w/w-2.css @@ -15,4 +15,4 @@ aside.widget .widget-title:before { left: 0; position: absolute; width: 30%; -} +} \ No newline at end of file diff --git a/skins/skin-made-in-heaven/assets/css/w/w-3.css b/skins/skin-made-in-heaven/assets/css/w/w-3.css index d2d3409c0..7359f5e19 100644 --- a/skins/skin-made-in-heaven/assets/css/w/w-3.css +++ b/skins/skin-made-in-heaven/assets/css/w/w-3.css @@ -4,5 +4,6 @@ aside.widget .widget-title { border-left: 10px solid var(--main-color); + border-radius: 0; padding: 10px; } \ No newline at end of file diff --git a/skins/skin-made-in-heaven/assets/js/block.js b/skins/skin-made-in-heaven/assets/js/block.js index 49eba7af8..8f4dda2bf 100644 --- a/skins/skin-made-in-heaven/assets/js/block.js +++ b/skins/skin-made-in-heaven/assets/js/block.js @@ -3,6 +3,11 @@ wp.blocks.registerBlockStyle('cocoon-blocks/timeline', { label: 'ミニ' }); +wp.blocks.registerBlockStyle('cocoon-blocks/timeline', { + name: 'hvn-timeline-line', + label: 'ライン' +}); + wp.blocks.registerBlockStyle('cocoon-blocks/timeline', { name: 'hvn-timeline-step', label: 'ステップ' @@ -17,3 +22,15 @@ wp.blocks.registerBlockStyle('cocoon-blocks/timeline', { name: 'hvn-timeline-box', label: 'ボックス' }); + + +wp.blocks.registerBlockStyle('cocoon-blocks/tab', { + name: 'hvn-tab-balloon', + label: '吹き出し' +}); + + +wp.blocks.registerBlockStyle('cocoon-blocks/tab', { + name: 'hvn-tab-line', + label: '下線' +}); diff --git a/skins/skin-made-in-heaven/functions.php b/skins/skin-made-in-heaven/functions.php index 40fbe483a..9756a1082 100644 --- a/skins/skin-made-in-heaven/functions.php +++ b/skins/skin-made-in-heaven/functions.php @@ -5,6 +5,7 @@ global $_THEME_OPTIONS; global $_MOBILE_COPY_BUTTON; global $_HVN_EYECATCH; +global $_HVN_NOTICE; $skin_url = get_skin_url(); // ふわっと追加 @@ -54,7 +55,7 @@ 'site_background_color' => '', 'site_background_image_url' => '', 'align_site_width' => 0, - 'site_link_color' => '', + 'site_link_color' => '#1e88e5', 'site_selection_color' =>'', 'site_selection_background_color' => '', 'sidebar_position' => 'sidebar_right', @@ -204,7 +205,6 @@ 'comment_form_display_type' => 'toggle_button', // おすすめカード - 'recommended_cards_style' => 'large_thumb_on', 'recommended_cards_margin_enable' => 1, 'recommended_cards_area_both_sides_margin_enable' => 1, diff --git a/skins/skin-made-in-heaven/lib/function.php b/skins/skin-made-in-heaven/lib/function.php index c2847d12b..d259d8c93 100644 --- a/skins/skin-made-in-heaven/lib/function.php +++ b/skins/skin-made-in-heaven/lib/function.php @@ -205,6 +205,25 @@ function hvn_custom_css() { endif; +//****************************************************************************** +// エディターCSS追加 +//****************************************************************************** +if (!function_exists('hvn_editor_css')): +function hvn_editor_css() { + ob_start(); + cocoon_template_part(HVN_SKIN . 'tmp/css-editor'); + + $css = ob_get_clean(); + if ($css) { + $handle = 'hvn-editor'; + wp_register_style($handle, false, array()); + wp_enqueue_style($handle); + wp_add_inline_style($handle, $css); + } +} +endif; + + //****************************************************************************** // メインビジュアル追加 //****************************************************************************** @@ -376,10 +395,28 @@ function hvn_like_tag($post_ID) { //****************************************************************************** if (!function_exists('get_notice_area_message')): function get_notice_area_message() { + global $_HVN_NOTICE; + + $_HVN_NOTICE = false; + $msg = stripslashes_deep(get_theme_option(OP_NOTICE_AREA_MESSAGE)); + + if (!is_admin()) { $msg = str_replace('[', '<', $msg); $msg = str_replace(']', '>', $msg); + + $msg_array = explode(',' ,$msg); + + if (count($msg_array) > 1) { + $_HVN_NOTICE = true; + $html = null; + + for ($i=0;$i 1 && get_theme_mod('hvn_header_setting') == 'image' && is_front_top_page())) { + && (($_HVN_NOTICE) + || (hvn_image_count() > 1 && get_theme_mod('hvn_header_setting') == 'image' && is_front_top_page()))) { echo <<< EOF @@ -221,11 +225,13 @@ function breadcrumbs_root_text_custom(){ // オリジナルレイアウト変更 //****************************************************************************** add_filter('cocoon_part__tmp/list-category-columns', function($content) { - if (is_entry_card_type_vertical_card_2() - || is_entry_card_type_vertical_card_3()) { - ob_start(); - cocoon_template_part(HVN_SKIN . 'tmp/list-category-columns'); - $content = ob_get_clean(); + if (get_theme_mod('hvn_card_expansion_setting')) { + if (is_entry_card_type_vertical_card_2() + || is_entry_card_type_vertical_card_3()) { + ob_start(); + cocoon_template_part(HVN_SKIN . 'tmp/list-category-columns'); + $content = ob_get_clean(); + } } return $content; @@ -246,3 +252,66 @@ function breadcrumbs_root_text_custom(){ } return $content; }); + + +//****************************************************************************** +// カテゴリーごと(2、3カード)縦型カード +//****************************************************************************** +add_filter('index_widget_entry_card_type', function($type, $cat_id) { + if (get_theme_mod('hvn_categoties_card_setting')) { + $type = 'large_thumb'; + } + return $type; +}, 2, 10); + + +//****************************************************************************** +// プロフィールのSNSフォローを非表示 +//****************************************************************************** +add_filter('cocoon_part__tmp/sns-follow-buttons', function($content) { + if (get_theme_mod('hvn_profile_follows_setting')) { + if (get_query_var('option') == 'sf-profile') { + $content = null; + } + } + return $content; +}); + + +//****************************************************************************** +// ダークモード +//****************************************************************************** +add_filter('cocoon_part__tmp/footer-bottom', function($content) { + $html = << + + + +EOF; + $content = preg_replace('/(class="source-org copyright">.*)<\/div>/', "$1$html", $content); + return $content; +}); + + +//****************************************************************************** +// タイトルとURLをコピー +//****************************************************************************** +add_filter('cocoon_part__tmp/sns-share-buttons', function($content) { + $before ='/data-clipboard-text=".*" title/'; + $after = 'data-clipboard-text="' . get_share_page_title() . '" title'; + $content = preg_replace($before, $after, $content); + + return $content; +}); + + +//****************************************************************************** +// エントリーカードにリボンを追加 +//****************************************************************************** +add_action('entry_card_snippet_after',function($post_ID) { + $memo = get_post_meta($post_ID, 'the_page_memo', true); + preg_match('/ribbon-color-[1-5]/', $memo,$class); + if ($class) { + echo '
'; + } +}); diff --git a/skins/skin-made-in-heaven/lib/hook-wp.php b/skins/skin-made-in-heaven/lib/hook-wp.php index 6871e5ae6..01d0e1f7e 100644 --- a/skins/skin-made-in-heaven/lib/hook-wp.php +++ b/skins/skin-made-in-heaven/lib/hook-wp.php @@ -18,6 +18,7 @@ hvn_color($wp_customize); hvn_main($wp_customize); hvn_header($wp_customize); + hvn_editor($wp_customize); }); @@ -268,8 +269,10 @@ add_filter('widget_title', function($title) { $title = str_replace('[', '<', $title); $title = str_replace(']', '>', $title); - $title = str_replace(''', "'", $title); - $title = str_replace('"', '"', $title); + $title = str_replace('‘', "'", $title); + $title = str_replace('’', "'", $title); + $title = str_replace('”', '"', $title); + $title = str_replace('“', '"', $title); return $title; }); @@ -287,12 +290,9 @@ // CSS、ライブラリ追加 //****************************************************************************** add_action('wp_enqueue_scripts', function() { - if (get_theme_mod('hvn_like_setting')) { - wp_enqueue_script('cookie', 'https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js', ['jquery-migrate'], false, true); - } - hvn_h2_h4_css(); hvn_color_css(); + hvn_editor_css(); hvn_custom_css(); wp_dequeue_style('scrollhint-style'); }, 999); @@ -307,6 +307,7 @@ // エディター画面 if (is_gutenberg_editor_enable() && ($pagenow == 'post.php' || $pagenow == 'post-new.php')) { hvn_h2_h4_css(); + hvn_editor_css(); } wp_enqueue_style('hvn-admin', HVN_SKIN_URL . 'assets/css/admin.css'); }, 999); @@ -352,33 +353,55 @@ add_action('wp_head', function() { global $_THEME_OPTIONS; + // サイト開設年 $yymmdd = get_theme_mod('hvn_site_date_setting'); if ($yymmdd) { list($yy, $mm, $dd) = explode('-', $yymmdd); $_THEME_OPTIONS['site_initiation_year'] = $yy; } + $_THEME_OPTIONS['front_page_type'] = get_theme_mod('front_page_type', 'index'); $_THEME_OPTIONS['entry_card_type'] = get_theme_mod('entry_card_type', 'entry_card'); - // タイルカード除外 - if ((get_theme_mod('entry_card_type') == 'tile_card_2') - || (get_theme_mod('entry_card_type') == 'tile_card_3')) { - remove_theme_mod('entry_card_type'); - } - // サイドバー変更 - if ((get_theme_mod('entry_card_type') == 'vertical_card_3') - || (get_theme_mod('front_page_type') == 'category_3_columns')) { + if ((get_entry_card_type() == 'vertical_card_3') + || (get_front_page_type() == 'category_3_columns')) { $_THEME_OPTIONS['sidebar_display_type'] = 'no_display_index_pages'; } else { // 3列解除 - if (get_theme_mod('entry_card_type') == 'vertical_card_3') { + if (get_entry_card_type() == 'vertical_card_3') { remove_theme_mod('entry_card_type'); } - if (get_theme_mod('front_page_type') == 'category_3_columns') { + if (get_front_page_type() == 'category_3_columns') { remove_theme_mod('front_page_type'); } } + + switch(get_entry_card_type()) { + case 'title_card_2': + case 'tile_card_3': + remove_theme_mod('entry_card_type'); + break; + + case 'big_card': + if (get_theme_mod('hvn_card_expansion_setting')) { + $_THEME_OPTIONS['entry_card_snippet_visible'] = 1; + } + break; + + case 'big_card_first': + case 'vertical_card_2': + if (get_theme_mod('hvn_card_expansion_setting')) { + if (strpos(get_front_page_type(), 'category') !== false) { + // 新着記事数変更 + $_THEME_OPTIONS['index_new_entry_card_count'] = 5; + + // カテゴリーごと記事数変更 + $_THEME_OPTIONS['index_category_entry_card_count'] = 5; + } + } + break; + } }, 999); @@ -481,3 +504,23 @@ return $nav_menu; }, 10,2); + + +//****************************************************************************** +// インラインボタン変更 +//****************************************************************************** +add_filter('render_block', function($block_content) { + $btn_circle = null; + $btn_shine = null; + + if (get_theme_mod('hvn_inline_button_set1_setting')) { + $btn_circle = 'btn-circle'; + } + + if (get_theme_mod('hvn_inline_button_set2_setting')) { + $btn_shine = 'btn-shine'; + } + + $block_content = preg_replace('/class="(inline-button)/', "class=\"$btn_circle $btn_shine $1", $block_content); + return $block_content; +}); diff --git a/skins/skin-made-in-heaven/lib/panel-color.php b/skins/skin-made-in-heaven/lib/panel-color.php index b9a50386d..8fd7987ea 100644 --- a/skins/skin-made-in-heaven/lib/panel-color.php +++ b/skins/skin-made-in-heaven/lib/panel-color.php @@ -20,6 +20,21 @@ function hvn_color($wp_customize) { // コントロール + $wp_customize->add_setting('hvn_label1_decoration_section'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label1_decoration_section', + array( + 'label' => '■ 基本カラー', + 'section' => 'hvn_decoration_section', + 'settings' => 'hvn_label1_decoration_section', + 'type' => 'hidden', + ) + ) + ); + + $wp_customize->add_setting('hvn_main_color_setting', array('default' => HVN_MAIN_COLOR)); $wp_customize->add_control( new WP_Customize_Color_Control( @@ -62,6 +77,21 @@ function hvn_color($wp_customize) { ); + $wp_customize->add_setting('hvn_label2_decoration_section'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label2_decoration_section', + array( + 'label' => '■ 個別カラー', + 'section' => 'hvn_decoration_section', + 'settings' => 'hvn_label2_decoration_section', + 'type' => 'hidden', + ) + ) + ); + + $wp_customize->add_setting('header_background_color'); $wp_customize->add_control( new WP_Customize_Color_Control( @@ -132,6 +162,21 @@ function hvn_color($wp_customize) { ); + $wp_customize->add_setting('hvn_label3_decoration_section'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label3_decoration_section', + array( + 'label' => '■ 見出しデザイン', + 'section' => 'hvn_decoration_section', + 'settings' => 'hvn_label1_decoration_section', + 'type' => 'hidden', + ) + ) + ); + + $wp_customize->add_setting('hvn_h2_css_setting', array('default' => '0')); $wp_customize->add_control( new WP_Customize_Control( diff --git a/skins/skin-made-in-heaven/lib/panel-eitor.php b/skins/skin-made-in-heaven/lib/panel-eitor.php new file mode 100644 index 000000000..b5d73796b --- /dev/null +++ b/skins/skin-made-in-heaven/lib/panel-eitor.php @@ -0,0 +1,286 @@ +add_section( + 'hvn_editor_section', + array( + 'title' => 'エディター', + 'panel' => 'hvn_cocoon', + 'priority' => 4, + ) + ); + + + // コントロール + $wp_customize->add_setting('hvn_label1_editor_setting'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label1_editor_setting', + array( + 'label' => '■ マーカー', + 'section' => 'hvn_editor_section', + 'settings' => 'hvn_label1_editor_setting', + 'type' => 'hidden', + ) + ) + ); + + // マーカー + $marker = [ + ['黄色', '#ffff99'], + ['赤色', '#ffd0d1'], + ['青色', '#a8dafb'], + ]; + + for ($i=0; $iadd_setting("hvn_marker_color{$i}_setting", array('default' => $marker[$i][1])); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + "hvn_marker_color{$i}_setting", + array( + 'description' => $marker[$i][0], + 'section' => 'hvn_editor_section', + 'settings' => "hvn_marker_color{$i}_setting", + ) + ) + ); + } + + + $wp_customize->add_setting('hvn_marker_color_set1_setting', array('default' => false)); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_marker_color_set1_setting', + array( + 'label' => 'ストライプ', + 'section' => 'hvn_editor_section', + 'settings'=> 'hvn_marker_color_set1_setting', + 'type' => 'checkbox', + ) + ) + ); + + + // インラインボタン + $wp_customize->add_setting('hvn_label2_editor_setting'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label2_editor_setting', + array( + 'label' => '■ インラインボタン', + 'section' => 'hvn_editor_section', + 'settings' => 'hvn_label2_editor_setting', + 'type' => 'hidden', + ) + ) + ); + + + $inline_button = [ + ['黒色', '#333333'], + ['赤色', '#e60033'], + ['青色', '#0095d9'], + ['緑色', '#007b43'] + ]; + for ($i=0; $iadd_setting("hvn_inline_button_color{$i}_setting", array('default' => $inline_button[$i][1])); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + "hvn_inline_button_color{$i}_setting", + array( + 'description' => $inline_button[$i][0], + 'section' => 'hvn_editor_section', + 'settings' => "hvn_inline_button_color{$i}_setting", + ) + ) + ); + } + + + $set = ['円形にする', '光らせる', '立体にする']; + for ($i=0; $iadd_setting('hvn_inline_button_set' . ($i + 1) . '_setting', array('default' => false)); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_inline_button_set' . ($i + 1) . '_setting', + array( + 'label' => $set[$i], + 'section' => 'hvn_editor_section', + 'settings'=> 'hvn_inline_button_set' . ($i + 1) . '_setting', + 'type' => 'checkbox', + ) + ) + ); + } + + + // リスト丸数字 + $wp_customize->add_setting('hvn_label3_editor_setting'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label3_editor_setting', + array( + 'label' => '■ リスト丸数字', + 'section' => 'hvn_editor_section', + 'settings' => 'hvn_label3_editor_setting', + 'type' => 'hidden', + ) + ) + ); + + + $wp_customize->add_setting("hvn_numeric_list_set1_setting", array('default' => '#47585c')); + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + "hvn_numeric_list_set1_setting", + array( + 'description' => '背景カラー', + 'section' => 'hvn_editor_section', + 'settings' => "hvn_numeric_list_set1_setting", + ) + ) + ); + + + $wp_customize->add_setting('hvn_numeric_list_set2_setting', array('default' => '0')); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_numeric_list_set2_setting', + array( + 'description' => 'スタイル', + 'section' => 'hvn_editor_section', + 'settings' => 'hvn_numeric_list_set2_setting', + 'type' => 'radio', + 'choices' => array( + '0' => '丸', + '1' => '四角', + ), + ) + ) + ); + + + // アイコンボックス + $wp_customize->add_setting('hvn_label4_editor_setting'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label4_editor_setting', + array( + 'label' => '■ アイコンボックス', + 'section' => 'hvn_editor_section', + 'settings' => 'hvn_label4_editor_setting', + 'type' => 'hidden', + ) + ) + ); + + + $wp_customize->add_setting('hvn_icon_box_set1_setting', array('default' => '0')); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_icon_box_set1_setting', + array( + 'description' => 'スタイル', + 'section' => 'hvn_editor_section', + 'settings' => 'hvn_icon_box_set1_setting', + 'type' => 'radio', + 'choices' => array( + '0' => '塗りつぶし', + '1' => '枠', + '2' => '付箋', + ), + ) + ) + ); + + // タブボックス + $wp_customize->add_setting('hvn_label5_editor_setting'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label5_editor_setting', + array( + 'label' => '■ タブボックス', + 'section' => 'hvn_editor_section', + 'settings' => 'hvn_label5_editor_setting', + 'type' => 'hidden', + ) + ) + ); + + + $wp_customize->add_setting('hvn_tab_box_set1_setting', array('default' => '0')); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_tab_box_set1_setting', + array( + 'description' => 'スタイル', + 'section' => 'hvn_editor_section', + 'settings' => 'hvn_tab_box_set1_setting', + 'type' => 'radio', + 'choices' => array( + '0' => '見出し(標準)', + '1' => '見出し(枠上)', + '2' => '見出し(枠中)', + ), + ) + ) + ); + + + // FAQ + $wp_customize->add_setting('hvn_label6_editor_setting'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label6_editor_setting', + array( + 'label' => '■ FAQ', + 'section' => 'hvn_editor_section', + 'settings' => 'hvn_label6_editor_setting', + 'type' => 'hidden', + ) + ) + ); + + + $wp_customize->add_setting('hvn_faq_set1_setting', array('default' => '0')); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_faq_set1_setting', + array( + 'description' => 'スタイル', + 'section' => 'hvn_editor_section', + 'settings' => 'hvn_faq_set1_setting', + 'type' => 'radio', + 'choices' => array( + '0' => '標準', + '1' => '角型ラベル', + '2' => '丸型ラベル', + ), + ) + ) + ); +} +endif; diff --git a/skins/skin-made-in-heaven/lib/panel-main.php b/skins/skin-made-in-heaven/lib/panel-main.php index b3230ee88..02032c2d9 100644 --- a/skins/skin-made-in-heaven/lib/panel-main.php +++ b/skins/skin-made-in-heaven/lib/panel-main.php @@ -20,6 +20,21 @@ function hvn_main($wp_customize) { // コントロール + $wp_customize->add_setting('hvn_label1_main_section'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label1_main_section', + array( + 'label' => '■ ローディン画面', + 'section' => 'hvn_main_section', + 'settings' => 'hvn_label1_main_section', + 'type' => 'hidden', + ) + ) + ); + + $wp_customize->add_setting('hvn_front_loading_setting', array('default' => 'none')); $wp_customize->add_control( new WP_Customize_Control( @@ -35,6 +50,21 @@ function hvn_main($wp_customize) { ); + $wp_customize->add_setting('hvn_label2_main_section'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label2_main_section', + array( + 'label' => '■ フロントページ', + 'section' => 'hvn_main_section', + 'settings' => 'hvn_label2_main_section', + 'type' => 'hidden', + ) + ) + ); + + $wp_customize->add_setting('entry_card_type', array('default' => 'entry_card')); $wp_customize->add_control( new WP_Customize_Control( @@ -71,6 +101,7 @@ function hvn_main($wp_customize) { ) ); + $wp_customize->add_setting('hvn_border_radius_setting', array('default' => false)); $wp_customize->add_control( new WP_Customize_Control( @@ -108,6 +139,22 @@ function hvn_main($wp_customize) { ); + + $wp_customize->add_setting('hvn_card_expansion_setting', array('default' => false)); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_card_expansion_setting', + array( + 'label' => '拡張タイプ', + 'section' => 'hvn_main_section', + 'settings' => 'hvn_card_expansion_setting', + 'type' => 'checkbox', + ) + ) + ); + + $wp_customize->add_setting('hvn_front_none_setting', array('default' => false)); $wp_customize->add_control( new WP_Customize_Control( @@ -123,6 +170,21 @@ function hvn_main($wp_customize) { ); + $wp_customize->add_setting('hvn_categoties_card_setting', array('default' => false)); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_categoties_card_setting', + array( + 'label' => 'カテゴリーごと(2、3カード)縦型カード', + 'section' => 'hvn_main_section', + 'settings' => 'hvn_categoties_card_setting', + 'type' => 'checkbox', + ) + ) + ); + + $wp_customize->add_setting('hvn_category_color_setting', array('default' => false)); $wp_customize->add_control( new WP_Customize_Control( @@ -138,6 +200,21 @@ function hvn_main($wp_customize) { ); + $wp_customize->add_setting('hvn_label3_main_section'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label3_main_section', + array( + 'label' => '■ ボタン', + 'section' => 'hvn_main_section', + 'settings' => 'hvn_label3_main_section', + 'type' => 'hidden', + ) + ) + ); + + $wp_customize->add_setting('hvn_button_more_setting', array( 'default' => 'もっと見る', 'sanitize_callback' => 'hvn_sanitize_text', @@ -201,23 +278,34 @@ function hvn_main($wp_customize) { ); - $wp_customize->add_setting('hvn_index_new_setting', array( - 'default' => 0, - 'sanitize_callback' => 'hvn_sanitize_number_range', - )); + $wp_customize->add_setting('hvn_label4_main_section'); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, - 'hvn_index_new_setting', + 'hvn_label4_main_section', array( - 'description' => 'NEWマーク(0~5日、0はオフ)', + 'label' => '■ 目次', 'section' => 'hvn_main_section', - 'settings' => 'hvn_index_new_setting', - 'type' => 'number', - 'input_attrs' => array( - 'min' => 0, - 'max' => 5, - 'required' => '', + 'settings' => 'hvn_label4_main_section', + 'type' => 'hidden', + ) + ) + ); + + $wp_customize->add_setting('hvn_toc_style_setting', array('default' => '0')); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_toc_style_setting', + array( + 'description' => 'スタイル', + 'section' => 'hvn_main_section', + 'settings' => 'hvn_toc_style_setting', + 'type' => 'select', + 'choices' => array( + '0' => 'シンプル', + '1' => 'ボックス', + '2' => '上下線', ) ) ) @@ -230,7 +318,7 @@ function hvn_main($wp_customize) { $wp_customize, 'hvn_toc_setting', array( - 'label' => '目次ハイライト', + 'label' => 'スクロール追従ハイライト', 'section' => 'hvn_main_section', 'settings' => 'hvn_toc_setting', 'type' => 'checkbox', @@ -239,6 +327,59 @@ function hvn_main($wp_customize) { ); + $wp_customize->add_setting('hvn_toc_fix_setting', array('default' => false)); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_toc_fix_setting', + array( + 'label' => '目次ボタン', + 'section' => 'hvn_main_section', + 'settings' => 'hvn_toc_fix_setting', + 'type' => 'checkbox', + ) + ) + ); + + + $wp_customize->add_setting('hvn_label5_main_section'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label5_main_section', + array( + 'label' => '■ オプション', + 'section' => 'hvn_main_section', + 'settings' => 'hvn_label5_main_section', + 'type' => 'hidden', + ) + ) + ); + + + $wp_customize->add_setting('hvn_index_new_setting', array( + 'default' => 0, + 'sanitize_callback' => 'hvn_sanitize_number_range', + )); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_index_new_setting', + array( + 'description' => 'NEWマーク(0~5日、0はオフ)', + 'section' => 'hvn_main_section', + 'settings' => 'hvn_index_new_setting', + 'type' => 'number', + 'input_attrs' => array( + 'min' => 0, + 'max' => 5, + 'required' => '', + ) + ) + ) + ); + + $wp_customize->add_setting('hvn_like_setting', array('default' => false)); $wp_customize->add_control( new WP_Customize_Control( @@ -299,6 +440,36 @@ function hvn_main($wp_customize) { ); + $wp_customize->add_setting('hvn_accordion_setting', array('default' => false)); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_accordion_setting', + array( + 'label' => 'アコーディオン化', + 'section' => 'hvn_main_section', + 'settings' => 'hvn_accordion_setting', + 'type' => 'checkbox', + ) + ) + ); + + + $wp_customize->add_setting('hvn_label6_main_section'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label6_main_section', + array( + 'label' => '■ プロフィール', + 'section' => 'hvn_main_section', + 'settings' => 'hvn_label6_main_section', + 'type' => 'hidden', + ) + ) + ); + + $wp_customize->add_setting('hvn_prof_setting'); $wp_customize->add_control( new WP_Customize_Media_Control( @@ -314,6 +485,21 @@ function hvn_main($wp_customize) { ); + $wp_customize->add_setting('hvn_profile_follows_setting', array('default' => false)); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_profile_follows_setting', + array( + 'label' => 'プロフィールのSNSフォローを非表示', + 'section' => 'hvn_main_section', + 'settings' => 'hvn_profile_follows_setting', + 'type' => 'checkbox', + ) + ) + ); + + $wp_customize->add_setting('hvn_site_date_setting'); $wp_customize->add_control( new WP_Customize_Media_Control( @@ -328,6 +514,7 @@ function hvn_main($wp_customize) { ) ); + $wp_customize->add_setting('hvn_site_date_onoff_setting', array('default' => false)); $wp_customize->add_control( new WP_Customize_Control( diff --git a/skins/skin-made-in-heaven/lib/panel-visual.php b/skins/skin-made-in-heaven/lib/panel-visual.php index afa924e9e..e00214698 100644 --- a/skins/skin-made-in-heaven/lib/panel-visual.php +++ b/skins/skin-made-in-heaven/lib/panel-visual.php @@ -20,6 +20,21 @@ function hvn_header($wp_customize) { // コントロール + $wp_customize->add_setting('hvn_label1_header_section'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label1_header_section', + array( + 'label' => '■ ヘッダーロゴ', + 'section' => 'hvn_header_section', + 'settings' => 'hvn_label1_header_section', + 'type' => 'hidden', + ) + ) + ); + + $wp_customize->add_setting('the_site_logo_url'); $wp_customize->add_control( new WP_Customize_Image_Control( @@ -50,6 +65,21 @@ function hvn_header($wp_customize) { ); + $wp_customize->add_setting('hvn_label2_header_section'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label2_header_section', + array( + 'label' => '■ メインビジュアル', + 'section' => 'hvn_header_section', + 'settings' => 'hvn_label2_header_section', + 'type' => 'hidden', + ) + ) + ); + + $wp_customize->add_setting('hvn_header_setting', array('default' => 'none')); $wp_customize->add_control( new WP_Customize_Control( @@ -194,6 +224,21 @@ function hvn_header($wp_customize) { } + $wp_customize->add_setting('hvn_label3_header_section'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label3_header_section', + array( + 'label' => '■ スライドオプション', + 'section' => 'hvn_header_section', + 'settings' => 'hvn_label3_header_section', + 'type' => 'hidden', + ) + ) + ); + + $wp_customize->add_setting('hvn_header_fade_setting', array('default' => 'fade')); $wp_customize->add_control( new WP_Customize_Control( @@ -236,6 +281,21 @@ function hvn_header($wp_customize) { ); + $wp_customize->add_setting('hvn_label4_header_section'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label4_header_section', + array( + 'label' => '■ フィルター', + 'section' => 'hvn_header_section', + 'settings' => 'hvn_label4_header_section', + 'type' => 'hidden', + ) + ) + ); + + $wp_customize->add_setting('hvn_header_filter_setting', array('default' => '0')); $wp_customize->add_control( new WP_Customize_Control( @@ -257,6 +317,21 @@ function hvn_header($wp_customize) { ); + $wp_customize->add_setting('hvn_label5_header_section'); + $wp_customize->add_control( + new WP_Customize_Control( + $wp_customize, + 'hvn_label5_header_section', + array( + 'label' => '■ オーバーレイ', + 'section' => 'hvn_header_section', + 'settings' => 'hvn_label5_header_section', + 'type' => 'hidden', + ) + ) + ); + + $wp_customize->add_setting('hvn_header_color_setting'); $wp_customize->add_control( new WP_Customize_Color_Control( diff --git a/skins/skin-made-in-heaven/style.css b/skins/skin-made-in-heaven/style.css index 4fbdd93e4..52d832a13 100644 --- a/skins/skin-made-in-heaven/style.css +++ b/skins/skin-made-in-heaven/style.css @@ -7,7 +7,7 @@ Author: chu-ya Author URI: https://ss1.xrea.com/chuya.s239.xrea.com/temp/ Screenshot URI: https://im-cocoon.net/wp-content/uploads/skin-made-in-heaven.png - Version: 0.1.3 + Version: 1.0.1 Priority: 6900001000 */ @@ -52,6 +52,26 @@ ** FAQのCSS修正 ** タイムライン(ミニ)を追加 ** 0.1.3 2023-04-01 バグ対策 +** 1.0.0 2023-04-18 カスタマイザーエディターを追加 +** タイムライン(ライン)を追加 +** 見出しデザインH2(塗りつぶしアクセント)を追加 +** 見出しデザインH3(角括弧)を追加 +** FAQのCSS修正 +** 大きなカードのCSS修正 +** 「いいね」ボタンをLocalStorageに変更 +** 拡張タイプを追加 +** 目次スタイルを追加 +** アコーディオン化を追加 +** カテゴリーごと(2、3カード)縦型カードを追加 +** プロフィールのSNSフォローを非表示を追加 +** 目次ボタンを追加 +** ダークモードを追加 +** タイトルとURLをコピーを変更 +** 通知メッセージ複数表示を追加 +** エントリーカードにリボンを追加 +** タブのCSS追加 +** プルクオートのCSS追加 +** 1.0.1 2023-04-19 バグ対策 ** *******************************************************************************/ @@ -65,9 +85,9 @@ --cocoon-badge-border-radius: 0; --cocoon-basic-border-radius: 0; --cocoon-middle-border-radius: 0; - --cocoon-middle-thickness-color: var( --border-color); - --cocoon-thin-color: var( --border-color); - --cocoon-three-d-border-colors: var( --border-color); + --cocoon-middle-thickness-color: var(--border-color); + --cocoon-thin-color: var(--border-color); + --cocoon-three-d-border-colors: var(--border-color); --cocoon-text-size-s: 14px; --cocoon-list-padding: 0; --cocoon-list-wide-padding: var(--padding15) var(--padding15) var(--padding15) 40px; @@ -118,6 +138,10 @@ --column: 3; } +.fpt-columns .list { + --column: 1; +} + .fpt-2-columns { --fpt-column: 2; } @@ -414,7 +438,8 @@ img { opacity: 1; } -.notice-area-link .notice-area:after { +.notice-area-link .swiper-slide:after, +.notice-area-link:not(:has(.swiper)) .notice-area-message:after { background-color: rgb(255 255 255 / 40%); border-radius: 100px; content: '詳細はこちら'; @@ -422,6 +447,10 @@ img { padding: 3px 10px; } +.notice-area-message .swiper { + height: 40px; +} + /******************************************************************************* ** @@ -453,6 +482,26 @@ img { } +/* 背景画像固定 */ + +.ba-fixed.appeal { + clip-path: inset(0 0 0 0); +} + +.ba-fixed.appeal:before { + background-image: inherit; + background-position: top center; + background-size: cover; + content: ''; + height: 100vh; + left: 0px; + position: fixed; + top: 0px; + width: 100%; + z-index: -1; +} + + /******************************************************************************* ** ** おすすめカード @@ -491,6 +540,17 @@ img { } +/* 画像のみ */ + +.body .recommended.rcs-image-only .card-title { + display: none; +} + +.body .recommended.rcs-image-only .card-content { + background-color: unset!important; +} + + /******************************************************************************* ** ** カラム @@ -618,7 +678,7 @@ img { .footer-in { display: flex; flex-direction: column; - gap: var( --gap30); + gap: var(--gap30); padding: var(--gap30) 10px 0; } @@ -789,13 +849,13 @@ span.fas.fa-history:before { border-radius: var(--border-radius100); box-shadow: var(--shadow-color); color: unset; - display: block; + display: grid; font-size: var(--cocoon-text-size-s)!important; font-weight: normal; - min-height: 40px; - line-height: 40px; margin: 0; + min-height: 40px; padding: 0!important; + place-content: center; transition: none!important; } @@ -1126,12 +1186,8 @@ span.fas.fa-history:before { } .main .toc { - background-clip: padding-box; - background-color: var(--gray-bgcolor); - border: 0; - border-bottom: 4px double var(--border-color); - border-top: 4px double var(--border-color); - padding: var(--main-padding); + border: 1px solid var(--border-color); + padding: var(--gap30) var(--main-padding); } .main .widget_toc .main-widget-label { @@ -1143,8 +1199,10 @@ span.fas.fa-history:before { } .main .toc-title { + border-bottom: 1px dotted var(--border-color); display: block; - font-size: unset; + font-size: 16px; + margin-bottom: var(--gap30); padding: 0 0 var(--padding15); } @@ -1621,6 +1679,10 @@ span.fas.fa-history:before { ** *******************************************************************************/ +.mobile-menu-buttons { + color: var(--cocoon-text-color); +} + .mobile-menu-buttons .menu-button > a, .mobile-menu-buttons .menu-caption, .mobile-menu-buttons .menu-icon { @@ -1707,7 +1769,7 @@ span.fas.fa-history:before { ** *******************************************************************************/ - :is(.content-top, .content-bottom, .sidebar-scroll, .footer-widgets):not(:has(.widget)) { +:is(.content-top, .content-bottom, .sidebar-scroll, .footer-widgets):not(:has(.widget)) { display: none!important; } @@ -1841,6 +1903,7 @@ aside.widget .widget-title { background-color: unset; border-top-left-radius: var(--border-radius10); border-top-right-radius: var(--border-radius10); + color: var(--cocoon-text-color); font-size: 16px; font-weight: bold; line-height: 1.8; @@ -1943,14 +2006,12 @@ aside.widget .widget-title { } .front-top-page .ect-big-card-first .a-wrap:first-child .card-title, -.body .ect-big-card .card-title, .body .ect-vertical-card .card-title, .body .large-thumb .card-title { height: calc(1.4em * var(--title-line)); } .front-top-page .ect-big-card-first .a-wrap:first-child .card-snippet, -.ect-big-card .card-snippet, .ect-vertical-card .card-snippet, .large-thumb .card-snippet { border-top: 3px dotted var(--border-color); @@ -2019,7 +2080,8 @@ aside.widget .widget-title { } .body .large-thumb-on .card-title { - color: #fff; + background-color: unset!important; + color: #fff!important; height: unset!important; margin: 0 10px; } @@ -2033,10 +2095,6 @@ aside.widget .widget-title { ** 横型表示 *******************************************************************************/ -.body .swiper { - padding: 0 1px; -} - .swiper-wrapper { margin: 0; padding: 0; @@ -2344,7 +2402,7 @@ aside.widget .widget-title { } .author-box .author-name a { - color: unset; + color: var(--cocoon-text-color); font-size: 16px; line-height: 1.8; text-decoration: none; @@ -2373,7 +2431,7 @@ aside.widget .widget-title { background-color: unset!important; border: 1px solid var(--cocoon-text-color); border-radius: 0; - color: unset; + color: var(--cocoon-text-color); display: flex; height: 30px; opacity: 1!important; @@ -2702,20 +2760,20 @@ aside.widget .widget-title { .comment-content, .recent-comment-content { + background-color: var(--gray-bgcolor); + border: 0; + border-radius: 0; font-size: 16px; line-height: 1.8; margin-top: 10px; - background-color: var(--gray-bgcolor); padding: var(--padding15); - border: 0; - border-radius: 0; position: relative; } .recent-comment-article { color: var(--s-text-color); - margin-top: 5px; font-size: var(--cocoon-text-size-s); + margin-top: 5px; line-height: 1.4; } @@ -2723,11 +2781,11 @@ aside.widget .widget-title { .recent-comment-content:before { border: 10px solid transparent; border-bottom-color: var(--gray-bgcolor); - position: absolute; content: ''; - top: -20px; - margin: 0; left: 10px; + margin: 0; + position: absolute; + top: -20px; } .recent-comment-content:after { @@ -2743,8 +2801,8 @@ aside.widget .widget-title { } .body .widget .recent-comments { - margin: var(--padding15) 0; border-bottom: 1px dotted var(--border-color); + margin: var(--padding15) 0; padding-bottom: var(--padding15); } @@ -2758,9 +2816,9 @@ aside.widget .widget-title { } .body .widget .recent-comments:last-of-type { + border: 0; margin-bottom: 0; padding-bottom: 0; - border: 0; } @@ -2770,8 +2828,8 @@ aside.widget .widget-title { .widget select { background-color: unset; - display: block; color: var(--cocoon-text-color); + display: block; outline: 0; } @@ -2779,6 +2837,7 @@ aside.widget .widget-title { .body .widget_categories li, .body .widget_pages li { margin: 0; + position: relative; } @@ -2807,8 +2866,8 @@ aside.widget .widget-title { .body .wp-calendar-table td, .wp-calendar-table th { - padding: 0!important; line-height: calc(1.8em + 6px); + padding: 0!important; } .wp-calendar-table td a, @@ -2866,7 +2925,7 @@ aside.widget .widget-title { .body .widget_categories a:hover, .body .widget_tag_cloud a:hover, .body .widget_pages a:hover { - background-color: var(--hover-color); + background-color: var(--hover-color)!important; } .tag-link, @@ -2956,7 +3015,7 @@ aside.widget .widget-title { ** 検索 *******************************************************************************/ - :placeholder { +:placeholder { color: transparent; } @@ -3109,10 +3168,6 @@ aside.widget .widget-title { margin-bottom: 0; } -table { - border-collapse: collapse!important; -} - figure.wp-block-table table, .body table { width: 100%; @@ -3186,38 +3241,34 @@ table tr:nth-of-type(2n+1), ** アイコンボックス *******************************************************************************/ +blockquote, +.is-style-comment-box, .is-style-profile-box, .profile-box, -.is-style-comment-box, -.comment-box, -blockquote { +.comment-box { + border-color: #ccc; background-color: #f9f9f9; - border: 0; - border-radius: 0; - color: #333; - padding: var(--padding15) var(--padding15) var(--padding15) calc(1em + var(--padding15) * 3); } blockquote:before { - border-right: 1px dashed #999; - color: #999; content: '\f10d'; - display: grid; - font-family: 'Font Awesome 5 Free'; - font-size: 16px; font-weight: 900; - inset: 0; - line-height: 1; - margin: var(--padding15) 0; - place-content: center; - text-align: center; - width: calc(1em + var(--padding15) * 2); } blockquote:after { content: none; } +blockquote:before, +.is-style-comment-box:before, +.is-style-profile-box:before, +.profile-box:before, +.comment-box:before { + border-color: #ccc; + color: #ccc; +} + +blockquote, .is-style-information-box, .is-style-question-box, .is-style-alert-box, @@ -3231,11 +3282,6 @@ blockquote:after { .information-box, .question-box, .alert-box, -.information, -.question, -.alert, -.memo-box, -.comment-box, .common-icon-box { border-radius: 0; border-width: 0; @@ -3243,6 +3289,7 @@ blockquote:after { padding: var(--padding15) var(--padding15) var(--padding15) calc(1em + var(--padding15) * 3); } +blockquote:before, .is-style-information-box:before, .is-style-question-box:before, .is-style-alert-box:before, @@ -3256,16 +3303,13 @@ blockquote:after { .information-box:before, .question-box:before, .alert-box:before, -.information:before, -.question:before, -.alert:before, -.memo-box:before, -.comment-box:before, .common-icon-box:before { border-right: 1px dashed; display: grid; + font-family: 'Font Awesome 5 Free'; font-size: 16px; inset: 0; + line-height: 1.8; margin: var(--padding15) 0; padding: 0; place-content: center; @@ -3342,12 +3386,14 @@ blockquote:after { font-family: unset; } -.blank-box.bb-tab:before, +.blank-box.bb-tab::before, .blank-box.bb-tab .bb-label { border-radius: 0; font-size: var(--cocoon-text-size-s); + line-height: 25px; left: -1px; padding: 0 var(--padding15); + top: -25.5px; } .blank-box.bb-tab { @@ -3378,11 +3424,11 @@ blockquote:after { border-radius: 0; color: var(--cocoon-text-color); font-size: var(--cocoon-text-size-s); - left: auto; + left: 14px; letter-spacing: normal; - line-height: 1.8; + line-height: 25px; padding: 0 var(--padding15); - top: -0.9em; + top: -12.5px; } .body .blogcard-thumbnail { @@ -3395,10 +3441,16 @@ blockquote:after { ** アイコンリスト *******************************************************************************/ -.body .iconlist-box { +.iconlist-box { padding-left: 0; } +.iconlist-box:has(.iconlist-title:empty) { + --cocoon-custom-border-color: transparent; + padding-bottom: 0; + padding-top: 0; +} + .body .iconlist-box :is(ul, ol) { border: 0; padding-top: 0; @@ -3420,7 +3472,7 @@ blockquote:after { } .toggle-button { - background-color: #eee; + background-color: var(--border-color); border: 0; color: #333; padding: var(--padding15); @@ -3457,8 +3509,8 @@ blockquote:after { /* FAQ */ -.body .faq { - line-height: 1.8; +.faq-wrap:not(.is-style-square, .is-style-accordion) { + --cocoon-custom-border-color: transparent; } .faq-wrap.is-style-accordion { @@ -3466,21 +3518,25 @@ blockquote:after { } .body .faq .faq-item-label { + font-size: 16px!important; font-weight: bold; - font-size: unset!important; margin-right: 0.5em; padding: 0!important; text-align: center; - width: 1.8em; + width: 1.8em!important; +} + +.faq-item-content { + margin: 0; } .is-style-accordion .faq-question { - background-color: #eee!important; - padding: var(--padding15)!important; + background-color: var(--border-color); } -.is-style-accordion .faq-answer { - padding: var(--padding15)!important; +.is-style-accordion .faq-item { + color: #333; + padding: var(--padding15); } .is-style-accordion .faq-question:before { @@ -3555,10 +3611,10 @@ div.search-form { .timeline-item:before { background-color: var(--main-color); - top: 20px; - width: 16px; height: 16px; left: 103px; + top: 20px; + width: 16px; } .timeline-item:last-of-type .timeline-item-content { @@ -3575,13 +3631,14 @@ div.search-form { } .caption-box { - border-color: var(--border-color); + --cocoon-custom-border-color: var(--border-color); + border-color: var(--cocoon-custom-border-color); border-width: 1px; - line-height: 24px!important; } -.caption-box-label { - background-color: #eee; +.caption-box .caption-box-label, +.caption-box.not-nested-style:not(.has-border-color) .caption-box-label { + background-color: var(--border-color); color: #333; padding: var(--padding15); } @@ -3604,10 +3661,11 @@ div.search-form { .tab-caption-box-label { border-radius: 0; color: #fff!important; + display: block; font-size: var(--cocoon-text-size-s); + line-height: 25px; padding: 0 var(--padding15); - position: absolute; - top: calc(-1.8em + 1px); + width: fit-content; } .tab-caption-box-content { @@ -3621,34 +3679,30 @@ div.search-form { ** ラベルボックス *******************************************************************************/ +.label-box { + position: relative; +} + .label-box-label { - display: inline-flex; + background-color: var(--white-bgcolor); + display: block; font-size: var(--cocoon-text-size-s); font-weight: normal; + line-height: 25px; margin: 0 var(--padding15); padding: 0 var(--padding15); - position: relative; + position: absolute; text-shadow: none; - z-index: 1; + top: -12.5px; + width: fit-content; } .label-box-content { border-width: 1px; + margin: calc(12.5px + var(--gap30)) 0 0 0; padding: var(--padding15); } -.label-box-label:after { - background-color: var(--white-bgcolor); - content: ''; - display: block; - height: 3px; - left: 0; - position: absolute; - top: calc((1.8em - 3px) / 2); - width: 100%; - z-index: -1; -} - /******************************************************************************* ** マイクロバルーン @@ -3672,6 +3726,19 @@ div.search-form { } +/******************************************************************************* +** インラインボタン +*******************************************************************************/ + +[class*=inline-button] { + display: inline-flex; +} + +[class*=inline-button-white-] { + border-width: 2px; +} + + /******************************************************************************* ** テキスト *******************************************************************************/ @@ -3681,9 +3748,10 @@ div.search-form { .keyboard-key { background-color: var(--white-bgcolor); + box-shadow: none; color: var(--cocoon-text-color); - border-radius: 0; font-size: 16px; + margin: 0 3px; } @@ -3725,6 +3793,71 @@ div.search-form { } +/******************************************************************************* +** インラインコード +*******************************************************************************/ + +:not(pre) > code { + background: #f7f7f7; + border: 1px solid var(--border-color); + border-radius: 2px; + color: var(--cocoon-text-color); + font-family: Menlo, Consolas, sans-serif; + letter-spacing: 0; + margin: 0 3px; + padding: 1px 3px; +} + + +/******************************************************************************* +** プルクオート +*******************************************************************************/ + +.wp-block-pullquote { + font-size: 16px; + padding: 0; + text-align: unset; +} + +.wp-block-pullquote blockquote:before, +.wp-block-pullquote blockquote:after { + box-sizing: border-box; + height: 46px; + margin: 0; + position: absolute; + width: 46px; +} + +.wp-block-pullquote blockquote { + background-color: #f9f9f9!important; + border: 0; +} + +.wp-block-pullquote blockquote:before { + background-color: unset; + border-left: 1px solid var(--main-color)!important; + border-right: 0!important; + border-top: 1px solid var(--main-color)!important; + color: var(--main-color)!important; +} + +.wp-block-pullquote blockquote:after { + border-bottom: 1px solid var(--main-color); + border-right: 1px solid var(--main-color); + bottom: 0; + content: ''; + display: block; + right: 0; +} + +.wp-block-pullquote cite { + color: var(--s-text-color); + display: block; + font-size: var(--cocoon-text-size-s); + text-align: right; +} + + /******************************************************************************* ** wpForo *******************************************************************************/ @@ -3742,8 +3875,8 @@ div.search-form { } .body .wpforo-widget-wrap .wpforo-widget-content li:last-child { - padding-bottom: 0!important; border-bottom: 0; + padding-bottom: 0!important; } .body .wpforo-widget-wrap .wpforo-widget-content li { @@ -3751,6 +3884,42 @@ div.search-form { } +/******************************************************************************* +** タブ +*******************************************************************************/ + +.tab-label-group { + gap: 0; + padding-bottom: var(--gap30); +} + +.tab-label-group .tab-label { + background-color: transparent; + border-bottom: 1px solid var(--border-color); + border-radius: 0; + color: var(--cocoon-text-color); + display: grid; + font-size: var(--cocoon-text-size-s); + font-weight: unset; + height: 40px; + padding: 0 var(--padding15); + place-content: center; + position: relative; + width: 100%; +} + +.tab-label-group .tab-label.is-active { + background-color: var(--main-color); + color: var(--text-color); +} + +.tab-content-group { + border: 0; + border-radius: 0; + padding: 0; +} + + /******************************************************************************* ** ** レスポンシブ @@ -3758,21 +3927,21 @@ div.search-form { *******************************************************************************/ @media (width >1023px) { - .sns-share { + .article-footer .sns-share { + height: fit-content; inset: 0 0 0 var(--gap30); margin: auto 0!important; - height: fit-content; position: fixed; width: fit-content; z-index: 1; } - .sns-share-message { + .article-footer .sns-share-message { display: none; } - .sns-share .sns-buttons { + .article-footer .sns-share .sns-buttons { flex-direction: column; } - .sns-share .sns-button { + .article-footer .sns-share .sns-button { border-radius: var(--border-radius100); box-shadow: var(--shadow-color) } @@ -3803,8 +3972,8 @@ div.search-form { display: block; } .navi-footer-in > .menu-footer li.menu-item { - width: 100%; margin: 0; + width: 100%; } .scrollable-table th, .scrollable-table td { diff --git a/skins/skin-made-in-heaven/tmp/css-custom.php b/skins/skin-made-in-heaven/tmp/css-custom.php index 4238172c3..141a6a727 100644 --- a/skins/skin-made-in-heaven/tmp/css-custom.php +++ b/skins/skin-made-in-heaven/tmp/css-custom.php @@ -6,114 +6,135 @@ //****************************************************************************** -// ブログカードスニペット非表示 +// ダークモード //****************************************************************************** -if (!is_entry_card_snippet_visible()) { - echo <<< EOF -.blogcard-title { - --title-line: 4; -} - -.body .blogcard-snippet { - display: none; +echo <<< EOF +.body { + visibility: hidden; } -EOF; +.hvn-dark { + --appeal-bgcolor: 51, 51, 51; + --body-rgb-color: 51, 51, 51; + --body-color: #333; + --cocoon-text-color: #ccc; + --gray-bgcolor: #555; + --hover-color: rgba(255, 255, 255, 0.2); + --title-color: var(--cocoon-text-color); + --white-bgcolor: #444; } - -//****************************************************************************** -// モバイルSNSシェアボタン -//****************************************************************************** -$css_arr = []; - -// Twitter -if (!is_bottom_twitter_share_button_visible()) { - $css_arr[] = '.share-menu-content .twitter-button'; +.hvn-dark .author-thumb img { + background-color: var(--main-color); } -// Mastodon -if (!is_bottom_mastodon_share_button_visible()) { - $css_arr[] = '.share-menu-content .mastodon-button'; +.hvn-dark #footer { + background-color: var(--hover-color); } -// Bluesky -if (!is_bottom_bluesky_share_button_visible()) { - $css_arr[] = '.share-menu-content .bluesky-button'; +.hvn-dark .footer-bottom, +.hvn-dark .footer-bottom a, +.hvn-dark .footer-bottom a:hover { + border-color: var(--cocoon-text-color); + color: var(--cocoon-text-color); } -// Misskey -if (!is_bottom_misskey_share_button_visible()) { - $css_arr[] = '.share-menu-content .misskey-button'; +.hvn-dark .navi-footer-in > .menu-footer li, +.hvn-dark .navi-footer-in > .menu-footer li:last-child, +.hvn-dark .footer .footer-in .footer-bottom-content { + border-color: var(--cocoon-text-color); } -// Facebook -if (!is_bottom_facebook_share_button_visible()) { - $css_arr[] = '.share-menu-content .facebook-button'; +.hvn-dark-switch { + display: inline-block; + margin-left: 5px; + width: fit-content; } -// はてなブックマーク -if (!is_bottom_hatebu_share_button_visible()) { - $css_arr[] ='.share-menu-content .hatebu-button'; +#hvn-dark { + display: none; } -// Pocket -if (!is_bottom_pocket_share_button_visible()) { - $css_arr[] = '.share-menu-content .pocket-button'; +.hvn-dark-switch label:before { + content: '\\f186'; + font-family: 'Font Awesome 5 Free'; + font-weight: 400; } -// LINE@ -if (!is_bottom_line_at_share_button_visible()) { - $css_arr[] ='.share-menu-content .line-button'; +#hvn-dark:checked + label:before { + color: #fff176; + font-weight: 900; } -// Pinterest -if (!is_bottom_pinterest_share_button_visible()) { - $css_arr[] = '.share-menu-content .pinterest-button'; -} +EOF; -// LinkedIn -if (!is_bottom_linkedin_share_button_visible()) { - $css_arr[] = '.share-menu-content .linkedin-button'; -} -// タイトルとURLをコピー -if (!is_bottom_copy_share_button_visible()) { - $css_arr[] = '.share-menu-content .copy-button'; +//****************************************************************************** +// ブログカードスニペット非表示 +//****************************************************************************** +if (!is_entry_card_snippet_visible()) { + echo <<< EOF +.blogcard-title { + --title-line: 4; } -if (!empty($css_arr)) { - $css = implode(',', $css_arr) ; - echo $css . "{display: none;}\n"; - if (count($css_arr) == 8) { - echo <<< EOF -.share-menu-button { +.body .blogcard-snippet { display: none; } EOF; - } } //****************************************************************************** -// タブ一覧 +// モバイルSNSシェアボタン //****************************************************************************** -function hvn_delimiter($i, $max) { - if ($i == ($max + 1)) { - echo "{\n"; - } else { - echo ",\n"; +$css = []; +$count = 0; +$css_arr = [ + ['is_bottom_twitter_share_button_visible' ,'.twitter-button'], + ['is_bottom_mastodon_share_button_visible' ,'.mastodon-button'], + ['is_bottom_bluesky_share_button_visible' ,'.bluesky-button'], + ['is_bottom_misskey_share_button_visible' ,'.misskey-button'], + ['is_bottom_facebook_share_button_visible' ,'.facebook-button'], + ['is_bottom_hatebu_share_button_visible' ,'.hatebu-button'], + ['is_bottom_pocket_share_button_visible' ,'.pocket-button'], + ['is_bottom_line_at_share_button_visible' ,'.line-button'], + ['is_bottom_pinterest_share_button_visible' ,'.pinterest-button'], + ['is_bottom_linkedin_share_button_visible' ,'.linkedin-button'], + ['is_bottom_copy_share_button_visible' ,'.copy-button'] +]; + +for ($i=0;$i < count($css_arr);$i++){ + $func = $css_arr[$i][0]; + if ($func()) { + $count ++; + }else { + $css[] = $css_arr[$i][1]; } } +if ($count) { + $css = implode(',', $css) ; + echo ".share-menu-content :is({$css}){ display: none; }\n"; +}else{ + echo ".body .share-menu-button { display: none; }\n"; +} + + +//****************************************************************************** +// タブ一覧 +//****************************************************************************** +$id_array = []; $tab_cnt = apply_filters('cocoon_index_max_category_tab_count', 3); for ($i=1; $i<=$tab_cnt + 1; $i++) { - echo "#index-tab-{$i}:checked ~ .index-tab-buttons .index-tab-button[for='index-tab-{$i}']"; - hvn_delimiter($i ,$tab_cnt); + $id_array [$i - 1] = "#index-tab-{$i}:checked ~ .index-tab-buttons .index-tab-button[for='index-tab-{$i}']"; } +$id = implode(',', $id_array ) ; + echo <<< EOF +{$id} { background-color: var(--main-color); border: 1px solid var(--main-color); color: var(--text-color); @@ -122,10 +143,12 @@ function hvn_delimiter($i, $max) { EOF; for ($i=1; $i<=$tab_cnt + 1; $i++) { - echo "#index-tab-{$i}:checked ~ .index-tab-buttons .index-tab-button[for='index-tab-{$i}']:before"; - hvn_delimiter($i, $tab_cnt); + $id_array [$i - 1] = "#index-tab-{$i}:checked ~ .index-tab-buttons .index-tab-button[for='index-tab-{$i}']:before"; } +$id = implode(',', $id_array ) ; + echo <<< EOF +{$id} { background-color: var(--main-color); bottom: -11px; clip-path: polygon(0 0,100% 0, 50% 100%); @@ -140,10 +163,12 @@ function hvn_delimiter($i, $max) { EOF; for ($i=1; $i<=$tab_cnt + 1; $i++) { - echo "#index-tab-{$i}:checked ~ .tab-cont.tb{$i}"; - hvn_delimiter($i, $tab_cnt); + $id_array [$i - 1] = "#index-tab-{$i}:checked ~ .tab-cont.tb{$i}"; } +$id = implode(',', $id_array ) ; + echo <<< EOF +{$id} { animation: none; display: flex; flex-direction: column; @@ -167,14 +192,14 @@ function hvn_delimiter($i, $max) { border: 1px solid var(--main-color); border-radius: 0; box-shadow: var(--shadow-color); - display: block; color: var(--cocoon-text-color); + display: grid; font-size: var(--cocoon-text-size-s); font-weight: unset!important; height: 40px; - line-height: 40px; margin: 0; - padding: 0; + padding: 0 var(--padding15); + place-content: center; position: relative; text-align: center; width: 100%; @@ -245,10 +270,15 @@ function hvn_delimiter($i, $max) { .body .list .e-card { background-color: transparent; border-radius: 0; - padding: 0!important; + padding: 0; overflow: unset; } +.body .list:is(.list.big-card, .ect-big-card) { + background-color: transparent; + padding: 0; +} + EOF; if (!get_theme_mod('hvn_border_radius_setting')) { echo <<< EOF @@ -267,7 +297,7 @@ function hvn_delimiter($i, $max) { //****************************************************************************** $color = get_footer_background_color(); if ($color == null || $color == "#ffffff") { - $color = 'ffffff'; + $color = '#ffffff'; } if (is_dark_hexcolor($color)) { @@ -290,6 +320,10 @@ function hvn_delimiter($i, $max) { border-color: {$color}; } +.hvn-dark-switch label:before { + color: {$color}; +} + EOF; @@ -347,10 +381,6 @@ function hvn_delimiter($i, $max) { if (is_front_top_page() && (get_theme_mod('hvn_front_loading_setting', 'none') != 'none')) { if (!is_admin()) { echo <<< EOF -body { - visibility: hidden; -} - .loader-bg { background-color: var(--body-color); display: grid; @@ -371,9 +401,45 @@ function hvn_delimiter($i, $max) { //****************************************************************************** // オリジナルレイアウト //****************************************************************************** -if ((is_front_page_type_category_2_columns() || is_front_page_type_category_3_columns()) - && (is_entry_card_type_vertical_card_2() || is_entry_card_type_vertical_card_3())) { - echo <<< EOF + + +//****************************************************************************** +// 拡張タイプ +//****************************************************************************** +if (get_theme_mod('hvn_card_expansion_setting')) { + + // カード2列 + $css1 =<<< EOF +.list { + --column: 2; +} + +@media (width <=834px) { + .list { + --column: 1; + } +} + +EOF; + + // 大きなカード(先頭のみ) + $css2 =<<< EOF +.front-top-page .list .a-wrap:first-child { + grid-column: 1 / 3; + grid-row: 1 / 3; +} + +@media (width <=834px) { + .front-top-page .list .a-wrap:first-child { + grid-column: unset; + grid-row: unset; + } +} + +EOF; + + // 縦型カード2、3列+カテゴリーごと(2、3カラム) + $css3 =<<< EOF .body .list-new-entries .card-content, .body .list-popular .card-content { padding: 0 0 var(--gap30)!important; @@ -425,24 +491,84 @@ function hvn_delimiter($i, $max) { } EOF; + + // 大きなカード + $css4 =<<< EOF +.list:is(.list.big-card, .ect-big-card) { + background-color: var(--white-bgcolor); + padding: var(--gap30) var(--main-padding); + border-radius: var(--border-radius10); +} + +.list:is(.list.big-card, .ect-big-card) .a-wrap .entry-card { + border-bottom: 1px dotted var(--border-color); + border-radius: 0; + padding: 0 0 var(--gap30) 0; +} + +.list:is(.list.big-card, .ect-big-card) .a-wrap:last-child .entry-card { + border: 0; + padding-bottom: 0; +} + +.list:is(.list.big-card, .ect-big-card) .a-wrap:hover img { + transform: unset; +} + +EOF; + + // カードタイプ + $card = [ + 'entry_card' => 0, + 'big_card_first' => 1, + 'big_card' => 2, + 'vertical_card_2' => 3, + 'vertical_card_3' => 4 + ]; + + // フロントページタイプ + $type = [ + 'index' => 0, + 'tab_index' => 1, + 'category' => 2, + 'category_2_columns' => 3, + 'category_3_columns' => 4 + ]; + + // CSS + $css_array = [ + [1, 1, 1, 1, 1], + [0, 0, 2, 2, 2], + [5, 5, 5, 5, 5], + [0, 0, 3, 4, 4], + [0, 0, 0, 4, 4] + ]; + + $css =[ 0, $css1, $css1 . $css2, $css2, $css3, $css4]; + $no = $css_array[$card[get_entry_card_type()]][$type[get_front_page_type()]]; + + if ($no) { + echo $css[$no]; + } } //****************************************************************************** // カテゴリーごと背景色 //****************************************************************************** -if ((get_theme_mod('entry_card_type') == 'vertical_card_3' - || get_theme_mod('front_page_type') == 'category_3_columns') - && get_theme_mod('hvn_category_color_setting')) { - $color = get_theme_mod('hvn_main_color_setting', HVN_MAIN_COLOR); - $rgb = hvn_color_mix_rgb($color, 0.25); +if (get_theme_mod('hvn_category_color_setting')) { + if (is_entry_card_type_vertical_card_3() + || is_front_page_type_category_3_columns()) { + $color = get_theme_mod('hvn_main_color_setting', HVN_MAIN_COLOR); + $rgb = hvn_color_mix_rgb($color, 0.25); - echo <<< EOF + echo <<< EOF :root { --category-color: {$rgb['red']}, {$rgb['green']}, {$rgb['blue']}; } .front-top-page.no-sidebar #list-columns { + --title-color: #333; background-color: rgb(var(--category-color), 1); margin: 0 calc(50% - 50vw); padding: var(--gap30) calc(50vw - 50%); @@ -458,8 +584,17 @@ function hvn_delimiter($i, $max) { } EOF; - if (get_theme_mod('hvn_header_wave_setting')) { - echo <<< EOF + if (!get_theme_mod('hvn_border_setting', true)) { + echo <<< EOF +.hvn-dark #list-columns { + --cocoon-text-color: #333; +} + +EOF; + } + + if (get_theme_mod('hvn_header_wave_setting')) { + echo <<< EOF .hvn-wave-category { --body-rgb-color: var(--category-color); display: block; @@ -470,6 +605,7 @@ function hvn_delimiter($i, $max) { } EOF; + } } } @@ -488,6 +624,51 @@ function hvn_delimiter($i, $max) { EOF; } +//****************************************************************************** +// 目次スタイル +//****************************************************************************** +switch(get_theme_mod('hvn_toc_style_setting')) { + case 1: + echo <<< EOF +.main .toc { + padding: 0; +} + +.main .toc-title { + background-color: var(--border-color); + border: 0; + color: #333; + margin: 0; + padding: var(--padding15); +} + +.main .toc-content { + padding: var(--gap30) var(--main-padding); +} + +EOF; + + break; + + case 2: + echo <<< EOF +.main .toc { + background-clip: padding-box; + background-color: var(--gray-bgcolor); + border: 0; + border-bottom: 4px double var(--border-color); + border-top: 4px double var(--border-color); +} + +.main .toc-title { + border:0; + margin-bottom:0; +} + +EOF; + break; +} + //****************************************************************************** // 目次ハイライト @@ -506,6 +687,97 @@ function hvn_delimiter($i, $max) { } +//****************************************************************************** +// 目次ボタン +//****************************************************************************** +if (get_theme_mod('hvn_toc_fix_setting')) { + echo <<< EOF +.hvn-modal { + display: none; + height: 100%; + left: 0; + position: fixed; + top: 0; + width: 100%; + z-index: 9999; +} + +#hvn-open:checked + .hvn-modal { + animation:hvn-animation .3s; + display:block; +} + +.hvn-content-wrap { + background-color: var(--white-bgcolor); + border: 0; + overflow-y: auto; + padding: var(--gap30); + left: 50%; + position: absolute; + top: 50%; + transform: translate(-50%, -50%); + width: 800px; + z-index: 2; +} + +#hvn-toc .hvn-title { + border-bottom: 1px dotted var(--border-color); + margin-bottom: var(--gap30); + padding: 0 0 var(--padding15); + text-align: center; +} + +.hvn-background { + background-color: rgba(0, 0, 0, .50); + height: 100%; + left: 0; + position: absolute; + top: 0; + width: 100%; + z-index: 1; +} + +.hvn-open-btn { + align-items: center; + background-color: var(--white-bgcolor); + border-radius: var(--border-radius100); + border: 1px solid var(--main-color); + bottom: 110px; + box-shadow: var(--shadow-color); + color: var(--main-color); + display: grid; + height: 50px; + place-content: center; + position: fixed; + right: var(--gap30); + visibility: hidden; + width: 50px; + z-index: 999; +} + +.hvn-open-btn.active{ + visibility: visible; +} + +@keyframes hvn-animation { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +@media (width <=1023px) { + #hvn-toc { + display: none; + } +} + +EOF; +} + + //****************************************************************************** // いいねボタン //****************************************************************************** @@ -674,6 +946,96 @@ function hvn_delimiter($i, $max) { } +//****************************************************************************** +// アコーディオン化 +//****************************************************************************** +if (get_theme_mod('hvn_accordion_setting')) { + echo <<< EOF +.body :is(.widget_pages, .body .widget_archive, .widget_categories) ul { + display: block; + margin: 0; + padding: 0; +} + +.body :is(.widget_pages, .widget_archive, .widget_categories) a { + background-color: unset; + border-radius: 0; + border-top: 1px dotted #ccc; + color: var(--cocoon-text-color); + justify-content: unset; + padding: 3px 5px; +} + +.body :is(.widget_pages, .widget_archive, .widget_categories) > ul > li:first-of-type > a { + border: 0; +} + +:is(.widget_pages, .widget_archive, .widget_categories) .children a { + padding-left: calc(1.5em + 5px); +} + +:is(.widget_pages, .widget_archive, .widget_categories) ul:not(.children) > li > a:before { + content: '\\f07b'; + font-family: 'Font Awesome 5 Free'; + font-weight: bold; + margin-right: 0.5em; +} + +:is(.widget_pages, .widget_archive, .widget_categories, .widget_tag_cloud) button { + background-color: transparent; + border: 1px solid #ccc; + cursor: pointer; + display: grid; + height: 20px; + place-content: center; + position: absolute; + right: 5px; + top: 8px; + transition: .3s; + width: 20px; +} + +:is(.widget_pages, .widget_archive, .widget_categories, .widget_tag_cloud) button:before { + color: #ccc; + content: '\\f078'; + display: block; + font-family: 'Font Awesome 5 Free'; + font-size: 5px; + font-weight: bold; + transition: transform .3s; +} + +:is(.widget_pages, .widget_archive, .widget_categories, .widget_tag_cloud) button.active:before { + transform: rotate(-180deg); +} + +.widget_categories .post-count, +.widget_archive .post-count { + margin-left:auto; + padding-right: 2em; +} + +.sidebar .widget_tag_cloud .close, +.sidebar .widget_tag_cloud .tagcloud a { + width: 100%; +} + +.widget_tag_cloud .close { + display: flex; + flex-wrap: wrap; + gap: 5px; +} + +.widget_tag_cloud button { + margin-top: 5px; + position: unset; + width: 100%; +} + +EOF; +} + + //****************************************************************************** // プロフィール背景画像 //****************************************************************************** diff --git a/skins/skin-made-in-heaven/tmp/css-editor.php b/skins/skin-made-in-heaven/tmp/css-editor.php new file mode 100644 index 000000000..5e541a0f6 --- /dev/null +++ b/skins/skin-made-in-heaven/tmp/css-editor.php @@ -0,0 +1,301 @@ + li:before, +.is-style-numeric-list-enclosed > li:before { + {$css} +} + +EOF; +} + + +//****************************************************************************** +// アイコンボックス +//****************************************************************************** +$icon_box_class = [ + ['blockquote' ,'#cccccc'], + ['.is-style-information-box','#87cefa'], + ['.is-style-question-box' ,'#ffe766'], + ['.is-style-alert-box' ,'#f6b9b9'], + ['.is-style-memo-box' ,'#8dd7c1'], + ['.is-style-comment-box' ,'#cccccc'], + ['.is-style-ok-box' ,'#3cb2cc'], + ['.is-style-ng-box' ,'#dd5454'], + ['.is-style-good-box' ,'#98e093'], + ['.is-style-bad-box' ,'#eb6980'], + ['.is-style-profile-box' ,'#cccccc'], + ['.information-box' ,'#87cefa'], + ['.question-box' ,'#ffe766'], + ['.alert-box' ,'#f6b9b9'], + ['.memo-box' ,'#8dd7c1'], + ['.comment-box' ,'#cccccc'], + ['.ok-box' ,'#3cb2cc'], + ['.ng-box' ,'#dd5454'], + ['.good-box' ,'#98e093'], + ['.bad-box' ,'#eb6980'], + ['.profile-box' ,'#cccccc'] +]; + +$id_array = []; +for ($i=0; $iget_settings(); + if (isset($settings['color']['palette']['default'])) { + $default_colors = $settings['color']['palette']['default']; + } +} + +$colors = array_merge($colors, $default_colors); +foreach ($colors as $color) { + $slug = $color['slug']; + $color = $color['color']; + echo <<< EOF +html .body .is-style-hvn-timeline-mini.has-{$slug}-point-color:not(.not-nested-style) .timeline-item:before{ + border-color: {$color}; +} + +html .body .is-style-hvn-timeline-line.has-{$slug}-point-color:not(.not-nested-style) .timeline-item-content:before{ + background-color: {$color}; +} + +html .body .hvn-timeline.has-{$slug}-point-color:not(.not-nested-style) .timeline-item:before{ + border-color: {$color}; + color: {$color}; +} + +EOF; +} diff --git a/skins/skin-made-in-heaven/tmp/js-custom.php b/skins/skin-made-in-heaven/tmp/js-custom.php index 07d67725a..42fef59fb 100644 --- a/skins/skin-made-in-heaven/tmp/js-custom.php +++ b/skins/skin-made-in-heaven/tmp/js-custom.php @@ -2,6 +2,7 @@ if (!defined('ABSPATH')) exit; global $_IS_SWIPER_ENABLE; +global $_HVN_NOTICE; //****************************************************************************** @@ -298,7 +299,7 @@ function currentCheck() { // Cookie更新 var cookArry = JSON.stringify(cook); - $.cookie('like_page', cookArry, { expires: 365, path: '/' }); + localStorage.setItem('like_page', cookArry); check_cookie(this, id); // カスタムフィールド更新 @@ -322,7 +323,7 @@ function currentCheck() { // Cookieチェック処理 function check_cookie(elm, id) { // cookie取得 - cook = $.cookie('like_page') ? JSON.parse( $.cookie('like_page')) : []; + cook = localStorage.getItem('like_page') ? JSON.parse(localStorage.getItem('like_page')) : []; // 投稿ID登録済? if (cook.indexOf(id) > -1) { @@ -462,3 +463,169 @@ function setHeight() { EOF; } + + +//****************************************************************************** +// アコーディオン化 +//****************************************************************************** +if (get_theme_mod('hvn_accordion_setting')) { + echo <<< EOF +// アーカイブ +(function($) { + var html; + var li; + var pcount; + var year; + var byear; + + $(".widget_archive").each(function() { + html = ''; + li = ''; + pcount = 0; + year = 0; + byear = 0; + + $('li', this).each(function() { + var y = $(this).text().match(/(\d+)-/); + year = y[1]; + if (byear == '') { + byear = y[1]; + } + + if (year != byear) { + out_html(); + byear = y[1]; + li = ''; + pcount = 0; + } + li += '
  • ' + $(this).html().replace(/(\d+)-/, '') + '
  • '; + pcount += Number($('.post-count', this).text()); + }); + + out_html(); + $('ul', this).html(html); + }); + + function out_html() { + var p = ''; + if (pcount != 0) { + p = '' + pcount + ''; + } + html += '
  • ' + byear + '' + p + '
      ' + li + '
  • '; + } +})(jQuery); + + +// カテゴリー、固定ページ +(function($) { + $(".widget").each(function() { + $('.children', this).hide(); +  $('.children', this).before(''); + + $('.sub-item', this).click(function() { + $(this).next('ul').slideToggle(300); + $(this).toggleClass('active'); + }); + }); +})(jQuery); + + +// タグクラウド +(function($) { + var no = 10; + + $('.sidebar .widget_tag_cloud').each(function() { + if ($('.tag-link-position-' + (no + 1), this).length) { + $('.tag-link-position-' + no, this).nextUntil().wrapAll('
    '); + $(this).append(''); + + $('.close', this).hide(); + $('button', this).click(function() { +       $(this).parent().find('.close').slideToggle(300); + $(this).toggleClass('active'); + }); + } + }); +})(jQuery); + +EOF; +} + + +//****************************************************************************** +// ダークモード +//****************************************************************************** +echo <<< EOF +(function($) { + const btn = $('#hvn-dark'); + btn.click(function() { + $('body').toggleClass('hvn-dark'); + if (btn.prop('checked')) { + localStorage.setItem('hvn-dark', 'dark'); + } else { + localStorage.removeItem('hvn-dark'); + } + }); + + //ローカルストレージ判定 + if (localStorage.getItem('hvn-dark') ==='dark') { + $('body').addClass('hvn-dark'); + btn.prop("checked", true); + } else { + $('body').removeClass('hvn-dark'); + } + $('body').css('visibility', 'visible'); +})(jQuery); +EOF; + + +//****************************************************************************** +// 通知エリア +//****************************************************************************** +if ($_HVN_NOTICE) { + echo <<< EOF +const noticeSwiper = new Swiper(".notice-area-message .swiper",{ + loop: true, + direction: "vertical", + autoplay: { + delay: 8000, + }, + speed: 2000, +}); + +EOF; +} + + +//****************************************************************************** +// 目次ボタン +//****************************************************************************** +if (get_theme_mod('hvn_toc_fix_setting')) { + $html = do_shortcode('[toc]'); + echo <<< EOF +
    + + + +
    +
    +
    目次
    + {$html} +
    + +
    +
    + + +EOF; +}