Explorar el Código

Merge pull request #2056 from openNAMU/dev

Dev
잉여개발기 hace 2 años
padre
commit
0e58fdc300
Se han modificado 55 ficheros con 544 adiciones y 1670 borrados
  1. 18 20
      app.py
  2. 10 8
      route/__init__.py
  3. 1 14
      route/api_func_lang.py
  4. 0 18
      route/api_func_sha224.py
  5. 3 17
      route/api_image_view.py
  6. 0 15
      route/api_title_index.py
  7. 93 104
      route/api_user_info.py
  8. 0 101
      route/api_w.py
  9. 18 4
      route/api_w_render.py
  10. 18 0
      route/go_api_func_sha224.py
  11. 6 4
      route/go_main_func_easter_egg.py
  12. 7 7
      route/go_view_random.py
  13. 2 6
      route/main_search_deep.py
  14. 6 10
      route/main_setting_main.py
  15. 1 4
      route/main_view.py
  16. 1 4
      route/main_view_image.py
  17. 35 69
      route/recent_block.py
  18. 4 1
      route/recent_change.py
  19. 24 21
      route/tool/func.py
  20. 1 1
      route/tool/func_render_namumark.py
  21. 29 0
      route/user_edit_filter.py
  22. 0 0
      route/view_category.py
  23. 64 84
      route/view_read.py
  24. 21 0
      route_go/api_func_sha224.go
  25. BIN
      route_go/bin/api_func_sha224.amd64.bin
  26. BIN
      route_go/bin/api_func_sha224.amd64.exe
  27. BIN
      route_go/bin/api_func_sha224.arm64.bin
  28. BIN
      route_go/bin/api_func_sha224.arm64.exe
  29. BIN
      route_go/bin/main_func_easter_egg.amd64.bin
  30. BIN
      route_go/bin/main_func_easter_egg.amd64.exe
  31. BIN
      route_go/bin/main_func_easter_egg.arm64.bin
  32. BIN
      route_go/bin/main_func_easter_egg.arm64.exe
  33. 0 3
      route_go/main_func_easter_egg.go
  34. 1 1
      route_go/view_random.go
  35. 2 2
      version.json
  36. 3 3
      views/main_css/css/main.css
  37. 2 1
      views/main_css/css/sub/dark.css
  38. 8 0
      views/main_css/js/func/func.js
  39. 97 102
      views/main_css/js/func/insert_user_info.js
  40. 1 1
      views/main_css/js/func/shortcut.js
  41. 8 9
      views/main_css/js/route/bbs_w_post.js
  42. 0 14
      views/main_css/js/route/bbs_w_post.ts
  43. 27 20
      views/main_css/js/route/editor_sub.js
  44. 0 58
      views/main_css/js/route/editor_sub.ts
  45. 10 7
      views/main_css/js/route/topic.js
  46. 0 14
      views/main_css/js/route/topic.ts
  47. 20 0
      views/ringo/css/dark.css
  48. 2 2
      views/ringo/index.html
  49. 1 1
      views/ringo/info.json
  50. 0 53
      views/tenshi/css/dark.css
  51. 0 479
      views/tenshi/css/main.css
  52. 0 251
      views/tenshi/index.html
  53. 0 5
      views/tenshi/info.json
  54. 0 51
      views/tenshi/js/main.js
  55. 0 81
      views/tenshi/js/skin_set.js

+ 18 - 20
app.py

