diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 6ff3a50..fdce93e 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -15,3 +15,35 @@ */ @import "bootstrap"; + +$nord0: #2e3440; +$nord1: #3b4252; +$nord2: #434c5e; +$nord3: #4c566a; + +// Snow Storm +$nord4: #D8DEE9; + +$nord9: #5e81ac; + +a, a:visited { + color: $nord0; + text-decoration: none; +} + +a:hover { + color: $nord3; + text-decoration: underline; +} + +.dictionary-index-links { + font-size: 40px; + //color: #000; + font-weight: bold; +} + +.selected-letter { + color: $nord9; + display: inline; +} + diff --git a/app/helpers/dictionary_helper.rb b/app/helpers/dictionary_helper.rb index f958701..db9f749 100644 --- a/app/helpers/dictionary_helper.rb +++ b/app/helpers/dictionary_helper.rb @@ -1,10 +1,14 @@ module DictionaryHelper LETTERS = ['i', 'u', 'e', 'o', 'a', 'm', 'n', 'p', 't', 'k', 's', 'w', 'l', 'j'].sort - def alphabetical_links + def alphabetical_links(letter = nil) LETTERS.map do |l| - link_to l.to_s, dictionary_path(l) + if l == letter then + "
#{l.to_s}
" + else + link_to l.to_s, dictionary_path(l)#, class: "dictionary_index_links text-center" + end end.join("\n") end end diff --git a/app/views/application/_alphabetical_links.html.erb b/app/views/application/_alphabetical_links.html.erb new file mode 100644 index 0000000..ead009a --- /dev/null +++ b/app/views/application/_alphabetical_links.html.erb @@ -0,0 +1,11 @@ +<%= @parts_of_speech.count %> parts of speech entries in database
-<%= @words.count %> word entries in database
+<%= @parts_of_speech.count %> parts of speech entries in database
+<%= @words.count %> word entries in database
+