Explorar el Código

skin change beta

잉여개발기 (SPDV) hace 3 años
padre
commit
ee1d117fc0

+ 1 - 1
route/main_func_setting_main.py

@@ -179,7 +179,7 @@ def main_func_setting_main(db_set):
                         <h2>2. ''' + load_lang('design_set') + '''</h2>
                         <span>''' + load_lang('wiki_skin') + '''</span>
                         <hr class="main_hr">
-                        <select name="skin">''' + load_skin(d_list[5] if d_list[5] != '' else 'tenshi') + '''</select>
+                        <select name="skin">''' + load_skin(d_list[5] if d_list[5] != '' else 'ringo') + '''</select>
 
                         <h2>3. ''' + load_lang('login_set') + '''</h2>
                         <input type="checkbox" name="reg" ''' + check_box_div[0] + '''> ''' + load_lang('no_register') + '''

+ 1 - 1
route/tool/func.py

@@ -978,7 +978,7 @@ def skin_check(set_n = 0):
     curs = conn.cursor()
 
     # 개편 필요?
-    skin_list = load_skin('tenshi', 1)
+    skin_list = load_skin('ringo', 1)
     skin = skin_list[0]
     ip = ip_check()
     

+ 7 - 3
views/ringo/css/main.css

@@ -85,15 +85,13 @@ header a#logo:hover {
     
     background: #efd8f7;
     
-    padding: 10px;
-    
     line-height: initial;
 
     z-index: 1;
 }
 
 .top_cel_in a {
-    padding: 0px;
+    padding: 10px;
     
     display: block;
     
@@ -292,6 +290,12 @@ article.main#title h1 {
     .only_mobile, header#main form.only_mobile {
         display: block;
     }
+
+    .top_cel_in {
+        left: 0;
+
+        width: 100%;
+    }
 }
 
 footer {

+ 13 - 20
views/ringo/index.html

@@ -94,32 +94,25 @@
                         {% else %}
                             <span class="iconify" data-icon="ic:round-person-search" data-inline="true"></span>
                         {% endif %}
-                        <span class="not_mobile">{{'tool'|load_lang}}</span>
+                        <span class="not_mobile">{{imp[2][5]}}</span>
                         <span class="iconify" data-icon="ic:baseline-arrow-drop-down" data-inline="true"></span>
                     </a>
                     <div class="top_cel_in" id="user_cel_in" style="display: none;">
-                        <a href="/random">
-                            <span class="iconify" data-icon="ic:baseline-shuffle" data-inline="true"></span>
-                            {{'random'|load_lang}}
-                        </a>
-                        <a href="/other">
-                            <span class="iconify" data-icon="ic:baseline-build" data-inline="true"></span>
-                            {{'other_tool'|load_lang}}
+                        <a href="/user">
+                            <span class="iconify" data-icon="ic:baseline-account-box" data-inline="true"></span>
+                            {{'user_tool'|load_lang}}
                         </a>
-                        {% if imp[2][9] != '0' %}
-                            <a href="/manager">
-                                <span class="iconify" data-icon="ic:baseline-how-to-reg" data-inline="true"></span>
-                                {{'admin_tool'|load_lang}}
+                        {% if imp[2][2] == 1 %}
+                            <a href="/alarm">
+                                <span class="iconify" data-icon="ic:baseline-contact-mail" data-inline="true"></span>
+                                {{'alarm'|load_lang}} ({{imp[2][8]}})
+                            </a>
+                        {% else %}
+                            <a href="/login">
+                                <span class="iconify" data-icon="ic:baseline-contact-mail" data-inline="true"></span>
+                                {{'alarm'|load_lang}} ({{imp[2][8]}})
                             </a>
                         {% endif %}
-                        <a href="/upload">
-                            <span class="iconify" data-icon="ic:baseline-cloud-upload" data-inline="true"></span>
-                            {{'upload'|load_lang}}
-                        </a>
-                        <a href="/skin_set">
-                            <span class="iconify" data-icon="ic:baseline-settings" data-inline="true"></span>
-                            {{'skin_setting'|load_lang}}
-                        </a>
                     </div>
                 </div>
                 <form class="not_mobile" method="post" action="/search" role="search" id="search">

+ 5 - 0
views/ringo/info.json

@@ -0,0 +1,5 @@
+{
+    "name" : "Ringo",
+    "skin_ver" : "v0.1.1",
+    "require_ver" : "3500110"
+}

+ 25 - 20
views/ringo/js/main.js

@@ -1,44 +1,49 @@
 let ringo_save_data = '';
 let ringo_open = 0;
+let ringo_menu_list = [
+    'recent_cel',
+    'other_cel',
+    'user_cel'
+];
 
 function ringo_opening(data) {
-    ringo_save_data = data;
-
-    console.log(data);
     let element = [data];
     
-    let menu_list = [
-        'recent_cel_in',
-        'other_cel_in',
-        'user_cel_in'
-    ];
-    for(for_a in menu_list) {
-        if(menu_list[for_a] !== data) {
-            element.push(menu_list[for_a]);
+    for(for_a in ringo_menu_list) {
+        if(ringo_menu_list[for_a] + '_in' !== data) {
+            element.push(ringo_menu_list[for_a] + '_in');
         }
     }
 
-    console.log(element);
-
-    if(document.getElementById(element[0]).style.display == 'none') {
+    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') {
-                console.log(for_a);
+            if(for_a !== '0') { 
                 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 = 1;
-    setTimeout(function() { ringo_open = 0; }, 100);
+        ringo_open = 0
+    }
 }
 
 document.onclick = function(event) {
-    if(ringo_save_data !== '' && ringo_open == 0) {
+    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 && !cel_list.includes(event.path[1])) {
         document.getElementById(ringo_save_data).style.display = 'none';
+
+        setTimeout(function() { ringo_open = 0; }, 100);
     }
 }

+ 0 - 29
views/tenshi/LICENSE

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

+ 0 - 2
views/tenshi/README.md

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

+ 1 - 1
views/tenshi/info.json

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