@@ -452,13 +452,9 @@ app.route('/list/user/check/<name>/<do_type>/<int:arg_num>/<plus_name>')(list_us
 app.route('/list/user/check/delete/<name>/<ip>/<time>/<do_type>', methods = ['POST', 'GET'])(list_user_check_delete)
 
 # Func-auth
-# /auth/give
-# /auth/give/<name>
 app.route('/auth/give', methods = ['POST', 'GET'])(give_auth)
 app.route('/auth/give/<name>', methods = ['POST', 'GET'])(give_auth)
 
-# /auth/give
-# /auth/give/<name>
 app.route('/auth/give/ban', methods = ['POST', 'GET'])(give_user_ban)
 app.route('/auth/give/ban/<everything:name>', methods = ['POST', 'GET'])(give_user_ban)
 app.route('/auth/give/ban_regex/<everything:name>', methods = ['POST', 'GET'], defaults = { 'ban_type' : 'regex' })(give_user_ban)
@@ -477,9 +473,16 @@ app.route('/app_submit', methods = ['POST', 'GET'])(recent_app_submit_2)
 
 # /auth/history
 # ongoing 반영 필요
-app.route('/block_log')(recent_block_2)
-app.route('/block_log/<regex("user"):tool>/<name>')(recent_block_2)
-app.route('/block_log/<regex("admin"):tool>/<name>')(recent_block_2)
+app.route('/block_log')(recent_block)
+app.route('/block_log/<int:num>')(recent_block)
+app.route('/block_log/user/<name>', defaults = { 'tool' : 'user' })(recent_block)
+app.route('/block_log/user/<name>/<int:num>', defaults = { 'tool' : 'user' })(recent_block)
+app.route('/block_log/admin/<name>', defaults = { 'tool' : 'admin' })(recent_block)
+app.route('/block_log/admin/<name>/<int:num>', defaults = { 'tool' : 'admin' })(recent_block)
+app.route('/block_log/regex', defaults = { 'tool' : 'regex' })(recent_block)
+app.route('/block_log/regex/<int:num>', defaults = { 'tool' : 'regex' })(recent_block)
+app.route('/block_log/ongoing', defaults = { 'tool' : 'ongoing' })(recent_block)
+app.route('/block_log/ongoing/<int:num>', defaults = { 'tool' : 'ongoing' })(recent_block)
 
 # Func-history
 app.route('/recent_change', defaults = { 'tool' : 'recent' })(recent_change)
@@ -523,7 +526,6 @@ app.route('/down/<everything:name>')(view_down)
 app.route('/acl/<everything:name>', methods = ['POST', 'GET'])(view_acl)
 
 # everything 다음에 추가 붙은 경우에 대해서 재검토 필요 (진행중)
-app.route('/w_rev/<int(signed = True):doc_rev>/<everything:name>')(view_read)
 app.route('/w_from/<everything:name>', defaults = { 'do_type' : 'from' })(view_read)
 app.route('/w/<everything:name>')(view_read)
 
@@ -590,6 +592,8 @@ app.route('/user/<name>')(user_info)
 
 app.route('/challenge', methods = ['GET', 'POST'])(user_challenge)
 
+app.route('/edit_filter/<name>', methods = ['GET', 'POST'])(user_edit_filter)
+
 app.route('/count')(user_count)
 app.route('/count/<name>')(user_count)
 
@@ -662,15 +666,10 @@ app.route('/bbs/edit/<int:bbs_num>/<int:post_num>/<comment_num>', methods = ['PO
 app.route('/bbs/delete/<int:bbs_num>/<int:post_num>/<comment_num>', methods = ['POST', 'GET'])(bbs_w_delete)
 
 # Func-api
-# 폐지 예정
-app.route('/api/w_rev/<int(signed = True):rev>/<tool>/<everything:name>', methods = ['GET', 'POST'])(api_w)
-app.route('/api/w_tool/<tool>/<everything:name>', methods = ['GET', 'POST'])(api_w)
-app.route('/api/w/<everything:name>', methods = ['GET', 'POST'])(api_w)
-
 # app.route('/api/render_tool/<tool>/<everything:name>', methods = ['POST'])(api_w_render)
 # app.route('/api/render_tool/<tool>', methods = ['POST'])(api_w_render)
-# app.route('/api/render/<everything:name>', methods = ['POST'])(api_w_render)
-# app.route('/api/render', methods = ['POST'])(api_w_render)
+app.route('/api/render/<everything:name>', methods = ['POST'])(api_w_render)
+app.route('/api/render', methods = ['POST'])(api_w_render)
 
 app.route('/api/raw_exist/<everything:name>', defaults = { 'exist_check' : 'on' })(api_w_raw)
 app.route('/api/raw_rev/<int(signed = True):rev>/<everything:name>')(api_w_raw)
@@ -683,7 +682,7 @@ app.route('/api/bbs/w/comment_one/<sub_code>')(api_bbs_w_comment)
 app.route('/api/version', defaults = { 'version_list' : version_list })(api_version)
 app.route('/api/skin_info')(api_skin_info)
 app.route('/api/skin_info/<name>')(api_skin_info)
-app.route('/api/user_info/<name>', methods = ['POST', 'GET'])(api_user_info)
+app.route('/api/user_info/<user_name>')(api_user_info)
 app.route('/api/setting/<name>')(api_setting)
 
 app.route('/api/thread/<int:topic_num>/<tool>/<int:num>/<render>')(api_topic)
@@ -703,11 +702,10 @@ app.route('/api/recent_discuss/<get_type>/<int:num>')(api_recent_discuss)
 app.route('/api/recent_discuss/<int:num>')(api_recent_discuss)
 app.route('/api/recent_discuss')(api_recent_discuss)
 
-app.route('/api/lang/<data>', methods = ['POST', 'GET'])(api_func_lang)
-app.route('/api/sha224/<everything:data>', methods = ['POST', 'GET'])(api_func_sha224)
+app.route('/api/lang/<data>')(api_func_lang)
+app.route('/api/sha224/<everything:data>')(api_func_sha224)
 
-app.route('/api/title_index')(api_title_index)
-app.route('/api/image/<everything:name>', methods = ['POST', 'GET'])(api_image_view)
+app.route('/api/image/<everything:name>')(api_image_view)
 
 # Func-main
 # 여기도 전반적인 조정 시행 예정

+ 10 - 8
route/__init__.py

@@ -1,18 +1,15 @@
 from route.api_func_lang import api_func_lang
-from route.api_func_sha224 import api_func_sha224
 from route.api_image_view import api_image_view
 from route.api_w_raw import api_w_raw
-from route.api_w_render import api_w_render
 from route.api_recent_change import api_recent_change
 from route.api_recent_discuss import api_recent_discuss
 from route.api_search import api_search
 from route.api_setting import api_setting
 from route.api_skin_info import api_skin_info
-from route.api_title_index import api_title_index
 from route.api_topic import api_topic
 from route.api_user_info import api_user_info
 from route.api_version import api_version
-from route.api_w import api_w
+from route.api_w_render import api_w_render
 from route.api_bbs_w_post import api_bbs_w_post
 from route.api_bbs_w_comment import api_bbs_w_comment
 from route.api_bbs_w_comment_one import api_bbs_w_comment_one
@@ -77,7 +74,6 @@ from route.login_register_email import login_register_email_2
 from route.login_register_email_check import login_register_email_check_2
 from route.login_register_submit import login_register_submit_2
 
-from route.main_func_easter_egg import main_func_easter_egg
 from route.main_func_error_404 import main_func_error_404
 
 from route.main_search import main_search
@@ -111,7 +107,7 @@ from route.main_view_image import main_view_image
 
 from route.recent_app_submit import recent_app_submit_2
 
-from route.recent_block import recent_block_2
+from route.recent_block import recent_block
 from route.recent_change import recent_change
 from route.recent_discuss import recent_discuss
 from route.recent_history_add import recent_history_add
@@ -140,6 +136,7 @@ from route.user_alarm_delete import user_alarm_delete
 from route.user_challenge import user_challenge
 from route.user_count import user_count
 from route.user_info import user_info
+from route.user_edit_filter import user_edit_filter
 
 from route.user_setting import user_setting
 from route.user_setting_email import user_setting_email_2
@@ -161,7 +158,6 @@ from route.user_watch_list_name import user_watch_list_name
 from route.view_acl import view_acl
 from route.view_diff import view_diff
 from route.view_down import view_down
-from route.view_random import view_random
 from route.view_raw import view_raw_2
 from route.view_read import view_read
 from route.view_xref import view_xref
@@ -170,4 +166,10 @@ from route.vote_add import vote_add
 from route.vote_close import vote_close
 from route.vote_end import vote_end
 from route.vote_list import vote_list
-from route.vote_select import vote_select
+from route.vote_select import vote_select
+
+from route.go_api_func_sha224 import api_func_sha224
+
+from route.go_view_random import view_random
+
+from route.go_main_func_easter_egg import main_func_easter_egg

+ 1 - 14
route/api_func_lang.py

@@ -2,17 +2,4 @@ from .tool.func import *
 
 def api_func_lang(data = 'Test'):
     with get_db_connect() as conn:
-        if flask.request.method == 'POST':
-            try:
-                title_list = json.loads(flask.request.form.get('title_list', ''))
-                title_list = list(set(title_list))
-            except:
-                title_list = []
-
-            data_list = {}
-            for i in title_list:
-                data_list[i] = load_lang(i)
-
-            return flask.jsonify(data_list)
-        else:
-            return flask.jsonify({ "data" : load_lang(data) })
+        return flask.jsonify({ "data" : load_lang(data) })

+ 0 - 18
route/api_func_sha224.py

@@ -1,18 +0,0 @@
-from .tool.func import *
-
-def api_func_sha224(data = 'Test'):
-    with get_db_connect() as conn:
-        if flask.request.method == 'POST':
-            try:
-                title_list = json.loads(flask.request.form.get('title_list', ''))
-                title_list = list(set(title_list))
-            except:
-                title_list = []
-
-            data_list = {}
-            for i in title_list:
-                data_list[i] = sha224_replace(i)
-
-            return flask.jsonify(data_list)
-        else:
-            return flask.jsonify({ "data" : sha224_replace(data) })

+ 3 - 17
route/api_image_view.py

@@ -2,21 +2,7 @@ from .tool.func import *
 
 def api_image_view(name = 'Test'):
     with get_db_connect() as conn:
-        if flask.request.method == 'POST':
-            try:
-                title_list = json.loads(flask.request.form.get('title_list', ''))
-                title_list = list(set(title_list))
-            except:
-                title_list = []
-
-            data_list = {}
-            for i in title_list:
-                if os.path.exists(os.path.join(load_image_url(), i)):
-                    data_list[i] = '1'
-
-            return flask.jsonify(data_list)
+        if os.path.exists(os.path.join(load_image_url(), name)):
+            return flask.jsonify({ "exist" : "1" })
         else:
-            if os.path.exists(os.path.join(load_image_url(), name)):
-                return flask.jsonify({ "exist" : "1" })
-            else:
-                return flask.jsonify({})
+            return flask.jsonify({})

+ 0 - 15
route/api_title_index.py

@@ -1,15 +0,0 @@
-from .tool.func import *
-
-def api_title_index():
-    with get_db_connect() as conn:
-        curs = conn.cursor()
-
-        if flask.request.args.get('count', '1') == '1':
-            curs.execute(db_change('select data from other where name = "count_all_title"'))
-            title_count = curs.fetchall()
-            if title_count:
-                return flask.jsonify({ 'count' : title_count[0][0] })
-            else:
-                return flask.jsonify({ 'count' : '0' })
-        else:
-            return flask.jsonify({})

+ 93 - 104
route/api_user_info.py

@@ -1,118 +1,107 @@
 from .tool.func import *
 
-def api_user_info(name = ''):
+def api_user_info(user_name = ''):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
-        if flask.request.method == 'POST':
-            try:
-                data_list = json.loads(flask.request.form.get('title_list', ''))
-                data_list = list(set(data_list))
-            except:
-                data_list = [name]
-
-            data_result = {}
-            for user_name in data_list:
-                data_result[user_name] = {}
-                
-                # name part
-                data_result[user_name]['render'] = ip_pas(user_name)
-                
-                # auth part
-                curs.execute(db_change("select data from user_set where id = ? and name = 'acl'"), [user_name])
-                db_data = curs.fetchall()
-                if db_data:
-                    if db_data[0][0] != 'user':
-                        curs.execute(db_change("select name from alist where name = ?"), [db_data[0][0]])
-                        if curs.fetchall() or db_data[0][0] in get_default_admin_group():
-                            data_result[user_name]['auth'] = db_data[0][0]
-                        else:
-                            data_result[user_name]['auth'] = '1'
-                    else:
-                        data_result[user_name]['auth'] = '1'
+        data_result = {}
+        
+        # name part
+        data_result['render'] = ip_pas(user_name)
+        
+        # auth part
+        curs.execute(db_change("select data from user_set where id = ? and name = 'acl'"), [user_name])
+        db_data = curs.fetchall()
+        if db_data:
+            if db_data[0][0] != 'user':
+                curs.execute(db_change("select name from alist where name = ?"), [db_data[0][0]])
+                if curs.fetchall() or db_data[0][0] in get_default_admin_group():
+                    data_result['auth'] = db_data[0][0]
                 else:
-                    data_result[user_name]['auth'] = '0'
+                    data_result['auth'] = '1'
+            else:
+                data_result['auth'] = '1'
+        else:
+            data_result['auth'] = '0'
 
-                curs.execute(db_change("select data from user_set where id = ? and name = 'auth_date'"), [user_name])
-                db_data = curs.fetchall()
-                if db_data:
-                    data_result[user_name]['auth_date'] = db_data[0][0]
-                else:
-                    data_result[user_name]['auth_date'] = '0'
+        curs.execute(db_change("select data from user_set where id = ? and name = 'auth_date'"), [user_name])
+        db_data = curs.fetchall()
+        if db_data:
+            data_result['auth_date'] = db_data[0][0]
+        else:
+            data_result['auth_date'] = '0'
 
-                curs.execute(db_change("select data from user_set where id = ? and name = 'level'"), [user_name])
-                db_data = curs.fetchall()
-                if db_data:
-                    data_result[user_name]['level'] = db_data[0][0]
-                else:
-                    data_result[user_name]['level'] = '0'
+        curs.execute(db_change("select data from user_set where id = ? and name = 'level'"), [user_name])
+        db_data = curs.fetchall()
+        if db_data:
+            data_result['level'] = db_data[0][0]
+        else:
+            data_result['level'] = '0'
 
-                curs.execute(db_change("select data from user_set where id = ? and name = 'experience'"), [user_name])
-                db_data = curs.fetchall()
-                if db_data:
-                    data_result[user_name]['exp'] = db_data[0][0]
-                else:
-                    data_result[user_name]['exp'] = '0'
+        curs.execute(db_change("select data from user_set where id = ? and name = 'experience'"), [user_name])
+        db_data = curs.fetchall()
+        if db_data:
+            data_result['exp'] = db_data[0][0]
+        else:
+            data_result['exp'] = '0'
+            
+        # ban part
+        if ban_check(user_name) == 0:
+            data_result['ban'] = '0'
+        else:
+            data_result['ban'] = {}
+            regex_ban = 0
+            
+            curs.execute(db_change("select login, block, end, why from rb where band = 'regex' and ongoing = '1'"))
+            for db_data in curs.fetchall():
+                if re.compile(db_data[1]).search(user_name):
+                    regex_ban = 1
                     
-                # ban part
-                if ban_check(name) == 0:
-                    data_result[user_name]['ban'] = '0'
-                else:
-                    data_result[user_name]['ban'] = {}
-                    regex_ban = 0
+                    data_result['ban']['type'] = 'regex'
+                    if db_data[0] == 'O':
+                        data_result['ban']['login_able'] = '1'
+                    else:
+                        data_result['ban']['login_able'] = '0'
+                        
+                    if db_data[2] == '':
+                        data_result['ban']['period'] = '0'
+                    else:
+                        data_result['ban']['period'] = db_data[2]
+                        
+                    data_result['ban']['reason'] = db_data[3]
                     
-                    curs.execute(db_change("select login, block, end, why from rb where band = 'regex' and ongoing = '1'"))
-                    for db_data in curs.fetchall():
-                        if re.compile(db_data[1]).search(user_name):
-                            regex_ban = 1
-                            
-                            data_result[user_name]['ban']['type'] = 'regex'
-                            if db_data[0] == 'O':
-                                data_result[user_name]['ban']['login_able'] = '1'
-                            else:
-                                data_result[user_name]['ban']['login_able'] = '0'
-                                
-                            if db_data[2] == '':
-                                data_result[user_name]['ban']['period'] = '0'
-                            else:
-                                data_result[user_name]['ban']['period'] = db_data[2]
-                                
-                            data_result[user_name]['ban']['reason'] = db_data[3]
-                            
-                            break
-                            
-                    if regex_ban == 0:
-                        curs.execute(db_change("select login, block, end, why from rb where block = ? and ongoing = '1'"), [user_name])
-                        db_data = curs.fetchall()
-                        if db_data:
-                            data_result[user_name]['ban']['type'] = 'normal'
-                            if db_data[0][0] == 'O':
-                                data_result[user_name]['ban']['login_able'] = '1'
-                            else:
-                                data_result[user_name]['ban']['login_able'] = '0'
-                                
-                            if db_data[0][2] == '':
-                                data_result[user_name]['ban']['period'] = '0'
-                            else:
-                                data_result[user_name]['ban']['period'] = db_data[0][2]
-                                
-                            data_result[user_name]['ban']['reason'] = db_data[0][3]
-                
-                # user document part
-                curs.execute(db_change("select title from data where title = ?"), ['user:' + user_name])
-                if curs.fetchall():
-                    data_result[user_name]['document'] = '1'
-                else:
-                    data_result[user_name]['document'] = '0'
-
-                # user title part
-                curs.execute(db_change('select data from user_set where name = "user_title" and id = ?'), [user_name])
+                    break
+                    
+            if regex_ban == 0:
+                curs.execute(db_change("select login, block, end, why from rb where block = ? and ongoing = '1'"), [user_name])
                 db_data = curs.fetchall()
                 if db_data:
-                    data_result[user_name]['user_title'] = db_data[0][0]
-                else:
-                    data_result[user_name]['user_title'] = ''
-                    
-            return flask.jsonify(data_result)
+                    data_result['ban']['type'] = 'normal'
+                    if db_data[0][0] == 'O':
+                        data_result['ban']['login_able'] = '1'
+                    else:
+                        data_result['ban']['login_able'] = '0'
+                        
+                    if db_data[0][2] == '':
+                        data_result['ban']['period'] = '0'
+                    else:
+                        data_result['ban']['period'] = db_data[0][2]
+                        
+                    data_result['ban']['reason'] = db_data[0][3]
+        
+        # user document part
+        curs.execute(db_change("select title from data where title = ?"), ['user:' + user_name])
+        if curs.fetchall():
+            data_result['document'] = '1'
+        else:
+            data_result['document'] = '0'
+
+        # user title part
+        curs.execute(db_change('select data from user_set where name = "user_title" and id = ?'), [user_name])
+        db_data = curs.fetchall()
+        if db_data:
+            data_result['user_title'] = db_data[0][0]
         else:
-            return flask.jsonify({})
+            data_result['user_title'] = ''
+                
+        return flask.jsonify({ 'data' : data_result })

+ 0 - 101
route/api_w.py

@@ -1,101 +0,0 @@
-from .tool.func import *
-
-def api_w(name = 'Test', tool = '', rev = ''):
-    with get_db_connect() as conn:
-        curs = conn.cursor()
-
-        if flask.request.method == 'POST':
-            if tool == '' or tool == 'preview':
-                # data_in 말고 data_use_type이랑 data_use_num 추가 예정
-                data_org = flask.request.form.get('data', '')
-                data_pas = render_set(
-                    doc_name = name, 
-                    doc_data = data_org, 
-                    data_type = 'api_view'
-                )
-
-                return flask.jsonify({
-                    "data" : data_pas[0], 
-                    "js_data" : data_pas[1]
-                })
-            elif tool == 'include':
-                name_org = flask.request.form.get('name_org', '')
-                name_org = name if name_org == '' else name_org
-
-                include_data = flask.request.form.get('name_include', '')
-
-                try:
-                    include_list = json.loads(flask.request.form.get('include_list', ''))
-                except:
-                    include_list = []
-
-                curs.execute(db_change("select data from data where title = ?"), [name])
-                sql_data = curs.fetchall()
-                if not sql_data:
-                    return flask.jsonify({})
-                else:
-                    json_data = sql_data[0][0]
-
-                    get_all_change_1 = []
-                    find_replace_moment = re.findall(r'(@([^=@]+)=([^=@]+)@|@([^=@]+)@)', json_data)
-                    for i in find_replace_moment:
-                        if i[1] != '':
-                            get_all_change_1 += [[i[1], i[2]]]
-
-                            json_data = json_data.replace(i[0], '@' + i[1] + '@', 1)
-                        else:
-                            json_data = json_data.replace(i[0], '@' + i[3] + '@', 1)
-
-                    get_all_change_2 = include_list + get_all_change_1
-                    for i in get_all_change_2:
-                        json_data = json_data.replace('@' + i[0] + '@', i[1])
-
-                    data_pas = render_set(
-                        doc_name = name_org, 
-                        doc_data = json_data, 
-                        data_type = 'api_view',
-                        data_in = include_data
-                    )
-
-                    return flask.jsonify({
-                        "data" : data_pas[0], 
-                        "js_data" : data_pas[1]
-                    })
-            elif tool == 'exist':
-                try:
-                    title_list = json.loads(flask.request.form.get('title_list', ''))
-                    title_list = list(set(title_list))
-                except:
-                    title_list = [name]
-
-                data_exist = {}
-                for i in title_list:
-                    curs.execute(db_change("select title from data where title = ?"), [i])
-                    if curs.fetchall():
-                        data_exist[i] = '1'
-
-                return flask.jsonify(data_exist)
-
-            return flask.jsonify({})
-        else:
-            if tool == '' or tool == 'view':
-                if acl_check(name, 'render') != 1:
-                    if number_check(rev) == '':
-                        curs.execute(db_change("select data from data where title = ?"), [name])
-                    else:
-                        curs.execute(db_change("select data from history where title = ? and id = ?"), [name, rev])
-
-                    sql_data = curs.fetchall()
-                    if sql_data:
-                        data_pas = render_set(
-                            doc_name = name, 
-                            doc_data = sql_data[0][0], 
-                            data_type = 'api_view'
-                        )
-
-                        return flask.jsonify({
-                            "data" : data_pas[0], 
-                            "js_data" : data_pas[1]
-                        })
-
-            return flask.jsonify({})

+ 18 - 4
route/api_w_render.py

@@ -1,6 +1,20 @@
 from .tool.func import *
 
-def api_w_render(name = '', tool = ''):
-    data_org = flask.request.form.get('data', '')
-    
-    pass
+def api_w_render(name = ''):
+    with get_db_connect() as conn:
+        curs = conn.cursor()
+
+        if flask.request.method == 'POST':
+            data_org = flask.request.form.get('data', '')
+            data_pas = render_set(
+                doc_name = name, 
+                doc_data = data_org, 
+                data_type = 'api_view'
+            )
+
+            return flask.jsonify({
+                "data" : data_pas[0], 
+                "js_data" : data_pas[1]
+            })
+        else:
+            return ''

+ 18 - 0
route/go_api_func_sha224.py

@@ -0,0 +1,18 @@
+from .tool.func import *
+
+def api_func_sha224(data = 'Test'):
+    with get_db_connect() as conn:
+        if platform.system() == 'Linux':
+            if platform.machine() in ["AMD64", "x86_64"]:
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".amd64.bin"), data], stdout = subprocess.PIPE).communicate()[0]
+            else:
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".arm64.bin"), data], stdout = subprocess.PIPE).communicate()[0]
+        else:
+            if platform.machine() in ["AMD64", "x86_64"]:
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".amd64.exe"), data], stdout = subprocess.PIPE).communicate()[0]
+            else:
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".arm64.exe"), data], stdout = subprocess.PIPE).communicate()[0]
+
+        data = data.decode('utf8')
+
+        return flask.jsonify({ "data" : data })

