Created
February 21, 2013 22:07
-
-
Save marti1125/5008778 to your computer and use it in GitHub Desktop.
Index YAML
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
%h1 Images | |
if @images.count == 0 | |
%h3 You have no images | |
@images.each do |image| | |
%h2 | |
%a{href: "/images/#{image.id}"}=image[:title] | |
%p | |
%img{src: image[:url], width: 40} | |
%blockquote=image[:description] | |
%h2 Store a new image | |
%form.row(action="/images" method="post") | |
%p.six.columns | |
%label Title | |
%input(type="text" placeholder="Enter a title" name="image[title]") | |
%p.six.columns | |
%label URL | |
%input(type="url" placeholder="Enter a url" name="image[url]") | |
%p.twelve.columns | |
%label Description | |
%textarea(placeholder="Enter a quick description" rows="3" name="image[description]") | |
%p.twelve.columns | |
%input.button(type="submit" value="Create image") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment