module App::HTML
Overview
HTML support for the application's web interface. Module methods simply return embedded HTML strings because the requirements are very simple. (Otherwise Kilt which comes as a Kemal dependency could be used for rendering templates.)
Defined in:
app/html.crConstant Summary
-
DEFAULT =
"https://arstechnica.com/gadgets/2020/03/amds-7nm-ryzen-4000-laptop-processors-are-finally-here/\nhttps://github.com/docelic/article_date\nhttps://github.com/crystal-lang/crystal/releases\nhttps://en.wikipedia.org/wiki/Crystal_(programming_language)\nhttps://www.google.com\nhttps://duckduckgo.com\nhttp://localhost"
-
Default list of URLs to populate the search box on first visit to the GUI.
Class Method Summary
-
.form(io, body = DEFAULT)
Prints HTML input form for URLs to process
-
.hr(io)
Prints HTML
-
.page_footer(io)
Prints HTML page footer
-
.page_header(io)
Prints HTML page header
-
.table_footer(io, rt, et, gt)
Prints results table footer
-
.table_header(io, total_urls)
Prints results table header
-
.table_row(io, idx, url, title, date, et, gt, status, method, confidence)
Prints individual results row
-
.wrap(io, &)
Wraps content in basic HTML layout
Class Method Detail
def self.table_row(io, idx, url, title, date, et, gt, status, method, confidence)
#
Prints individual results row