diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fc472a0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +log +tmp +*.log +*.output +*.sqlite3 + diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index e873396..17b289b 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -5,15 +5,16 @@ <%= controller.controller_name %>: <%= controller.action_name %> - <%= stylesheet_link_tag 'scaffold' %> + <%= stylesheet_link_tag 'application' %> <%- %w{active4d all_hallows_eve amy blackboard brilliance_black brilliance_dull cobalt dawn eiffel espresso_libre idle iplastic lazy mac_classic magicwb_amiga pastels_on_dark spacecadet sunburst twilight zenburnesque}.each do |theme| -%> <%= require_syntax_css theme%> <%- end -%> <%= javascript_include_tag :defaults %> - -

<%= flash[:notice] %>

+<% if flash[:notice] -%> +

<%= flash[:notice] -%>

+<% end -%> <%= yield %> diff --git a/app/views/layouts/pastes.html.erb b/app/views/layouts/pastes.html.erb deleted file mode 100644 index b4d4b14..0000000 --- a/app/views/layouts/pastes.html.erb +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - Pastes: <%= controller.action_name %> - <%= stylesheet_link_tag 'scaffold' %> - <%- %w{active4d all_hallows_eve amy blackboard brilliance_black brilliance_dull cobalt dawn eiffel espresso_libre idle iplastic lazy mac_classic magicwb_amiga pastels_on_dark spacecadet sunburst twilight zenburnesque}.each do |theme| -%> - <%= require_syntax_css theme%> - <%- end -%> - <%= javascript_include_tag :defaults %> - - - -

<%= flash[:notice] %>

-<%= yield %> - - - diff --git a/app/views/pastes/_code.html.erb~ b/app/views/pastes/_code.html.erb~ deleted file mode 100644 index 2e3bcb1..0000000 --- a/app/views/pastes/_code.html.erb~ +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/app/views/pastes/_form.html.erb~ b/app/views/pastes/_form.html.erb~ deleted file mode 100644 index f650389..0000000 --- a/app/views/pastes/_form.html.erb~ +++ /dev/null @@ -1,22 +0,0 @@ -<%- unless @paste.errors.empty? -%> - - - -<%- end -%> - - - diff --git a/app/views/pastes/edit.html.erb~ b/app/views/pastes/edit.html.erb~ deleted file mode 100644 index 383918c..0000000 --- a/app/views/pastes/edit.html.erb~ +++ /dev/null @@ -1,20 +0,0 @@ -

Editing paste

- -<%= error_messages_for :paste %> - -<% form_for(@paste) do |f| %> -

- Language
- <%= f.select :language, SYNTAXES %> -

-

- Code
- <%= f.text_area :code %> -

-

- <%= f.submit "Update" %> -

-<% end %> - -<%= link_to 'Show', @paste %> | -<%= link_to 'Back', pastes_path %> diff --git a/app/views/pastes/index.html.erb~ b/app/views/pastes/index.html.erb~ deleted file mode 100644 index 4d0de9e..0000000 --- a/app/views/pastes/index.html.erb~ +++ /dev/null @@ -1,23 +0,0 @@ -
<%=h paste.code[0, 25] %><%=h paste.language %><%= link_to 'Show', paste %><%= link_to 'Edit', edit_paste_path(paste) %><%= link_to 'Destroy', paste, :confirm => 'Are you sure?', :method => :delete %>
<%= error_messages_for :paste %>
- <% form_for(@paste) do |f| %> -

- <%= f.label :language %>
- <%= f.select :language, SYNTAXES, :include_blank => true %> -

-

- <%= f.label :code %>
- <%= f.text_area :code, :cols => 80, :rows => 25 %> -

-

- <%= f.submit "Create" %> -

- <% end %> -
- - - - - - - - - - - - - - <% render :partial => 'paste', :collection => @pastes %> - - - - - -

Pastes

<%= link_to 'New paste', new_paste_path %>
CodeLanguage
<%= link_to 'New paste', new_paste_path %>
- - diff --git a/app/views/pastes/new.html.erb~ b/app/views/pastes/new.html.erb~ deleted file mode 100644 index f6b313f..0000000 --- a/app/views/pastes/new.html.erb~ +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - <%= render_partial 'form' %> - - - - -

New paste