+ 6 - 4
route/main_func_easter_egg.py → route/go_main_func_easter_egg.py

@@ -13,14 +13,16 @@ def main_func_easter_egg():
     
         if platform.system() == 'Linux':
             if platform.machine() in ["AMD64", "x86_64"]:
-                data = os.popen(os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".amd64.bin")).read()
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".amd64.bin")], stdout = subprocess.PIPE).communicate()[0]
             else:
-                data = os.popen(os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".arm64.bin")).read()
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".arm64.bin")], stdout = subprocess.PIPE).communicate()[0]
         else:
             if platform.machine() in ["AMD64", "x86_64"]:
-                data = os.popen(os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".amd64.exe")).read()
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".amd64.exe")], stdout = subprocess.PIPE).communicate()[0]
             else:
-                data = os.popen(os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".arm64.exe")).read()
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".arm64.exe")], stdout = subprocess.PIPE).communicate()[0]
+
+        data = data.decode('utf8')
 
         return easy_minify(flask.render_template(skin_check(),
             imp = ['Easter Egg', wiki_set(), wiki_custom(), wiki_css([0, 0])],

+ 7 - 7
route/view_random.py → route/go_view_random.py

@@ -2,17 +2,17 @@ from .tool.func import *
 
 def view_random(db_set):
     with get_db_connect() as conn:
-        curs = conn.cursor()
-
         if platform.system() == 'Linux':
             if platform.machine() in ["AMD64", "x86_64"]:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".amd64.bin"), db_set], stdout=subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".amd64.bin"), db_set], stdout = subprocess.PIPE).communicate()[0]
             else:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".arm64.bin"), db_set], stdout=subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".arm64.bin"), db_set], stdout = subprocess.PIPE).communicate()[0]
         else:
             if platform.machine() in ["AMD64", "x86_64"]:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".amd64.exe"), db_set], stdout=subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".amd64.exe"), db_set], stdout = subprocess.PIPE).communicate()[0]
             else:
-                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".arm64.exe"), db_set], stdout=subprocess.PIPE).communicate()[0]
+                data = subprocess.Popen([os.path.join(".", "route_go", "bin", sys._getframe().f_code.co_name + ".arm64.exe"), db_set], stdout = subprocess.PIPE).communicate()[0]
+
+        data = data.decode('utf8')
 
-        return redirect('/w/' + url_pas(data.decode('utf8')))
+        return redirect('/w/' + url_pas(data))

+ 2 - 6
route/main_search_deep.py

@@ -53,13 +53,9 @@ def main_search_deep(name = 'Test', search_type = 'title', num = 1):
             '''
 
             if search_type == 'title':
-                curs.execute(db_change("select title from data where title like ? collate nocase order by title limit ?, 50"),
-                    ['%' + name + '%', sql_num]
-                )
+                curs.execute(db_change("select title from data where title like ? collate nocase order by title limit ?, 50"), ['%' + name + '%', sql_num])
             else:
-                curs.execute(db_change("select title from data where data like ? collate nocase order by title limit ?, 50"),
-                    ['%' + name + '%', sql_num]
-                )
+                curs.execute(db_change("select title from data where data like ? collate nocase order by title limit ?, 50"), ['%' + name + '%', sql_num])
 
             all_list = curs.fetchall()
             for data in all_list:

+ 6 - 10
route/main_setting_main.py

@@ -26,7 +26,6 @@ def main_setting_main(db_set):
             22 : ['domain', ''],
             23 : ['ua_get', ''],
             24 : ['enable_comment', ''],
-            25 : ['enable_challenge', ''],
             26 : ['edit_bottom_compulsion', ''],
             27 : ['http_select', 'http'],
             28 : ['title_max_length', ''],
@@ -93,7 +92,7 @@ def main_setting_main(db_set):
                 else:
                     tls_select += '<option value="' + tls_select_one + '">' + tls_select_one + '</option>'
 
-            check_box_div = [7, 8, '', 20, 23, 24, 25, 26, 31, 33, 34, 35, 36, 37, 44, 45]
+            check_box_div = [7, 8, '', 20, 23, 24, '', 26, 31, 33, 34, 35, 36, 37, 44, 45]
             for i in range(0, len(check_box_div)):
                 acl_num = check_box_div[i]
                 if acl_num != '' and d_list[acl_num]:
@@ -154,11 +153,6 @@ def main_setting_main(db_set):
                         <hr class="main_hr">
                         <input type="password" name="key" value="''' + html.escape(d_list[11]) + '''">
                         <hr class="main_hr">
-
-                        <span>''' + load_lang('encryption_method') + '''</span>
-                        <hr class="main_hr">
-                        <select name="encode">''' + encode_select + '''</select>
-                        <hr class="main_hr">
                         
                         <input type="checkbox" name="wiki_access_password_need" ''' + check_box_div[8] + '''> ''' + load_lang('set_wiki_access_password_need') + ''' (''' + load_lang('restart_required') + ''')
                         <hr class="main_hr">
@@ -182,9 +176,6 @@ def main_setting_main(db_set):
                         <input type="checkbox" name="enable_comment" ''' + check_box_div[5] + '''> ''' + load_lang('enable_comment_function') + ''' (''' + load_lang('not_working') + ''')
                         <hr class="main_hr">
 
-                        <input type="checkbox" name="enable_challenge" ''' + check_box_div[6] + '''> ''' + load_lang('enable_challenge_function') + ''' (''' + load_lang('not_working') + ''')
-                        <hr class="main_hr">
-
                         <input type="checkbox" name="user_name_level" ''' + check_box_div[15] + '''> ''' + load_lang('display_level_in_user_name') + '''
                         <hr class="main_hr">
 
@@ -219,6 +210,11 @@ def main_setting_main(db_set):
                         <span>''' + load_lang('password_min_length') + '''</span> (''' + load_lang('off') + ''' : ''' + load_lang('empty') + ''')
                         <hr class="main_hr">
                         <input name="password_min_length" value="''' + html.escape(d_list[30]) + '''">
+                        <hr class="main_hr">
+
+                        <span>''' + load_lang('encryption_method') + '''</span>
+                        <hr class="main_hr">
+                        <select name="encode">''' + encode_select + '''</select>
 
                         <h3>''' + load_lang('ua') + '''</h3>
                         

+ 1 - 4
route/main_view.py

@@ -30,7 +30,4 @@ def main_view(name = ''):
                 else:
                     mime_type = 'text/' + mime_type
 
-            return flask.send_from_directory(
-                dir_name, file_name, 
-                mimetype = mime_type
-            )
+            return flask.send_from_directory(dir_name, file_name, mimetype = mime_type)

+ 1 - 4
route/main_view_image.py

@@ -10,9 +10,6 @@ def main_view_image(name = ''):
             if mime_type == 'svg':
                 mime_type = 'svg+xml'
 
-            return flask.send_from_directory(
-                './' + load_image_url(), name, 
-                mimetype = 'image/' + mime_type
-            )
+            return flask.send_from_directory('./' + load_image_url(), name, mimetype = 'image/' + mime_type)
         else:
             return main_func_error_404()

+ 35 - 69
route/recent_block.py

@@ -1,10 +1,9 @@
 from .tool.func import *
 
-def recent_block_2(name = 'Test', tool = 'all'):
+def recent_block(name = 'Test', tool = 'all', num = 1):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
-        num = int(number_check(flask.request.args.get('num', '1')))
         sql_num = (num * 50 - 50) if num * 50 > 0 else 0
 
         div = '''
