Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added Stylesheet

  • Loading branch information...
commit 344ac71d4b421a53411a1d8833ce5ac16c852f6d 1 parent a059ca5
@nvijayap authored
View
16 .gitignore
@@ -0,0 +1,16 @@
+# See https://help.github.com/articles/ignoring-files for more about ignoring files.
+#
+# If you find yourself ignoring temporary files generated by your text editor
+# or operating system, you probably want to add a global ignore instead:
+# git config --global core.excludesfile '~/.gitignore_global'
+
+# Ignore bundler config.
+/.bundle
+
+# Ignore the default SQLite database.
+/db/*.sqlite3
+/db/*.sqlite3-journal
+
+# Ignore all logfiles and tempfiles.
+/log/*.log
+/tmp
View
85 app/assets/stylesheets/spellcheck.css.scss
@@ -0,0 +1,85 @@
+body {
+ background-color: #fff;
+ color: #333;
+ font-family: verdana, arial, helvetica, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+}
+
+p, ol, ul, td {
+ font-family: verdana, arial, helvetica, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+}
+
+pg {
+ font-family: verdana, arial, helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 13px;
+ line-height: 18px;
+ color: green;
+}
+
+pr {
+ font-family: verdana, arial, helvetica, sans-serif;
+ font-weight: bold;
+ font-size: 13px;
+ line-height: 18px;
+ color: red;
+}
+
+pre {
+ background-color: #eee;
+ padding: 10px;
+ font-size: 11px;
+}
+
+a {
+ color: #000;
+ &:visited {
+ color: #666;
+ }
+ &:hover {
+ color: #fff;
+ background-color: #000;
+ }
+}
+
+div {
+ &.field, &.actions {
+ margin-bottom: 10px;
+ }
+}
+
+#notice {
+ color: green;
+}
+
+.field_with_errors {
+ padding: 2px;
+ background-color: red;
+ display: table;
+}
+
+#error_explanation {
+ width: 450px;
+ border: 2px solid red;
+ padding: 7px;
+ padding-bottom: 0;
+ margin-bottom: 20px;
+ background-color: #f0f0f0;
+ h2 {
+ text-align: left;
+ font-weight: bold;
+ padding: 5px 5px 5px 15px;
+ font-size: 12px;
+ margin: -7px;
+ margin-bottom: 0px;
+ background-color: #c00;
+ color: #fff;
+ }
+ ul li {
+ font-size: 12px;
+ list-style: square;
+ }
+}
View
14 app/views/spell_check/view.html.erb
@@ -1,14 +1,20 @@
<br/>
<%= form_tag("/spellcheck", method: "post") do %>
<% if params[:q] %>
- <% if params[:yn] %>
- <%= "'" + params[:q] + "' has passed Spell Check "%>
+ <% if params[:q].blank? %>
+ <pr><%= "Spell Check CANNOT be done on blank/empty word !" %></pr>
+ <% else %>
+ <% if params[:yn] %>
+ <pg><%= "'" + params[:q] + "' has passed Spell Check" %></pg>
<% else %>
- <%= "'" + params[:q] + "' has FAILED Spell Check "%>
+ <pr><%= "'" + params[:q] + "' has FAILED Spell Check" %></pr>
<% end %>
+ <% end %>
<% end %>
- <br/><br/>
+ <br/>
+ <p>
<%= label_tag(:q, "Word:") %>
<%= text_field_tag(:q) %>
<%= submit_tag("SpellCheck") %>
+ </p>
<% end %>
View
2  config/routes.rb
@@ -7,7 +7,7 @@
# See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root"
- # root 'welcome#index'
+ root 'spell_check#view'
# Example of regular route:
# get 'products/:id' => 'catalog#view'
View
2  public/index.html
@@ -1,2 +0,0 @@
-<br/>
-<a href="/spellcheck">Enter Spell Check App</a>
Please sign in to comment.
Something went wrong with that request. Please try again.