芝麻web文件管理V1.00
编辑当前文件:/home/r5772835/public_html/blog.ycreate.jp/wp-content/themes/swell/classes/Style/Header.php
li:hover > a', '.c-gnav > .-current > a' ], $gnav_li_hover_a ); } if ( ! empty( $gnav_li_hover_a_after ) ) { Style::add( ['.c-gnav > li:hover > a::after', '.c-gnav > .-current > a::after' ], $gnav_li_hover_a_after ); } // サブメニューの色 $subbg_is_white = 'main' !== SWELL::get_setting( 'head_submenu_bg' ); $submenu_color = $subbg_is_white ? '#333' : '#fff'; $submenu_bg = $subbg_is_white ? '#fff' : 'var(--color_main)'; Style::add( '.c-gnav .sub-menu', [ 'color:' . $submenu_color, 'background:' . $submenu_bg, ] ); } /** * お知らせバー */ public static function info_bar() { $infoBar = []; // テキスト色 $infoBar[] = 'color:' . SWELL::get_setting( 'color_info_text' ); // 背景 $bgcol_01 = SWELL::get_setting( 'color_info_bg' ); $bgcol_02 = SWELL::get_setting( 'color_info_bg2' ); // 背景グラデーションかどうか if ( 'gradation' === SWELL::get_setting( 'info_bar_effect' ) ) { if ( $bgcol_02 ) { $gradation_bg = 'repeating-linear-gradient(' . '100deg,' . \SWELL_Theme::get_rgba( $bgcol_01, 1, .1 ) . ' 0,' . $bgcol_01 . ' 5%,' . $bgcol_02 . ' 95%,' . \SWELL_Theme::get_rgba( $bgcol_02, 1, .1 ) . ' 100%' . ')'; } else { // 背景色02が指定されていなければ、単一色からグラデーションを計算 $gradation_bg = 'repeating-linear-gradient(' . '100deg, ' . $bgcol_01 . ' 0,' . \SWELL_Theme::get_rgba( $bgcol_01, 1, .1 ) . ' 10%,' . \SWELL_Theme::get_rgba( $bgcol_01, 1, .4 ) . ' 90%,' . \SWELL_Theme::get_rgba( $bgcol_01, 1, .5 ) . ' 100%' . ')'; } $infoBar[] = 'background-image:' . $gradation_bg; } else { $infoBar[] = 'background-color:' . $bgcol_01; } // $head_style .= '.c-infoBar{'. $notice_style .'}'; Style::add( '.c-infoBar', $infoBar ); // フォントサイズ switch ( SWELL::get_setting( 'info_bar_size' ) ) { case 'small': $fz_tab = '12px'; $fz_mobile = '3vw'; break; case 'big': $fz_tab = '16px'; $fz_mobile = '3.8vw'; break; default: $fz_tab = '14px'; $fz_mobile = '3.4vw'; break; } Style::add( '.c-infoBar__text', 'font-size:' . $fz_mobile ); Style::add( '.c-infoBar__text', 'font-size:' . $fz_tab, 'tab' ); // ボタンの色 $color_info_btn = SWELL::get_setting( 'color_info_btn' ) ?: 'var(--color_main)'; Style::add( '.c-infoBar__btn', 'background-color:' . $color_info_btn . ' !important' ); } }