Преглед изворни кода

Merge pull request #754 from 2du/master

버그 수정
잉여개발기 (SPDV) пре 6 година
родитељ
комит
601e26a875

+ 6 - 6
Dockerfile

@@ -3,12 +3,12 @@ FROM python:3.6.8-stretch
 MAINTAINER 2du <min08101@naver.com>
 MAINTAINER hoparkgo9ma <me@ho9.me>
 
-ENV NAMU_DB = data
-ENV NAMU_HOST = 0.0.0.0
-ENV NAMU_PORT = 3000
-ENV NAMU_LANG = en-US
-ENV NAMU_MARKUP = namumark
-ENV NAMU_ENCRYPT = sha3
+ENV NAMU_DB data
+ENV NAMU_HOST 0.0.0.0
+ENV NAMU_PORT 3000
+ENV NAMU_LANG en-US
+ENV NAMU_MARKUP namumark
+ENV NAMU_ENCRYPT sha3
 
 ADD . /app
 WORKDIR /app

+ 6 - 6
Dockerfile.arm32v7

@@ -3,12 +3,12 @@ FROM arm32v7/python:3.6.8-stretch
 MAINTAINER 2du <min08101@naver.com>
 MAINTAINER hoparkgo9ma <me@ho9.me>
 
-ENV NAMU_DB = data
-ENV NAMU_HOST = 0.0.0.0
-ENV NAMU_PORT = 3000
-ENV NAMU_LANG = en-US
-ENV NAMU_MARKUP = namumark
-ENV NAMU_ENCRYPT = sha3
+ENV NAMU_DB data
+ENV NAMU_HOST 0.0.0.0
+ENV NAMU_PORT 3000
+ENV NAMU_LANG en-US
+ENV NAMU_MARKUP namumark
+ENV NAMU_ENCRYPT sha3
 
 ADD . /app
 WORKDIR /app

+ 6 - 6
Dockerfile.arm64v8

@@ -3,12 +3,12 @@ FROM arm64v8/python:3.6.8-stretch
 MAINTAINER 2du <min08101@naver.com>
 MAINTAINER hoparkgo9ma <me@ho9.me>
 
-ENV NAMU_DB = data
-ENV NAMU_HOST = 0.0.0.0
-ENV NAMU_PORT = 3000
-ENV NAMU_LANG = en-US
-ENV NAMU_MARKUP = namumark
-ENV NAMU_ENCRYPT = sha3
+ENV NAMU_DB data
+ENV NAMU_HOST 0.0.0.0
+ENV NAMU_PORT 3000
+ENV NAMU_LANG en-US
+ENV NAMU_MARKUP namumark
+ENV NAMU_ENCRYPT sha3
 
 ADD . /app
 WORKDIR /app

+ 5 - 1
app.py

@@ -131,7 +131,7 @@ if setup_tool != 0:
     create_data['filter'] = ['name', 'regex', 'sub']
     create_data['scan'] = ['user', 'title']
     create_data['acl'] = ['title', 'decu', 'dis', 'view', 'why']
-    create_data['inter'] = ['title', 'link']
+    create_data['inter'] = ['title', 'link', 'icon']
     create_data['html_filter'] = ['html', 'kind', 'plus']
     create_data['oauth_conn'] = ['provider', 'wiki_id', 'sns_id', 'name', 'picture']
 
@@ -587,6 +587,10 @@ def api_user_info(name = ''):
 @app.route('/api/topic/<everything:name>/sub/<sub>')
 def api_topic_sub(name = '', sub = '', time = ''):
     return api_topic_sub_2(conn, name, sub, time)
+
+@app.route('/api/search/<name>')
+def api_search(name = ''):
+    return api_search_2(conn, name)
     
 # File
 @app.route('/views/easter_egg.html')

+ 2 - 0
language/en-US.json

@@ -26,6 +26,7 @@
         "document" : "Document",
         "discussion" : "Discussion",
         "backlink" : "Backlink",
+        "link" : "Link",
         "closed" : "Closed",
         "reload" : "Reload",
         "send" : "Send",
@@ -91,6 +92,7 @@
         "markup" : "Markup",
         "title" : "Title",
         "reference" : "Reference",
+        "icon" : "Icon",
         "_comment_1.1_" : "Time",
             "second" : "Second(s)",
             "hour" : "Hour(s)",

+ 6 - 4
language/ko-KR.json

@@ -158,7 +158,7 @@
     "admin": "관리자",
     "edit_filter_list": "편집 필터 목록",
     "wiki_skin": "위키 스킨",
-    "admin_group" : "관리자 그룹",
+    "admin_group": "관리자 그룹",
     "all": "전체",
     "skin_error": "이 스킨은 설정을 지원하지 않습니다.",
     "member": "가입자",
@@ -291,7 +291,9 @@
     "direct_input": "직접 입력",
     "acl_record": "ACL 기록",
     "main_bottom_body": "본문 하단",
-    "reference" : "참고",
-    "owner_acl" : "소유자만",
-    "last_edit_time" : "최근 수정 시각"
+    "reference": "참고",
+    "owner_acl": "소유자만",
+    "last_edit_time": "최근 수정 시각",
+    "link": "링크",
+    "icon": "아이콘"
 }

+ 23 - 0
route/api_search.py

@@ -0,0 +1,23 @@
+from .tool.func import *
+
+def api_search_2(conn, name):
+    curs = conn.cursor()
+
+    num = int(number_check(flask.request.args.get('num', '1')))
+    if not num > 0:
+        num = 1
+
+    if num > 1000:
+        num = 1
+
+    curs.execute("" + \
+        "select distinct title, case when title like ? then 'title' else 'data' " + \
+        "end from data where title like ? or data like ? order by case " + \
+        "when title like ? then 1 else 2 end limit ?",
+        ['%' + name + '%', '%' + name + '%', '%' + name + '%', '%' + name + '%', str(num)]
+    )
+    all_list = curs.fetchall()
+    if all_list:
+        return flask.jsonify(all_list)
+    else:
+        return flask.jsonify({})

+ 8 - 2
route/inter_wiki_plus.py

@@ -5,7 +5,11 @@ def inter_wiki_plus_2(conn, tools, name):
     
     if flask.request.method == 'POST':
         if tools == 'plus_inter_wiki':
-            curs.execute('insert into inter (title, link) values (?, ?)', [flask.request.form.get('title', None), flask.request.form.get('link', None)])
+            curs.execute('insert into inter (title, link, icon) values (?, ?, ?)', [
+                flask.request.form.get('title', None), 
+                flask.request.form.get('link', None),
+                flask.request.form.get('icon', None)
+            ])
             
             admin_check(None, 'inter_wiki_plus')
         elif tools == 'plus_edit_filter':
@@ -78,7 +82,9 @@ def inter_wiki_plus_2(conn, tools, name):
             form_data = '''
                 <input placeholder="''' + load_lang('name') + '''" type="text" name="title">
                 <hr class=\"main_hr\">
-                <input placeholder="link" type="text" name="link">
+                <input placeholder="''' + load_lang('link') + '''" type="text" name="link">
+                <hr class=\"main_hr\">
+                <input placeholder="''' + load_lang('icon') + ''' (HTML)" type="text" name="icon">
             '''
         elif tools == 'plus_edit_filter':
             curs.execute("select regex, sub from filter where name = ?", [name])

