Explorar o código

Merge branch 'master' of http://git.choozmo.com:3000/choozmo/bhouse_backstage

yukyo0821 %!s(int64=3) %!d(string=hai) anos
pai
achega
33dfc95f1f

+ 5 - 4
backstage/templates/contact_us.html

@@ -6,16 +6,17 @@
 <script type="text/javascript" src="/static/js/yo.js"></script>
 <table>
     <tbody id='contactData'>
-
+        <h1 class="h3"><i class="fas fa-pen mr-3 mb-3"></i>{{ title }}</h1>
         <tr>
-            <td class="table__data">修改聯絡EMAIL</td>
-            <td class="table__data"><input id="newEmail" type="text" style="width: 600px;" /></td>
+         
+            <!-- <td class="table__data">修改聯絡EMAIL</td> -->
+            <td class="table__data"><input class="form-control" id="newEmail" type="text" style="width: 600px;" placeholder="修改聯絡EMAIL" /></td>
             <td class="table__data"></td>
             <!-- <td class="table__data">1</td> -->
             <td class="table__data"></td>
             <td>
                 <div class="d-flex justify-content-center">
-                    <button class="btn btn_light mr-1" onclick="modEmail($('#newEmail').val());"><b>修改</b> <i
+                    <button class="btn btn_light mr-1" onclick="modEmail($('#newEmail').val());"><b>儲存</b> <i
                             class="fas fa-pencil-alt"></i></button>
                 </div>
 

+ 65 - 13
backstage/templates/frequently_asked_questions.html

@@ -7,28 +7,80 @@
 <link rel="stylesheet" href="/static/styles/richtext.min.css">
 <script src="https://code.jquery.com/ui/1.13.0/jquery-ui.js"></script>
 <link rel="stylesheet" href="https://code.jquery.com/ui/1.13.0/themes/base/jquery-ui.css">
-<input type="text" id="input_q" style="width:600px" />
-<button onclick="addQa();">新增</button><button onclick="saveQa();">修改項目</button><button
-    onclick="removeQa();">移除項目</button><button onclick="writeAllQa();">完成儲存</button>
-<div style="width:800px;"><textarea id='input_a'></textarea></div>
-<hr />
-<input id="curl" type="text" style="display: none;" /><br />
-<div>
-    <ul id='qaData1'></ul>
+
+<div class="faq-content">
+    <div class="row px-0 mx-0">
+     
+        <div class="col-lg-6">
+            <h1 class="h3"><i class="fas fa-pen mr-3 mb-3"></i>{{ title }}</h1>
+
+            <input id="curl" type="text" style="display: none;" />
+            <div>
+                <div>
+                    <ul id='qaData1'></ul>
+                </div>
+            </div>
+        </div>
+        <div class="col-lg-6">
+            <div class="faq-editor">
+                <input type="text" class="form-control mb-3 w-100" id="input_q"
+                    placeholder="EX:小寶優居的規劃師服務和一般的室內設計有什麼不同嗎?" />
+                <div><textarea id='input_a'></textarea></div>
+                <div class="mt-4 d-flex justify-content-end">
+                    <div>
+                        <button class="btn faq-btn" onclick="addQa();">新增</button>
+                        <button class="btn faq-btn" onclick="saveQa();">修改項目</button>
+                        <button class="btn faq-btn" onclick="removeQa();">移除項目</button>
+                        <button class="btn faq-btn" onclick="writeAllQa();">完成儲存</button>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
 </div>
+
+
 <style>
+    .faq-editor{
+        position:sticky !important;
+        top: 21px;
+    }
     #qaData1 li {
-        vertical-align: top;
+        vertical-align: center;
+        list-style-type:none;
     }
-
+    ul{
+        padding-inline-start: 0px !important;
+    }
+    
     #qaData1 tr {
         border: inset 2px
     }
 
     #qaData1 td {
         vertical-align: top;
-        border: inset 1px
+        padding: 0.475rem 0.475rem;
+        border: 1px solid #ced4da;
+        border-radius: 0.25rem;
+        font-size: 1rem;
+        /* border-collapse: unset; */
+        cursor: pointer;
+    }
+    table{
+        border-collapse: unset;
+        width: 100%;
+    }
+    .faq-btn {
+        background-color: rgb(179, 179, 179);
+        color: white;
+        transition: all 0.3s;
+        margin-right: 5px;
     }
+    .faq-btn:hover{
+        background-color: grey;
+    }
+
+
 </style>
 <script>
 
@@ -67,11 +119,11 @@
                 //alert(qa.length);
                 for (i = 0; i < qa.length; i++) {
                     //$('#qaData').append("<tr><td>" + qa[i].q + "</td><td>" + qa[i].a + "</td></tr>");
-                    $('#qaData1').append("<li data-si='" + i + "''><table><tr class='qa_q'><td>" + qa[i].q + "</td></tr><tr class='qa_a'><td>" + qa[i].a + "</td></tr></table></li>");
+                    $('#qaData1').append("<li class='mb-1' data-si='" + i + "''><table><tr class='qa_q'><td>" + qa[i].q + "</td></tr><tr class='qa_a'><td>" + qa[i].a + "</td></tr></table></li>");
 
                 }
                 $('.qa_a').hide();
