module Display
Public Instance Methods
get_display()
click to toggle source
get html output to render
# File lib/display/display.rb, line 4 def get_display() %{ <!doctype html> <html> <head> <title>FedTechJobber Jobs Report</title> <meta name="viewport" content="width=device-width"> <style> body { font-family: Tahoma, Verdana, Arial, sans-serif; color: #333; background: #ccc; } article { background: #eee; padding: 1em; } @media screen and (min-width: 1020px) { article { width: 1000px; border: 0.2em solid #aaa; margin: auto; } } @media screen and (max-width: 1019px) { body { margin: 0; padding: 0; } } article section { margin-bottom: 2em; } h1 { font-weight: normal; border-bottom: 0.1em solid #aaa; padding-bottom: 0.3em; position: relative; } h1 aside { font-size: 0.7em; float: right; } h2 { font-weight: normal; font-size: 1.2em; border-bottom: 0.1em solid #aaa; padding-bottom: 0.2em; } text { font-weight: normal; font-size: .8em; padding-bottom: 0.2em; } div.column { display: inline-block; margin-right: 3em; vertical-align: top; } .field { margin-bottom: 0.2em; } .field .label { font-weight: bold; width: 10em; text-align: right; display: inline-block; } .field .label:after { content: ":"; } .field .val { padding-left: 1em; } div.chart { text-align: center; } div.left-chart { text-align: left; } </style> </head> <body> <article> <header> <h1> <b>FedTechJobber Jobs Report:</b> <aside> <%= @date.strftime('%A, %d %B %Y %T') %> </aside> </h1> </header> <section id="jobs"> <text><b>Search params: </b><%= @request.params_arr %></text><br><br> <% @jobs.each do |job| %> <h2><b><%= job.title %></b></h2> <table width="100%"> <tr><td width="15%"><text><b>Agency:</b></text></td><td><text><%= job.agency_display %></text></td></tr> <tr><td width="15%"><text><b>Salary:</b></text></td><td><text><b><%= job.salary %></b></text></td></tr> <tr><td width="15%"><text><b>Series Grade:</b></text></td><td><text><%= job.series_grade %></text></td></tr> <tr><td width="15%"><text><b>Eligibility:</b></text></td><td><text><%= job.eligibility %></text></td></tr> <tr><td width="15%"><text><b>Position:</b></text></td><td><text><%= job.position %></text></td></tr> <tr><td width="15%"><text><b>Location(s):</b></text></td><td><text><%= job.locations %></text></td></tr> <tr><td width="15%"><text><b>Full details:</b></text></td><td><text><a href='<%= job.url %>'>click here</a></text></td></tr> <tr><td width="15%"><text><b>Posting dates:</b></text></td><td><text><%= job.dates %></text></td></tr> <tr><td width="15%"><text><b>Summary:</b></text></td><td><text><%= job.summary %></text></td></tr> <tr><td width="15%"><text><b>Public GitHub profile:</b></text></td> <td> <text> <% if job.github_url.nil? %> none <% else %> <a href='<%= job.github_url %>'><%= job.github_url %></a> <% end %> </text> </td> </tr> </table> <br><br> <% end %> </section> </article> </body> </html> } end