com web/php: Made the beta-warning banner animated like stack-overflow, it's more eye catching now which is the point of it. It's position: fixed so
it's floating on top of the content: js/common.js styles/home.css
| From: | Paul Dragoonis | Date: | Thu, 06 Jan 2011 23:20:33 +0000 |
| Subject: | com web/php: Made the beta-warning banner animated like stack-overflow, it's more eye catching now which is the point of it. It's position: fixed so it's floating on top of the content: js/common.js styles/home.css |
||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-23639@lists.php.net to get a copy of this message | ||
Commit: 216acd04517a568c32e43d942da8142d18ba82db
Author: Paul Dragoonis <dragoonis@gmail.com> Thu, 6 Jan 2011 23:20:33 +0000
Parents: b7aaafec7e1ecb617801b9047de9801d994fa3ad
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=216acd04517a568c32e43d942da8142d18ba82db
Log:
Made the beta-warning banner animated like stack-overflow, it's more eye catching now which is
the point of it.. It's position: fixed so it's floating on top of the content
Changed paths:
M js/common.js
M styles/home.css
Diff:
diff --git a/js/common.js b/js/common.js
index 601e48c..cef8466 100644
--- a/js/common.js
+++ b/js/common.js
@@ -1,15 +1,4 @@
$(document).ready(function() {
- // Wire up the beta warning.
- $("#beta-warning-close").click(function(event) {
- event.preventDefault();
- $("#head-beta-warning").slideUp("fast");
-
- // Hide it for a month by default.
- var expiry = new Date();
- expiry.setTime(expiry.getTime() + (30 * 24 * 60 * 60 * 1000));
-
- document.cookie = "BetaWarning=off; expires=" + expiry.toGMTString() + ";
path=/";
- });
// Ugh, cookie handling.
var cookies = document.cookie..split(";");
@@ -21,10 +10,29 @@ $(document).ready(function() {
}
}
- if (showBetaWarning) {
- $("#head-beta-warning").slideDown("fast");
- }
+ var $headBetaWarning = $('#head-beta-warning'); // Cache for multiple references
+ // Wire up the beta warning.
+ $("#beta-warning-close").click(function(event) {
+ event.preventDefault();
+ $('body').css('margin-top', 0);
+ $headBetaWarning.slideUp("fast");
+
+ // Hide it for a month by default.
+ var expiry = new Date();
+ expiry.setTime(expiry.getTime() + (30 * 24 * 60 * 60 * 1000));
+
+ document.cookie = "BetaWarning=off; expires=" + expiry.toGMTString() + ";
path=/";
+ });
+
+
+ if (showBetaWarning) {
+ $headBetaWarning.show();
+ $('body').css('margin-top', '25px');
+ $('#beta-warning').slideDown(300, function() {
+ $(this).find('.blurb').fadeIn('slow');
+ });
+ }
// auto-expand the home menu when on the home page
// and remove it from other pages.
$("#headhome.current div.children").appendTo($('#menu-container'));
diff --git a/styles/home.css b/styles/home.css
index 54e4b42..9ef869f 100644
--- a/styles/home.css
+++ b/styles/home.css
@@ -81,12 +81,18 @@ complimentary greens: 9FB553 7B8851 61761B C6DA82 CCDA99
background: #e2d8ed;
border-bottom: solid 2px #C3ADD9;
display: none;
+ position: fixed;
+ top: 0px;
+ left: 0px;
+ width: 100%;
+ z-index: 100;
}
#beta-warning {
margin: 0 auto;
padding: 0.3em;
width: 960px;
+ display: none;
}
#beta-warning .blurb {
@@ -94,6 +100,7 @@ complimentary greens: 9FB553 7B8851 61761B C6DA82 CCDA99
line-height: 1.65em;
vertical-align: middle;
color: #444;
+ display: none;
}
#beta-warning-close {