doortts doortts 2017-04-06
view: Make more natural loading effect in two column mode
@5fe12536a33657c973477e6bb80a39153e561bad
app/assets/stylesheets/less/_page.less
--- app/assets/stylesheets/less/_page.less
+++ app/assets/stylesheets/less/_page.less
@@ -6843,7 +6843,6 @@
 #pageslide {
     /* These styles MUST be included. Do not change. */
     display: none;
-    position: absolute;
     position: fixed;
     top: 0;
     height: 100%;
@@ -6854,7 +6853,6 @@
     padding: 0;
 
     /* These styles are optional, and describe how the pageslide will look */
-    color: #FFF;
     -webkit-box-shadow: inset 0 0 5px 5px #222;
     -moz-shadow: inset 0 0 5px 5px #222;
     //box-shadow: inset 0 0 5px 5px #222;
 
public/images/Loading.png (Binary) (added)
+++ public/images/Loading.png
Binary file is not shown
public/javascripts/lib/jquery.pageslide.js
--- public/javascripts/lib/jquery.pageslide.js
+++ public/javascripts/lib/jquery.pageslide.js
@@ -51,7 +51,7 @@
         } else {
             // Load a URL. Into an iframe?
             if( useIframe ) {
-                var iframe = $("<iframe />").attr({
+                var iframe = $("<iframe allowtransparency='true' />").attr({
                     src: url,
                     frameborder: 0,
                     hspace: 0
@@ -157,7 +157,10 @@
                 _start( settings.direction, settings.speed );
             });
         } else {
-            _load( settings.href, settings.iframe );
+            setTimeout(function () {
+                _load(settings.href, settings.iframe);
+            }, 300);
+            $("#pageslide > iframe").remove();
             if( $pageslide.is(':hidden') ) {
                 _start( settings.direction, settings.speed );
             }
public/javascripts/service/yona.twoColumnMode.js
--- public/javascripts/service/yona.twoColumnMode.js
+++ public/javascripts/service/yona.twoColumnMode.js
@@ -32,7 +32,6 @@
             localStorage.setItem('useTwoColumnMode', true);
             attachPageSlideEvent($twoColumnMode, $title);
             bindFrameLoading();
-            $('#pageslide').html("<div>Loading...</div>");
         } else {
             localStorage.setItem('useTwoColumnMode', false);
             $('.post-item').removeClass('highlightBg').css("cursor", "");
Add a comment
List