svn: /web/php/trunk/ js/common.js styles/home.css
[email protected] (Paul Dragoonis)
| Newsgroups | php.webmaster |
|---|---|
| Message-ID | <[email protected]> |
dragoonis Thu, 06 Jan 2011 23:20:33 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=307198
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:
U web/php/trunk/js/common.js
U web/php/trunk/styles/home.css
Modified: web/php/trunk/js/common.js
===================================================================
--- web/php/trunk/js/common.js 2011-01-06 23:08:04 UTC (rev 307197)
+++ web/php/trunk/js/common.js 2011-01-06 23:20:33 UTC (rev 307198)
@@ -1,16 +1,5 @@
$(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(";");
var showBetaWarning = true;
@@ -21,10 +10,29 @@
}
}
+ 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) {
- $("#head-beta-warning").slideDown("fast");
- }
-
+ $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'));
Modified: web/php/trunk/styles/home.css
===================================================================
--- web/php/trunk/styles/home.css 2011-01-06 23:08:04 UTC (rev 307197)
+++ web/php/trunk/styles/home.css 2011-01-06 23:20:33 UTC (rev 307198)
@@ -81,12 +81,18 @@
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 @@
line-height: 1.65em;
vertical-align: middle;
color: #444;
+ display: none;
}
#beta-warning-close {