Commit: 634677f7e365aa96f5bd3d994dcdb1292db2ad41 Author: Adam Harvey <[email protected]> Thu, 6 Jan 2011 16:41:32 +0000 Parents: 4d37acb1d628be77c71ea8fd7f78559db4e55f09 Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=634677f7e365aa96f5bd3d994dcdb1292db2ad41 Log: Add a temporary banner across the top of the beta site that explains that it's an experimental design and not the actual live site. Barring major changes to the structure of header.inc, with any luck this commit should be able to be reverted whole to get rid of this before deploying to live. Changed paths: M include/header.inc M js/common.js M styles/home.css Diff: diff --git a/include/header.inc b/include/header.inc index f7ad92f..ed81680 100644 --- a/include/header.inc +++ b/include/header.inc @@ -52,6 +52,17 @@ if ($shortname) { </head> <body> +<div id="head-beta-warning"> + <div id="beta-warning"> + <a href="#" id="beta-warning-close">X</a> + <span class="blurb"> + This is a work-in-progress experimental design. + Things <strong>will</strong> be broken and unfinished! + You may prefer <a href="http://php.net/">php.net</a>. + </span> + </div> +</div> + <div id="headnav"> <ul id="headmenu"> diff --git a/js/common.js b/js/common.js index 3ceff68..601e48c 100644 --- a/js/common.js +++ b/js/common.js @@ -1,4 +1,29 @@ $(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; + for (var i = 0; i < cookies.length; i++) { + if (cookies[i].indexOf("BetaWarning=") != -1) { + showBetaWarning = false; + break; + } + } + + if (showBetaWarning) { + $("#head-beta-warning").slideDown("fast"); + } // auto-expand the home menu when on the home page // and remove it from other pages. diff --git a/styles/home.css b/styles/home.css index 13e41cc..54e4b42 100644 --- a/styles/home.css +++ b/styles/home.css @@ -76,3 +76,42 @@ complimentary greens: 9FB553 7B8851 61761B C6DA82 CCDA99 #mega-drop-down div.download a span.package { font-size: 1.3em; } + +#head-beta-warning { + background: #e2d8ed; + border-bottom: solid 2px #C3ADD9; + display: none; +} + +#beta-warning { + margin: 0 auto; + padding: 0.3em; + width: 960px; +} + +#beta-warning .blurb { + font-size: 1.3em; + line-height: 1.65em; + vertical-align: middle; + color: #444; +} + +#beta-warning-close { + display: block; + float: right; + border: solid 1px #604080; + background: #604080; + color: white; + font-weight: bold; + text-decoration: none; + margin-top: 0.24em; + height: 1.2em; + line-height: 1.2em; + vertical-align: middle; + width: 1.2em; + padding: 0.2em; + text-align: center; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; +} -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
