Browse Source

fix navbar

huaisianhuang 3 years ago
parent
commit
7a9a651585
5 changed files with 12 additions and 8 deletions
  1. 0 5
      css/style.css
  2. 0 0
      css/style.css.map
  3. 1 1
      css/style.scss
  4. 1 1
      index.html
  5. 10 1
      js/index.js

+ 0 - 5
css/style.css

@@ -178,8 +178,6 @@ body {
 .navbar .navbar-nav .nav-item .dropbox {
   visibility: hidden;
   opacity: 0;
-  -webkit-transition: all .4s;
-  transition: all .4s;
   position: absolute;
   width: 100vw;
   top: 100%;
@@ -614,7 +612,6 @@ body {
   background-position: center center;
   background-size: cover;
   background-repeat: no-repeat;
-  background-image: url("../images/2_2.webp");
 }
 
 .sec-guessLike__card.special {
@@ -755,7 +752,6 @@ body {
   background-position: center center;
   background-size: cover;
   background-repeat: no-repeat;
-  background-image: url("../images/2_2.webp");
 }
 
 @media (max-width: 1100px) {
@@ -1704,7 +1700,6 @@ body {
 }
 
 #favorModal .sec-favor-form .imgfr, #favorModal .sec-favor-checklist .imgfr {
-  background-image: url("../images/2_2.webp");
   background-position: center center;
   background-size: cover;
   background-repeat: no-repeat;

File diff suppressed because it is too large
+ 0 - 0
css/style.css.map


+ 1 - 1
css/style.scss

@@ -133,7 +133,7 @@ body {
             .dropbox {
                 visibility: hidden;
                 opacity: 0;
-                transition: all .4s;
+                //transition: all .2s;
                 position: absolute;
                 width: 100vw;
                 top: 100%;

+ 1 - 1
index.html

@@ -828,7 +828,7 @@
                     </div>
                 </div>
                 <div class="navbar-brand navbar-login ms-2 d-flex align-items-center">
-                    <a href="" class="navbar-login">登入 / 註冊</a>
+                    <a href="https://hhh.com.tw/login/index" class="navbar-login">登入 / 註冊</a>
                 </div>
             </div>
         </nav>

+ 10 - 1
js/index.js

@@ -1,7 +1,7 @@
 let result;
       $.ajax({
           method: "GET",
-          url: "../json/realtime.json",
+          url: "https://m3.hhh.com.tw/json/realtime.json",
           dataType: "json",
       }).done(function (msg) {
           result = [...msg];
@@ -372,6 +372,15 @@ $('.btn-gotop').click(function () {
 
 $('.navbar-search img').click(function(){
     $('.navbar-search .dropbox').toggleClass('open');
+    if($('.navbar-search .dropbox').hasClass('open')) {
+        $('.navbar-nav .nav-item').hover(function() {
+            $('.navbar-nav .nav-item:hover>.dropbox').css("visibility", "hidden");
+        })
+    } else {
+        $('.navbar-nav .nav-item').hover(function() {
+            $('.navbar-nav .nav-item:hover>.dropbox').css("visibility", "visible");
+        })
+    }
 });
 
 $('.sec-00__close').click(function(){

Some files were not shown because too many files changed in this diff