@version(2) @load('./lang') @load('../../assets/heritage.css') @load('css/layout.css') @load('js/layout.js') @php $hr = $layout_info; $hr_width = (int)($hr->content_width ?? 1180) ?: 1180; $hr_scheme = $hr->color_scheme ?? 'auto'; $hr_point = trim((string)($hr->point_color ?? '')) ?: '#6c5ce0'; $hr_menu = array_values($gnb->list ?? []); $hr_current = null; foreach ($hr_menu as $hr_m) { if (!empty($hr_m['selected']) || !empty($hr_m['open'])) { $hr_current = $hr_m; break; } } $hr_type = $hr->layout_type ?? 'sub'; $hr_class_map = ['m' => 'main', 'sl' => 'sub', 'sf' => 'sub_full']; $hr_selected_class = ''; foreach ($hr_menu as $hr_m) { if (empty($hr_m['selected']) && empty($hr_m['open'])) continue; $hr_selected_class = (string)($hr_m['class'] ?? ''); foreach ((array)($hr_m['list'] ?? []) as $hr_m2) { if (empty($hr_m2['selected']) && empty($hr_m2['open'])) continue; $hr_selected_class = (string)($hr_m2['class'] ?? '') ?: $hr_selected_class; foreach ((array)($hr_m2['list'] ?? []) as $hr_m3) { if (!empty($hr_m3['selected'])) { $hr_selected_class = (string)($hr_m3['class'] ?? '') ?: $hr_selected_class; } } } break; } $hr_has_class_type = false; foreach (preg_split('/\s+/', trim($hr_selected_class)) as $hr_token) { if (isset($hr_class_map[$hr_token])) { $hr_type = $hr_class_map[$hr_token]; $hr_has_class_type = true; break; } } $hr_module_info = \Context::get('current_module_info'); $hr_module_now = is_object($hr_module_info) ? (string)($hr_module_info->module ?? '') : ''; // 사이트 대문은 메뉴 클래스 지정이 없으면 메인(비주얼)으로 본다. // 대문에 sl/sf 클래스를 넣으면 그 지정이 우선한다. $hr_site_info = \Context::get('site_module_info'); $hr_home_mid = is_object($hr_site_info) ? (string)($hr_site_info->mid ?? '') : ''; $hr_now_mid = is_object($hr_module_info) ? (string)($hr_module_info->mid ?? '') : ''; if (!$hr_has_class_type && $hr_home_mid !== '' && $hr_now_mid === $hr_home_mid) { $hr_type = 'main'; } $hr_full_modules = ['member', 'communication', 'zittme_pay', 'integration_search']; if (!$hr_has_class_type && in_array($hr_module_now, $hr_full_modules, true)) { $hr_type = 'sub_full'; } $hr_lnb = ($hr_type === 'sub' && $hr_current && !empty($hr_current['list'])) ? $hr_current : null; $hr_visuals = array_values((array)($hr->visuals ?? [])); $hr_visual_mode = $hr->show_visual ?? 'main'; $hr_show_visual = count($hr_visuals) && $hr_visual_mode !== 'none' && ($hr_visual_mode === 'all' || $hr_type === 'main'); $hr_interval = max(0, (int)($hr->visual_interval ?? 6)); $hr_footer_info = array_values(array_filter(array_map('trim', explode("\n", (string)($hr->footer_info ?? ''))))); @endphp