Class: Dictionaries::Sinatra

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/dictionaries/sinatra/english_to_german.rb

Instance Method Summary collapse

Instance Method Details

#html_header_default_title_and_start_of_the_body_tagObject

#

html_header_default_title_and_start_of_the_body_tag

#


49
50
51
# File 'lib/dictionaries/sinatra/english_to_german.rb', line 49

def html_header_default_title_and_start_of_the_body_tag
  return Dictionaries::HelperModule.html_header_default_title_and_start_of_the_body_tag
end

#return_english_to_german_formObject

#

return_english_to_german_form

#


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/dictionaries/sinatra/english_to_german.rb', line 28

def return_english_to_german_form
  route_to_this_action = '/english_to_german/'
  html_header_default_title_and_start_of_the_body_tag+
  h5('Input an english word to see the translation.')+
  div(css_style: 'padding: 0.1em') {
    p(
      '<b>Enter the word here:</b>',
      css_style: 'padding: 0.15em'
    )+
    form(action: route_to_this_action,
             id: 'english_to_german',
      css_style: 'margin-left:1em; margin-top:2px') {
      '<input type="text" name="user_input" style="border:3px solid slateblue; padding: 4px"><br>'+
      return_search_button
    }
  }
end

#return_search_buttonObject

#

return_search_button

#


56
57
58
# File 'lib/dictionaries/sinatra/english_to_german.rb', line 56

def return_search_button
  return Dictionaries::HelperModule.return_search_button
end