From dda86bcca33a4ad66c8b75c9baaad4ccf3800a35 Mon Sep 17 00:00:00 2001 From: ruanyf Date: Tue, 29 Apr 2014 10:37:53 +0800 Subject: [PATCH] edit css/app --- css/app.css | 22 +++++++++++++++++++--- js/ditto.js | 10 ++++++---- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/css/app.css b/css/app.css index ad392e2..56bc44a 100644 --- a/css/app.css +++ b/css/app.css @@ -288,14 +288,30 @@ body { display: none; position: fixed; - height: 17px; - top: 45%; + height: 100%; + width: 100%; + top: 0; + background-color: rgba(0,0,0,0.5); - margin-left: 560px; + z-index:10; font-size: 14px; } +@media (min-width: 40rem) { + #loading, #error { + display: none; + position: fixed; + + height: 17px; + top: 45%; + + margin-left: 560px; + + font-size: 14px; + } +} + /** * okaidia theme for JavaScript, CSS and HTML * Loosely based on Monokai textmate theme by http://www.monokai.nl/ diff --git a/js/ditto.js b/js/ditto.js index 5c36f4c..65c9b6d 100644 --- a/js/ditto.js +++ b/js/ditto.js @@ -171,10 +171,6 @@ function show_loading() { function router() { - $('html, body').animate({ - scrollTop: $('#content').offset().top - }, 200); - var path = location.hash.replace("#", "./"); // default page if hash is empty @@ -222,6 +218,12 @@ function router() { })(); })(); + if(path.indexOf('README') === -1){ + $('html, body').animate({ + scrollTop: $('#content').offset().top + }, 200); + } + }).fail(function() { show_error();