サイドバーの有無でサイズを決める if ( $front_id === $post_id ) { $side_key = 'show_sidebar_top'; } elseif ( 'page' === $post_type ) { $side_key = 'show_sidebar_page'; } else { $side_key = 'show_sidebar_post'; } $block_width = \Arkhe::get_setting( $side_key ) ? 900 : $container_width; } // ブロック幅 self::add_root_css( '--ark-block_width', $block_width . 'px' ); } /** * ヘッダー関連 */ protected static function css_header( $logo_size_sp, $logo_size_pc ) { self::add_root_css( '--ark-logo_size--sp', $logo_size_sp . 'px' ); self::add_root_css( '--ark-logo_size--pc', $logo_size_pc . 'px' ); } /** * タイトル背景 */ protected static function css_title_bg( $ttlbg_overlay_color, $ttlbg_overlay_opacity ) { self::add_css( '.p-topArea.c-filterLayer::before', array( 'background-color:' . $ttlbg_overlay_color, 'opacity:' . $ttlbg_overlay_opacity, ) ); } /** * 設定に合わせてサムネイル比率を返す */ public static function get_thumb_ratio( $thumb_ratio ) { switch ( $thumb_ratio ) { case 'golden': return '61.8%'; case 'silver': return '70.72%'; case 'slr': return '66.66%'; case 'wide': return '56.25%'; case 'wide2': return '50%'; case 'wide3': return '40%'; default: // 'square' return '100%'; } } /** * サムネイル比率 */ protected static function css_thumb_ratio( $thumb_ratio ) { self::add_root_css( '--ark-thumb_ratio', self::get_thumb_ratio( $thumb_ratio ) ); } }