@@ -17,80 +16,47 @@ def recent_block_2(name = 'Test', tool = 'all'):
                     </tr>
         '''
 
-        get_type = flask.request.args.get('type', '')
-        sub_type = flask.request.args.get('s_type', '')
+        div = '' + \
+            '<a href="/block_log">(' + load_lang('all') + ')</a> ' + \
+            '<a href="/manager/11">(' + load_lang('blocked') + ')</a> ' + \
+            '<a href="/manager/12">(' + load_lang('admin') + ')</a> ' + \
+            '<a href="/block_log/ongoing">(' + load_lang('in_progress') + ')</a> ' + \
+            '<a href="/block_log/regex">(' + load_lang('regex') + ')</a>' + \
+            '<hr class="main_hr">' + \
+        '' + div
+
         if tool == 'all':
-            if get_type == 'ongoing':
-                sub = ' (' + load_lang('in_progress') + ')'
-
-                if sub_type == '':
-                    div = '' + \
-                        '<a href="?type=ongoing&s_type=regex">(' + load_lang('regex') + ')</a> ' + \
-                        '<a href="?type=ongoing&s_type=normal">(' + load_lang('normal') + ')</a>' + \
-                        '<hr class="main_hr">' + \
-                    '' + div
-                    menu = [['block_log', load_lang('return')]]
-                    plus_sql = ''
-                else:
-                    menu = [['block_log?type=ongoing', load_lang('return')]]
-
-                    if sub_type == 'regex':
-                        sub += ' (' + load_lang('regex') + ')'
-                        plus_sql = 'and band = \'regex\' '
-                    else:
-                        sub += ' (' + load_lang('normal') + ')'
-                        plus_sql = 'and band = \'\' '
-
-                curs.execute(db_change("" + \
-                    "select why, block, blocker, end, today, band, ongoing from rb " + \
-                    "where ((end > ? and end like '2%') or end = '') and ongoing = '1' " + plus_sql + \
-                    "order by end desc limit ?, 50" + \
-                ""), [
-                    get_time(),
-                    sql_num
-                ])
-            else:
-                sub = 0
-                menu = 0
-
-                div = '' + \
-                    '<a href="/manager/11">(' + load_lang('blocked') + ')</a> ' + \
-                    '<a href="/manager/12">(' + load_lang('admin') + ')</a> ' + \
-                    '<a href="?type=ongoing">(' + load_lang('in_progress') + ')</a>' + \
-                    '<hr class="main_hr">' + \
-                '' + div
-
-                curs.execute(db_change("" + \
-                    "select why, block, blocker, end, today, band, ongoing " + \
-                    "from rb order by today desc limit ?, 50" + \
-                ""), [sql_num])
+            sub = 0
+            menu = [['other', load_lang('return')]]
+
+            curs.execute(db_change("select why, block, blocker, end, today, band, ongoing from rb order by today desc limit ?, 50"), [sql_num])
+        elif tool == 'ongoing':
+            sub = '(' + load_lang('in_progress') + ')'
+            menu = [['other', load_lang('return')]]
+
+            curs.execute(db_change("select why, block, blocker, end, today, band, ongoing from rb where ongoing = '1' order by end desc limit ?, 50"), [sql_num])
+        elif tool == 'regex':
+            sub = '(' + load_lang('regex') + ')'
+            menu = [['other', load_lang('return')]]
+
+            curs.execute(db_change("select why, block, blocker, end, today, band, ongoing from rb where band = 'regex' order by today desc limit ?, 50"), [sql_num])
         elif tool == 'user':
-            sub = ' (' + load_lang('blocked') + ')'
-            menu = [['block_log', load_lang('normal')]]
-
-            curs.execute(db_change("" + \
-                "select why, block, blocker, end, today, band, ongoing " + \
-                "from rb where block = ? order by today desc limit ?, 50" + \
-            ""), [
-                name, 
-                sql_num
-            ])
+            sub = '(' + load_lang('blocked') + ')'
+            menu = [['other', load_lang('return')]]
+
+            curs.execute(db_change("select why, block, blocker, end, today, band, ongoing from rb where block = ? order by today desc limit ?, 50"), [name, sql_num])
         else:
-            sub = ' (' + load_lang('admin') + ')'
-            menu = [['block_log', load_lang('normal')]]
+            sub = '(' + load_lang('admin') + ')'
+            menu = [['other', load_lang('return')]]
 
-            curs.execute(db_change("" + \
-                "select why, block, blocker, end, today, band, ongoing " + \
-                "from rb where blocker = ? order by today desc limit ?, 50" + \
-            ""), [
-                name, 
-                sql_num
-            ])
+            curs.execute(db_change("select why, block, blocker, end, today, band, ongoing from rb where blocker = ? order by today desc limit ?, 50"), [name, sql_num])
 
         data_list = curs.fetchall()
         all_ip = ip_pas([i[1] for i in data_list] + [i[2] for i in data_list])
         for data in data_list:
             why = '<br>' if data[0] == '' else html.escape(data[0])
+            if why == 'edit filter':
+                why = '<a href="/edit_filter/' + url_pas(data[1]) + '">edit filter</a>'
 
             if data[5] == 'regex':
                 ip = data[1]
@@ -135,9 +101,9 @@ def recent_block_2(name = 'Test', tool = 'all'):
         div += '</table>'
 
         if tool == 'all':
-            div += next_fix('/block_log?num=', num, data_list)
+            div += next_fix('/block_log/', num, data_list)
         else:
-            div += next_fix('/block_log/' + url_pas(tool) + '/' + url_pas(name) + '?num=', num, data_list)
+            div += next_fix('/block_log/' + url_pas(tool) + '/' + url_pas(name) + '/', num, data_list)
 
         return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('recent_ban'), wiki_set(), wiki_custom(), wiki_css([sub, 0])],

+ 4 - 1
route/recent_change.py

@@ -143,7 +143,10 @@ def recent_change(name = '', tool = '', num = 1, set_type = 'normal'):
                         style[1] = 'class="opennamu_history_blind"'
 
                 if tool == 'history':
-                    title = '<a href="/w_rev/' + data[0] + '/' + url_pas(name) + '">r' + data[0] + '</a> '
+                    if int(data[0]) < 2:
+                        title = '<a href="/raw_rev/' + data[0] + '/' + url_pas(name) + '">r' + data[0] + '</a> '
+                    else:
+                        title = '<a href="/diff/' + str(int(data[0]) - 1) + '/' + data[0] + '/' + url_pas(name) + '">r' + data[0] + '</a> '
                 else:
                     title = '<a href="/w/' + url_pas(data[1]) + '">' + html.escape(data[1]) + '</a> '
                     if int(data[0]) < 2:

+ 24 - 21
route/tool/func.py

@@ -1043,9 +1043,9 @@ def wiki_css(data):
     data += ['' for _ in range(0, 3 - len(data))]
     
     data_css = ''
-    data_css_add = ''
+    data_css_dark = ''
 
-    data_css_ver = '191'
+    data_css_ver = '194'
     data_css_ver = '.cache_v' + data_css_ver
 
     if 'main_css' in global_wiki_set:
@@ -1081,16 +1081,23 @@ def wiki_css(data):
 
         # External CSS
         data_css += '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.8/dist/katex.min.css" integrity="sha384-GvrOXuhMATgEsSwCs4smul74iXGOixntILdUW9XmUC6+HX0sLNAK3q71HotJqlAn" crossorigin="anonymous">'
+        data_css += '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/default.min.css" integrity="sha512-hasIneQUHlh06VNBe7f6ZcHmeRTLIaQWFd43YriJ0UND19bvYRauxthDg8E4eVNPm9bRUhr5JGeqH7FRFXQu5g==" crossorigin="anonymous" referrerpolicy="no-referrer" />'
     
         global_wiki_set['main_css'] = data_css
 
     # Darkmode
-    if flask.request.cookies.get('main_css_darkmode', '0') == '0':
-        data_css += '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/default.min.css" integrity="sha512-hasIneQUHlh06VNBe7f6ZcHmeRTLIaQWFd43YriJ0UND19bvYRauxthDg8E4eVNPm9bRUhr5JGeqH7FRFXQu5g==" crossorigin="anonymous" referrerpolicy="no-referrer" />'
+    if 'dark_main_css' in global_wiki_set:
+        data_css_dark = global_wiki_set['dark_main_css']
     else:
-        data_css += '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/dark.min.css" integrity="sha512-bfLTSZK4qMP/TWeS1XJAR/VDX0Uhe84nN5YmpKk5x8lMkV0D+LwbuxaJMYTPIV13FzEv4CUOhHoc+xZBDgG9QA==" crossorigin="anonymous" referrerpolicy="no-referrer" />'
+        # Main CSS
+        data_css_dark += '<link rel="stylesheet" href="/views/main_css/css/sub/dark.css' + data_css_ver + '">'
+
+        # External CSS
+        data_css_dark += '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/dark.min.css" integrity="sha512-bfLTSZK4qMP/TWeS1XJAR/VDX0Uhe84nN5YmpKk5x8lMkV0D+LwbuxaJMYTPIV13FzEv4CUOhHoc+xZBDgG9QA==" crossorigin="anonymous" referrerpolicy="no-referrer" />'
+
+        global_wiki_set['dark_main_css'] = data_css_dark
 
-    data = data[0:2] + ['', data_css_add + data_css] + data[2:]
+    data = data[0:2] + ['', data_css] + data[2:] + [data_css_dark]
 
     return data
 
@@ -1399,7 +1406,7 @@ def render_set(doc_name = '', doc_data = '', data_type = 'view', data_in = '', d
                     get_class_render[0] = '''
                         <style>
                             .opennamu_render_complete {
-                                font-size: 14.4px !important;
+                                font-size: 15px !important;
                                 line-height: 1.5;
                             }
 
@@ -1750,9 +1757,7 @@ def get_admin_list(num = None):
         curs = conn.cursor()
         
         if num == 'all':
-            curs.execute(db_change(
-                "select data from user_set where data != 'user' and name = 'acl'"
-            ))
+            curs.execute(db_change("select data from user_set where data != 'user' and name = 'acl'"))
             db_data = curs.fetchall()
             db_data = [db_data_in[0] for db_data_in in db_data] if db_data else []
             
@@ -1761,14 +1766,10 @@ def get_admin_list(num = None):
             check = get_admin_auth_list(num)
             admin_list = []
             
-            curs.execute(db_change(
-                'select name from alist where acl = ?'
-            ), [check])
+            curs.execute(db_change('select name from alist where acl = ?'), [check])
             db_data = curs.fetchall()
             for db_data_in in db_data:
-                curs.execute(db_change(
-                    "select id from user_set where data = ? and name = 'acl'"
-                ), [db_data_in[0]])
+                curs.execute(db_change("select id from user_set where data = ? and name = 'acl'"), [db_data_in[0]])
                 db_data_2 = curs.fetchall()
                 admin_list += [db_data_2_in[0] for db_data_2_in in db_data_2] if db_data_2 else []
                 
@@ -1834,9 +1835,7 @@ def acl_check(name = 'test', tool = '', topic_num = '1'):
                 if get_ban == 1:
                     return 1
                     
-                curs.execute(db_change(
-                    "select data from acl where title = ? and type = 'decu'"
-                ), [name])
+                curs.execute(db_change("select data from acl where title = ? and type = 'decu'"), [name])
                 acl_data = curs.fetchall()
                 if acl_data:
                     if acl_data[0][0] == 'all':
@@ -2300,6 +2299,7 @@ def do_edit_filter(data):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
+        ip = ip_check()
         if admin_check(1) != 1:
             curs.execute(db_change("select plus, plus_t from html_filter where kind = 'regex_filter' and plus != ''"))
             for data_list in curs.fetchall():
@@ -2314,9 +2314,12 @@ def do_edit_filter(data):
                         r_time = (time + plus).strftime("%Y-%m-%d %H:%M:%S")
                     else:
                         r_time = '0'
