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.cr

Constant 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

Class Method Detail

def self.form(io, body = DEFAULT) #

Prints HTML input form for URLs to process


[View source]
def self.hr(io) #

Prints HTML



[View source]
def self.page_footer(io) #

Prints HTML page footer


[View source]
def self.page_header(io) #

Prints HTML page header


[View source]
def self.table_footer(io, rt, et, gt) #

Prints results table footer


[View source]
def self.table_header(io, total_urls) #

Prints results table header


[View source]
def self.table_row(io, idx, url, title, date, et, gt, status, method, confidence) #

Prints individual results row


[View source]
def self.wrap(io, &) #

Wraps content in basic HTML layout


[View source]