From 19e91b2de0ed638bde1a0e5dfeaa216b60dca506 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 29 Apr 2018 02:44:09 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=85=EA=B5=AC=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f_install/j_setup_db.php | 7 +++++++ f_install/templates/menu.orig.js | 8 ++++++++ index.php | 13 +++++++++++++ js/title.js | 15 +++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 f_install/templates/menu.orig.js create mode 100644 js/title.js diff --git a/f_install/j_setup_db.php b/f_install/j_setup_db.php index 9db7c2a9..ad9b1f14 100644 --- a/f_install/j_setup_db.php +++ b/f_install/j_setup_db.php @@ -216,6 +216,13 @@ $result = Util::generateFileUsingSimpleTemplate( true ); +$result = Util::generateFileUsingSimpleTemplate( + __dir__.'/templates/menu.orig.js', + ROOT.'/d_shared/menu.js', + [], + true +); + if ($result !== true) { Json::die([ 'result'=>false, diff --git a/f_install/templates/menu.orig.js b/f_install/templates/menu.orig.js new file mode 100644 index 00000000..308daf9d --- /dev/null +++ b/f_install/templates/menu.orig.js @@ -0,0 +1,8 @@ +window.sammo_menu = [ + ['/bbs/board', '삼모게시판', '_blank'], + ['/bbs/tip', '팁/강좌', '_blank'], + ['/bbs/news', '삼국 일보', '_blank'], + ['/bbs/history2', '개인 열전', '_blank'], + ['/bbs/history3', '국가 열전', '_blank'], + ['/bbs/patch', '패치 내역', '_blank'] +]; \ No newline at end of file diff --git a/index.php b/index.php index 30eaadc3..c2f0cce0 100644 --- a/index.php +++ b/index.php @@ -29,7 +29,10 @@ if ($session->isLoggedIn()) { + + + +

삼국지 모의전투 HiDCHe

diff --git a/js/title.js b/js/title.js new file mode 100644 index 00000000..7fe5c47d --- /dev/null +++ b/js/title.js @@ -0,0 +1,15 @@ +jQuery(function($){ + $.each(window.sammo_menu, function(idx){ + var href = this[0]; + var name = this[1]; + var target = (this.length > 2)?this[2]:null; + + var $a = $('{1}'.format(href, name)); + if(target){ + $a.attr('target', target); + } + var $li = $('').append($a); + $('#navbarNav .navbar-nav').append($li); + console.log(this); + }); +}); \ No newline at end of file