-                
+
+                    curs.execute(db_change('delete from user_set where name = "edit_filter" and id = ?'), [ip])
+                    curs.execute(db_change('insert into user_set (name, id, data) values ("edit_filter", ?, ?)'), [ip, data])
+
                     ban_insert(
-                        ip_check(),
+                        ip,
                         r_time,
                         'edit filter',
                         None,

+ 1 - 1
route/tool/func_render_namumark.py

@@ -1020,7 +1020,7 @@ class class_do_render_namumark:
 
                         if self.data_category == '':
                             self.data_category = '' + \
-                                '<div class="opennamu_category">' + \
+                                '<div class="opennamu_category" id="cate">' + \
                                     '<a class="opennamu_category_button" href="javascript:opennamu_do_category_spread();"> (+)</a>' + \
                                     self.get_tool_lang('category') + ' : ' + \
                                 '' + \

+ 29 - 0
route/user_edit_filter.py

@@ -0,0 +1,29 @@
+from .tool.func import *
+
+def user_edit_filter(name = ''):
+    with get_db_connect() as conn:
+        curs = conn.cursor()
+
+        if admin_check(1, None) != 1:
+            return redirect('/block_log')
+
+        if flask.request.method == 'POST':
+            curs.execute(db_change('delete from user_set where name = "edit_filter" and id = ?'), [name])
+
+            return redirect('/edit_filter/' + url_pas(name))
+        else:
+            curs.execute(db_change('select data from user_set where name = "edit_filter" and id = ?'), [name])
+            db_data = curs.fetchall()
+            p_data = db_data[0][0] if db_data else ''
+            p_data = '<textarea readonly class="opennamu_textarea_500">' + html.escape(p_data) + '</textarea>'
+
+            return easy_minify(flask.render_template(skin_check(),
+                imp = [name, wiki_set(), wiki_custom(), wiki_css(['(' + load_lang('edit_filter') + ')', 0])],
+                data = p_data + '''
+                    <hr class="main_hr">
+                    <form method="post">
+                        <button type="submit">''' + load_lang('delete') + '''</button>
+                    </form>
+                ''',
+                menu = [['block_log', load_lang('return')]]
+            ))

+ 0 - 0
route/view_category.py


+ 64 - 84
route/view_read.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def view_read(name = 'Test', doc_rev = '', doc_from = '', do_type = ''):
+def view_read(name = 'Test', do_type = ''):
     with get_db_connect() as conn:
         curs = conn.cursor()
 
@@ -18,7 +18,6 @@ def view_read(name = 'Test', doc_rev = '', doc_from = '', do_type = ''):
             
         uppage = re.sub(r"/([^/]+)$", '', name)
         uppage = 0 if uppage == name else uppage
-        num = str(doc_rev)
 
         curs.execute(db_change("select sub from rd where title = ? and not stop = 'O' order by date desc"), [name])
         topic = 1 if curs.fetchall() else 0
@@ -161,14 +160,7 @@ def view_read(name = 'Test', doc_rev = '', doc_from = '', do_type = ''):
         else:
             name_view = name
 
-        if num != '':
-            curs.execute(db_change("select title from history where title = ? and id = ? and hide = 'O'"), [name, num])
-            if curs.fetchall() and admin_check(6) != 1:
-                return redirect('/history/' + url_pas(name))
-
-            curs.execute(db_change("select data from history where title = ? and id = ?"), [name, num])
-        else:
-            curs.execute(db_change("select data from data where title = ?"), [name])
+        curs.execute(db_change("select data from data where title = ?"), [name])
 
         data = curs.fetchall()
         end_data = render_set(
@@ -217,44 +209,39 @@ def view_read(name = 'Test', doc_rev = '', doc_from = '', do_type = ''):
         else:
             response_data = 200
 
-        if num != '':
-            menu += [['history/' + url_pas(name), load_lang('return')]]
-            sub = ' (r' + str(num) + ')'
-            acl = 0
-            r_date = 0
+        curs.execute(db_change("select title from acl where title = ?"), [name])
+        acl = 1 if curs.fetchall() else 0
+        menu_acl = 1 if acl_check(name) == 1 else 0
+        if response_data == 404:
+            menu += [['edit/' + url_pas(name), load_lang('create'), menu_acl]] 
         else:
-            curs.execute(db_change("select title from acl where title = ?"), [name])
-            acl = 1 if curs.fetchall() else 0
-            menu_acl = 1 if acl_check(name) == 1 else 0
-            if response_data == 404:
-                menu += [['edit/' + url_pas(name), load_lang('create'), menu_acl]] 
-            else:
-                menu += [['edit/' + url_pas(name), load_lang('edit'), menu_acl]]
-
-            menu += [
-                ['topic/' + url_pas(name), load_lang('discussion'), topic], 
-                ['history/' + url_pas(name), load_lang('history')], 
-                ['xref/' + url_pas(name), load_lang('backlink')], 
-                ['acl/' + url_pas(name), load_lang('setting'), acl],
-            ]
-
-            if flask.session and 'lastest_document' in flask.session:
-                if type(flask.session['lastest_document']) != type([]):
-                    flask.session['lastest_document'] = []
-            else:
+            menu += [['edit/' + url_pas(name), load_lang('edit'), menu_acl]]
+
+        menu += [
+            ['topic/' + url_pas(name), load_lang('discussion'), topic], 
+            ['history/' + url_pas(name), load_lang('history')], 
+            ['xref/' + url_pas(name), load_lang('backlink')], 
+            ['acl/' + url_pas(name), load_lang('setting'), acl],
+        ]
+
+        if flask.session and 'lastest_document' in flask.session:
+            if type(flask.session['lastest_document']) != type([]):
                 flask.session['lastest_document'] = []
+        else:
+            flask.session['lastest_document'] = []
 
-            if do_type == 'from':
-                menu += [['w/' + url_pas(name), load_lang('pass')]]
-                
-                last_page = ''
-                for for_a in reversed(range(0, len(flask.session['lastest_document']))):
-                    last_page = flask.session['lastest_document'][for_a]
+        if do_type == 'from':
+            menu += [['w/' + url_pas(name), load_lang('pass')]]
+            
+            last_page = ''
+            for for_a in reversed(range(0, len(flask.session['lastest_document']))):
+                last_page = flask.session['lastest_document'][for_a]
 
-                    curs.execute(db_change("select link from back where (title = ? or link = ?) and type = 'redirect' limit 1"), [last_page, last_page])
-                    if curs.fetchall():
-                        break
+                curs.execute(db_change("select link from back where (title = ? or link = ?) and type = 'redirect' limit 1"), [last_page, last_page])
+                if curs.fetchall():
+                    break
 
+            if last_page != name:
                 redirect_text = '{0} ➤ {1}'
 
                 curs.execute(db_change('select data from other where name = "redirect_text"'))
@@ -269,53 +256,46 @@ def view_read(name = 'Test', doc_rev = '', doc_from = '', do_type = ''):
                     redirect_text = redirect_text.format('<a href="/w_from/' + url_pas(last_page) + '">' + html.escape(last_page) + '</a>', '<b>' + html.escape(name) + '</b>')
 
                 end_data = '''
-                    <div id="redirect">
+                    <div class="opennamu_redirect" id="redirect">
                         ''' + redirect_text + '''
                     </div>
                     <hr class="main_hr">
                 ''' + end_data
-                    
-            if len(flask.session['lastest_document']) >= 10:
-                flask.session['lastest_document'] = flask.session['lastest_document'][-9:] + [name]
-            else:
-                flask.session['lastest_document'] += [name]
-            
-            flask.session['lastest_document'] = list(reversed(dict.fromkeys(reversed(flask.session['lastest_document']))))
-
-            view_history_on = get_main_skin_set(curs, flask.session, 'main_css_view_history', ip)
-            if view_history_on == 'on':
-                end_data = '' + \
-                    '<div id="redirect">' + \
-                        load_lang('trace') + ' : ' + \
-                        ' ➥ '.join(
-                            [
-                                '<a href="/w/' + url_pas(for_a) + '">' + html.escape(for_a) + '</a>'
-                                for for_a in flask.session['lastest_document']
-                            ]
-                        ) + \
-                    '</div>' + \
-                    '<hr class="main_hr">' + \
-                '' + end_data
-
-            if uppage != 0:
-                menu += [['w/' + url_pas(uppage), load_lang('upper')]]
-
-            if down:
-                menu += [['down/' + url_pas(name), load_lang('sub')]]
-
-            curs.execute(db_change("select set_data from data_set where doc_name = ? and set_name = 'last_edit'"), [name])
-            r_date = curs.fetchall()
-            r_date = r_date[0][0] if r_date else 0
+                
+        if len(flask.session['lastest_document']) >= 10:
+            flask.session['lastest_document'] = flask.session['lastest_document'][-9:] + [name]
+        else:
+            flask.session['lastest_document'] += [name]
+        
+        flask.session['lastest_document'] = list(reversed(dict.fromkeys(reversed(flask.session['lastest_document']))))
+
+        view_history_on = get_main_skin_set(curs, flask.session, 'main_css_view_history', ip)
+        if view_history_on == 'on':
+            end_data = '' + \
+                '<div class="opennamu_trace">' + \
+                    '<a class="opennamu_trace_button" href="javascript:opennamu_do_trace_spread();"> (+)</a>' + \
+                    load_lang('trace') + ' : ' + \
+                    ' ➥ '.join(
+                        [
+                            '<a href="/w/' + url_pas(for_a) + '">' + html.escape(for_a) + '</a>'
+                            for for_a in flask.session['lastest_document']
+                        ]
+                    ) + \
+                '</div>' + \
+                '<hr class="main_hr">' + \
+            '' + end_data
+
+        if uppage != 0:
+            menu += [['w/' + url_pas(uppage), load_lang('upper')]]
+
+        if down:
+            menu += [['down/' + url_pas(name), load_lang('sub')]]
+
+        curs.execute(db_change("select set_data from data_set where doc_name = ? and set_name = 'last_edit'"), [name])
+        r_date = curs.fetchall()
+        r_date = r_date[0][0] if r_date else 0
 
         div = file_data + user_doc + end_data + category_total
-
-        if num != '':
-            curs.execute(db_change('select data from other where name = "phrase_old_page_warning"'))
-            db_data = curs.fetchall()
-            if db_data and db_data[0][0] != '':
-                div = db_data[0][0] + '<hr class="main_hr">' + div
-
-            doc_type = 'rev'
         
         if doc_type == '':
             curs.execute(db_change('select data from other where name = "outdated_doc_warning_date"'))

+ 21 - 0
route_go/api_func_sha224.go

@@ -0,0 +1,21 @@
+package main
+
+import (
+	"crypto/sha256"
+	"encoding/hex"
+	"fmt"
+	"os"
+)
+
+func main() {
+	call_arg := os.Args[1:]
+
+	data := call_arg[0]
+
+	hasher := sha256.New224()
+	hasher.Write([]byte(data))
+	hash_byte := hasher.Sum(nil)
+	hash_str := hex.EncodeToString(hash_byte)
+
+	fmt.Print(hash_str)
+}

BIN
route_go/bin/api_func_sha224.amd64.bin


BIN
route_go/bin/api_func_sha224.amd64.exe


BIN
route_go/bin/api_func_sha224.arm64.bin


BIN
route_go/bin/api_func_sha224.arm64.exe


BIN
route_go/bin/main_func_easter_egg.amd64.bin


BIN
route_go/bin/main_func_easter_egg.amd64.exe


BIN
route_go/bin/main_func_easter_egg.arm64.bin


BIN
route_go/bin/main_func_easter_egg.arm64.exe


+ 0 - 3
route_go/main_func_easter_egg.go

@@ -3,12 +3,9 @@ package main
 import (
 	"fmt"
 	"math/rand"
-	"time"
 )
 
 func main() {
-	rand.Seed(time.Now().UnixNano())
-
 	select_list := []string{
 		"PWD0ZbR7AOY", // Shanghai Teahouse ~ Chinese Tea
 		"HoU29ljOmTE", // Flawless Clothing of Celestials

+ 1 - 1
route_go/view_random.go

@@ -10,8 +10,8 @@ import (
 
 func main() {
 	call_arg := os.Args[1:]
-	db_set := map[string]string{}
 
+	db_set := map[string]string{}
 	json.Unmarshal([]byte(call_arg[0]), &db_set)
 
 	db := tool.DB_connect(db_set)

+ 2 - 2
version.json

@@ -1,7 +1,7 @@
 {
     "beta" : {
-        "r_ver" : "v3.4.6-RC5-dev93",
+        "r_ver" : "v3.5.0-dev2",
         "c_ver" : "3500374",
-        "s_ver" : "3500112"
+        "s_ver" : "3500113"
     }
 }

+ 3 - 3
views/main_css/css/main.css

@@ -181,7 +181,7 @@ a:hover {
 }
 
 /* - category */
-.opennamu_category {
+.opennamu_category, .opennamu_trace {
     border: 1px solid gainsboro;
     
     padding: 10px;
@@ -191,7 +191,7 @@ a:hover {
     text-overflow: ellipsis;
 }
 
-.opennamu_category_button {
+.opennamu_category_button, .opennamu_trace_button {
     float: right;
     z-index: 100;
     position: relative;
@@ -214,7 +214,7 @@ a:hover {
     margin-top: 10px;
 }
 
-pre, #redirect {
+pre, .opennamu_redirect {
     border: 1px solid gainsboro;
     
     padding: 10px;

+ 2 - 1
views/main_css/css/sub/dark.css

@@ -16,7 +16,7 @@ input::placeholder, textarea::placeholder, select::placeholder {
     color: white;
 }
 
-#toc, .opennamu_TOC, #cate, #redirect {
+.opennamu_TOC, .opennamu_redirect {
     background: #1f2023;
 }
 
@@ -70,6 +70,7 @@ blockquote {
     background-color: #313236;
 }
 
+/* 이 부분은 레거시 */
 #topic_color {
     background: #325a56;
 }

+ 8 - 0
views/main_css/js/func/func.js

@@ -122,4 +122,12 @@ function opennamu_get_main_skin_set(set_name) {
 
 function opennamu_insert_v(name, data) {
     document.getElementById(name).value = data;
+}
+
+function opennamu_do_trace_spread() {
+    if(document.getElementsByClassName('opennamu_trace')) {
+        document.getElementsByClassName('opennamu_trace')[0].innerHTML = '' +
+            '<style>.opennamu_trace_button { display: none; } .opennamu_trace { white-space: pre-wrap; overflow-x: unset; text-overflow: unset; }</style>' +
+        '' + document.getElementsByClassName('opennamu_trace')[0].innerHTML
+    }
 }

+ 97 - 102
views/main_css/js/func/insert_user_info.js

@@ -1,5 +1,101 @@
 "use strict";
 
+function do_insert_user_info_sub(name, lang_data_list, lang_data = {}, for_a = 0) {
+    if(lang_data_list[for_a]) {
+        fetch("/api/lang/" + lang_data_list[for_a]).then(function(res) {
+            return res.json();
+        }).then(function(data) {
+            lang_data[lang_data_list[for_a]] = data['data'];
+
+            do_insert_user_info_sub(name, lang_data_list, lang_data, for_a + 1);
+        });
+    } else {
+        fetch("/api/user_info/" + opennamu_do_url_encode(name)).then(function(res) {
+            return res.json();
+        }).then(function(data) {
+            let get_data_auth = data['data']['auth'];
+            if(get_data_auth === '0') {
+                get_data_auth = lang_data['ip'];
+            } else if(get_data_auth === '1') {
+                get_data_auth = lang_data['member'];
+            } else {
+                get_data_auth = data['data']['auth'];
+            }
+
+            let get_data_auth_date = data['data']['auth_date'];
+            if(get_data_auth_date !== '0') {
+                get_data_auth += ' (~' + get_data_auth_date + ')'
+            }
+            
+            let get_data_ban = data['data']['ban'];
+            if(get_data_ban === '0') {
+                get_data_ban = lang_data['normal'];
+            } else {
+                get_data_ban = lang_data['ban'];
+                get_data_ban += '<br>';
+                
+                get_data_ban += lang_data['type'] + ' : ';
+                if(data['data']['ban']['type'] === 'normal') {
+                    get_data_ban += lang_data['normal']; 
+                } else {
+                    get_data_ban += lang_data['regex'];
+                }
+                get_data_ban += '<br>';
+                
+                get_data_ban += lang_data['period'] + ' : ';
+                if(data['data']['ban']['period'] === '0') {
+                    get_data_ban += lang_data['limitless']; 
+                } else {
+                    get_data_ban += data['data']['ban']['period'];
+                }
+                get_data_ban += '<br>';
+                
+                get_data_ban += lang_data['login_able'] + ' : ';
+                if(data['data']['ban']['login_able'] === '1') {
+                    get_data_ban += 'O'; 
+                } else {
+                    get_data_ban += 'X';
+                }
+                get_data_ban += '<br>';
+                
+                get_data_ban += lang_data['why'] + ' : ' + data['data']['ban']['reason'];
+            }
+
+            let level = '0';
+            let exp = '0';
+            let max_exp = '0';
+            if(get_data_auth !== lang_data['ip']) {
+                level = data['data']['level'];
+                exp = data['data']['exp'];
+                max_exp = String(500 + (Number(data['data']['level']) * 50));
+            }
+            
+            let end_data = '' +
+                '<table class="user_info_table">' +
+                    '<tr>' +
+                        '<td>' + lang_data['user_name'] + '</td>' +
+                        '<td>' + data['data']['render'] + '</td>' +
+                    '</tr>' +
+                    '<tr>' +
+                        '<td>' + lang_data['authority'] + '</td>' +
+                        '<td>' + get_data_auth + '</td>' +
+                    '</tr>' +
+                    '<tr>' +
+                        '<td>' + lang_data['state'] + '</td>' +
+                        '<td>' + get_data_ban + '</td>' +
+                    '</tr>' +
+                    '<tr>' +
+                        '<td>' + lang_data['level'] + '</td>' +
+                        '<td>' + level + ' (' + exp + ' / ' + max_exp + ')</td>' +
+                    '</tr>' +
+                '</table>' +
+            '';
+            
+            document.getElementById('opennamu_get_user_info').innerHTML = end_data;
+        });
+    }
+}
+
 function do_insert_user_info() {
     if(document.getElementById('opennamu_get_user_info')) {
         let name = document.getElementById('opennamu_get_user_info').innerHTML;
@@ -22,108 +118,7 @@ function do_insert_user_info() {
             'level'
         ];
 
-        let data_form = new FormData();
-        data_form.append('title_list', JSON.stringify(lang_data_list));
-
-        let xhr = new XMLHttpRequest();
-        xhr.open("POST", "/api/lang/Test");
-        xhr.send(data_form);
-
-        xhr.onreadystatechange = function() {
-            if(this.readyState === 4 && this.status === 200) {
-                let lang_data = JSON.parse(this.responseText);
-                
-                let xhr_2 = new XMLHttpRequest();
-                xhr_2.open("POST", "/api/user_info/" + opennamu_do_url_encode(name));
-                xhr_2.send();
-
-                xhr_2.onreadystatechange = function() {
-                    if(this.readyState === 4 && this.status === 200) {
-                        let get_data = JSON.parse(this.responseText);
-                        
-                        let get_data_auth = get_data[name]['auth'];
-                        if(get_data_auth === '0') {
-                            get_data_auth = lang_data['ip'];
-                        } else if(get_data_auth === '1') {
-                            get_data_auth = lang_data['member'];
-                        } else {
-                            get_data_auth = get_data[name]['auth'];
-                        }
-
-                        let get_data_auth_date = get_data[name]['auth_date'];
-                        if(get_data_auth_date !== '0') {
-                            get_data_auth += ' (~' + get_data_auth_date + ')'
-                        }
-                        
-                        let get_data_ban = get_data[name]['ban'];
-                        if(get_data_ban === '0') {
-                            get_data_ban = lang_data['normal'];
-                        } else {
-                            get_data_ban = lang_data['ban'];
-                            get_data_ban += '<br>';
-                            
-                            get_data_ban += lang_data['type'] + ' : ';
-                            if(get_data[name]['ban']['type'] === 'normal') {
-                                get_data_ban += lang_data['normal']; 
-                            } else {
-                                get_data_ban += lang_data['regex'];
-                            }
-                            get_data_ban += '<br>';
-                            
-                            get_data_ban += lang_data['period'] + ' : ';
-                            if(get_data[name]['ban']['period'] === '0') {
-                                get_data_ban += lang_data['limitless']; 
-                            } else {
-                                get_data_ban += get_data[name]['ban']['period'];
-                            }
-                            get_data_ban += '<br>';
-                            
-                            get_data_ban += lang_data['login_able'] + ' : ';
-                            if(get_data[name]['ban']['login_able'] === '1') {
-                                get_data_ban += 'O'; 
-                            } else {
-                                get_data_ban += 'X';
-                            }
-                            get_data_ban += '<br>';
-                            
-                            get_data_ban += lang_data['why'] + ' : ' + get_data[name]['ban']['reason'];
-                        }
-
-                        let level = '0';
-                        let exp = '0';
-                        let max_exp = '0';
-                        if(get_data_auth !== lang_data['ip']) {
-                            level = get_data[name]['level'];
-                            exp = get_data[name]['exp'];
-                            max_exp = String(500 + (Number(get_data[name]['level']) * 50));
-                        }
-                        
-                        let data = '' +
-                            '<table class="user_info_table">' +
-                                '<tr>' +
-                                    '<td>' + lang_data['user_name'] + '</td>' +
-                                    '<td>' + get_data[name]['render'] + '</td>' +
-                                '</tr>' +
-                                '<tr>' +
-                                    '<td>' + lang_data['authority'] + '</td>' +
-                                    '<td>' + get_data_auth + '</td>' +
-                                '</tr>' +
-                                '<tr>' +
-                                    '<td>' + lang_data['state'] + '</td>' +
-                                    '<td>' + get_data_ban + '</td>' +
-                                '</tr>' +
-                                '<tr>' +
-                                    '<td>' + lang_data['level'] + '</td>' +
-                                    '<td>' + level + ' (' + exp + ' / ' + max_exp + ')</td>' +
-                                '</tr>' +
-                            '</table>' +
-                        '';
-                        
-                        document.getElementById('opennamu_get_user_info').innerHTML = data;
-                    }
-                }
-            }
-        }
+        do_insert_user_info_sub(name, lang_data_list);
     }
 }
 

+ 1 - 1
views/main_css/js/func/shortcut.js

@@ -11,7 +11,7 @@ document.onkeypress = function(e) {
         shortcut_check !== 'input' &&
         shortcut_check !== 'textarea'
     ) {
-        let doc_shortcut = /^\/(w|w_rev\/[0-9]+|w_from|history|edit|acl|topic|xref)\//i;
+        let doc_shortcut = /^\/(w|w_from|history|edit|acl|topic|xref)\//i;
 
         shortcut_key_list[e.key] = 1;
         if(shortcut_key_list['f'] === 1) {

+ 8 - 9
views/main_css/js/route/bbs_w_post.js

@@ -1,15 +1,14 @@
 function opennamu_change_comment(get_id) {
-    var _a;
-    var input = document.querySelector('#opennamu_comment_select');
-    if (input !== null) {
+    const input = document.querySelector('#opennamu_comment_select');
+    if(input !== null) {
         input.value = get_id;
-        (_a = document.getElementById('opennamu_edit_textarea')) === null || _a === void 0 ? void 0 : _a.focus();
+        document.getElementById('opennamu_edit_textarea')?.focus();
     }
 }
+
 function opennamu_return_comment() {
-    var _a;
-    var input = document.querySelector('#opennamu_comment_select');
-    if (input !== null) {
-        (_a = document.getElementById(input.value)) === null || _a === void 0 ? void 0 : _a.focus();
+    const input = document.querySelector('#opennamu_comment_select');
+    if(input !== null) {
+        document.getElementById(input.value)?.focus();
     }
-}
+}

+ 0 - 14
views/main_css/js/route/bbs_w_post.ts

@@ -1,14 +0,0 @@
-function opennamu_change_comment(get_id : string): void {
-    const input = document.querySelector('#opennamu_comment_select') as HTMLInputElement | null;
-    if(input !== null) {
-        input.value = get_id;
-        document.getElementById('opennamu_edit_textarea')?.focus();
-    }
-}
-
-function opennamu_return_comment(): void {
-    const input = document.querySelector('#opennamu_comment_select') as HTMLInputElement | null;
-    if(input !== null) {
-        document.getElementById(input.value)?.focus();
-    }
-}

+ 27 - 20
views/main_css/js/route/editor_sub.js

@@ -1,43 +1,50 @@
 function opennamu_do_editor_preview() {
     do_sync_monaco_and_textarea();
-    var input = document.querySelector('#opennamu_edit_textarea');
-    if (input !== null) {
-        var doc_name = 'test';
-        var doc_name_input = document.querySelector('#opennamu_editor_doc_name');
-        if (doc_name_input !== null) {
+
+    const input = document.querySelector('#opennamu_edit_textarea');
+    if(input !== null) {
+        let doc_name = 'test';
+
+        const doc_name_input = document.querySelector('#opennamu_editor_doc_name');
+        if(doc_name_input !== null) {
             doc_name = doc_name_input.value;
         }
-        fetch("/api/w_tool/preview/" + (opennamu_do_url_encode(doc_name)), {
-            method: 'POST',
-            headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
-            body: new URLSearchParams({
+
+        fetch("/api/render/" + (opennamu_do_url_encode(doc_name)), {
+            method : 'POST',
+            headers : { 'Content-Type': 'application/x-www-form-urlencoded' },
+            body : new URLSearchParams({
                 'data': input.value,
             })
-        }).then(function (res) {
+        }).then(function(res) {
             return res.json();
-        }).then(function (text) {
-            var preview = document.querySelector('#opennamu_preview_area');
-            if (preview !== null) {
+        }).then(function(text) {
+            const preview = document.querySelector('#opennamu_preview_area');
+            if(preview !== null) {
                 preview.innerHTML = text.data;
                 eval(text.js_data);
             }
         });
     }
 }
+
 function opennamu_do_editor_temp_save() {
     do_sync_monaco_and_textarea();
-    var input = document.querySelector('#opennamu_edit_textarea');
-    if (input !== null) {
+
+    const input = document.querySelector('#opennamu_edit_textarea');
+    if(input !== null) {
         localStorage.setItem("key", input.value);
     }
 }
+
 function opennamu_do_editor_temp_save_load() {
-    var data = localStorage.getItem("key");
-    if (data !== null) {
-        var input = document.querySelector('#opennamu_edit_textarea');
-        if (input !== null) {
+    const data = localStorage.getItem("key");
+    if(data !== null) {
+        const input = document.querySelector('#opennamu_edit_textarea');
+        if(input !== null) {
             input.value = data;
         }
+        
         do_textarea_to_manaco();
     }
-}
+}

+ 0 - 58
views/main_css/js/route/editor_sub.ts

@@ -1,58 +0,0 @@
-declare function opennamu_do_url_encode(data : any) : string;
-declare function do_sync_monaco_and_textarea();
-declare function do_textarea_to_manaco();
-
-interface Window {
-    editor? : any;
-}
-
-function opennamu_do_editor_preview() {
-    do_sync_monaco_and_textarea();
-
-    const input = document.querySelector('#opennamu_edit_textarea') as HTMLInputElement | null;
-    if(input !== null) {
-        let doc_name : string = 'test';
-
-        const doc_name_input = document.querySelector('#opennamu_editor_doc_name') as HTMLInputElement | null;
-        if(doc_name_input !== null) {
-            doc_name = doc_name_input.value;
-        }
-
-        fetch("/api/w_tool/preview/" + (opennamu_do_url_encode(doc_name)), {
-            method : 'POST',
-            headers : { 'Content-Type': 'application/x-www-form-urlencoded' },
-            body : new URLSearchParams({
-                'data': input.value,
-            })
-        }).then(function(res) {
-            return res.json();
-        }).then(function(text) {
-            const preview = document.querySelector('#opennamu_preview_area') as HTMLInputElement | null;
-            if(preview !== null) {
-                preview.innerHTML = text.data;
-                eval(text.js_data);
-            }
-        });
-    }
-}
-
-function opennamu_do_editor_temp_save() {
-    do_sync_monaco_and_textarea();
-
-    const input = document.querySelector('#opennamu_edit_textarea') as HTMLInputElement | null;
-    if(input !== null) {
-        localStorage.setItem("key", input.value);
-    }
-}
-
-function opennamu_do_editor_temp_save_load() {
-    const data = localStorage.getItem("key");
-    if(data !== null) {
-        const input = document.querySelector('#opennamu_edit_textarea') as HTMLInputElement | null;
-        if(input !== null) {
-            input.value = data;
-        }
-        
-        do_textarea_to_manaco();
-    }
-}

+ 10 - 7
views/main_css/js/route/topic.js

@@ -1,11 +1,14 @@
 function opennamu_do_remove_blind_thread() {
-    var style = document.querySelector('#opennamu_remove_blind');
-    if (style !== null) {
-        if (style.innerHTML !== "") {
+    const style = document.querySelector('#opennamu_remove_blind');
+    if(style !== null) {
+        if(style.innerHTML !== "") {
             style.innerHTML = '';
-        }
-        else {
-            style.innerHTML = "\n                .opennamu_comment_blind_js {\n                    display: none;\n                }\n            ";
+        } else {
+            style.innerHTML = `
+                .opennamu_comment_blind_js {
+                    display: none;
+                }
+            `;
         }
     }
-}
+}

+ 0 - 14
views/main_css/js/route/topic.ts

@@ -1,14 +0,0 @@
-function opennamu_do_remove_blind_thread() {
-    const style = document.querySelector('#opennamu_remove_blind') as HTMLInputElement | null;
-    if(style !== null) {
-        if(style.innerHTML !== "") {
-            style.innerHTML = '';
-        } else {
-            style.innerHTML = `
-                .opennamu_comment_blind_js {
-                    display: none;
-                }
-            `;
-        }
-    }
-}

+ 20 - 0
views/ringo/css/dark.css

@@ -47,4 +47,24 @@ footer {
 
 #nav_bar a {
     color: white;
+}
+
+header#main a:hover {
+    background: #405d6a;
+}
+
+button:hover, aside .side_button:hover, .menu_item_link:hover, #main_data button:hover, #topic_color:hover {
+    background: #444;
+}
+
+button.search_button#goto:hover {
+    background: #53664d;
+}
+
+button.search_button#search:hover {
+    background: #665f52;
+}
+
+#opennamu_save_button {
+    background: #325a56;
 }

+ 2 - 2
views/ringo/index.html

@@ -15,8 +15,8 @@
         <script src="/views/ringo/js/skin_set.js.cache_v5"></script>
         <link rel="stylesheet" href="/views/ringo/css/main.css.cache_v7">
         {% if request.cookies.get('main_css_darkmode', '') == '1' %}
-            <link rel="stylesheet" href="/views/main_css/css/sub/dark.css.cache_v1">
-            <link rel="stylesheet" href="/views/ringo/css/dark.css.cache_v1">
+            {{imp[3][5]|safe}}
+            <link rel="stylesheet" href="/views/ringo/css/dark.css.cache_v2">
         {% endif %}
         <style id="ringo_add_style"></style>
         <link rel="shortcut icon" href="/views/main_css/file/favicon.ico.cache_v1">

+ 1 - 1
views/ringo/info.json

@@ -1,5 +1,5 @@
 {
     "name" : "Ringo",
     "skin_ver" : "v1.1.2",
-    "require_ver" : "3500112"
+    "require_ver" : "3500113"
 }

+ 0 - 53
views/tenshi/css/dark.css

@@ -1,53 +0,0 @@
-html, #main {
-    background: black;
-    color: white;
-}
-
-#top {
-    background: black;
-}
-
-.cel_in_cel, #background, div#pre_search, #toc, #cate, #redirect {
-    background: #1f2023;
-    border-color: #1f2023;
-}
-
-#bottom {
-    background: black;
-    color: white;
-}
-
-#top .cel_in_cel a {
-    color: white;
-}
-
-#mobile_search_input, #mobile_search_input::placeholder {
-    background: gray;
-    color: white;
-}
-
-#titlt_a {
-    color: white;
-}
-
-#search_input, textarea, input, button, select, #toc, #cate, #redirect { 
-    border-color: #1f2023; 
-    background: #1f2023;
-    color: white;
-}
-
-#search_input:hover, #search_input:focus {
-    color: white;
-}
-
-#search_input::placeholder {
-    color: white;
-}
-
-button#opennamu_save_button {
-    background: #083808;
-}
-
-#nav_bar {
-    background: #2f0000;
-}

+ 0 - 479
views/tenshi/css/main.css

@@ -1,479 +0,0 @@
-body, textarea, input, pre, code {
-    font-family: 'Apple SD Gothic', '맑은고딕', 'Nanum Gothic', 'Noto Sans KR', sans-serif;
-}
-
-body {
-    max-width: 100%;
-    
-    word-break: break-all;
-    word-wrap: break-word;
-    
-    margin: 0;
-    
-    font-size: 14px;
-}
-
-select {
-    padding: 5px;
-}
-
-html {
-    background: #eeeeee;
-}
-
-#background {
-    background: #eeeeee;
-}
-
-#main {
-    margin: auto;
-    margin-top: -20px;
-    
-    padding: 20px;
-    padding-bottom: 20px;
-    
-    min-height: 350px;
-    
-    background: white;
-    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12);
-}
-
-#bottom {
-    width: 100%;
-    
-    background: #eeeeee;
-    
-    margin-top: 10px;
-    padding-bottom: 20px;
-}
-
-#bottom_main {
-    margin: auto;
-    
-    padding-top: 20px;
-}
-
-#tool {
-    float: right;
-    
-    border: none;
-}
-
-@media (min-width: 780px) and (max-width: 1180px) {
-    #main {
-        width: calc(100% - 45px);
-    }
-
-    #top_main, #bottom_main {
-        width: 90%;
-    }
-
-    .is_mobile {
-        display: none;
-    }
-}
-
-
-@media (min-width: 1180px) and (max-width: 2000px) {
-    #main, #top_main, #bottom_main {
-        width: 1000px;
-    }
-    
-    .is_mobile {
-        display: none;
-    }
-}
-
-@media (min-width: 2000px) {
-    #main, #top_main, #bottom_main {
-        width: 55%;
-    }
-
-    .is_mobile {
-        display: none;
-    }
-}
-
-@media (max-width: 780px) {
-    #main {
-        width: 90%;
-        
-        border-left: none;
-        border-right: none;
-    }
-
-    #top_main, #bottom_main {
-        width: 90%;
-    }
-
-    .not_mobile {
-        display: none;
-    }
-
-    #tool {
-        float: none;
-        
-        width: 90%;
-        
-        margin-top: 0px;
-        margin-bottom: 10px;
-    }
-}
-
-h1, h2, h3, h4, h5, h6 {
-    border-bottom: 1px solid gainsboro;
-    
-    padding-bottom: 10px;
-}
-
-#main_top {
-    width: 100%;
-}
-
-/* top */
-#top {
-    width: 100%;
-    line-height: 50px;
-    
-    position: relative;
-    top: 0;
-    left: 0;
-
-    background: #2780e3;
-    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12);
-}
-
-#top_main {
-    margin: auto;
-}
-
-#top_tool {
-    float: right;
-    color: white;
-}
-
-#top_tool_group {
-    display: inline-block;
-    
-    margin-right: 10px;
-}
-
-#top_tool_cel {
-    display: inline-block;
-    
-    margin-right: -12px;
-}
-
-.top_in_cel {
-    padding-left: 10px;
-    padding-right: 10px;
-    
-    transition: .2s ease-in-out;
-}
-
-.top_in_cel:hover {
-    background: #022988;
-    
-    transition: .2s ease-in-out;
-}
-
-#top_in_user {
-    margin-right: -13px;
-}
-
-#tool_cel {
-    display: inline-block;
-}
-
-#top a {
-    color: white;
-    
-    display: block;
-}
-
-#logo {
-    display: inline-block;
-}
-
-#logo a {
-    padding-left: 20px;
-    padding-right: 20px;
-}
-
-.cel_in_cel {
-    padding: 10px;
-    
-    line-height: initial;
-    
-    position: absolute;
-    
-    background: white;
-    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12);
-}
-
-#top .cel_in_cel a {
-    color: black;
-    
-    padding-left: 0;
-    padding-right: 0;
-}
-
-/* search */
-#search {
-    display: inline-block;
-    width: 300px;
-}
-
-#search_input {
-    width: 220px;
-    height: 35px;
-    
-    padding-left: 10px;
-    
-    background-color: white;
-    border: solid 2px #2780e3;
-    color: black;
-    box-shadow: none;
-    
-    transition: .2s ease-in-out;
-}
-
-#search_input::placeholder {
-    color: black;
-}
-
-#search_input:hover, #search_input:focus {
-    border: solid 2px #f4aba1;
-    
-    transition: .2s ease-in-out;
-}
-
-#pre_search {
-    padding: 10px;
-    border: 1px solid #4a4a4a;
-    width: 200px;
-    color: black;
-    margin-top: 5px;
-    background: white;
-    position: absolute;
-}
-
-#pre_search a {
-    color: dodgerblue;
-}
-
-#search button {
-    padding: 0;
-    
-    border: none;
-    
-    background: transparent;
-    box-shadow: none;
-    
-    color: white;
-}
-
-/* content */
-a {
-    color: dodgerblue;
-}
-
-#toc {
-    max-width: 300px;
-}
-
-/*
-pre, #toc, #cate, #redirect {
-    border: 1px solid #aaa;
-}
-*/
-
-#redirect, #cate, #toc, button#opennamu_save_button, button#opennamu_preview_button {
-    border: 0;
-    
-    padding: 10px;
-    
-    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12);
-}
-
-blockquote {
-    border: 0;
-    
-    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12);
-}
-
-button#opennamu_save_button {
-    background: #92f7f4;
-}
-
-button#opennamu_preview_button {
-    margin-left: 5px;
-}
-
-#cate {
-    background: #ccf5bc;
-}
-
-#redirect {
-    background: #d9edf7;
-}
-
-#toc {
-    background: lightyellow;
-    padding: 20px;
-}
-
-textarea, input, pre {    
-    border: 0;
-    
-    padding: 5px;
-    
-    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12);
-}
-
-textarea, input {
-    width: calc(100% - 10px);
-}
-
-pre {
-    padding: 10px;
-}
-
-#syntax {
-    background: #f0f0f0;
-    padding: 5px;
-}
-
-#syntax code {
-    background: transparent;
-}
-
-table {
-    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12);
-}
-
-button {
-    border: 0;
-    
-    padding: 10px;
-    
-    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12);
-    background: papayawhip;
-    
-    cursor: pointer;
-}
-
-input[type="checkbox"], input[type="radio"] {
-    box-shadow: None;
-    background: transparent;
-}
-
-select {
-    padding: 0;
-    padding-left: 5px;
-    padding-right: 5px;
-    
-    background: white;
-    border: 0;
-    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.16), 0 2px 10px 0 rgba(0,0,0,0.12);
-    
-    min-height: 30px;
-}
-
-/* nav_bar */
-#nav_bar {
-    z-index: 100;
-    
-    font-size: 25px;
-    
-    position: fixed;
-    bottom: 0;
-    right: 0;
-    
-    background: #fa635c;
-    box-shadow: -1px -1px 4px 0 rgba(0,0,0,0.16), -1px -1px 10px 0 rgba(0,0,0,0.12);
-    
-    text-align: center;
-}
-
-#go_toc {
-    display: inline-block;
-
-    padding-right: 10px;
-    padding-left: 10px;
-    padding-top: 5px;
-    padding-bottom: 5px;
-    
-    width: 25px;
-}
-
-#go_top {
-    display: inline-block;
-    
-    padding-right: 10px;
-    padding-left: 10px;
-    
-    width: 25px;
-}
-
-#go_bottom {
-    display: inline-block;
-
-    padding-right: 10px;
-    padding-left: 10px;
-    
-    width: 25px;
-}
-
-#nav_bar a {
-    color: white;
-}
-
-/* content */
-a:hover {
-    text-decoration: underline;
-}
-
-#top a:hover {
-    text-decoration: none;
-}
-
-h1#title {
-    margin-bottom: 10px;
-}
-
-div#last_edit {
-    margin-bottom: 20px;
-}
-
-@media (max-width: 600px) {
-    #top_tool {
-        float: none;
-        display: inline;
-    }
-
-    #top_tool_group {
-        margin-left: 20px;
-    }
-
-    #search {
-        width: 100%;
-    }
-
-    #search_input {
-        width: calc(100% - 60px);
-    }
-}
-
-#titlt_a {
-    color: initial;
-}
-
-blockquote {
-    background-color: #ffefff;
-    border-left: 4px solid #ffb3ff;
-}
-
-#b_logo {
-    width: 100px;
-}