+ 1 - 1
route/search_deep.py

@@ -34,7 +34,7 @@ def search_deep_2(conn, name):
             '''
 
     curs.execute("" + \
-        "select distinct title, case when title like ? then '제목' else '내용' " + \
+        "select distinct title, case when title like ? then 'title' else 'data' " + \
         "end from data where title like ? or data like ? order by case " + \
         "when title like ? then 1 else 2 end limit ?, '50'",
         ['%' + name + '%', '%' + name + '%', '%' + name + '%', '%' + name + '%', str(sql_num)]

+ 4 - 2
route/tool/func.py

@@ -348,7 +348,7 @@ def ip_warring():
     return text_data
 
 def skin_check(set_n = 0):
-    skin = 'neo_yousoro'
+    skin = 'marisa'
 
     curs.execute('select data from other where name = "skin"')
     skin_exist = curs.fetchall()
@@ -694,7 +694,7 @@ def load_skin(data = '', set_n = 0):
             curs.execute('select data from other where name = "skin"')
             data = curs.fetchall()
             if not data:
-                data = [['neo_yousoro']]
+                data = [['marisa']]
 
         if set_n == 0:
             for skin_data in os.listdir(os.path.abspath('views')):
@@ -1068,6 +1068,8 @@ def re_error(data):
                 data = load_lang('authority_error')
             elif num == 4:
                 data = load_lang('no_admin_block_error')
+            elif num == 5:
+                data = load_lang('skin_error')
             elif num == 6:
                 data = load_lang('same_id_exist_error')
             elif num == 7:

+ 42 - 3
route/tool/set_mark/namu.py

@@ -25,6 +25,8 @@ def table_parser(data, cel_data, start_data, num = 0):
             all_table += 'height: ' + table_height.groups()[0] + 'px;'
         else:
             all_table += 'height: ' + table_height.groups()[0] + ';'
+
+    # width, height
     
     table_align = re.search("&lt;table ?align=((?:(?!&gt;).)*)&gt;", data)
     if table_align:
@@ -50,6 +52,8 @@ def table_parser(data, cel_data, start_data, num = 0):
             row_style += 'text-align: center;'
         else:
             row_style += 'text-align: left;'
+        
+    # align
     
     table_cel = re.search("&lt;-((?:(?!&gt;).)*)&gt;", data)
     if table_cel:
@@ -61,9 +65,17 @@ def table_parser(data, cel_data, start_data, num = 0):
     if table_row:
         row = 'rowspan="' + table_row.groups()[0] + '"'
 
+    # <>
+
     row_bgcolor = re.search("&lt;rowbgcolor=(#(?:[0-9a-f-A-F]{3}){1,2}|\w+)&gt;", data)
     if row_bgcolor:
         row_style += 'background: ' + row_bgcolor.groups()[0] + ';'
+
+    row_bgcolor = re.search("&lt;rowcolor=(#(?:[0-9a-f-A-F]{3}){1,2}|\w+)&gt;", data)
+    if row_bgcolor:
+        row_style += 'color: ' + row_bgcolor.groups()[0] + ';'
+
+    # row
         
     table_border = re.search("&lt;table ?bordercolor=(#(?:[0-9a-f-A-F]{3}){1,2}|\w+)&gt;", data)
     if table_border:
@@ -72,10 +84,20 @@ def table_parser(data, cel_data, start_data, num = 0):
     table_bgcolor = re.search("&lt;table ?bgcolor=(#(?:[0-9a-f-A-F]{3}){1,2}|\w+)&gt;", data)
     if table_bgcolor:
         all_table += 'background: ' + table_bgcolor.groups()[0] + ';'
+
+    table_bgcolor = re.search("&lt;table ?color=(#(?:[0-9a-f-A-F]{3}){1,2}|\w+)&gt;", data)
+    if table_bgcolor:
+        all_table += 'color: ' + table_bgcolor.groups()[0] + ';'
+
+    # all
         
     bgcolor = re.search("&lt;(?:bgcolor=)?(#(?:[0-9a-f-A-F]{3}){1,2}|\w+)&gt;", data)
     if bgcolor:
         cel_style += 'background: ' + bgcolor.groups()[0] + ';'
+
+    bgcolor = re.search("&lt;color=(#(?:[0-9a-f-A-F]{3}){1,2}|\w+)&gt;", data)
+    if bgcolor:
+        cel_style += 'color: ' + bgcolor.groups()[0] + ';'
         
     cel_width = re.search("&lt;width=((?:(?!&gt;).)*)&gt;", data)
     if cel_width:
@@ -90,6 +112,8 @@ def table_parser(data, cel_data, start_data, num = 0):
             cel_style += 'height: ' + cel_height.groups()[0] + 'px;'
         else:
             cel_style += 'height: ' + cel_height.groups()[0] + ';'
+
+    # cel
         
     text_right = re.search("&lt;\)&gt;", data)
     text_center = re.search("&lt;:&gt;", data)
@@ -831,13 +855,28 @@ def namu(conn, data, title, main_num, include_num):
                 inter_data = re.search('^inter:((?:(?!:).)+):((?:(?!\]\]|\|).)+)', main_link)
                 inter_data = inter_data.groups()
 
-                curs.execute('select link from inter where title = ?', [inter_data[0]])
+                curs.execute('select link, icon from inter where title = ?', [inter_data[0]])
                 inter = curs.fetchall()
                 if inter:
+                    if inter[0][1] != '':
+                        inter_view = inter[0][1]
+                    else:
+                        inter_view = inter_data[0] + ':'
+
                     if see_link != main_link:
-                        data = re.sub('\[\[((?:(?!\[\[|\]\]).)+)\]\]', '<a id="inside" href="' + inter[0][0] + inter_data[1] + '">' + inter_data[0] + ':' + see_link + '</a>', data, 1)
+                        data = re.sub(
+                            '\[\[((?:(?!\[\[|\]\]).)+)\]\]',
+                            '<a id="inside" href="' + inter[0][0] + inter_data[1] + '">' + inter_view + see_link + '</a>',
+                            data, 
+                            1
+                        )
                     else:
-                        data = re.sub('\[\[((?:(?!\[\[|\]\]).)+)\]\]', '<a id="inside" href="' + inter[0][0] + inter_data[1] + '">' + inter_data[0] + ':' + inter_data[1] + '</a>', data, 1)
+                        data = re.sub(
+                            '\[\[((?:(?!\[\[|\]\]).)+)\]\]',
+                            '<a id="inside" href="' + inter[0][0] + inter_data[1] + '">' + inter_view + inter_data[1] + '</a>', 
+                            data, 
+                            1
+                        )
                 else:
                     data = re.sub('\[\[((?:(?!\[\[|\]\]).)+)\]\]', 'Not exist', data, 1)
             elif re.search('^\/', main_link):

+ 4 - 4
version.json

@@ -1,11 +1,11 @@
 {
     "master" : {
-        "r_ver" : "v3.1.3-stable-02",
-        "c_ver" : "400003",
+        "r_ver" : "v3.1.3-stable-03",
+        "c_ver" : "400004",
         "s_ver" : "3"
     }, "stable" : {
-        "r_ver" : "v3.1.3-stable-02",
-        "c_ver" : "400003",
+        "r_ver" : "v3.1.3-stable-03",
+        "c_ver" : "400004",
         "s_ver" : "3"
     }
 }

+ 2 - 2
views/main_css/js/load_include.js

@@ -8,8 +8,8 @@ function load_include(title, name, p_data) {
     xhr.send(null);
 
     xhr.onreadystatechange = function() {
-        if(xhr.readyState === 4 && xhr.status === 200) {
-            var o_p_data = JSON.parse(xhr.responseText);
+        if(this.readyState === 4 && this.status === 200) {
+            var o_p_data = JSON.parse(this.responseText);
             var g_data = o_p_data['data'];
             
             for(key in p_data) {

+ 29 - 29
views/neo_yousoro/LICENSE → views/marisa/LICENSE

@@ -1,29 +1,29 @@
-BSD 3-Clause License
-
-Copyright (c) 2018, Surplus_Up (2DU)
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-  list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-
-* Neither the name of the copyright holder nor the names of its
-  contributors may be used to endorse or promote products derived from
-  this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+BSD 3-Clause License
+
+Copyright (c) 2018, Surplus_Up (2DU)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 2 - 0
views/marisa/README.md

@@ -0,0 +1,2 @@
+## 개요
+오픈나무 공식 스킨 입니다. Nitori 스킨이랑 자매 관계 입니다.

+ 431 - 412
views/neo_yousoro/css/main.css → views/marisa/css/main.css

@@ -1,413 +1,432 @@
-body {
-    max-width: 100%;
-    word-break: break-all;
-    word-wrap: break-word;
-    margin: 0;
-    font-family: "나눔고딕", "nanumgothic", "Nanum Gothic", "KoPub Dotum", "Malgun Gothic", "맑은 고딕", "sans-serif";
-}
-
-ul {
-    padding: 0;
-    padding-left: 10px;
-}
-
-input {
-    padding: 5px;
-}
-
-select {
-    padding: 5px;
-}
-
-hr {
-    border: 0;
-    border-top: 1px solid gainsboro;
-}
-
-button {
-    padding: 10px;
-    border: 2px solid gainsboro;
-    background: white;
-    cursor: pointer;
-}
-
-code {
-    background: gainsboro;
-}
-
-td {
-    border: 1px solid gainsboro;
-}
-
-li {
-    margin-left: 20px;
-}
-
-#background {
-    background: gainsboro;
-}
-
-#top {
-    width: 100%;
-    background: #4a4a4a;
-    padding: 15px;
-    padding-right: 0;
-    padding-left: 0;
-    position: relative;
-    top: 0;
-    left: 0;
-    height: 20px;
-}
-
-#main {
-    margin: auto;
-    margin-top: -20px;
-    padding: 20px;
-    padding-bottom: 20px;
-    background: white;
-    min-height: 350px;
-}
-
-#bottom {
-    width: 100%;
-    background: white;
-    padding-bottom: 20px;
-}
-
-#top_main {
-    margin: auto;
-}
-
-#bottom_main {
-    margin: auto;
-    margin-top: 20px;
-}
-
-#tool {
-    float: right;
-    border: 2px solid gainsboro;
-    padding: 10px;
-    border-radius: 10px;
-}
-
-@media (min-width: 780px) and (max-width: 1350px) {
-    #main {
-        width: 90%;
-    }
-
-    #top_main {
-        width: 90%;
-    }
-
-    #bottom_main {
-        width: 90%;
-    }
-
-    .is_mobile {
-        display: none;
-    }
-}
-
-
-@media (min-width: 1350px) and (max-width: 1590px) {
-    #main {
-        width: 70%;
-    }
-
-    #top_main {
-        width: 70%;
-    }
-
-    #bottom_main {
-        width: 70%;
-    }
-
-    .is_mobile {
-        display: none;
-    }
-}
-
-@media (min-width: 1590px) {
-    #main {
-        width: 55%;
-    }
-
-    #top_main {
-        width: 55%;
-    }
-
-    #bottom_main {
-        width: 55%;
-    }
-
-    .is_mobile {
-        display: none;
-    }
-}
-
-@media (max-width: 780px) {
-    #main {
-        width: 90%;
-        border-left: none;
-        border-right: none;
-    }
-
-    #top_main {
-        width: 90%;
-    }
-
-    #bottom_main {
-        width: 90%;
-    }
-
-    .not_mobile {
-        display: none;
-    }
-
-    #tool {
-        float: none;
-        width: 90%;
-        margin-bottom: 10px;
-    }
-}
-
-h1 {
-    border-bottom: 1px solid gainsboro;
-    padding-bottom: 10px;
-}
-
-h2 {
-    border-bottom: 1px solid gainsboro;
-    padding-bottom: 10px;
-}
-
-h3 {
-    border-bottom: 1px solid gainsboro;
-    padding-bottom: 10px;
-}
-
-h4 {
-    border-bottom: 1px solid gainsboro;
-    padding-bottom: 10px;
-}
-
-h5 {
-    border-bottom: 1px solid gainsboro;
-    padding-bottom: 10px;
-}
-
-h6 {
-    border-bottom: 1px solid gainsboro;
-    padding-bottom: 10px;
-}
-
-#tool_cel {
-    display: inline-block;
-}
-
-#main_top {
-    width: 100%;
-}
-
-#logo {
-    display: inline-block;
-}
-
-#top_tool {
-    float: right;
-    color: white;
-    margin-top: -5px;
-}
-
-.cel_in_cel {
-    border: 2px solid gainsboro;
-    padding: 10px;
-    position: absolute;
-    background: white;
-    margin-top: 10px;
-    border-radius: 10px;
-}
-
-#top_tool_cel {
-    display: inline-block;
-}
-
-#search {
-    display: inline-block;
-    width: 300px;
-}
-
-#mobile_search {
-    width: 100%;
-}
-
-#search_input {
-    width: 80%;
-    border: 1px solid #4a4a4a;
-    border-radius: 10px;
-}
-
-#search button {
-    padding: 0;
-    border: none;
-    background: transparent;
-    color: white;
-}
-
-#mobile_search button {
-    padding: 0;
-    border: none;
-    background: transparent;
-}
-
-#mobile_button_first {
-    margin-top: 10px;
-}
-
-#top_tool_mobile {
-    float: right;
-}
-
-#mobile_menu {
-    width: 200px;
-    height: 100%;
-    position: fixed;
-    top: 0;
-    right: 0;
-    background: white;
-    border-left: 2px solid gainsboro;
-    z-index: 1;
-}
-
-#mobile_menu_main {
-    width: 90%;
-    margin: auto;
-    margin-top: 5%;
-}
-
-#toc {
-    max-width: 300px;
-}
-
-#top a {
-    color: white;
-}
-
-#top .cel_in_cel a {
-    color: black;
-}
-
-a {
-    color: dodgerblue;
-}
-
-#syntax {
-    background: #f0f0f0;
-    padding: 5px;
-    border-radius: 10px;
-}
-
-pre {
-    border: 2px solid gainsboro;
-    border-radius: 10px;
-}
-
-textarea {
-    border: 2px solid gainsboro;
-    font-family: '나눔고딕', 'nanumgothic', "Nanum Gothic","KoPub Dotum","Malgun Gothic","맑은 고딕",sans-serif;
-    padding: 0;
-}
-
-input {
-    border: 2px solid gainsboro;
-    font-family: '나눔고딕', 'nanumgothic', "Nanum Gothic","KoPub Dotum","Malgun Gothic","맑은 고딕",sans-serif;
-}
-
-#toc {
-    border: 2px solid gainsboro;
-    border-radius: 10px;
-}
-
-#cate {
-    border: 2px solid gainsboro;
-    border-radius: 10px;
-}
-
-#syntax code {
-    background: transparent;
-}
-
-#redirect {
-    border: 2px solid gainsboro;
-    border-radius: 10px;
-}
-
-#go_toc {
-    display: inline-block;
-    padding: 10px;
-    width: 25px;
-}
-
-#go_top {
-    display: inline-block;
-    padding: 10px;
-    width: 25px;
-}
-
-#go_bottom {
-    display: inline-block;
-    padding-left: 5px;
-    padding-right: 5px;
-    width: 25px;
-}
-
-#nav_bar {
-    font-size: 24px;
-    position: fixed;
-    bottom: 0;
-    right: 0;
-    border: 2px solid #4a4a4a;
-    background: #4a4a4a;
-    text-align: center;
-    border-radius: 10px 0px 0px 0px;
-}
-
-#nav_bar a {
-    color: white;
-}
-
-blockquote {
-    padding: 1em calc(2em + 25px) 1em 1em;
-    margin: 1em 0em 0em;
-    background: #eeeeee;
-    border: 2px dashed #ccc;
-    border-left: 5px solid black;
-}
-
-#out_link::before {
-    font-family: "Font Awesome 5 Free";
-    content: "\f360";
-    font-weight: 900;
-    background: transparent;
-    color: green;
-}
-
-a:hover {
-    text-decoration: underline;
-}
-
-#mobile_menu a:hover, #top a:hover {
-    text-decoration: none;
-}
-
-h1#title {
-    margin-bottom: 10px;
-}
-
-div#last_edit {
-    margin-bottom: 20px;
-}
-
-#topic_color {
-    color: limegreen;
+body {
+    max-width: 100%;
+    word-break: break-all;
+    word-wrap: break-word;
+    margin: 0;
+    font-family: "나눔고딕", "nanumgothic", "Nanum Gothic", "KoPub Dotum", "Malgun Gothic", "맑은 고딕", "sans-serif";
+}
+
+ul {
+    padding: 0;
+    padding-left: 10px;
+}
+
+input {
+    padding: 5px;
+}
+
+select {
+    padding: 5px;
+}
+
+hr {
+    border: 0;
+    border-top: 1px solid gainsboro;
+}
+
+button {
+    padding: 10px;
+    border: 2px solid gainsboro;
+    background: white;
+    cursor: pointer;
+}
+
+code {
+    background: gainsboro;
+}
+
+td {
+    border: 1px solid gainsboro;
+}
+
+li {
+    margin-left: 20px;
+}
+
+#background {
+    background: gainsboro;
+}
+
+#top {
+    width: 100%;
+    background: #4a4a4a;
+    padding: 15px;
+    padding-right: 0;
+    padding-left: 0;
+    position: relative;
+    top: 0;
+    left: 0;
+    height: 20px;
+}
+
+#main {
+    margin: auto;
+    margin-top: -20px;
+    padding: 20px;
+    padding-bottom: 20px;
+    background: white;
+    min-height: 350px;
+}
+
+#bottom {
+    width: 100%;
+    background: white;
+    padding-bottom: 20px;
+}
+
+#top_main {
+    margin: auto;
+}
+
+#bottom_main {
+    margin: auto;
+    margin-top: 20px;
+}
+
+#tool {
+    float: right;
+    border: 2px solid gainsboro;
+    padding: 10px;
+    border-radius: 10px;
+}
+
+@media (min-width: 780px) and (max-width: 1350px) {
+    #main {
+        width: 90%;
+    }
+
+    #top_main {
+        width: 90%;
+    }
+
+    #bottom_main {
+        width: 90%;
+    }
+
+    .is_mobile {
+        display: none;
+    }
+}
+
+
+@media (min-width: 1350px) and (max-width: 1590px) {
+    #main {
+        width: 70%;
+    }
+
+    #top_main {
+        width: 70%;
+    }
+
+    #bottom_main {
+        width: 70%;
+    }
+
+    .is_mobile {
+        display: none;
+    }
+}
+
+@media (min-width: 1590px) {
+    #main {
+        width: 55%;
+    }
+
+    #top_main {
+        width: 55%;
+    }
+
+    #bottom_main {
+        width: 55%;
+    }
+
+    .is_mobile {
+        display: none;
+    }
+}
+
+@media (max-width: 780px) {
+    #main {
+        width: 90%;
+        border-left: none;
+        border-right: none;
+    }
+
+    #top_main {
+        width: 90%;
+    }
+
+    #bottom_main {
+        width: 90%;
+    }
+
+    .not_mobile {
+        display: none;
+    }
+
+    #tool {
+        float: none;
+        width: 90%;
+        margin-bottom: 10px;
+    }
+}
+
+h1 {
+    border-bottom: 1px solid gainsboro;
+    padding-bottom: 10px;
+}
+
+h2 {
+    border-bottom: 1px solid gainsboro;
+    padding-bottom: 10px;
+}
+
+h3 {
+    border-bottom: 1px solid gainsboro;
+    padding-bottom: 10px;
+}
+
+h4 {
+    border-bottom: 1px solid gainsboro;
+    padding-bottom: 10px;
+}
+
+h5 {
+    border-bottom: 1px solid gainsboro;
+    padding-bottom: 10px;
+}
+
+h6 {
+    border-bottom: 1px solid gainsboro;
+    padding-bottom: 10px;
+}
+
+#tool_cel {
+    display: inline-block;
+}
+
+#main_top {
+    width: 100%;
+}
+
+#logo {
+    display: inline-block;
+}
+
+#top_tool {
+    float: right;
+    color: white;
+    margin-top: -5px;
+}
+
+.cel_in_cel {
+    border: 2px solid gainsboro;
+    padding: 10px;
+    position: absolute;
+    background: white;
+    margin-top: 10px;
+    border-radius: 10px;
+}
+
+#top_tool_cel {
+    display: inline-block;
+}
+
+#search {
+    display: inline-block;
+    width: 300px;
+}
+
+#mobile_search {
+    width: 100%;
+}
+
+#search_input {
+    width: 220px;
+    border-radius: 10px;
+}
+
+div#pre_search {
+    padding: 10px;
+    border: 2px solid #4a4a4a;
+    width: 200px;
+    color: black;
+    margin-top: 5px;
+    background: white;
+    border-radius: 10px;
+    position: absolute;
+}
+
+div#pre_search a {
+    color: dodgerblue;
+}
+
+#search button {
+    padding: 0;
+    border: none;
+    background: transparent;
+    color: white;
+}
+
+#mobile_search button {
+    padding: 0;
+    border: none;
+    background: transparent;
+}
+
+#mobile_button_first {
+    margin-top: 10px;
+}
+
+#top_tool_mobile {
+    float: right;
+}
+
+#mobile_menu {
+    width: 200px;
+    height: 100%;
+    position: fixed;
+    top: 0;
+    right: 0;
+    background: white;
+    border-left: 2px solid gainsboro;
+    z-index: 1;
+    overflow-y: scroll;
+}
+
+#mobile_menu button {
+    color: dodgerblue;
+}
+
+#mobile_menu_main {
+    width: 90%;
+    margin: auto;
+    margin-top: 5%;
+}
+
+#toc {
+    max-width: 300px;
+}
+
+#top a {
+    color: white;
+}
+
+#top .cel_in_cel a {
+    color: black;
+}
+
+a {
+    color: dodgerblue;
+}
+
+#syntax {
+    background: #f0f0f0;
+    padding: 5px;
+    border-radius: 10px;
+}
+
+pre {
+    border: 2px solid gainsboro;
+    border-radius: 10px;
+}
+
+textarea {
+    border: 2px solid gainsboro;
+    font-family: '나눔고딕', 'nanumgothic', "Nanum Gothic","KoPub Dotum","Malgun Gothic","맑은 고딕",sans-serif;
+    padding: 0;
+}
+
+input {
+    border: 2px solid gainsboro;
+    font-family: '나눔고딕', 'nanumgothic', "Nanum Gothic","KoPub Dotum","Malgun Gothic","맑은 고딕",sans-serif;
+}
+
+#toc {
+    border: 2px solid gainsboro;
+    border-radius: 10px;
+}
+
+#cate {
+    border: 2px solid gainsboro;
+    border-radius: 10px;
+}
+
+#syntax code {
+    background: transparent;
+}
+
+#redirect {
+    border: 2px solid gainsboro;
+    border-radius: 10px;
+}
+
+#go_toc {
+    display: inline-block;
+    padding: 10px;
+    width: 25px;
+}
+
+#go_top {
+    display: inline-block;
+    padding: 10px;
+    width: 25px;
+}
+
+#go_bottom {
+    display: inline-block;
+    padding-left: 5px;
+    padding-right: 5px;
+    width: 25px;
+}
+
+#nav_bar {
+    font-size: 24px;
+    position: fixed;
+    bottom: 0;
+    right: 0;
+    border: 2px solid #4a4a4a;
+    background: #4a4a4a;
+    text-align: center;
+    border-radius: 10px 0px 0px 0px;
+}
+
+#nav_bar a {
+    color: white;
+}
+
+blockquote {
+    padding: 1em calc(2em + 25px) 1em 1em;
+    margin: 1em 0em 0em;
+    background: #eeeeee;
+    border: 2px dashed #ccc;
+    border-left: 5px solid black;
+}
+
+#out_link::before {
+    font-family: "Font Awesome 5 Free";
+    content: "\f360";
+    font-weight: 900;
+    background: transparent;
+    color: green;
+}
+
+a:hover {
+    text-decoration: underline;
+}
+
+#mobile_menu a:hover, #top a:hover {
+    text-decoration: none;
+}
+
+h1#title {
+    margin-bottom: 10px;
+}
+
+div#last_edit {
+    margin-bottom: 20px;
+}
+
+#topic_color {
+    color: limegreen;
 }

+ 206 - 203
views/neo_yousoro/index.html → views/marisa/index.html

@@ -1,204 +1,207 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <meta charset="utf-8">
-        <title>{{imp[0]}} - {{imp[1][0]}}</title>
-        {{imp[3][3]|safe}}
-        <link rel="stylesheet" href="/views/neo_yousoro/css/main.css?ver=3">
-        <script src="/views/neo_yousoro/js/main.js?ver=1"></script>
-        <script src="/views/neo_yousoro/js/skin_set.js?ver=1"></script>
-        <link   rel="stylesheet"
-                href="https://use.fontawesome.com/releases/v5.7.2/css/all.css"
-                integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
-                crossorigin="anonymous">
-        <link rel="shortcut icon" href="/views/main_css/file/favicon.ico?ver=1">
-        {{imp[1][5]|safe}}
-        {{imp[2][3]|safe}}
-        <meta name="title" content="{{imp[0]}} - {{imp[1][0]}}">
-        <meta name="keywords" content="{{imp[1][0]}}">
-        <meta name="description" content="{{data|cut_100}}">
-        <meta name="viewport" content="width=device-width, initial-scale=1">
-    </head>
-    <body>
-        <div id="background">
-            <div id="top">
-                <div id="top_main">
-                    <div id="logo">
-                        <a href="/">{{imp[1][4]|safe}}</a>
-                    </div>
-                    <div id="top_tool" class="not_mobile">
-                        <div id="top_tool_cel">
-                            <a href="javascript:void(0);" onclick="opening('recent_cel');">
-                                <i class="fas fa-exclamation-circle"></i>
-                                {{'recent'|load_lang}}
-                                <i class="fas fa-angle-down"></i>
-                            </a>
-                            <div id="recent_cel" class="cel_in_cel" style="display: none;">
-                                <a href="/recent_changes">
-                                    <i class="fas fa-sync-alt"></i>
-                                    {{'edit'|load_lang}}
-                                </a>
-                                <hr>
-                                <a href="/recent_discuss">
-                                    <i class="fas fa-comment"></i>
-                                    {{'discussion'|load_lang}}
-                                </a>
-                            </div>
-                        </div>
-                         
-                        <div id="top_tool_cel">
-                            <a href="javascript:void(0);" onclick="opening('other_cel');">
-                                <i class="fas fa-plus-circle"></i>
-                                {{'other'|load_lang}}
-                                <i class="fas fa-angle-down"></i>
-                            </a>
-                            <div id="other_cel" class="cel_in_cel" style="display: none;">
-                                <a href="/random">
-                                    <i class="fas fa-random"></i>
-                                    {{'random'|load_lang}}
-                                </a>
-                                <hr>
-                                <a href="/other">
-                                    <i class="fas fa-wrench"></i>
-                                    {{'tool'|load_lang}}
-                                </a>
-                                <hr>
-                                <a href="/skin_set">
-                                    <i class="fas fa-cog"></i>
-                                    {{'skin_setting'|load_lang}}
-                                </a>
-                            </div>
-                        </div>
-                         
-                        <div id="top_tool_cel">
-                            <a href="/user">
-                                {% if imp[2][2] == 1 %}
-                                    {% if imp[2][8] != 0 %}
-                                        <i class="fas fa-user-secret"></i>
-                                    {% else %}
-                                        <i class="fas fa-user"></i>
-                                    {% endif %}
-                                {% else %}
-                                    <i class="fas fa-user-times"></i>
-                                {% endif %}
-                                {{imp[2][5]}}
-                            </a>
-                        </div>
-                         
-                        <form method="post" action="/search" id="search" role="search">
-                            <input id="search_input" name="search" placeholder="{{'search'|load_lang}}" autocomplete="off" type="search">
-                            |
-                            <button type="submit" formaction="/goto"><i class="fas fa-sign-in-alt"></i></button>
-                            |
-                            <button type="submit" formaction="/search"><i class="fas fa-search"></i></button>
-                        </form>
-                    </div>
-                    <div id="top_tool_mobile" class="is_mobile">
-                        <a href="javascript:void(0);" onclick="opening('mobile_menu');">
-                            <i class="fas fa-bars"></i> {{'tool'|load_lang}}
-                        </a>
-                    </div>
-                </div>
-            </div>
-            <div id="mobile_menu" class="is_mobile" style="display: none;">
-                <div id="mobile_menu_main">
-                    <form method="post" action="/search" id="mobile_search" role="search">
-                        <input id="mobile_search_input" name="search" placeholder="{{'search'|load_lang}}" autocomplete="off" type="search">
-                        <br>
-                        <button id="mobile_button_first" type="submit" formaction="/goto"><i class="fas fa-sign-in-alt"></i></button>
-                        |
-                        <button type="submit" formaction="/search"><i class="fas fa-search"></i></button>
-                        |
-                        <a href="javascript:void(0);" onclick="opening('mobile_menu');">
-                            <i class="fas fa-bars"></i>
-                        </a>
-                    </form>
-                    <h2>{{'recent'|load_lang}}</h2>
-                    <li><a href="/recent_changes">{{'edit'|load_lang}}</a></li>
-                    <li><a href="/recent_discuss">{{'discussion'|load_lang}}</a></li>
-                    <h2>{{'other'|load_lang}}</h2>
-                    <li><a href="/random">{{'random'|load_lang}}</a></li>
-                    <li><a href="/other">{{'tool'|load_lang}}</a></li>
-                    <li><a href="/skin_set">{{'skin_setting'|load_lang}}</a></li>
-                    <h2>{{'user'|load_lang}}</h2>
-                    <li><a href="/user">{{imp[2][5]}}</a></li>
-                </div>
-            </div>
-            <div id="main">
-                <div id="main_top">
-                    {% if menu != 0 %}
-                        <div id="tool" class="not_mobile">
-                            {% for sub_d in menu %}
-                                <div id="tool_cel">
-                                    {% if sub_d|length > 2 and sub_d[2] == 1 %}
-                                        <a class="menu-item" href="/{{sub_d[0]}}" id="topic_color">{{sub_d[1]}}</a>
-                                    {% else %}
-                                        <a class="menu-item" href="/{{sub_d[0]}}">{{sub_d[1]}}</a>
-                                    {% endif %}
-                                </div>
-                                {% if menu[loop.index] %}
-                                    |
-                                {% endif %}
-                            {% endfor %}
-                        </div>
-                    {% endif %}
-                    <h1 id="title">
-                        {{imp[0]}}
-                        {% if imp[3][0] != 0 %}
-                            <sub>{{imp[3][0]}}</sub>
-                        {% endif %}
-                    </h1>
-                    <div id="last_edit">
-                        {% if imp[3][1] != 0 %}
-                            {{'last_edit_time'|load_lang}} : {{imp[3][1]}}
-                        {% endif %}
-                    </div>
-                    {% if menu != 0 %}
-                        <div id="tool" class="is_mobile">
-                            {% for sub_d in menu %}
-                                <div id="tool_cel">
-                                    {% if sub_d|length > 2 and sub_d[2] == 1 %}
-                                        <a class="menu-item" href="/{{sub_d[0]}}" id="topic_color">{{sub_d[1]}}</a>
-                                    {% else %}
-                                        <a class="menu-item" href="/{{sub_d[0]}}">{{sub_d[1]}}</a>
-                                    {% endif %}
-                                </div>
-                                {% if menu[loop.index] %}
-                                    |
-                                {% endif %}
-                            {% endfor %}
-                        </div>
-                    {% endif %}
-                </div>
-                <div id="main_data">
-                    {{data|safe}}
-                </div>
-            </div>
-        </div>
-        <div id="bottom">
-            <div id="bottom_main">
-                {{imp[1][1]|safe}}
-                <br>
-                <br>
-                <a href="https://github.com/2du/openNAMU"><img id="b_logo" src="/views/main_css/file/s_logo.png"></a>
-            </div>
-        </div>
-        <div id="nav_bar">
-            <div id="go_top">
-                <a href="#top">
-                    <i class="fas fa-arrow-up"></i>  
-                </a>                  
-            </div>
-            <div id="go_bottom">
-                <a href="#bottom">
-                    <i class="fas fa-arrow-down"></i>
-                </a>
-            </div>
-            <div id="go_toc">
-                <a href="#toc">
-                    <i class="fas fa-list"></i>
-                </a>
-            </div>                                    
-        </div>
-    </body>
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta charset="utf-8">
+        <title>{{imp[0]}} - {{imp[1][0]}}</title>
+        {{imp[3][3]|safe}}
+        <link rel="stylesheet" href="/views/marisa/css/main.css?ver=3">
+        <script src="/views/marisa/js/search.js?ver=1"></script>
+        <script src="/views/marisa/js/skin_set.js?ver=2"></script>
+        <script src="/views/marisa/js/main.js?ver=1"></script>
+        <script>window.onload = function () { search_do(); skin_set(); }</script>
+        <link   rel="stylesheet"
+                href="https://use.fontawesome.com/releases/v5.7.2/css/all.css"
+                integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr"
+                crossorigin="anonymous">
+        <link rel="shortcut icon" href="/views/main_css/file/favicon.ico?ver=1">
+        {{imp[1][5]|safe}}
+        {{imp[2][3]|safe}}
+        <meta name="title" content="{{imp[0]}} - {{imp[1][0]}}">
+        <meta name="keywords" content="{{imp[1][0]}}">
+        <meta name="description" content="{{data|cut_100}}">
+        <meta name="viewport" content="width=device-width, initial-scale=1">
+    </head>
+    <body>
+        <div id="background">
+            <div id="top">
+                <div id="top_main">
+                    <div id="logo">
+                        <a href="/">{{imp[1][4]|safe}}</a>
+                    </div>
+                    <div id="top_tool" class="not_mobile">
+                        <div id="top_tool_cel">
+                            <a href="javascript:void(0);" onclick="opening('recent_cel');">
+                                <i class="fas fa-exclamation-circle"></i>
+                                {{'recent'|load_lang}}
+                                <i class="fas fa-angle-down"></i>
+                            </a>
+                            <div id="recent_cel" class="cel_in_cel" style="display: none;">
+                                <a href="/recent_changes">
+                                    <i class="fas fa-sync-alt"></i>
+                                    {{'edit'|load_lang}}
+                                </a>
+                                <hr>
+                                <a href="/recent_discuss">
+                                    <i class="fas fa-comment"></i>
+                                    {{'discussion'|load_lang}}
+                                </a>
+                            </div>
+                        </div>
+                         
+                        <div id="top_tool_cel">
+                            <a href="javascript:void(0);" onclick="opening('other_cel');">
+                                <i class="fas fa-plus-circle"></i>
+                                {{'other'|load_lang}}
+                                <i class="fas fa-angle-down"></i>
+                            </a>
+                            <div id="other_cel" class="cel_in_cel" style="display: none;">
+                                <a href="/random">
+                                    <i class="fas fa-random"></i>
+                                    {{'random'|load_lang}}
+                                </a>
+                                <hr>
+                                <a href="/other">
+                                    <i class="fas fa-wrench"></i>
+                                    {{'tool'|load_lang}}
+                                </a>
+                                <hr>
+                                <a href="/skin_set">
+                                    <i class="fas fa-cog"></i>
+                                    {{'skin_setting'|load_lang}}
+                                </a>
+                            </div>
+                        </div>
+                         
+                        <div id="top_tool_cel">
+                            <a href="/user">
+                                {% if imp[2][2] == 1 %}
+                                    {% if imp[2][8] != 0 %}
+                                        <i class="fas fa-user-secret"></i>
+                                    {% else %}
+                                        <i class="fas fa-user"></i>
+                                    {% endif %}
+                                {% else %}
+                                    <i class="fas fa-user-times"></i>
+                                {% endif %}
+                                {{imp[2][5]}}
+                            </a>
+                        </div>
+                         
+                        <form method="post" action="/search" id="search" role="search">
+                            <input id="search_input" name="search" placeholder="{{'search'|load_lang}}" autocomplete="off" type="search">
+                            |
+                            <button type="submit" formaction="/goto"><i class="fas fa-sign-in-alt"></i></button>
+                            |
+                            <button type="submit" formaction="/search"><i class="fas fa-search"></i></button>
+                            <div id="pre_search" style="display: none;"></div>
+                        </form>
+                    </div>
+                    <div id="top_tool_mobile" class="is_mobile">
+                        <a href="javascript:void(0);" onclick="opening('mobile_menu');">
+                            <i class="fas fa-bars"></i> {{'tool'|load_lang}}
+                        </a>
+                    </div>
+                </div>
+            </div>
+            <div id="mobile_menu" class="is_mobile" style="display: none;">
+                <div id="mobile_menu_main">
+                    <form method="post" action="/search" id="mobile_search" role="search">
+                        <input id="mobile_search_input" name="search" placeholder="{{'search'|load_lang}}" autocomplete="off" type="search">
+                        <br>
+                        <button id="mobile_button_first" type="submit" formaction="/goto"><i class="fas fa-sign-in-alt"></i></button>
+                        |
+                        <button type="submit" formaction="/search"><i class="fas fa-search"></i></button>
+                        |
+                        <a href="javascript:void(0);" onclick="opening('mobile_menu');">
+                            <i class="fas fa-bars"></i>
+                        </a>
+                    </form>
+                    <h2>{{'recent'|load_lang}}</h2>
+                    <li><a href="/recent_changes">{{'edit'|load_lang}}</a></li>
+                    <li><a href="/recent_discuss">{{'discussion'|load_lang}}</a></li>
+                    <h2>{{'other'|load_lang}}</h2>
+                    <li><a href="/random">{{'random'|load_lang}}</a></li>
+                    <li><a href="/other">{{'tool'|load_lang}}</a></li>
+                    <li><a href="/skin_set">{{'skin_setting'|load_lang}}</a></li>
+                    <h2>{{'user'|load_lang}}</h2>
+                    <li><a href="/user">{{imp[2][5]}}</a></li>
+                </div>
+            </div>
+            <div id="main">
+                <div id="main_top">
+                    {% if menu != 0 %}
+                        <div id="tool" class="not_mobile">
+                            {% for sub_d in menu %}
+                                <div id="tool_cel">
+                                    {% if sub_d|length > 2 and sub_d[2] == 1 %}
+                                        <a class="menu-item" href="/{{sub_d[0]}}" id="topic_color">{{sub_d[1]}}</a>
+                                    {% else %}
+                                        <a class="menu-item" href="/{{sub_d[0]}}">{{sub_d[1]}}</a>
+                                    {% endif %}
+                                </div>
+                                {% if menu[loop.index] %}
+                                    |
+                                {% endif %}
+                            {% endfor %}
+                        </div>
+                    {% endif %}
+                    <h1 id="title">
+                        {{imp[0]}}
+                        {% if imp[3][0] != 0 %}
+                            <sub>{{imp[3][0]}}</sub>
+                        {% endif %}
+                    </h1>
+                    <div id="last_edit">
+                        {% if imp[3][1] != 0 %}
+                            {{'last_edit_time'|load_lang}} : {{imp[3][1]}}
+                        {% endif %}
+                    </div>
+                    {% if menu != 0 %}
+                        <div id="tool" class="is_mobile">
+                            {% for sub_d in menu %}
+                                <div id="tool_cel">
+                                    {% if sub_d|length > 2 and sub_d[2] == 1 %}
+                                        <a class="menu-item" href="/{{sub_d[0]}}" id="topic_color">{{sub_d[1]}}</a>
+                                    {% else %}
+                                        <a class="menu-item" href="/{{sub_d[0]}}">{{sub_d[1]}}</a>
+                                    {% endif %}
+                                </div>
+                                {% if menu[loop.index] %}
+                                    |
+                                {% endif %}
+                            {% endfor %}
+                        </div>
+                    {% endif %}
+                </div>
+                <div id="main_data">
+                    {{data|safe}}
+                </div>
+            </div>
+        </div>
+        <div id="bottom">
+            <div id="bottom_main">
+                {{imp[1][1]|safe}}
+                <br>
+                <br>
+                <a href="https://github.com/2du/openNAMU"><img id="b_logo" src="/views/main_css/file/s_logo.png"></a>
+            </div>
+        </div>
+        <div id="nav_bar">
+            <div id="go_top">
+                <a href="#top">
+                    <i class="fas fa-arrow-up"></i>  
+                </a>                  
+            </div>
+            <div id="go_bottom">
+                <a href="#bottom">
+                    <i class="fas fa-arrow-down"></i>
+                </a>
+            </div>
+            <div id="go_toc">
+                <a href="#toc">
+                    <i class="fas fa-list"></i>
+                </a>
+            </div>                                    
+        </div>
+    </body>
 </html>

+ 5 - 0
views/marisa/info.json

@@ -0,0 +1,5 @@
+{
+    "name" : "Marisa",
+    "skin_ver" : "v1.0.8",
+    "require_ver" : "3"
+}

+ 7 - 7
views/neo_yousoro/js/main.js → views/marisa/js/main.js

@@ -1,8 +1,8 @@
-function opening(data) {
-    var element = document.getElementById(data);
-    if(element.style.display == 'none') {
-        element.style.display = 'block';
-    } else {
-        element.style.display = 'none';
-    }
+function opening(data) {
+    var element = document.getElementById(data);
+    if(element.style.display == 'none') {
+        element.style.display = 'block';
+    } else {
+        element.style.display = 'none';
+    }
 }

+ 36 - 0
views/marisa/js/search.js

@@ -0,0 +1,36 @@
+function search_do() {
+    function search_load() {
+        var data = document.getElementById("search_input").value;
+        if(before !== data && data !== '') {
+            before = data;
+            var url = "/api/search/" + encodeURI(data) + "?num=10";
+        
+            var xhr = new XMLHttpRequest();
+            xhr.open("GET", url, true);
+            xhr.send(null);
+            
+            xhr.onreadystatechange = function() {
+                if(this.readyState === 4 && this.status === 200) {
+                    document.getElementById("pre_search").style.display = 'block';
+
+                    var get_data = JSON.parse(this.responseText);
+                    document.getElementById("pre_search").innerHTML = '';
+
+                    if(this.responseText !== "{}\n") {
+                        for(key in get_data) {
+                            document.getElementById("pre_search").innerHTML += '<a href="/w/' + encodeURI(get_data[key][0]) + '">' + get_data[key][0] + '</a><br>';
+                        }
+                    } else {
+                        document.getElementById("pre_search").style.display = 'none';
+                    }
+                }
+            }
+        } else if(before !== data && data === '') {
+            before = '';
+            document.getElementById("pre_search").style.display = 'none';
+        }
+    }
+
+    var before = '';
+    setInterval(search_load, 1000);
+}

+ 64 - 64
views/neo_yousoro/js/skin_set.js → views/marisa/js/skin_set.js

@@ -1,83 +1,83 @@
-function get_post() {
-    check = document.getElementById('strike');
-    if(check.value === 'normal') {
-        document.cookie = 'del_strike=0;';
-    } else if(check.value === 'change') {
-        document.cookie = 'del_strike=1;';
-    } else {
-        document.cookie = 'del_strike=2;';
-    }
+function skin_set() {
+    function get_post() {
+        check = document.getElementById('strike');
+        if(check.value === 'normal') {
+            document.cookie = 'del_strike=0;';
+        } else if(check.value === 'change') {
+            document.cookie = 'del_strike=1;';
+        } else {
+            document.cookie = 'del_strike=2;';
+        }
 
-    check = document.getElementById('bold');
-    if(check.value === 'normal') {
-        document.cookie = 'del_bold=0;';
-    } else if(check.value === 'change') {
-        document.cookie = 'del_bold=1;';
-    } else {
-        document.cookie = 'del_bold=2;';
-    }
+        check = document.getElementById('bold');
+        if(check.value === 'normal') {
+            document.cookie = 'del_bold=0;';
+        } else if(check.value === 'change') {
+            document.cookie = 'del_bold=1;';
+        } else {
+            document.cookie = 'del_bold=2;';
+        }
 
-    check = document.getElementById('include');
-    if(check.checked === true) {
-        document.cookie = 'include_link=1;';
-    } else {
-        document.cookie = 'include_link=0;';
-    }
+        check = document.getElementById('include');
+        if(check.checked === true) {
+            document.cookie = 'include_link=1;';
+        } else {
+            document.cookie = 'include_link=0;';
+        }
 
-    check = document.getElementById('invert');
-    if(check.checked === true) {
-        document.cookie = 'invert=1;';
-    } else {
-        document.cookie = 'invert=0;';
-    }
+        check = document.getElementById('invert');
+        if(check.checked === true) {
+            document.cookie = 'invert=1;';
+        } else {
+            document.cookie = 'invert=0;';
+        }
 
-    history.go(0);
-}
+        history.go(0);
+    }
 
-function regex_data(data) {
-    r_data = new RegExp('(?:^|; )' + data + '=([^;]*)')
+    function regex_data(data) {
+        r_data = new RegExp('(?:^|; )' + data + '=([^;]*)')
 
-    return r_data;
-}
+        return r_data;
+    }
 
-cookies = document.cookie;
+    cookies = document.cookie;
 
-function main_load() {
-    head_data = document.querySelector('head');
-    if(cookies.match(regex_data('del_strike'))) {
-        if(cookies.match(regex_data('del_strike'))[1] === '1') {
-            head_data.innerHTML += '<style>s { text-decoration: none; } s:hover { background-color: transparent; }</style>';
-        } else if(cookies.match(regex_data('del_strike'))[1] === '2') {
-            head_data.innerHTML += '<style>s { display: none; }</style>';
+    function main_load() {
+        head_data = document.querySelector('head');
+        if(cookies.match(regex_data('del_strike'))) {
+            if(cookies.match(regex_data('del_strike'))[1] === '1') {
+                head_data.innerHTML += '<style>s { text-decoration: none; } s:hover { background-color: transparent; }</style>';
+            } else if(cookies.match(regex_data('del_strike'))[1] === '2') {
+                head_data.innerHTML += '<style>s { display: none; }</style>';
+            }
         }
-    }
 
-    if(cookies.match(regex_data('del_bold'))) {
-        if(cookies.match(regex_data('del_bold'))[1] === '1') {
-            head_data.innerHTML += '<style>b { font-weight: normal; }</style>';
-        } else if(cookies.match(regex_data('del_bold'))[1] === '2') {
-            head_data.innerHTML += '<style>b { display: none; }</style>';
+        if(cookies.match(regex_data('del_bold'))) {
+            if(cookies.match(regex_data('del_bold'))[1] === '1') {
+                head_data.innerHTML += '<style>b { font-weight: normal; }</style>';
+            } else if(cookies.match(regex_data('del_bold'))[1] === '2') {
+                head_data.innerHTML += '<style>b { display: none; }</style>';
+            }
         }
-    }
 
-    if(
-        cookies.match(regex_data('include_link')) &&
-        cookies.match(regex_data('include_link'))[1] === '1'
-    ) {
-        head_data.innerHTML += '<style>#include_link { display: inline; }</style>';
-    }
+        if(
+            cookies.match(regex_data('include_link')) &&
+            cookies.match(regex_data('include_link'))[1] === '1'
+        ) {
+            head_data.innerHTML += '<style>#include_link { display: inline; }</style>';
+        }
 
-    if(
-        cookies.match(regex_data('invert')) &&
-        cookies.match(regex_data('invert'))[1] === '1'
-    ) {
-        head_data.innerHTML += '<style>body { -webkit-filter: invert(100%); filter: invert(100%); background: black; }</style>';
+        if(
+            cookies.match(regex_data('invert')) &&
+            cookies.match(regex_data('invert'))[1] === '1'
+        ) {
+            head_data.innerHTML += '<style>body { -webkit-filter: invert(100%); filter: invert(100%); background: black; }</style>';
+        }
     }
-}
 
-main_load();
+    main_load();
 
-window.onload = function () {
     if(window.location.pathname === '/skin_set') {
         set_language = {
             "en-US" : {

+ 0 - 2
views/neo_yousoro/README.md

@@ -1,2 +0,0 @@
-## 개요
-YouSoro 스킨의 공식적인 후속 스킨 입니다. 폴더명을 `neo_yousoro`로 변경한 후 `views` 폴더에 넣어주세요.

+ 0 - 5
views/neo_yousoro/info.json

@@ -1,5 +0,0 @@
-{
-    "name" : "Neo_Yousoro",
-    "skin_ver" : "v1.0.6",
-    "require_ver" : "2"
-}