module Dictionaries::HelperModule

Public Class Methods

html_header_default_title_and_start_of_the_body_tag() click to toggle source
#

Dictionaries::HelperModule.html_header_default_title_and_start_of_the_body_tag

#
# 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_form() click to toggle source
#

Dictionaries::HelperModule.return_english_to_german_form

#
# 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_button() click to toggle source
#

Dictionaries::HelperModule.return_search_button

#
# 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