Module: Dictionaries::HelperModule

Includes:
HtmlTags
Defined in:
lib/dictionaries/helper_module/helper_module.rb

Class Method Summary collapse

Class Method Details

.html_header_default_title_and_start_of_the_body_tagObject

#

Dictionaries::HelperModule.html_header_default_title_and_start_of_the_body_tag

#


27
28
29
30
31
# File 'lib/dictionaries/helper_module/helper_module.rb', line 27

def self.html_header_default_title_and_start_of_the_body_tag
  "<html>\n"\
  "<title>Dictionaries</title>\n"\
  "<body>\n"
end

.return_english_to_german_formObject

#

Dictionaries::HelperModule.return_english_to_german_form

#


36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/dictionaries/helper_module/helper_module.rb', line 36

def self.return_english_to_german_form
  route_to_this_action = '/english_to_german/'
  html_header_default_title_and_start_of_the_body_tag+
  HtmlTags.h5('Input an english word to see the translation.')+
  HtmlTags.div(css_style: 'padding: 0.1em') {
    HtmlTags.p(
      '<b>Enter the word here:</b>',
      css_style: 'padding: 0.15em'
    )+
    HtmlTags.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

#

Dictionaries::HelperModule.return_search_button

#


18
19
20
21
22
# File 'lib/dictionaries/helper_module/helper_module.rb', line 18

def self.return_search_button
  '<input type="submit" name="user_input_submit" value="Search" '\
  'style="font-weight: bold; font-size: larger; '\
  'border: 2px dotted slateblue; margin: 4px; margin-left: 2em">'
end