Created
September 12, 2011 16:02
-
-
Save marcpalmer/1211626 to your computer and use it in GitHub Desktop.
Resources Article 1 snippet 9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
} | |
} |
I would try it and see :)
Although one shouldn't do this, is it will likely result in bad results surely?
Haha, I agree. But sometimes we have the privilege of taking over old code, ya know? :) And say, for example, that old code had a lot of non-DRY stuff like that. Just saying, it helps to know what to expect, and then refactor where needed.
As for putting width/height here, vs in the html, I'm guessing a 'front end' html guy/gal would prefer to control that in the view code, but setting these as defaults might be a good compromise. Just thinking out loud...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When specifying attrs like this, if the tag in the gsp also specifies a width/height, which takes precedence?