From 5140047b5fc9ffcc137b206c62c71daa87abd1d9 Mon Sep 17 00:00:00 2001 From: Min-Soo Kim Date: Sun, 26 Feb 2017 01:05:57 +0900 Subject: [PATCH] =?UTF-8?q?=EB=84=A4=EB=AA=A8=EC=9D=98=20=EA=BF=88/=20?= =?UTF-8?q?=EC=BB=A8=ED=85=90=EC=B8=A0=20=EC=9C=84=EC=A0=AF=20=EC=8A=A4?= =?UTF-8?q?=ED=82=A8=20(#712)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 컨텐츠 모듈 스킨 - 사이트 테마를 따르지 않고 다른 색을 선택할 수 있도록 네모의 꿈 회원 스킨 컬러셋 추가. - 탭이 많을 때 터치 환경이 아니면 좌우로 넘기기 어려운 점을 고려하여서 메뉴를 펼침. - 작은 화면에서 화면을 최대한 활용하도록, 레이아웃 햄버거 메뉴를 부드럽게 나타내고 감춥니다. ## 위젯에서 LESS/SCSS 의 사용 - 변수를 위젯 캐시에도 전달할 수 있도록 해서 LESS 나 SCSS 에 값 전달이 가능하도록 함. - LESS 나 SCSS 를 사용한 경우에 위젯 코드 캐싱 코드가 적절하게 기록되도록 해서 LESS나 SCSS 를 사용 가능하도록 수정. ## 그 외 변화 - Reduce the number of regular expressions. --- classes/display/HTMLDisplayHandler.php | 14 +- classes/template/TemplateHandler.class.php | 11 +- layouts/simple_world/layout.html | 2 +- layouts/simple_world/layout.js | 6 +- .../skins/simple_world/common_header.html | 7 +- .../member/skins/simple_world/css/css.less | 7 +- modules/member/skins/simple_world/skin.xml | 90 ++++- .../skins/simple_world/common_header.html | 4 +- .../skins/xedition/http_status_code.html | 2 +- modules/page/page.mobile.php | 2 +- modules/page/page.view.php | 2 +- modules/widget/widget.controller.php | 30 +- widgets/content/content.class.php | 26 +- .../skins/simple_rectangle/_tab_left.html | 38 ++ .../skins/simple_rectangle/_tab_none.html | 15 + .../skins/simple_rectangle/_tab_top.html | 18 + .../skins/simple_rectangle/content.html | 79 +++++ .../skins/simple_rectangle/css/css.css | 274 +++++++++++++++ .../skins/simple_rectangle/css/css.less | 328 ++++++++++++++++++ .../skins/simple_rectangle/gallery.html | 32 ++ .../skins/simple_rectangle/image_title.html | 1 + .../simple_rectangle/image_title_content.html | 39 +++ .../simple_rectangle/js/content_widget.js | 42 +++ .../skins/simple_rectangle/normal.html | 29 ++ .../content/skins/simple_rectangle/skin.xml | 107 ++++++ .../skins/simple_rectangle/title_content.html | 108 ++++++ 26 files changed, 1286 insertions(+), 27 deletions(-) create mode 100644 widgets/content/skins/simple_rectangle/_tab_left.html create mode 100644 widgets/content/skins/simple_rectangle/_tab_none.html create mode 100644 widgets/content/skins/simple_rectangle/_tab_top.html create mode 100644 widgets/content/skins/simple_rectangle/content.html create mode 100644 widgets/content/skins/simple_rectangle/css/css.css create mode 100644 widgets/content/skins/simple_rectangle/css/css.less create mode 100644 widgets/content/skins/simple_rectangle/gallery.html create mode 100644 widgets/content/skins/simple_rectangle/image_title.html create mode 100644 widgets/content/skins/simple_rectangle/image_title_content.html create mode 100644 widgets/content/skins/simple_rectangle/js/content_widget.js create mode 100644 widgets/content/skins/simple_rectangle/normal.html create mode 100644 widgets/content/skins/simple_rectangle/skin.xml create mode 100644 widgets/content/skins/simple_rectangle/title_content.html diff --git a/classes/display/HTMLDisplayHandler.php b/classes/display/HTMLDisplayHandler.php index 71f12b91a..aa67124a2 100644 --- a/classes/display/HTMLDisplayHandler.php +++ b/classes/display/HTMLDisplayHandler.php @@ -174,7 +174,7 @@ class HTMLDisplayHandler $output = preg_replace_callback('!!is', array($this, '_moveMetaToHeader'), $output); // change a meta fine(widget often put the tag like to the content because of caching) - $output = preg_replace_callback('//is', array($this, '_transMeta'), $output); + $output = preg_replace_callback('//is', array($this, '_transMeta'), $output); // handles a relative path generated by using the rewrite module if(Context::isAllowRewrite()) @@ -370,9 +370,17 @@ class HTMLDisplayHandler { return ''; } - Context::loadFile($matches[2]); + if($matches[3]) + { + $vars = Context::get(str_replace('?$__Context->', '', $matches[3])); + Context::loadFile(array($matches[2], null, null, null, $vars)); + } + else + { + Context::loadFile($matches[2]); + } } - + /** * Add OpenGraph metadata tags. * diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index 0105173f8..b91bf8db8 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -805,6 +805,7 @@ class TemplateHandler else { $metafile = $attr['target']; + $metavars = ($attr['vars'] ? self::_replaceVar($attr['vars']) : ''); $result = "\$__tmp=array('{$attr['target']}','{$attr['media']}','{$attr['targetie']}','{$attr['index']}'," . ($attr['vars'] ? self::_replaceVar($attr['vars']) : 'array()') . ");Context::loadFile(\$__tmp);unset(\$__tmp);"; } break; @@ -813,7 +814,15 @@ class TemplateHandler $result = ""; if($metafile) { - $result = "" . $result; + if(!$metavars) + { + $result = "" . $result; + } + else + { + // LESS or SCSS needs the variables to be substituted. + $result = "" . $result; + } } return $result; diff --git a/layouts/simple_world/layout.html b/layouts/simple_world/layout.html index 0df133005..fa7b72184 100644 --- a/layouts/simple_world/layout.html +++ b/layouts/simple_world/layout.html @@ -48,7 +48,7 @@ {Context::addMetaTag("theme-color", $material_colors[$layout_info->primary_color])} -{Context::set('layout_scss_value', array('grey' => $material_colors['grey'], 'primary_color' => $material_colors[$layout_info->primary_color], 'menu_position' => $layout_info->menu_position, 'content_color' => $layout_info->content_color))} +{@Context::set('layout_scss_value', array('grey' => $material_colors['grey'], 'primary_color' => $material_colors[$layout_info->primary_color], 'menu_position' => $layout_info->menu_position, 'content_color' => $layout_info->content_color))} diff --git a/layouts/simple_world/layout.js b/layouts/simple_world/layout.js index 6e2798cbf..9f1c21668 100644 --- a/layouts/simple_world/layout.js +++ b/layouts/simple_world/layout.js @@ -67,8 +67,10 @@ $(function() { if($("#layout_menu_toggle").css( 'position' ) === 'fixed') { - $("#layout_menu_toggle").fadeIn(); - $("#layout_menu_toggle").css('display', ''); + $("#layout_menu_toggle").fadeIn(400, function() { + $("#layout_menu_toggle").css('display', '') + }); + ; } } previousScroll = currentScroll; diff --git a/modules/member/skins/simple_world/common_header.html b/modules/member/skins/simple_world/common_header.html index 7cf42c832..6092d1867 100644 --- a/modules/member/skins/simple_world/common_header.html +++ b/modules/member/skins/simple_world/common_header.html @@ -41,8 +41,8 @@ {@$layout_info->primary_color = 'blue';} - +{@$colorset = $material_colors[$member_config->colorset];} {@$skin_color = $material_colors[$layout_info->primary_color];} @@ -54,7 +54,10 @@ {@$skin_color = '#f44336'} -{Context::set('simple_less_value', array('red' => hexdec(substr($skin_color, 1, 2)), 'green' => hexdec(substr($skin_color, 3, 2)), 'blue' => hexdec(substr($skin_color, 5, 2)) ))} + + {@$skin_color = $colorset} + +{@Context::set('simple_less_value', array('red' => hexdec(substr($skin_color, 1, 2)), 'green' => hexdec(substr($skin_color, 3, 2)), 'blue' => hexdec(substr($skin_color, 5, 2)) ))}
diff --git a/modules/member/skins/simple_world/css/css.less b/modules/member/skins/simple_world/css/css.less index 00efe8d14..43156161b 100644 --- a/modules/member/skins/simple_world/css/css.less +++ b/modules/member/skins/simple_world/css/css.less @@ -188,9 +188,6 @@ script, style .rx_simple_member div.rx_simple_tab{ background: #ffffff; margin: 5px 0; - height: 52px; - overflow: hidden; - white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,0.16), 0 1px 2px rgba(0,0,0,0.23); box-sizing: border-box; } @@ -198,9 +195,7 @@ script, style list-style: outside none none; margin: 0; display: block; - overflow-x: auto; - -webkit-overflow-scrolling: touch; - padding: 6px 0px 100px; + padding: 6px 0; text-decoration: none; } diff --git a/modules/member/skins/simple_world/skin.xml b/modules/member/skins/simple_world/skin.xml index 4bf108777..6bb950ac7 100644 --- a/modules/member/skins/simple_world/skin.xml +++ b/modules/member/skins/simple_world/skin.xml @@ -11,6 +11,94 @@ misol - + + + 사이트 테마 색 + The site theme color + + + 붉은 색 + Red + + + 크림슨 + Crimson + + + 분홍 + Pink + + + 보라 + Purple + + + 진보라 + Deep Purple + + + 인디고 + Indigo + + + 짙은 파랑 + Deep Blue + + + 파랑 + Blue + + + 밝은 파랑 + Light Blue + + + 시안 + Cyan + + + + Teal + + + 초록 + Green + + + 연한 초록 + Light Green + + + 라임 + Lime + + + 노랑 + Yellow + + + 앰버 + Amber + + + 주황 + Orange + + + 진한 주황 + Deep Orange + + + 갈색 + Brown + + + 회색 + Grey + + + 푸른 회색 + Blue Grey + diff --git a/modules/message/skins/simple_world/common_header.html b/modules/message/skins/simple_world/common_header.html index e92d2b510..3f5be653b 100644 --- a/modules/message/skins/simple_world/common_header.html +++ b/modules/message/skins/simple_world/common_header.html @@ -1,5 +1,5 @@ -{Context::addMetaTag("viewport", "width=device-width, user-scalable=yes")} +{@Context::addMetaTag("viewport", "width=device-width, user-scalable=yes")} {@ @@ -57,6 +57,6 @@ {@$skin_color = '#f44336'} -{Context::set('simple_less_value', array('red' => hexdec(substr($skin_color, 1, 2)), 'green' => hexdec(substr($skin_color, 3, 2)), 'blue' => hexdec(substr($skin_color, 5, 2)) ))} +{@Context::set('simple_less_value', array('red' => hexdec(substr($skin_color, 1, 2)), 'green' => hexdec(substr($skin_color, 3, 2)), 'blue' => hexdec(substr($skin_color, 5, 2)) ))}
\ No newline at end of file diff --git a/modules/message/skins/xedition/http_status_code.html b/modules/message/skins/xedition/http_status_code.html index 5666332e7..39cc450d6 100644 --- a/modules/message/skins/xedition/http_status_code.html +++ b/modules/message/skins/xedition/http_status_code.html @@ -1,5 +1,5 @@ -{Context::addHtmlHeader('')} +{@Context::addHtmlHeader('')}