svn: /web/php/trunk/ include/header.inc js/common.js styles/home.css

From: Date: Thu, 06 Jan 2011 16:41:32 +0000
Subject: svn: /web/php/trunk/ include/header.inc js/common.js styles/home.css
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-10239@lists.php.net to get a copy of this message
aharvey Thu, 06 Jan 2011 16:41:32 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=307167 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: U web/php/trunk/include/header.inc U web/php/trunk/js/common.js U web/php/trunk/styles/home.css Modified: web/php/trunk/include/header.inc =================================================================== --- web/php/trunk/include/header.inc 2011-01-06 16:09:59 UTC (rev 307166) +++ web/php/trunk/include/header.inc 2011-01-06 16:41:32 UTC (rev 307167) @@ -52,6 +52,17 @@ </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"> Modified: web/php/trunk/js/common.js =================================================================== --- web/php/trunk/js/common.js 2011-01-06 16:09:59 UTC (rev 307166) +++ web/php/trunk/js/common.js 2011-01-06 16:41:32 UTC (rev 307167) @@ -1,5 +1,30 @@ $(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. $("#headhome.current div.children").appendTo($('#menu-container')); Modified: web/php/trunk/styles/home.css =================================================================== --- web/php/trunk/styles/home.css 2011-01-06 16:09:59 UTC (rev 307166) +++ web/php/trunk/styles/home.css 2011-01-06 16:41:32 UTC (rev 307167) @@ -76,3 +76,42 @@ #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; +}

« previous php.webmaster (#10239) next »