Helpers related to producing assets (images, stylesheets, js, etc) within templates.
["js", "css"]
%r{^(https?://)}
{ :js => 'javascripts', :css => 'stylesheets', }
#asset_path(kind, source = nil) ⇒ String
Returns the path to the specified asset (css or javascript). #favicon_tag(source, options = {}) ⇒ String
Generates a favicon link. #feed_tag(mime, url, options = {}) ⇒ String
Creates a link tag that browsers and news readers can use to auto-detect an RSS or ATOM feed. #flash_tag(*args) ⇒ String
Creates a div to display the flash of given type if it exists. #image_alt(src) ⇒ String
Returns a string suitable for an alt attribute of img element. #image_path(src) ⇒ String
Returns the path to the image, either relative or absolute. #image_tag(url, options = {}) ⇒ String
Creates an image element with given url and options. #javascript_include_tag(*sources, options = {}) ⇒ String
Returns a html script tag for each of the sources provided. #link_to(*args, &block) ⇒ String
Creates a link element with given name, url and options. #mail_to(email, caption = nil, mail_options = {}) ⇒ String
Creates a mail link element with given name and caption. #meta_tag(content, options = {}) ⇒ String
Creates a meta element with the content and given options. #stylesheet_link_tag(*sources, options = {}) ⇒ String
Returns a html link tag for each of the sources provided. Returns the path to the specified asset (css or javascript).
Generates a favicon link. Looks inside images folder
Creates a link tag that browsers and news readers can use to auto-detect an RSS or ATOM feed.
@param options
The options for the feed tag.
Creates a div to display the flash of given type if it exists.
Returns a string suitable for an alt attribute of img element.
Returns the path to the image, either relative or absolute. We search it in your appname.public_folder
like app/public/images for inclusion. You can provide also a full path.
Creates an image element with given url and options.
Returns a html script tag for each of the sources provided. You can pass in the filename without extension or a symbol and we search it in your appname.public_folder
like app/public/javascript for inclusion. You can provide also a full path.
Creates a link element with given name, url and options.
Note that you can pass :if
or :unless
conditions, but if you provide :current as condition padrino return true/false if the request.path_info match the given url.
Creates a mail link element with given name and caption.
Creates a meta element with the content and given options.
Returns a html link tag for each of the sources provided. You can pass in the filename without extension or a symbol and we search it in your appname.public_folder
like app/public/stylesheets for inclusion. You can provide also a full path.
© 2010–2019 Padrino
Licensed under the MIT License.
https://www.rubydoc.info/github/padrino/padrino-framework/Padrino/Helpers/AssetTagHelpers