-                $('.qa_q').dblclick(setTarget);
+                $('.qa_q').click(setTarget);
                 /* $('.qa_q').dblclick(function () {
                     //alert($(this).next()[0].childNodes[0].innerHTML);
                     //$('#editorjs')[0].innerHTML = "";

+ 35 - 35
backstage/templates/layout.html

@@ -44,52 +44,20 @@
         <ul class="list-group pt-2">
           <!-- /END Separator -->
           <!-- Menu with submenu -->
-          <a href="{{ url_for('home.home') }}"
+          <!-- <a href="{{ url_for('home.home') }}"
             class="bg-dark list-group-item list-group-item-action flex-column align-items-start">
             <div class="d-flex w-100 justify-content-start align-items-center">
               <i class="fas fa-home mr-3"></i>
               <span class="menu-collapsed">首頁</span>
               <span class="submenu-icon ml-auto"></span>
             </div>
-          </a>
-          <a href="{{ url_for('blogs.edit_news') }}" class="bg-dark list-group-item list-group-item-action">
-            <div class="d-flex w-100 justify-content-start align-items-center">
-              <i class="far fa-newspaper mr-3"></i>
-              <span class="menu-collapsed">最新消息</span>
-            </div>
-          </a>
-          <a href="{{ url_for('room_planner.main') }}"
-            class="bg-dark list-group-item list-group-item-action flex-column align-items-start">
-            <div class=" d-flex w-100 justify-content-start align-items-center">
-              <i class="fas fa-user-alt mr-3"></i>
-              <span class="menu-collapsed">家具規劃師</span>
-              <span class="submenu-icon ml-auto"></span>
-            </div>
-          </a>
+          </a> -->
           <a href="{{ url_for('collections.collection_list') }}" class="bg-dark list-group-item list-group-item-action">
             <div class="d-flex w-100 justify-content-start align-items-center">
               <i class="fas fa-ruler-combined mr-3"></i>
               <span class="menu-collapsed">規劃作品</span>
             </div>
           </a>
-          <a href="{{ url_for('store_locations.main') }}" class="bg-dark list-group-item list-group-item-action">
-            <div class="d-flex w-100 justify-content-start align-items-center">
-              <i class="fas fa-location-arrow mr-3"></i>
-              <span class="menu-collapsed">門市據點</span>
-            </div>
-          </a>
-          <a href="{{ url_for('blogs.edit_faq') }}" class="bg-dark list-group-item list-group-item-action">
-            <div class="d-flex w-100 justify-content-start align-items-center">
-              <i class="fas fa-question-circle mr-3"></i>
-              <span class="menu-collapsed">常見問題</span>
-            </div>
-          </a>
-          <a href="#" class="bg-dark list-group-item list-group-item-action">
-            <div class="d-flex w-100 justify-content-start align-items-center">
-              <i class="fas fa-tasks mr-3"></i>
-              <span class="menu-collapsed">關於小寶</span>
-            </div>
-          </a>
           <a href="{{ url_for('blogs.blog_list') }}" class="bg-dark list-group-item list-group-item-action">
             <div class="d-flex w-100 justify-content-start align-items-center">
               <i class="far fa-newspaper mr-3"></i>
@@ -109,6 +77,38 @@
               <span class="menu-collapsed">模組系統櫃</span>
             </div>
           </a>
+          <a href="{{ url_for('blogs.edit_news') }}" class="bg-dark list-group-item list-group-item-action">
+            <div class="d-flex w-100 justify-content-start align-items-center">
+              <i class="far fa-newspaper mr-3"></i>
+              <span class="menu-collapsed">最新消息</span>
+            </div>
+          </a>
+          <!-- <a href="{{ url_for('room_planner.main') }}"
+            class="bg-dark list-group-item list-group-item-action flex-column align-items-start">
+            <div class=" d-flex w-100 justify-content-start align-items-center">
+              <i class="fas fa-user-alt mr-3"></i>
+              <span class="menu-collapsed">家具規劃師</span>
+              <span class="submenu-icon ml-auto"></span>
+            </div>
+          </a> -->
+          <!-- <a href="{{ url_for('store_locations.main') }}" class="bg-dark list-group-item list-group-item-action">
+            <div class="d-flex w-100 justify-content-start align-items-center">
+              <i class="fas fa-location-arrow mr-3"></i>
+              <span class="menu-collapsed">門市據點</span>
+            </div>
+          </a> -->
+          <!-- <a href="{{ url_for('blogs.edit_faq') }}" class="bg-dark list-group-item list-group-item-action">
+            <div class="d-flex w-100 justify-content-start align-items-center">
+              <i class="fas fa-question-circle mr-3"></i>
+              <span class="menu-collapsed">常見問題</span>
+            </div>
+          </a> -->
+          <!-- <a href="#" class="bg-dark list-group-item list-group-item-action">
+            <div class="d-flex w-100 justify-content-start align-items-center">
+              <i class="fas fa-tasks mr-3"></i>
+              <span class="menu-collapsed">關於小寶</span>
+            </div>
+          </a> -->
           <a href="{{ url_for('blogs.edit_contact_us') }}" class="bg-dark list-group-item list-group-item-action">
             <div class="d-flex w-100 justify-content-start align-items-center">
               <i class="far fa-newspaper mr-3"></i>
@@ -120,7 +120,7 @@
             class="bg-dark list-group-item list-group-item-action d-flex align-items-center">
             <div class="d-flex w-100 justify-content-start align-items-center">
               <span id="collapse-icon" class="fa fa-2x mr-3"></span>
-              <span id="collapse-text" class="menu-collapsed">Collapse</span>
+              <span id="collapse-text" class="menu-collapsed">收合</span>
             </div>
           </a>
         </ul><!-- List Group END-->