+ 0 - 251
views/tenshi/index.html

@@ -1,251 +0,0 @@
-<!DOCTYPE html>
-<html lang="{{'language_tag'|load_lang}}">
-    <head>
-        <meta charset="utf-8">
-        {% if imp[3][0] != 0 %}
-            <title>{{imp[0]}} {{imp[3][0]}} - {{imp[1][0]}}</title>
-        {% else %}
-            <title>{{imp[0]}} - {{imp[1][0]}}</title>
-        {% endif %}
-        {{imp[3][3]|safe}}
-        <link rel="stylesheet" href="/views/tenshi/css/main.css?ver=22">
-        {% if request.cookies.get('main_css_darkmode', '') == '1' %}
-            <link rel="stylesheet" href="/views/main_css/css/sub/dark.css?ver=1">
-            <link rel="stylesheet" href="/views/tenshi/css/dark.css?ver=9">
-        {% endif %}
-        <script src="/views/tenshi/js/skin_set.js?ver=10"></script>
-        <script src="/views/tenshi/js/main.js?ver=4"></script>
-        <script src="https://code.iconify.design/1/1.0.3/iconify.min.js"></script>
-        <link rel="shortcut icon" href="/views/main_css/file/favicon.ico?ver=1">
-        {{imp[1][5]|safe}}
-        {{imp[2][3]|safe}}
-        {% if imp[3][0] != 0 %}
-            <meta name="title" content="{{imp[0]}}{{imp[3][0]}} - {{imp[1][0]}}">
-        {% else %}
-            <meta name="title" content="{{imp[0]}} - {{imp[1][0]}}">
-        {% endif %}
-        <meta name="keywords" content="{{imp[0]}}">
-        {% if imp[2][12] != 0 and imp[2][12][0] == 'w' %}
-            <meta name="description" content="{{data|cut_100}}">
-        {% endif %}
-        <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="/" class="top_in_cel">{{imp[1][4]|safe}}</a>
-                    </div>
-                    <div id="top_tool">
-                        <div id="top_tool_group">
-                            <div id="top_tool_cel">
-                                <a href="javascript:ringo_opening('recent_cel_in');" class="top_in_cel">
-                                    <span class="iconify" data-icon="ic:baseline-access-time" data-inline="true"></span>
-                                    <span class="not_mobile">{{'list'|load_lang}}</span>
-                                    <span class="iconify" data-icon="ic:baseline-arrow-drop-down" data-inline="true"></span>
-                                </a>
-                                <div id="recent_cel_in" class="cel_in_cel" style="display: none;">
-                                    <a href="/recent_changes">
-                                        <span class="iconify" data-icon="ic:baseline-autorenew" data-inline="true"></span>
-                                        {{'recent_change'|load_lang}}
-                                    </a>
-                                    <hr>
-                                    <a href="/recent_discuss">
-                                        <span class="iconify" data-icon="ic:baseline-add-comment" data-inline="true"></span>
-                                        {{'recent_discussion'|load_lang}}
-                                    </a>
-                                    <hr>
-                                    <a href="/vote">
-                                        <span class="iconify" data-icon="ic:baseline-how-to-vote" data-inline="true"></span>
-                                        {{'vote_list'|load_lang}}
-                                    </a>
-                                    <hr>
-                                    <a href="/bbs/main">
-                                        <span class="iconify" data-icon="ic:outline-developer-board" data-inline="true"></span>
-                                        {{'bbs_main'|load_lang}}
-                                    </a>
-                                </div>
-                            </div>
-                             
-                            <div id="top_tool_cel">
-                                <a href="javascript:ringo_opening('other_cel_in');" class="top_in_cel">
-                                    <span class="iconify" data-icon="ic:baseline-archive" data-inline="true"></span>
-                                    <span class="not_mobile">{{'tool'|load_lang}}</span>
-                                    <span class="iconify" data-icon="ic:baseline-arrow-drop-down" data-inline="true"></span>
-                                </a>
-                                <div id="other_cel_in" class="cel_in_cel" style="display: none;">
-                                    <a href="/random">
-                                        <span class="iconify" data-icon="ic:baseline-shuffle" data-inline="true"></span>
-                                        {{'random'|load_lang}}
-                                    </a>
-                                    <hr>
-                                    <a href="/other">
-                                        <span class="iconify" data-icon="ic:baseline-build" data-inline="true"></span>
-                                        {{'other_tool'|load_lang}}
-                                    </a>
-                                    {% if imp[2][9] != '0' %}
-                                        <hr>
-                                        <a href="/manager">
-                                            <span class="iconify" data-icon="ic:baseline-how-to-reg" data-inline="true"></span>
-                                            {{'admin_tool'|load_lang}}
-                                        </a>
-                                    {% endif %}
-                                    <hr>
-                                    <a href="/upload">
-                                        <span class="iconify" data-icon="ic:baseline-cloud-upload" data-inline="true"></span>
-                                        {{'upload'|load_lang}}
-                                    </a>
-                                    <hr>
-                                    <a href="/change/skin_set">
-                                        <span class="iconify" data-icon="ic:baseline-settings" data-inline="true"></span>
-                                        {{'skin_setting'|load_lang}}
-                                    </a>
-                                </div>
-                            </div>
-                            {% if imp[1][6] != '' %}
-                                 
-                                <div id="top_tool_cel">
-                                    <a href="javascript:ringo_opening('add_cel_in');" class="top_in_cel">
-                                        <span class="iconify" data-icon="ic:baseline-playlist-add" data-inline="true"></span>
-                                        <span class="not_mobile">{{'added_menu'|load_lang}}</span>
-                                        <span class="iconify" data-icon="ic:baseline-arrow-drop-down" data-inline="true"></span>
-                                    </a>
-                                    <div id="add_cel_in" class="cel_in_cel" style="display: none;">
-                                        {% for list_n in range(0, imp[1][6]|length) %}
-                                            <a href="{{imp[1][6][list_n][1]}}">
-                                                <span class="iconify" data-icon="ic:baseline-plus" data-inline="true"></span>
-                                                {{imp[1][6][list_n][0]}}
-                                            </a>
-                                            {% if list_n + 1 != imp[1][6]|length %}
-                                                <hr>
-                                            {% endif %}
-                                        {% endfor %}
-                                    </div>
-                                </div>
-                            {% endif %}
-                             
-                            <div id="top_tool_cel" id="top_in_user">
-                                <a href="/user" class="top_in_cel">
-                                    {% if imp[2][2] == 1 %}
-                                        {% if imp[2][8] != '0' %}
-                                            <span class="iconify" data-icon="ic:baseline-add-alert" data-inline="true"></span>
-                                        {% else %}
-                                            <span class="iconify" data-icon="ic:baseline-person" data-inline="true"></span>
-                                        {% endif %}
-                                    {% else %}
-                                        <span class="iconify" data-icon="ic:round-person-search" data-inline="true"></span>
-                                    {% endif %}
-                                    <span class="not_mobile">{{imp[2][5]}}</span>
-                                </a>
-                            </div>
-                        </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">
-                                <span class="iconify" data-icon="ic:round-find-in-page" data-inline="true"></span>
-                            </button>
-                            |
-                            <button type="submit" formaction="/search">
-                                <span class="iconify" data-icon="ic:baseline-search" data-inline="true"></span>
-                            </button>
-                            <div id="pre_search" style="display: none;"></div>
-                        </form>
-                    </div>
-                </div>
-            </div>
-            <div id="main">
-                <div id="main_top">
-                    {% if menu != 0 %}
-                        <div id="tool" class="not_mobile">
-                            {% if menu[0] == 1 %}
-                                {% 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 %}
-                            {% else %}
-                                {% 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 %}
-                            {% endif %}
-                        </div>
-                    {% endif %}
-                    <h1 id="title">
-                        <a id="titlt_a" href="#"><span class="change_space">{{imp[0]}}</span></a>
-                        {% 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/openNAMU/openNAMU"><img id="b_logo" src="/views/main_css/file/logo.svg"></a>
-            </div>
-        </div>
-        <div id="nav_bar">
-            <div id="go_top">
-                <a href="#top">
-                    <span class="iconify" data-icon="ic:baseline-arrow-upward" data-inline="true"></span>
-                </a>
-            </div>
-            <div id="go_bottom">
-                <a href="#bottom">
-                    <span class="iconify" data-icon="ic:baseline-arrow-downward" data-inline="true"></span>
-                </a>
-            </div>
-            <div id="go_toc">
-                <a href="#toc">
-                    <span class="iconify" data-icon="ic:baseline-list" data-inline="true"></span>
-                </a>
-            </div>
-        </div>
-    </body>
-</html>

+ 0 - 5
views/tenshi/info.json

@@ -1,5 +0,0 @@
-{
-    "name" : "Tenshi",
-    "skin_ver" : "v2.0.8",
-    "require_ver" : "3500110"
-}

+ 0 - 51
views/tenshi/js/main.js

@@ -1,51 +0,0 @@
-let ringo_save_data = '';
-let ringo_open = 0;
-let ringo_menu_list = [
-    'recent_cel',
-    'other_cel',
-    'add_cel'
-];
-
-function ringo_opening(data) {
-    let element = [data];
-    
-    for(for_a in ringo_menu_list) {
-        if(ringo_menu_list[for_a] + '_in' !== data) {
-            element.push(ringo_menu_list[for_a] + '_in');
-        }
-    }
-
-    if((document.getElementById(element[0]).style.display == 'none' && ringo_open == 0) || ringo_save_data !== data) {
-        document.getElementById(element[0]).style.display = 'block';
-
-        for(for_a in element) {
-            if(for_a !== '0') { 
-                if(document.getElementById(element[for_a]) !== null) {
-                    document.getElementById(element[for_a]).style.display = 'none';
-                }
-            }
-        }
-
-        ringo_open = 1;
-        ringo_save_data = data;
-
-        setTimeout(function() { ringo_open = 2; }, 100);
-    } else {
-        document.getElementById(element[0]).style.display = 'none';
-
-        ringo_open = 0
-    }
-}
-
-document.onclick = function(event) {
-    let cel_list = [];
-    for(for_a in ringo_menu_list) {
-        cel_list.push(document.getElementById(ringo_menu_list[for_a]));
-    }
-
-    if(ringo_save_data !== '' && ringo_open == 2) {
-        document.getElementById(ringo_save_data).style.display = 'none';
-
-        setTimeout(function() { ringo_open = 0; }, 100);
-    }
-}

+ 0 - 81
views/tenshi/js/skin_set.js

@@ -1,81 +0,0 @@
-function ringo_do_regex_data(data) {
-    return new RegExp('(?:^|; )' + data + '=([^;]*)');
-}
-
-function ringo_get_post() {
-    const check = document.getElementById('invert');
-    if(check.checked === true) {
-        document.cookie = 'main_css_darkmode=1; path=/';
-    } else {
-        document.cookie = 'main_css_darkmode=0; path=/';
-    }
-
-    const check_2 = document.getElementById('use_sys_darkmode');
-    if(check_2.checked === true) {
-        document.cookie = 'main_css_use_sys_darkmode=1; path=/';
-    } else {
-        document.cookie = 'main_css_use_sys_darkmode=0; path=/';
-    }
-
-    history.go(0);
-}
-
-function ringo_do_skin_set() {
-    let cookies = document.cookie;
-    if(!cookies.match(ringo_do_regex_data('main_css_use_sys_darkmode')) || (cookies.match(ringo_do_regex_data('main_css_use_sys_darkmode')) && cookies.match(ringo_do_regex_data('main_css_use_sys_darkmode'))[1] === '1')) {
-        if(window.matchMedia('(prefers-color-scheme: dark)').matches) {
-            document.cookie = 'main_css_darkmode=1; path=/';
-        } else {
-            document.cookie = 'main_css_darkmode=0; path=/';
-        }
-    }
-}
-
-function ringo_load_skin_set() {
-    let cookies = document.cookie;
-    
-    if(window.location.pathname === '/change/skin_set') {
-        let set_language = {
-            "en-US" : {
-                "save" : "Save",
-                "darkmode" : "Darkmode",
-                "use_sys_darkmode" : "Use system darkmode set",
-            }, "ko-KR" : {
-                "save" : "저장",
-                "darkmode" : "다크모드",
-                "use_sys_darkmode" : "시스템 다크모드 설정 사용",
-            }
-        }
-
-        let language = cookies.match(ringo_do_regex_data('language'))[1];
-        let user_language = cookies.match(ringo_do_regex_data('user_language'))[1];
-        if(user_language in set_language) {
-            language = user_language;
-        }
-
-        if(!language in set_language) {
-            language = "en-US";
-        }
-
-        let set_data = {};
-
-        if(cookies.match(ringo_do_regex_data('main_css_darkmode')) && cookies.match(ringo_do_regex_data('main_css_darkmode'))[1] === '1') {
-            set_data["invert"] = "checked";
-        }
-
-        if(!cookies.match(ringo_do_regex_data('main_css_use_sys_darkmode')) || (cookies.match(ringo_do_regex_data('main_css_use_sys_darkmode')) && cookies.match(ringo_do_regex_data('main_css_use_sys_darkmode'))[1] === '1')) {
-            set_data["use_sys_darkmode"] = "checked";
-        }
-
-        document.getElementById("main_skin_set").innerHTML = ' \
-            <input ' + set_data["use_sys_darkmode"] + ' type="checkbox" id="use_sys_darkmode" name="use_sys_darkmode" value="use_sys_darkmode"> ' + set_language[language]['use_sys_darkmode'] + ' \
-            <hr class="main_hr"> \
-            <input ' + set_data["invert"] + ' type="checkbox" id="invert" name="invert" value="invert"> ' + set_language[language]['darkmode'] + ' \
-            <hr class="main_hr"> \
-            <button onclick="ringo_get_post();">' + set_language[language]['save'] + '</button> \
-        ';
-    }
-}
-
-window.addEventListener('DOMContentLoaded', ringo_do_skin_set);
-window.addEventListener('DOMContentLoaded', ringo_load_skin_set);