From 6d512d606e465dfdb11e66db32fa5f41c9629eee Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 16 Apr 2007 03:47:04 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@1154 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- layouts/sample_blog_layout/conf/info.xml | 46 +++++++++ layouts/sample_blog_layout/js/layout.js | 48 +++++++++ layouts/sample_blog_layout/layout.html | 123 +++++++++++++++++++++++ layouts/sample_layout/layout.html | 7 -- 4 files changed, 217 insertions(+), 7 deletions(-) create mode 100644 layouts/sample_blog_layout/conf/info.xml create mode 100644 layouts/sample_blog_layout/js/layout.js create mode 100644 layouts/sample_blog_layout/layout.html diff --git a/layouts/sample_blog_layout/conf/info.xml b/layouts/sample_blog_layout/conf/info.xml new file mode 100644 index 000000000..9787870ca --- /dev/null +++ b/layouts/sample_blog_layout/conf/info.xml @@ -0,0 +1,46 @@ + + + 블로그 견본 레이아웃 + + 제로 + + 블로그 형태의 견본 레이아웃입니다. + 가장 기본적인 기능으로 이루어져 있습니다. + + + + + 상단 제목 + text + 레이아웃의 상단에 표시할 제목을 입력하세요. + + + 메인 메뉴 명 + text + 트리메뉴의 가장 상위에 표시될 이름을 입력하세요. + + + 컬러셋 + select + 원하시는 컬러셋을 선택해주세요. + + 적색 + red + + + 청색 + blue + + + + + + 주 메뉴 + 2 + + + 하단 메뉴 + 1 + + + diff --git a/layouts/sample_blog_layout/js/layout.js b/layouts/sample_blog_layout/js/layout.js new file mode 100644 index 000000000..7dddafb8b --- /dev/null +++ b/layouts/sample_blog_layout/js/layout.js @@ -0,0 +1,48 @@ +/** + * @brief sample_layout에서 메뉴를 출력하는 함수 + * text : 메뉴 명 + * href : 연결할 주소 + * open_window : [Y|N] 새창으로 띄울 것인지에 대한 값 + * normal_btn : 이미지 버튼 + * hover_btn : 이미지 버튼일 경우 mouseover 일 경우 + * active_btn : 선택되어 있을 경우의 이미지 + * modifier : 구분자 (
또는 null 이 사용 예상) + * selected_class : 이미지 버튼이 아닐 경우 선택된 문자열에 대한 css class (지정 안되어 있으면 ..로 처리 + * selected : 선택된 메뉴라면 true, 아니면 false + **/ +function xe_print_menu(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; + + document.write(html); +} diff --git a/layouts/sample_blog_layout/layout.html b/layouts/sample_blog_layout/layout.html new file mode 100644 index 000000000..9b3e17461 --- /dev/null +++ b/layouts/sample_blog_layout/layout.html @@ -0,0 +1,123 @@ + + + + + + + +
+ {$layout_info->top_title} + +
+ +
+ + + + + + +
+ +
+ + + + + + +
+ +
+ +
+ +
+ + + + + + + + + + +
+
+ +
+ + + + + + + +
+ + + + + + + +
+ +
+
{$content}
+
+
+ + + + + + + + + {@ $selected_style = 'style="font-weight:bold;"'} + + {@ $selected_style = ''; } + + + + {$val['text']} + + + + +
+
+
diff --git a/layouts/sample_layout/layout.html b/layouts/sample_layout/layout.html index 9b3e17461..c05a4f7ac 100644 --- a/layouts/sample_layout/layout.html +++ b/layouts/sample_layout/layout.html @@ -1,12 +1,6 @@ - - - -
{$layout_info->top_title} @@ -66,7 +60,6 @@
-
{$lang->cmd_layout_management}