<%= link_to 'Back', pastes_path %>
diff --git a/app/views/pastes/show.html.erb b/app/views/pastes/show.html.erb index 6104937..03f4bc2 100644 --- a/app/views/pastes/show.html.erb +++ b/app/views/pastes/show.html.erb @@ -1,22 +1,20 @@ - + - - +
Language: <%=h @paste.language %> Theme: <%= select_tag :themes, options_for_select(%w{active4d all_hallows_eve amy blackboard brilliance_black brilliance_dull cobalt dawn eiffel espresso_libre idle iplastic lazy mac_classic magicwb_amiga pastels_on_dark spacecadet sunburst twilight zenburnesque}), :onChange => "changeStyle(this.value)", :id => "theme_picker" %>
-
- <%=c @paste.code, :syntax => @paste.language %> -
+
+ <%=c @paste.code.gsub(/\t/, ' '), :syntax => @paste.language %>
<%= link_to 'Edit', edit_paste_path(@paste) %> <%= link_to 'Back', pastes_path %>
diff --git a/app/views/pastes/show.html.erb~ b/app/views/pastes/show.html.erb~ deleted file mode 100644 index db609b9..0000000 --- a/app/views/pastes/show.html.erb~ +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - -
Language: <%=h @paste.language %>Theme: <%= select_tag :themes, options_for_select(%w{active4d all_hallows_eve amy blackboard brilliance_black brilliance_dull cobalt dawn eiffel espresso_libre idle iplastic lazy mac_classic magicwb_amiga pastels_on_dark spacecadet sunburst twilight zenburnesque}), :onChange => "changeStyle(this.value)", :id => "theme_picker" %>
-
- <%=c @paste.code, :syntax => @paste.language %> -
-
<%= link_to 'Edit', edit_paste_path(@paste) %><%= link_to 'Back', pastes_path %>
- - - - diff --git a/config/routes.rb~ b/config/routes.rb~ deleted file mode 100644 index 1b1310f..0000000 --- a/config/routes.rb~ +++ /dev/null @@ -1,43 +0,0 @@ -ActionController::Routing::Routes.draw do |map| - map.resources :users - map.login '/login', :controller => 'sessions', :action => 'new' - - map.resource :session - - map.resources :pastes - map.root :controller => "pastes" - - # The priority is based upon order of creation: first created -> highest priority. - - # Sample of regular route: - # map.connect 'products/:id', :controller => 'catalog', :action => 'view' - # Keep in mind you can assign values other than :controller and :action - - # Sample of named route: - # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase' - # This route can be invoked with purchase_url(:id => product.id) - - # Sample resource route (maps HTTP verbs to controller actions automatically): - # map.resources :products - - # Sample resource route with options: - # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get } - - # Sample resource route with sub-resources: - # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller - - # Sample resource route within a namespace: - # map.namespace :admin do |admin| - # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb) - # admin.resources :products - # end - - # You can have the root of your site routed with map.root -- just remember to delete public/index.html. - # map.root :controller => "welcome" - - # See how all your routes lay out with "rake routes" - - # Install the default routes as the lowest priority. - #map.connect ':controller/:action/:id' - #map.connect ':controller/:action/:id.:format' -end diff --git a/public/stylesheets/scaffold.css b/public/stylesheets/application.css similarity index 93% rename from public/stylesheets/scaffold.css rename to public/stylesheets/application.css index 8e09398..c5761e1 100644 --- a/public/stylesheets/scaffold.css +++ b/public/stylesheets/application.css @@ -88,6 +88,12 @@ table caption {text-align: left; text-transform: uppercase; padding-bottom: 10p table thead th {background: #3A4856; padding: 15px 10px; color: #fff; text-align: left; font-weight: normal;} +table thead a {color: #FFFFFF; text-decoration: none; border-bottom: 1px solid #FFFFFF;} + +table thead a:visited {color: #AFAFAF;} + +table thead a:hover {color: #000;} + table tbody, table thead {border-left: 1px solid #EAECEE; border-right: 1px solid #EAECEE;} table tbody {border-bottom: 1px solid #EAECEE;} diff --git a/public/stylesheets/scaffold.css~ b/public/stylesheets/scaffold.css~ deleted file mode 100644 index 829d1bf..0000000 --- a/public/stylesheets/scaffold.css~ +++ /dev/null @@ -1,103 +0,0 @@ -body { background-color: #fff; color: #333; } - -body, p, ol, ul, td { - font-family: verdana, arial, helvetica, sans-serif; - font-size: 13px; - line-height: 18px; -} - -pre { - background-color: #eee; - padding: 10px; - font-size: 11px; -} - -/* -a { color: #000; } -a:visited { color: #666; } -a:hover { color: #fff; background-color:#000; } -*/ - -.fieldWithErrors { - padding: 2px; - background-color: red; - display: table; -} - -#errorExplanation { - width: 400px; - border: 2px solid red; - padding: 7px; - padding-bottom: 12px; - margin-bottom: 20px; - background-color: #f0f0f0; -} - -#errorExplanation h2 { - text-align: left; - font-weight: bold; - padding: 5px 5px 5px 15px; - font-size: 12px; - margin: -7px; - background-color: #c00; - color: #fff; -} - -#errorExplanation p { - color: #333; - margin-bottom: 0; - padding: 5px; -} - -#errorExplanation ul li { - font-size: 12px; - list-style: square; -} - -div.uploadStatus { - margin: 5px; -} - -div.progressBar { - margin: 5px; -} - -div.progressBar div.border { - background-color: #fff; - border: 1px solid gray; - width: 100%; -} - -div.progressBar div.background { - background-color: #333; - height: 18px; - width: 0%; -} - -/* "Winter Blues" CSS theme for CSS Table Gallery (http://icant.co.uk/csstablegallery/) by Gunta Klavina (http://www.klavina.com) */ - -table {font: 85% "Lucida Grande", "Lucida Sans Unicode", "Trebuchet MS", sans-serif;padding: 0; margin: 0; border-collapse: collapse; color: #333; background: #F3F5F7;} - -a {color: #3A4856; text-decoration: none; border-bottom: 1px solid #C6C8CB;} - -a:visited {color: #777;} - -a:hover {color: #000;} - -table caption {text-align: left; text-transform: uppercase; padding-bottom: 10px; font: 200% "Lucida Grande", "Lucida Sans Unicode", "Trebuchet MS", sans-serif;} - -table thead th {background: #3A4856; padding: 15px 10px; color: #fff; text-align: left; font-weight: normal;} - -table tbody, table thead {border-left: 1px solid #EAECEE; border-right: 1px solid #EAECEE;} - -table tbody {border-bottom: 1px solid #EAECEE;} - -table tbody td, table tbody th {padding: 10px; background: url("td_back.gif") repeat-x; text-align: left;} - -table tbody tr {background: #F3F5F7;} - -table tbody tr.odd {background: #F0F2F4;} - -table tbody tr:hover {background: #EAECEE; color: #111;} - -table tfoot td, table tfoot th, table tfoot tr {text-align: left; font: 120% "Lucida Grande", "Lucida Sans Unicode", "Trebuchet MS", sans-serif; text-transform: uppercase; background: #fff; padding: 10px;} \ No newline at end of file