From 292e1ae4bb7ce5472cfdc9b0100503bc1bcb19c2 Mon Sep 17 00:00:00 2001 From: jomo Date: Mon, 7 Oct 2013 05:33:12 +0200 Subject: [PATCH] details --- app/assets/stylesheets/screen.css.scss | 18 ++++++++++++++++++ app/views/blogposts/edit.html.erb | 2 +- app/views/blogposts/index.html.erb | 2 +- app/views/blogposts/new.html.erb | 2 +- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/screen.css.scss b/app/assets/stylesheets/screen.css.scss index 327e1ce..d2bab1d 100644 --- a/app/assets/stylesheets/screen.css.scss +++ b/app/assets/stylesheets/screen.css.scss @@ -231,6 +231,9 @@ and (min-width: 1000px) max-width: 100% !important; height: 200px; padding: 5px 3px; + &.full-width { + width: 100%; + } &.vertical { resize: vertical; } @@ -396,4 +399,19 @@ and (min-width: 1000px) font-weight: bold; } + + pre { + background: #ddd; + padding: 0.5em; + } + + code { + background: #ddd; + } + + pre code { + background: inherit; + padding: 0; + } + } \ No newline at end of file diff --git a/app/views/blogposts/edit.html.erb b/app/views/blogposts/edit.html.erb index 75e1a3e..7d4b736 100644 --- a/app/views/blogposts/edit.html.erb +++ b/app/views/blogposts/edit.html.erb @@ -2,7 +2,7 @@ <%= simple_form_for @post do |f|%> <%= f.input :title, :label => false %> - <%= f.input :content, :label => false %> + <%= f.input :content, :label => false, input_html: {class: "full-width vertical"} %> <%= f.submit "Update Post", :id => "edit_create_post" %> <% end %>
diff --git a/app/views/blogposts/index.html.erb b/app/views/blogposts/index.html.erb index 48c1e4e..b0e0e1a 100644 --- a/app/views/blogposts/index.html.erb +++ b/app/views/blogposts/index.html.erb @@ -15,5 +15,5 @@
<% end %> - <%= link_to 'Make new Post', new_blogpost_path if mod? %> + <%= button_to 'Make new Post', new_blogpost_path, method: "get" if mod? %> diff --git a/app/views/blogposts/new.html.erb b/app/views/blogposts/new.html.erb index e599f35..63d1017 100644 --- a/app/views/blogposts/new.html.erb +++ b/app/views/blogposts/new.html.erb @@ -1,6 +1,6 @@

New Post

<%= simple_form_for @post do |f|%> <%= f.input :title, :label => false %> - <%= f.input :content, :label => false %> + <%= f.input :content, :label => false, input_html: {class: "full-width vertical"} %> <%= f.submit "Update Post", :id => "edit_create_post" %> <% end %>