Skip to content

Commit

Permalink
Incorporated the Resources plugin into the grails.org website and did…
Browse files Browse the repository at this point in the history
… a lot of

GSP and CSS refactoring, including grouping images into sprites. I have also
switched the DOCTYPE to straight 'html' and added a conditional 'ie6' class
to the HTML tag (as a way to get IE-specific styles).
  • Loading branch information
pledbrook committed Nov 13, 2010
1 parent 7b29e97 commit e7a4f45
Show file tree
Hide file tree
Showing 32 changed files with 313 additions and 243 deletions.
8 changes: 6 additions & 2 deletions grails.org/grails-app/conf/BuildConfig.groovy
Expand Up @@ -20,6 +20,8 @@ grails.project.dependency.resolution = {
runtime ":autobase:0.9.2",
":avatar:0.3",
":bubbling:2.1.2",
":cache-headers:1.1.2",
":cached-resources:1.0-alpha6",
":commentable:0.7.5",
":feeds:1.5",
":grails-ui:1.2-SNAPSHOT",
Expand All @@ -28,15 +30,17 @@ grails.project.dependency.resolution = {
":pretty-time:0.3",
":quartz:0.4.2",
":rateable:0.6.2",
":resources:1.0-alpha13",
":richui:0.6",
":screencasts:0.4",
":searchable:0.5.5.1",
":shiro:1.1.1",
":simple-blog:0.1.5",
// ":springcache:1.2",
":springcache:1.2",
":spring-events:1.0",
":taggable:0.6.2",
":yui:2.7.0.1"
":yui:2.7.0.1",
":zipped-resources:1.0-alpha5"

test ":build-test-data:1.1.1",
":fixtures:1.0.1",
Expand Down
36 changes: 36 additions & 0 deletions grails.org/grails-app/conf/Config.groovy
Expand Up @@ -62,6 +62,40 @@ myAuth.applicationName = grails.org
"""
*/

// Static resources
grails.resources.modules = {
master {
resource url: 'css/new/master.css'
}
homepage {
dependsOn 'master'
resource 'css/new/homepage.css'
}
plugins {
dependsOn 'master'
resource url: 'css/new/plugins.css'
}
pluginInfo {
dependsOn 'master'
resource url: 'css/new/pluginInfo.css'
}
pluginDetails {
dependsOn 'pluginInfo'
['tabview', 'content', 'plugins'].each { sheet ->
resource url: "css/${sheet}.css".toString()
}
resource url: 'js/common/yui-effects.js'
resource url: 'js/diff_match_patch.js'
}
subpage {
dependsOn 'master'
resource url: 'css/new/subpage.css'
resource url: 'css/content.css'
resource url: 'js/common/yui-effects.js'
resource url: 'js/diff_match_patch.js'
}
}

springcache {
disabled = true
defaults {
Expand Down Expand Up @@ -101,6 +135,8 @@ grails.blog.author.evaluator= {

// log4j configuration
log4j = {
off 'grails.app.service.org.grails.plugin.resource'

warn 'org.codehaus.groovy.grails.web.servlet',
'org.codehaus.groovy.grails.web.pages', // GSP
'org.codehaus.groovy.grails.web.sitemesh', // layouts
Expand Down
12 changes: 6 additions & 6 deletions grails.org/grails-app/views/content/_editActions.gsp
Expand Up @@ -7,42 +7,42 @@
<shiro:hasRole name="${Role.ADMINISTRATOR}">
<li>
<a href="${href}" class="actionIcon" onclick="myYUI.appear('deprecateDialog')">
<img src="${createLinkTo(dir: 'images/', 'icon-upload.png')}" width="15" height="15" alt="Icon Image Upload" class="inlineIcon" border="0"/>
<r:img uri="/images/icon-upload.png" width="15" height="15" alt="Icon Image Upload" class="inlineIcon" border="0"/>
<span>Deprecate</span>
</a>
</li>
</shiro:hasRole>
<shiro:lacksRole name="${Role.ADMINISTRATOR}">
<li>
<a href="${href}" class="actionIcon" onclick="myYUI.appear('uploadDialog')">
<img src="${createLinkTo(dir: 'images/', 'icon-upload.png')}" width="15" height="15" alt="Icon Image Upload" class="inlineIcon" border="0"/>
<r:img uri="/images/icon-upload.png" width="15" height="15" alt="Icon Image Upload" class="inlineIcon" border="0"/>
<span>Upload Image</span>
</a>
</li>
</shiro:lacksRole>
<li>
<a href="${href}" class="actionIcon"
onclick="YAHOO.util.Connect.setForm('${editFormName}');YAHOO.util.Connect.asyncRequest('POST', '/preview/${content?.title}', {success: function(o){YAHOO.util.Dom.get('previewPane').innerHTML = o.responseText;showPreview();}, failure: function(o){}});return false;" class="actionIcon">
<img src="${createLinkTo(dir: 'images/', 'icon-preview.png')}" width="18" height="15" alt="Icon Edit" class="inlineIcon" border="0"/>
<r:img uri="/images/icon-preview.png" width="18" height="15" alt="Icon Edit" class="inlineIcon" border="0"/>
<span>Preview</span>
</a>
</li>
<li>
<a href="${href}" class="actionIcon"
onclick="YAHOO.util.Connect.setForm('${editFormName}');YAHOO.util.Connect.asyncRequest('POST', '/save/${content?.title}', {success: function(o){showCommentPost();YAHOO.util.Dom.get('${updateElement}').innerHTML = o.responseText; fadeMessages()}, failure: function(o){}});return false;" class="actionIcon">
<img src="${createLinkTo(dir: 'images/', 'icon-save.png')}" width="15" height="15" alt="Icon Save" class="inlineIcon" border="0"/>
<r:img uri="/images/icon-save.png" width="15" height="15" alt="Icon Save" class="inlineIcon" border="0"/>
<span>Save</span>
</a>
</li>
<li>
<g:remoteLink class="actionIcon" update="${updateElement}" controller="content" id="${content?.title}" params="[update: updateElement]" onLoaded="showCommentPost()">
<img src="${createLinkTo(dir: 'images/', 'icon-cancel.png')}" width="15" height="15" alt="Icon Cancel" class="inlineIcon" border="0"/>
<r:img uri="/images/icon-cancel.png" width="15" height="15" alt="Icon Cancel" class="inlineIcon" border="0"/>
<span>Cancel</span>
</g:remoteLink>
</li>
<li>
<g:remoteLink class="actionIcon" action="infoWikiPage" id="${content?.title}" update="${updateElement}" params="[update: updateElement]" method="GET" onLoaded="showCommentPost()">
<img border="0" src="${createLinkTo(dir: 'images/', 'icon-info.png')}" width="15" height="15" alt="Icon Edit" class="inlineIcon" border="0"/>
<r:img border="0" uri="/images/icon-info.png" width="15" height="15" alt="Icon Edit" class="inlineIcon" border="0"/>
<span>View Info</span>
</g:remoteLink>
</li>
Expand Down
2 changes: 1 addition & 1 deletion grails.org/grails-app/views/content/_footer.gsp
@@ -1,7 +1,7 @@
<div id="footer">
<div align="center">
<div class="innerFooter">
<a href="http://contegix.com"><img src="${resource(dir:'images',file:'contegix_logo.jpg')}" alt="Hosted by Contegix" border="0"/></a>
<a href="http://contegix.com"><r:img uri="/images/contegix_logo.jpg" alt="Hosted by Contegix" border="0"/></a>

<a href="http://twitter.com/grailsframework"><div class="twitter"></div></a>
<p>Running Grails <g:meta name="app.grails.version"></g:meta> &copy; Copyright 2009 SpringSource.<br/>All Rights Reserved. </p>
Expand Down
4 changes: 2 additions & 2 deletions grails.org/grails-app/views/content/_logos.gsp
@@ -1,10 +1,10 @@
<div id="springSourceBar">
<div id="grailsLogo">
<a href="/"><img src="${resource(dir:'images/new', file:'grailslogo_topNav.png')}" border="0"></a>
<a href="/"><r:img uri="/images/new/grailslogo_topNav.png" border="0"/></a>
</div>

<div id="springSourceLogo">
<a href="http://www.springsource.com/"><img src="${resource(dir:'images/new', file:'springsource.png')}" border="0"></a>
<a href="http://www.springsource.com/"><r:img uri="/images/new/springsource.png" border="0"/></a>
</div>
<div id="searchbar">
<g:form method="GET" url="[controller:'content', action:'search']" name="searchForm">
Expand Down
2 changes: 1 addition & 1 deletion grails.org/grails-app/views/content/_previewPane.gsp
@@ -1,4 +1,4 @@
<div id="previewContainer" class="previewPane" style="display:none;">
<div id="closePreview"><a href="#" onclick="hidePreview();"><img class="inlineIcon" width="15" height="15" border="0" alt="Icon Cancel" src="/images/icon-cancel.png"/> Close</a></div>
<div id="closePreview"><a href="#" onclick="hidePreview();"><r:img class="inlineIcon" width="15" height="15" border="0" alt="Icon Cancel" uri="/images/icon-cancel.png"/> Close</a></div>
<div id="previewPane" style="margin:10px; "></div>
</div>
4 changes: 2 additions & 2 deletions grails.org/grails-app/views/content/_viewActions.gsp
Expand Up @@ -8,14 +8,14 @@
<g:else>
<li>
<g:remoteLink class="actionIcon" controller="content" action="editWikiPage" id="${content?.title}" params="[update: updateElement, editFormName:editFormName]" update="${updateElement}" method="GET" onLoaded="hideCommentPost()">
<img border="0" src="${resource(dir: 'images/', 'icon-edit.png')}" width="15" height="15" alt="Icon Edit" class="inlineIcon" border="0"/>
<r:img border="0" uri="/images/icon-edit.png" width="15" height="15" alt="Icon Edit" class="inlineIcon" border="0"/>
<span>Edit</span>
</g:remoteLink>
</li>
</g:else>
<li>
<g:remoteLink class="actionIcon" controller="content" action="infoWikiPage" id="${content?.title}" update="${updateElement}" params="[update: updateElement]" method="GET">
<img border="0" src="${resource(dir: 'images/', 'icon-info.png')}" width="15" height="15" alt="Icon Edit" class="inlineIcon" border="0"/>
<r:img border="0" uri="/images/icon-info.png" width="15" height="15" alt="Icon Edit" class="inlineIcon" border="0"/>
<span>View Info</span>
</g:remoteLink>
</li>
Expand Down
4 changes: 2 additions & 2 deletions grails.org/grails-app/views/content/_wikiInfo.gsp
Expand Up @@ -6,13 +6,13 @@
<ul class="wikiActionMenu">
<li>
<g:remoteLink class="actionIcon" controller="content" action="editWikiPage" id="${wikiPage?.title}" params="[update:updateElement]" update="${updateElement}" onLoaded="hideCommentPost()">
<img border="0" src="${createLinkTo(dir:'images/','icon-edit.png')}" width="15" height="15" alt="Icon Edit" class="inlineIcon" border="0" />
<r:img border="0" uri="/images/icon-edit.png" width="15" height="15" alt="Icon Edit" class="inlineIcon" border="0" />
<span>Edit</span>
</g:remoteLink>
</li>
<li>
<g:remoteLink class="actionIcon" update="${updateElement}" controller="content" id="${wikiPage?.title}" params="[xhr:true, update:updateElement]" onLoaded="showCommentPost()">
<img src="${createLinkTo(dir:'images/','icon-info.png')}" width="15" height="15" alt="Icon Edit" class="inlineIcon" border="0" />
<r:img uri="/images/icon-info.png" width="15" height="15" alt="Icon Edit" class="inlineIcon" border="0" />
<span>View Page</span>
</g:remoteLink>
</li>
Expand Down
55 changes: 24 additions & 31 deletions grails.org/grails-app/views/layouts/homepage.gsp
@@ -1,26 +1,21 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
<!--[if IE 7 ]> <html class="ie7"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8"> <![endif]-->
<!--[if IE 9 ]> <html class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class=""> <!--<![endif]-->
<head>
<link rel="stylesheet" href="${resource(dir: 'css/new', file: 'master.css')}" type="text/css" />
<link rel="stylesheet" href="${resource(dir: 'css/new', file: 'homepage.css')}" type="text/css" />
<!--[if IE]>
<link rel="stylesheet" href="${resource(dir: 'css/new', file: 'ie.css')}"/>
<![endif]-->

<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon" />
<link rel="icon" href="/images/favicon.ico" type="image/x-icon">


<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="NOODP">
<meta name="Description" content="Grails is a high-productivity web framework based on the Groovy language that embraces the coding by convention paradigm, but is designed specifically for the Java platform.">
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="NOODP">
<meta name="Description" content="Grails is a high-productivity web framework based on the Groovy language that embraces the coding by convention paradigm, but is designed specifically for the Java platform.">

<title>Grails - The search is over.</title>

<g:layoutHead />

<title>Grails - The search is over.</title>

<r:use modules="homepage"/>
<r:resourceLink uri="/images/favicon.ico"/>
<r:layoutResources/>

<g:layoutHead />
</head>
<body>

Expand Down Expand Up @@ -69,16 +64,12 @@
<h3>
<g:if test="${grailsDownload}">
<download:link software="Grails" version="${grailsDownload?.softwareVersion}" file="Binary Zip">
<img src="${resource(dir:'images/new',file:'download_button.png')}"
border="0"
alt="Download Grails" />
<r:img uri="/images/new/download_button.png" border="0" alt="Download Grails" />
</download:link>
</g:if>
<g:else>
<g:link controller="content" id="Download">
<img src="${resource(dir:'images/new',file:'download_button.png')}"
border="0"
alt="Download Grails" />
<r:img uri="/images/new/download_button.png" border="0" alt="Download Grails" />
</g:link>
</g:else>
</h3>
Expand All @@ -89,7 +80,7 @@
<div id="plugins">
<h3>
<g:link controller="plugin">
<img src="${resource(dir:'images/new',file:'plugins_button.png')}" alt="Grails Plugins" border="0" />
<r:img uri="/images/new/plugins_button.png" alt="Grails Plugins" border="0" />
</g:link>
Expand Down Expand Up @@ -138,7 +129,7 @@
<div class="castBox">
<div class="advert">
<a href="http://www.springone2gx.com/conference/chicago/2010/10/register">
<img width="250" height="240" src="${resource(dir: 'images', file: 'SpringOne2GX_250x240.png')}"/>
<r:img width="250" height="240" uri="/images/SpringOne2GX_250x240.png"/>
</a>
</div>
</div>
Expand All @@ -147,7 +138,7 @@
<div class="castBox">
<div class="castScreen">
<a href="https://www.cloudfoundry.com/screencasts.html#grails">
<img src="/images/new/play_icon.png"/>
<r:img uri="/images/new/play_icon.png"/>
</a>
</div><!-- castScreen -->
<h4><g:link controller="screencast" action="list">View All</g:link></h4>
Expand Down Expand Up @@ -200,7 +191,7 @@ Visit the Grails <g:link controller="content" id="Community">community pages</g:
<div id="footer">
<div align="center">
<div class="innerFooter">
<a href="http://contegix.com"><img src="${resource(dir:'images',file:'contegix_logo.jpg')}" alt="Hosted by Contegix" border="0"/></a>
<a href="http://contegix.com"><r:img uri="/images/contegix_logo.jpg" alt="Hosted by Contegix" border="0"/></a>
<a href="http://twitter.com/grailsframework"><div class="twitter"></div></a>
<p>&copy; Copyright 2009 SpringSource.<br/>All Rights Reserved.</p>
</div><!-- innerFooter -->
Expand All @@ -209,5 +200,7 @@ Visit the Grails <g:link controller="content" id="Community">community pages</g:

<%-- Google Analytics --%>
<g:render template="/content/analytics" />

<r:layoutResources/>
</body>
</html>
22 changes: 12 additions & 10 deletions grails.org/grails-app/views/layouts/main.gsp
@@ -1,22 +1,22 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html class="ie6"> <![endif]-->
<!--[if IE 7 ]> <html class="ie7"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8"> <![endif]-->
<!--[if IE 9 ]> <html class="ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html class=""> <!--<![endif]-->
<head>
<title>Grails - <g:layoutTitle default="The search is over."></g:layoutTitle></title>

<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<wiki:robots/>
<meta name="Description" content="Grails is a high-productivity web framework based on the Groovy language that embraces the coding by convention paradigm, but is designed specifically for the Java platform.">

<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon" />
<link rel="icon" href="/images/favicon.ico" type="image/x-icon">

<link rel="stylesheet" href="${resource(dir: 'css/new', file: 'master.css')}" type="text/css" />
<r:use modules="master"/>
<r:resourceLink uri="/images/favicon.ico"/>
<r:layoutResources/>

<%-- Page-specific CSS goes in here --%>
<g:pageProperty name="page.pageCss" />
<!--[if IE]><link rel="stylesheet" href="${resource(dir: 'css/new', file: 'ie.css')}"/><![endif]-->

<g:layoutHead />
</head>
<body>
Expand Down Expand Up @@ -47,5 +47,7 @@

<%-- Google Analytics --%>
<g:render template="/content/analytics" />

<r:layoutResources/>
</body>
</html>
7 changes: 1 addition & 6 deletions grails.org/grails-app/views/layouts/pluginDetails.gsp
Expand Up @@ -5,13 +5,8 @@
<content tag="pageCss">
<rateable:resources />
<gui:resources components="['tabView','dialog','autoComplete']" javascript='animation'/>
<link rel="stylesheet" type="text/css" href="${resource(dir:'css',file:'tabview.css')}" />
<link rel="stylesheet" type="text/css" href="${resource(dir:'css',file:'content.css')}" />
<link rel="stylesheet" type="text/css" href="${resource(dir:'css',file:'plugins.css')}" />
</content>

<g:javascript src="common/yui-effects.js" />
<g:javascript library="diff_match_patch" />
<r:use modules="pluginDetails"/>

<g:layoutHead />

Expand Down
2 changes: 1 addition & 1 deletion grails.org/grails-app/views/layouts/pluginInfoLayout.gsp
@@ -1,9 +1,9 @@
<g:applyLayout name="main">
<head>
<title><g:layoutTitle /></title>
<r:use modules="pluginInfo"/>

<content tag="pageCss">
<link rel="stylesheet" href="${resource(dir: 'css/new', file: 'pluginInfo.css')}" type="text/css" />
<g:pageProperty name="page.pageCss" />
</content>

Expand Down
4 changes: 2 additions & 2 deletions grails.org/grails-app/views/layouts/pluginLayout.gsp
@@ -1,11 +1,11 @@
<g:applyLayout name="main">
<head>
<title><g:layoutTitle default="Plugins Portal" /></title>
<r:use modules="plugins"/>

<content tag="pageCss">
<link rel="stylesheet" href="${resource(dir: 'css/new', file: 'plugins.css')}" type="text/css" />

</content>

<g:layoutHead />
</head>
<body>
Expand Down
8 changes: 1 addition & 7 deletions grails.org/grails-app/views/layouts/pluginNav.gsp
Expand Up @@ -3,7 +3,7 @@
<div id="contentArea">

<div id="pluginsLogo">
<a href="http://grails.org"><img src="${resource(dir:'images/new/plugins', file:'plugins_topnav2.png')}" border="0"></a>
<a href="http://grails.org"><r:img uri="/images/new/plugins/plugins_topnav2.png" border="0"/></a>
</div>

<div id="pluginMenu">
Expand Down Expand Up @@ -47,11 +47,5 @@
</div>
</div><!-- contentArea -->

<div id="btmSectionGraphicsWrapper">
<div id="mountainLeft"></div>
<div id="knight"></div>
<div id="mountainRight"></div>
<div id="castle"></div>
</div><!-- btmSectionGraphicsWrapper-->
</body>
</g:applyLayout>

0 comments on commit e7a4f45

Please sign in to comment.