Documentation ¶
Overview ¶
Package component contains individual components that can render themselves as HTML.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContactInfo ¶
ContactInfo is a component for displaying the persons's contact information on top of a resume.
func (ContactInfo) Render ¶
func (c ContactInfo) Render() []*html.Node
type Date ¶
type Date struct { Year int // Year. E.g., 2009. Month time.Month // Month is 1 - 12. 0 means unspecified. }
Date represents an imprecise date.
Example ¶
{ d := Date{Year: 2015, Month: time.June} render(d) } { d := Date{Year: 2008} render(d) } { d := Present{} render(d) }
Output: 2015/06 2008 Present
type DateComponent ¶
type DateRange ¶
type DateRange struct {
From, To DateComponent
}
DateRange represents a span of time between two dates.
Example ¶
dr := DateRange{ From: Date{Year: 2010, Month: time.February}, To: Date{Year: 2012, Month: time.June}, } render(dr)
Output: <span title="2 years, 4 months">2010/02–2012/06</span>
Example (YearsMonths) ¶
fmt.Println(yearsMonths(Date{Year: 2010, Month: time.February}, Date{Year: 2010, Month: time.February})) fmt.Println(yearsMonths(Date{Year: 2010, Month: time.February}, Date{Year: 2010, Month: time.August})) fmt.Println(yearsMonths(Date{Year: 2010, Month: time.February}, Date{Year: 2011, Month: time.February})) fmt.Println(yearsMonths(Date{Year: 2010, Month: time.February}, Date{Year: 2012, Month: time.June}))
Output: 0 months 6 months 1 years 2 years, 4 months
type Fade ¶
type Fade string
Fade is like Text, except the font color is faded out to a light gray shade.
type Item ¶
type Item struct { Title htmlg.Component Subtitle htmlg.Component // Optional. Dates htmlg.Component // Optional. Lines []htmlg.Component // WIP controls whether the item is considered a work-in-progress, // and is therefore omitted during production use. WIP bool }
Item is a single item within a resume section. For example, a particular workplace or school.
type Name ¶
type Name struct {
Name string
}
Name is a component for displaying the person's name on top of a resume.
type Organization ¶
Organization is a component for displaying an entity with a name and a location.
func (Organization) Render ¶
func (o Organization) Render() []*html.Node
Click to show internal directories.
Click to hide internal directories.