Browse Source

add comments, test

huaisian 2 years ago
parent
commit
90c50540a7
2 changed files with 133 additions and 13 deletions
  1. 5 9
      iframe.html
  2. 128 4
      index.html

+ 5 - 9
iframe.html

@@ -753,11 +753,11 @@ div.div_info ul li.location_title {
 
     </style>
   </head>
-  <body style="background-color: transparent;">
-    <div class="modal fade show" id="exampleModal" style="display: block;background-color: rgba(67, 53, 60, 0.459);" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
+  <body style="background-color:rgba(39, 37, 38, 0.603);" class="modal fade show" id="exampleModal" style="display: block;">
+    
       <div class="modal-dialog modal-dialog-scrollable">
         <div class="modal-content">
-          <button type="button" class="btn-dismiss" data-bs-dismiss="modal" aria-label="Close">X</button>
+          <button type="button" class="btn-dismiss">X</button>
           <div class="modal-body">
             <div class="entry-content hometv_area" id="hometv_area">
               <div id="div_info" class="div_info">
@@ -829,7 +829,6 @@ div.div_info ul li.location_title {
           </div>
         </div>
       </div>
-    </div>
     <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
         integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
         crossorigin="anonymous"></script>
@@ -838,13 +837,10 @@ div.div_info ul li.location_title {
         crossorigin="anonymous"></script>
     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
     <script>
-      document.getElementByIdx_x=function(id){
-        return document.getElementById(id);
-      }
+      
       $('.btn-dismiss').click(function () {
-        $('.modal').css('display', 'none');
+        // $('.modal').css('display', 'none');
         $('.modal').removeClass('show');
-        $('.modal').css('backgroundColor', 'transparent');
         $('body').css('display', 'none');     	
         parent.window.document.getElementById("main").style.display = 'none';
       })

+ 128 - 4
index.html

@@ -39,6 +39,121 @@
 
     <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
     <link rel="stylesheet" href="css/style.css">
+    <style>
+      .v-btn[data-v-b868605a]:not(.v-btn--floating):not(.v-btn--icon) {
+    height: 52px;
+}
+.test-ifr.theme--light.v-btn:not(.v-btn--icon):not(.v-btn--flat) {
+    background-color: #f5f5f5;
+}
+.test-ifr.v-btn:not(.v-btn--floating):not(.v-btn--icon) {
+    height: 52px;
+}
+.test-ifr.v-btn:not(.v-btn--outline).accent, .v-btn:not(.v-btn--outline).error, .v-btn:not(.v-btn--outline).info, .v-btn:not(.v-btn--outline).primary, .v-btn:not(.v-btn--outline).secondary, .v-btn:not(.v-btn--outline).success, .v-btn:not(.v-btn--outline).warning {
+    color: #fff;
+}
+.test-ifr.width-130[data-v-b868605a] {
+    width: 130px;
+    font-size: 16px;
+    border-radius: 4px 4px 4px 4px;
+}
+.test-ifr.v-btn[data-v-b868605a] {
+    text-transform: none;
+}
+[data-v-b868605a]:not(.v-icon) {
+    font-family: Helvetica,Noto Sans TC,Roboto,Arial,sans-serif!important;
+}
+.test-ifr.bg-white[data-v-b868605a] {
+    background-color: #fff!important;
+}
+.theme--light.v-btn {
+    color: rgba(0,0,0,.87);
+}
+[type=reset], [type=submit], button, html [type=button] {
+    -webkit-appearance: button;
+}
+.test-ifr.v-btn {
+    text-transform: none;
+}
+.test-ifr:not(.v-icon) {
+    font-family: Helvetica,Noto Sans TC,Roboto,Arial,sans-serif!important;
+}
+.bg-white {
+    background-color: #fff!important;
+}
+.v-btn {
+    padding: 0 16px;
+}
+.v-btn {
+    align-items: center;
+    border-radius: 2px;
+    display: inline-flex;
+    height: 36px;
+    flex: 0 0 auto;
+    font-size: 14px;
+    font-weight: 500;
+    justify-content: center;
+    margin: 6px 8px;
+    min-width: 88px;
+    outline: 0;
+    text-transform: uppercase;
+    text-decoration: none;
+    transition: .3s cubic-bezier(.25,.8,.5,1),color 1ms;
+    position: relative;
+    vertical-align: middle;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+}
+.font-weight-bold {
+    font-weight: 700!important;
+}
+.test-ifr.my-4 {
+    margin-top: 24px!important;
+    margin-bottom: 24px!important;
+}
+.test-ifr.mx-0 {
+    margin-left: 0!important;
+    margin-right: 0!important;
+}
+[role=button], [type=button], [type=reset], [type=submit], button {
+    cursor: pointer;
+}
+.secondary--text {
+    color: #aaa!important;
+    caret-color: #aaa!important;
+}
+
+.secondary {
+    background-color: #aaa!important;
+    border-color: #aaa!important;
+}
+.v-btn:before {
+    border-radius: inherit;
+    color: inherit;
+    content: "";
+    position: absolute;
+    left: 0;
+    top: 0;
+    height: 100%;
+    opacity: .12;
+    width: 100%;
+    }
+    .v-btn__content {
+    align-items: center;
+    border-radius: inherit;
+    color: inherit;
+    display: flex;
+    flex: 1 0 auto;
+    justify-content: center;
+    margin: 0 auto;
+    position: relative;
+    transition: .3s cubic-bezier(.25,.8,.5,1);
+    white-space: nowrap;
+    width: inherit;
+    }
+    </style>
 </head>
 <body>
     <div style="overflow-x:hidden;">
@@ -1278,9 +1393,14 @@
                 </div>
             </div>
             <div class="container-fluid bottom-box">
-              <!-- <button type="button" class="test-ifr bg-white mx-0 my-4 hidden-sm-and-down font-weight-bold width-130 v-btn v-btn--depressed theme--light secondary secondary--text"><div class="v-btn__content">播出地區資訊</div></button>
-              <iframe name="main" id="main" src='iframe.html' frameborder="0" scrolling="no" style="width: 100vw;height: 100vh;position: fixed;left: 0;top: 0;display: none;z-index: 5000;"></iframe> -->
+
+              <!-- Test插入按鈕與iframe(start) -->
+              <button data-v-b868605a="" type="button" class="test-ifr bg-white mx-0 my-4 hidden-sm-and-down font-weight-bold width-130 v-btn v-btn--depressed theme--light secondary secondary--text"><div class="v-btn__content">播出地區資訊</div></button>
+              <iframe name="main" id="main" src='iframe.html' frameborder="0" scrolling="no" style="width: 100vw;height: 100vh;position: fixed;left: 0;top: 0;display: none;z-index: 5000;"></iframe>
+              <!-- Test插入按鈕與iframe(end) -->
+
             </div>
+
         </footer>
           <div class="fixed-btn">
             <!-- <div class="btn-favor mb-2" data-bs-toggle="modal" data-bs-target="#favorModal">
@@ -1816,14 +1936,18 @@
     <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/slick-carousel@1.8.1/slick/slick.min.js"></script>
     <script async defer src="js/index.js"></script>
     <script src="js/lazy-load.js" async></script>
-    <script type="text/javascript">
 
-      console.log(document.getElementById("main").contentWindow.document.body);
+
+    <script type="text/javascript">
+      // Test插入按鈕與iframe
       $('.test-ifr').click(function() {
         document.getElementById("main").style.display = 'block';
+        document.getElementById("main").contentWindow.document.body.style.display = 'block';
+        document.getElementById("main").contentWindow.document.body.classList.add('show');
       })
      
      </script>
+
 </body>
 
 </html>