Skip to content

Instantly share code, notes, and snippets.

View marcpalmer's full-sized avatar
💭
Busy working on Concepts app, and Captionista

Marc Palmer marcpalmer

💭
Busy working on Concepts app, and Captionista
View GitHub Profile
@marcpalmer
marcpalmer / resources_article_1_snippet_6.groovy
Created September 12, 2011 15:33
Resources Article 1 snippet 6
modules = {
common {
dependsOn "jquery-ui, jquery"
resource url:'css/main.css'
}
editPage {
dependsOn 'common'
// we could include and edit-specific JS resource here.
}
@marcpalmer
marcpalmer / resources_article_1_snippet_5b.groovy
Created September 12, 2011 15:38
Resources Article 1 snippet 5b
modules = {
common {
dependsOn "jquery-ui, jquery"
resource url:'css/main.css'
}
}
@marcpalmer
marcpalmer / resources_article_1_snippet_7.gsp
Created September 12, 2011 15:52
Resources Article 1 snippet 7
<html>
<head>
<meta name="layout" content="main"/>
<r:require module="common"/>
<r:script>window.alert('Boo!')</r:script>
</head>
<body>
...
</body>
</html>
@marcpalmer
marcpalmer / resources_article_1_snippet_8.gsp
Created September 12, 2011 16:01
Resources Article 1 snippet 8
<r:img uri="images/logo.png"/>
@marcpalmer
marcpalmer / resources_article_1_snippet_9.groovy
Created September 12, 2011 16:02
Resources Article 1 snippet 9
modules = {
common {
dependsOn "jquery-ui, jquery"
resource url:'css/main.css'
}
images {
resource url:'images/logo.png',
attrs:[width:400, height:180, alt:'ACME Corp.'],
disposition: 'image'
}
@marcpalmer
marcpalmer / resources_article_1_snippet_10.groovy
Created September 12, 2011 16:03
Resources Article 1 snippet 10
modules = {
common {
dependsOn "jquery-ui, jquery"
resource url:'css/main.css', bundle: 'core'
}
}
@marcpalmer
marcpalmer / resources_article_1_snippet_11.groovy
Created September 12, 2011 16:04
Resources Article 1 snippet 11
modules = {
common {
dependsOn "jquery-ui, jquery"
resource url:'css/main.css', bundle: 'core'
}
overrides {
jquery {
defaultBundle 'core'
}
@marcpalmer
marcpalmer / resources_article_1_snippet_12.groovy
Created September 12, 2011 16:06
Resources Article 1 snippet 12
modules = {
common {
resource url:'css/main.css', bundle:'core',
attrs:[media:'print']
}
}
@marcpalmer
marcpalmer / resources_article_1_snippet_13.groovy
Created September 12, 2011 16:08
Resources Article 1 snippet 13
modules = {
app {
resource url:[plugin:'blueprint',
dir:'css/blueprint',
file:'ie.css'],
wrapper: { s -> "<!--[if lt IE 8]>$s<![endif]-->" }
}
}
@marcpalmer
marcpalmer / resources_article_1_snippet_14.groovy
Created September 12, 2011 16:09
Resources Article 1 snippet 14
modules = {
overrides {
jquery {
resource id:'js', bundle:'global'
}
}
}