From 08580328f123b25af9c096fe426cad9821bb29a0 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 16 Apr 2007 06:32:08 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@1158 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- layouts/sample_layout/css/layout.css | 171 ++++++++++++++++++ layouts/sample_layout/js/layout.js | 112 ++++++------ layouts/sample_layout/layout.html | 145 +++++++-------- .../login_info/skins/default/normal/style.css | 1 - 4 files changed, 293 insertions(+), 136 deletions(-) create mode 100644 layouts/sample_layout/css/layout.css diff --git a/layouts/sample_layout/css/layout.css b/layouts/sample_layout/css/layout.css new file mode 100644 index 000000000..59674f862 --- /dev/null +++ b/layouts/sample_layout/css/layout.css @@ -0,0 +1,171 @@ +@charset "utf-8"; + +/** + * 레이아웃 style + **/ + +/** + * 상단 로고 및 메인 1차 메뉴 + **/ +.layout_top { + border-bottom:3px solid #EEEEEE; + height:50px; +} + +/* 상단 로고 부분 */ +.layout_logo { + float:left; +} + +/* 상단 1차 메뉴 */ +.layout_first_menu { + float:right; + margin-top:30px; +} + +/** + * 중간 영역 (왼쪽 메뉴 + 컨텐츠) + **/ +.layout_middle { + margin:10px 0px 10px 0px; + clear:both; +} + +/** + * 좌측 메뉴 및 메인 2차 메뉴, 로그인 플러그인 및 기타 + **/ +.layout_left { + width:220px; + margin-right:10px; + float:left; +} + +/* 좌측 2차 메뉴 */ +.layout_second_menu { + border:1px solid #EEEEEE; + padding:5px; +} + +/* 좌측 관리자 메뉴 */ +.layout_admin { + margin-top:10px; + border:3px solid #EEEEEE; + padding:5px; + text-align:center; +} + +/* 컨텐츠 */ +.layout_content { + position:absolute; + left:0px; + right:0px; + padding:0px 10px 0px 240px; +} + +/** + * 하단 메뉴 영역 + **/ +.layout_bottom { + clear:both; +} + +/* 하단 메뉴 */ +.layout_bottom_menu { + width:100%; + text-align:center; +} + +/** + * 메뉴 style, main_menu:1~3차, bottom_menu로 구성 + **/ + +/* 1차 메뉴 */ +.first_menu { + margin-right:5px; + font-weight:normal; +} + +.first_menu A { + color:#000000; + text-decoration:none; +} + +.first_menu_selected { + margin-right:5px; + font-weight:bold; +} + +.first_menu_selected A { + color:#000000; + font-weight:bold; + text-decoration:none; +} + +/* 2차 메뉴 */ +.second_menu { + margin-right:5px; + font-weight:normal; + display:block; +} + +.second_menu A { + color:#000000; + text-decoration:none; +} + +.second_menu_selected { + margin-right:5px; + font-weight:bold; + display:block; +} + +.second_menu_selected A { + color:#000000; + font-weight:bold; + text-decoration:none; +} + +/* 3차 메뉴 */ +.third_menu { + margin-left:10px; + display:block; +} + +.third_menu A { + color:#000000; + text-decoration:none; +} + +.third_menu_selected { + margin-left:10px; + font-weight:bold; + display:block; +} + +.third_menu_selected A { + color:#000000; + font-weight:bold; + text-decoration:none; +} + +/* 하단 메뉴 */ +.bottom_menu { + margin-right:5px; + font-weight:normal; +} + +.bottom_menu A { + color:#000000; + text-decoration:none; +} + +.bottom_menu_selected { + margin-right:5px; + font-weight:bold; +} + +.bottom_menu_selected A { + color:#000000; + font-weight:bold; + text-decoration:none; +} diff --git a/layouts/sample_layout/js/layout.js b/layouts/sample_layout/js/layout.js index 444bba2e4..18f902f1e 100644 --- a/layouts/sample_layout/js/layout.js +++ b/layouts/sample_layout/js/layout.js @@ -3,72 +3,68 @@ * @author zero (zero@nzeo.com) **/ -// 메뉴를 담을 javascript 변수 +/** + * 메뉴를 담을 javascript 변수 + * + * xe_layout_menu 구조 + * + * xe_layout_menu[메뉴명][depth][menu_srl] = Object + * + * Object { + * text : 메뉴 명 + * href : 연결할 주소 + * open_window : [Y|N] 새창으로 띄울 것인지에 대한 값 + * normal_btn : 이미지 버튼 + * hover_btn : 이미지 버튼일 경우 mouseover 일 경우 + * active_btn : 선택되어 있을 경우의 이미지 + * className : normal 상태의 className + * selectedClassName : 선택된 상태의 className + * selected : 선택된 메뉴라면 true, 아니면 false + * } + **/ var xe_layout_menu = new Array(); /** * @brief sample_layout에서 메뉴를 출력하는 함수 * menu_name : 레이아웃 설정상의 메뉴 이름 - * depth : 단계 - * text : 메뉴 명 - * href : 연결할 주소 - * open_window : [Y|N] 새창으로 띄울 것인지에 대한 값 - * normal_btn : 이미지 버튼 - * hover_btn : 이미지 버튼일 경우 mouseover 일 경우 - * active_btn : 선택되어 있을 경우의 이미지 - * modifier : 구분자 (
또는 null 이 사용 예상) - * selected_class : 이미지 버튼이 아닐 경우 선택된 문자열에 대한 css class (지정 안되어 있으면 ..로 처리 - * selected : 선택된 메뉴라면 true, 아니면 false - **/ -function xe_add_menu(menu_name, depth, text, href, open_window, normal_btn, hover_btn, active_btn, modifier, selected_class, selected) { - // 텍스트나 이미지 버튼이 없으면 패스~ - if(!text && !normal_btn) return; - - var html = ""; - - // 텍스트일 경우 - if(!normal_btn) { - // 선택되었을 때의 class or style 지정 - if(selected) { - if(!selected_class) selected_class = "style=\"font-weight:bold\""; - else selected_class = "class=\""+selected_class+"\""; - } else { - selected_class = ""; - } - - if(open_window == "Y") html = ""+text+""; - else html = ""+text+""; - - // 이미지 버튼 일 경우 - } else if(normal_btn) { - if(!hover_btn) hover_btn = normal_btn; - if(!active_btn) active_btn = normal_btn; - if(selected) normal_btn = active_btn; - - if(open_window == "Y") html = "\""+text+"\""; - else html = "\""+text+"\""; - - - } - - // modifier 출력 - if(modifier) html += modifier; - - if(!xe_layout_menu[menu_name]) xe_layout_menu[menu_name] = new Array(); - if(!xe_layout_menu[menu_name][depth]) xe_layout_menu[menu_name][depth] = new Array(); - xe_layout_menu[menu_name][depth][xe_layout_menu[menu_name][depth].length] = html; -} - -/** - * @brief xe_layout_menu에 있는 메뉴를 출력 - * menu_name : 레이아웃 설정상의 메뉴 이름 * depth : 입력된 단계 * print_child : true로 하면 메뉴 출력중 하위 메뉴가 있을 시 출력 **/ function xe_print_menu(menu_name, depth, print_child) { - if(!xe_layout_menu[menu_name] || !xe_layout_menu[menu_name][depth]) return; - for(var i=0;i"+menu_obj.text+""; + else html = ""+menu_obj.text+""; + + // 이미지 버튼 일 경우 + } else if(menu_obj.normal_btn) { + if(!menu_obj.hover_btn) menu_obj.hover_btn = menu_obj.normal_btn; + if(!menu_obj.active_btn) menu_obj.active_btn = menu_obj.normal_btn; + + if(menu_obj.selected) menu_obj.normal_btn = menu_obj.active_btn; + + if(menu_obj.open_window == "Y") html = "\""+menu_obj.text+"\""; + else html = "\""+menu_obj.text+"\""; + } + + if(html) document.write(html); + + if(print_child && menu_obj.selected && typeof(xe_layout_menu[menu_name][depth+1])!='undefined') xe_print_menu('main_menu', depth+1, true); } } diff --git a/layouts/sample_layout/layout.html b/layouts/sample_layout/layout.html index b86f9b54f..d25a3ba32 100644 --- a/layouts/sample_layout/layout.html +++ b/layouts/sample_layout/layout.html @@ -1,92 +1,83 @@ - + + + + -
- {$layout_info->top_title} + +
+ -
- -
- - - -
+
+ + +
-
- - - - - - - - - - -
-
- -
+ +
-
- - - -
+ +
+ + - - - - + +
+ +
-
-
{$content}
-
-
- - - -
-
+ + + + +
+ + +
{$content}
+
+ + +
+
+ +
diff --git a/plugins/login_info/skins/default/normal/style.css b/plugins/login_info/skins/default/normal/style.css index d23427e54..07072513e 100644 --- a/plugins/login_info/skins/default/normal/style.css +++ b/plugins/login_info/skins/default/normal/style.css @@ -1,7 +1,6 @@ .login_plugin { border:3px solid #DDDDDD; padding:6px; - width:190px; height:80px; margin-bottom:10px; }