Documentation ¶
Overview ¶
Package html is shared HTML rendering components that are shared by the other packages.
Package html is shared HTML rendering components that are shared by the other packages.
Index ¶
- Constants
- func GetIndexLetters(document *gedcom.Document) []rune
- func GetIndividuals(document *gedcom.Document) map[string]*gedcom.IndividualNode
- func GetPlaces(document *gedcom.Document) map[string]*place
- func PageFamilies() string
- func PageIndividual(document *gedcom.Document, individual *gedcom.IndividualNode, ...) string
- func PageIndividuals(firstLetter rune) string
- func PagePlace(document *gedcom.Document, place string) string
- func PagePlaces() string
- func PageSource(source *gedcom.SourceNode) string
- func PageSources() string
- func PageStatistics() string
- func PageSurnames() string
- type Age
- type AllParentButtons
- type Anchor
- type BadgePill
- type BigTitle
- type Card
- type Column
- type Component
- type Components
- type CountBadge
- type DiffPage
- type DiffRow
- type Div
- type Empty
- type EventDate
- type EventDates
- type EventStatistics
- type FamilyInList
- type FamilyListPage
- type FamilyStatistics
- type FooterRow
- type GoogleAnalytics
- type HTML
- type Heading
- type HorizontalRule
- type HorizontalRuleRow
- type IndividualAdditionalNames
- type IndividualButton
- type IndividualCompare
- type IndividualDates
- type IndividualEvent
- type IndividualEvents
- type IndividualInList
- type IndividualIndexHeader
- type IndividualIndexLetter
- type IndividualLink
- type IndividualListPage
- type IndividualName
- type IndividualNameAndDates
- type IndividualNameAndDatesLink
- type IndividualNameAndSex
- type IndividualPage
- type IndividualStatistics
- type KeyedTableRow
- type LineBreak
- type Lines
- type Link
- type LivingVisibility
- type NavItem
- type NavLink
- type NavPills
- type NavPillsRow
- type NavTabs
- type Number
- type Octicon
- type Page
- type ParentButtons
- type PartnersAndChildren
- type PlaceEvent
- type PlaceInList
- type PlaceLink
- type PlaceListPage
- type PlacePage
- type PlaceStatistics
- type PlusSVG
- type PublishHeader
- type PublishShowOptions
- type Row
- type SexBadge
- type SourceInList
- type SourceLink
- type SourceListPage
- type SourcePage
- type SourceProperty
- type SourceStatistics
- type Space
- type Span
- type StatisticsPage
- type StyledTableCell
- type SurnameInList
- type SurnameIndex
- type SurnameLink
- type SurnameListPage
- type Table
- type TableCell
- type TableHead
- type TableRow
- type Tag
- type Text
Constants ¶
const ( IndividualMaleColor = "#0275d8" IndividualFemaleColor = "#d9534f" )
const ( DiffPageShowAll = "all" // default DiffPageShowOnlyMatches = "only-matches" DiffPageShowSubset = "subset" )
These are used for optionShow. If you update these options you will also need to adjust validateOptions.
const ( DiffPageSortWrittenName = "written-name" // default DiffPageSortHighestSimilarity = "highest-similarity" )
These are used for optionSort. If you update these options you will also need to adjust validateOptions.
const ( LivingVisibilityShow = "show" LivingVisibilityHide = "hide" LivingVisibilityPlaceholder = "placeholder" )
const ( QuarterRow = 3 HalfRow = 6 EntireRow = 12 )
const UnknownEmphasis = "<em>Unknown</em>"
Variables ¶
This section is empty.
Functions ¶
func GetIndexLetters ¶
func GetIndividuals ¶
func GetIndividuals(document *gedcom.Document) map[string]*gedcom.IndividualNode
func PageFamilies ¶
func PageFamilies() string
func PageIndividual ¶
func PageIndividual(document *gedcom.Document, individual *gedcom.IndividualNode, visibility LivingVisibility) string
func PageIndividuals ¶
func PagePlaces ¶
func PagePlaces() string
func PageSource ¶
func PageSource(source *gedcom.SourceNode) string
func PageSources ¶
func PageSources() string
func PageStatistics ¶
func PageStatistics() string
func PageSurnames ¶
func PageSurnames() string
Types ¶
type AllParentButtons ¶
type AllParentButtons struct {
// contains filtered or unexported fields
}
AllParentButtons represent one or more families that an individual belongs to. These are show as large buttons above the large name of the person in on their individual page.
func NewAllParentButtons ¶
func NewAllParentButtons(document *gedcom.Document, individual *gedcom.IndividualNode, visibility LivingVisibility) *AllParentButtons
type BadgePill ¶
type BadgePill struct {
// contains filtered or unexported fields
}
BadgePill is a rounded badge that contains a value.
func NewBadgePill ¶
type BigTitle ¶
type BigTitle struct {
// contains filtered or unexported fields
}
func NewBigTitle ¶
type Card ¶
type Card struct {
// contains filtered or unexported fields
}
Card is a simple box with a header and body section.
type Column ¶
type Column struct {
// contains filtered or unexported fields
}
Column is used inside of a row. The row consists of 12 virtual columns and each column can specify how many of the columns it represents.
type Components ¶
type Components struct {
// contains filtered or unexported fields
}
Components is a wrapper for zero more components that rendered at the same time.
func NewComponents ¶
func NewComponents(items ...Component) *Components
type CountBadge ¶
type CountBadge struct {
// contains filtered or unexported fields
}
CountBadge shows a pill badge containing an integer. The appropriate localization will be applied (like a thousands separator).
func NewCountBadge ¶
func NewCountBadge(value int) *CountBadge
type DiffPage ¶
type DiffPage struct {
// contains filtered or unexported fields
}
func NewDiffPage ¶
func NewDiffPage(comparisons gedcom.IndividualComparisons, filterFlags *gedcom.FilterFlags, googleAnalyticsID string, show, sort string, progress chan gedcom.Progress, compareOptions *gedcom.IndividualNodesCompareOptions, visibility LivingVisibility) *DiffPage
type Div ¶
type Div struct {
// contains filtered or unexported fields
}
Div is a <div> tag with a class.
type Empty ¶
type Empty struct{}
Empty is used a placeholder for a component where nothing should be visible.
type EventDate ¶
type EventDate struct {
// contains filtered or unexported fields
}
EventDate shows a date like "d. 1882" but will not show anything if the date is not provided.
type EventDates ¶
type EventDates struct {
// contains filtered or unexported fields
}
EventDates contains several eventDate instances that are separated by three spaces. Only the dates that are non-empty will be shown.
func NewEventDates ¶
func NewEventDates(items []*EventDate) *EventDates
type EventStatistics ¶
type EventStatistics struct {
// contains filtered or unexported fields
}
func NewEventStatistics ¶
func NewEventStatistics(document *gedcom.Document) *EventStatistics
type FamilyInList ¶
type FamilyInList struct {
// contains filtered or unexported fields
}
func NewFamilyInList ¶
func NewFamilyInList(document *gedcom.Document, family *gedcom.FamilyNode, visibility LivingVisibility) *FamilyInList
type FamilyListPage ¶
type FamilyListPage struct {
// contains filtered or unexported fields
}
func NewFamilyListPage ¶
func NewFamilyListPage(document *gedcom.Document, googleAnalyticsID string, options PublishShowOptions, visibility LivingVisibility) *FamilyListPage
type FamilyStatistics ¶
type FamilyStatistics struct {
// contains filtered or unexported fields
}
func NewFamilyStatistics ¶
func NewFamilyStatistics(document *gedcom.Document) *FamilyStatistics
type FooterRow ¶
type FooterRow struct{}
FooterRow appears on all pages at the bottom.
func NewFooterRow ¶
func NewFooterRow() *FooterRow
type GoogleAnalytics ¶
type GoogleAnalytics struct {
// contains filtered or unexported fields
}
func NewGoogleAnalytics ¶
func NewGoogleAnalytics(id string) *GoogleAnalytics
type Heading ¶
type Heading struct {
// contains filtered or unexported fields
}
Heading is larger text.
type HorizontalRule ¶
type HorizontalRule struct{}
HorizontalRule is a dividing line.
func NewHorizontalRule ¶
func NewHorizontalRule() *HorizontalRule
type HorizontalRuleRow ¶
type HorizontalRuleRow struct{}
HorizontalRuleRow is a dividing line.
func NewHorizontalRuleRow ¶
func NewHorizontalRuleRow() *HorizontalRuleRow
type IndividualAdditionalNames ¶
type IndividualAdditionalNames struct {
// contains filtered or unexported fields
}
IndividualAdditionalNames is shown on the individual page. It shows all of the extra names (except the primary name) and their type.
func NewIndividualAdditionalNames ¶
func NewIndividualAdditionalNames(individual *gedcom.IndividualNode) *IndividualAdditionalNames
type IndividualButton ¶
type IndividualButton struct {
// contains filtered or unexported fields
}
IndividualButton is a large coloured button that links to an individuals page. It contains the same and some date information. This is also used to represent unknown or missing individuals.
func NewIndividualButton ¶
func NewIndividualButton(document *gedcom.Document, individual *gedcom.IndividualNode, visibility LivingVisibility) *IndividualButton
type IndividualCompare ¶
type IndividualCompare struct {
// contains filtered or unexported fields
}
func NewIndividualCompare ¶
func NewIndividualCompare(comparison *gedcom.IndividualComparison, filterFlags *gedcom.FilterFlags, progress chan gedcom.Progress, compareOptions *gedcom.IndividualNodesCompareOptions, visibility LivingVisibility) *IndividualCompare
type IndividualDates ¶
type IndividualDates struct {
// contains filtered or unexported fields
}
func NewIndividualDates ¶
func NewIndividualDates(individual *gedcom.IndividualNode, visibility LivingVisibility) *IndividualDates
func (*IndividualDates) EventDates ¶
func (c *IndividualDates) EventDates() []*EventDate
func (*IndividualDates) IsBlank ¶
func (c *IndividualDates) IsBlank() bool
type IndividualEvent ¶
type IndividualEvent struct {
// contains filtered or unexported fields
}
IndividualEvent is a row in the "Events" section of the individuals page.
func NewIndividualEvent ¶
func NewIndividualEvent(date, place string, description Component, individual *gedcom.IndividualNode, event gedcom.Node) *IndividualEvent
type IndividualEvents ¶
type IndividualEvents struct {
// contains filtered or unexported fields
}
IndividualEvents is the table of events show in the "Events" section of the individuals page.
type IndividualInList ¶
type IndividualInList struct {
// contains filtered or unexported fields
}
IndividualInList is a single row in the table of individuals on the list page.
func NewIndividualInList ¶
func NewIndividualInList(document *gedcom.Document, individual *gedcom.IndividualNode, visibility LivingVisibility) *IndividualInList
type IndividualIndexHeader ¶
type IndividualIndexHeader struct {
// contains filtered or unexported fields
}
func NewIndividualIndexHeader ¶
func NewIndividualIndexHeader(document *gedcom.Document, selectedLetter rune) *IndividualIndexHeader
type IndividualIndexLetter ¶
type IndividualIndexLetter struct {
// contains filtered or unexported fields
}
func NewIndividualIndexLetter ¶
func NewIndividualIndexLetter(letter rune, isSelected bool) *IndividualIndexLetter
type IndividualLink ¶
type IndividualLink struct {
// contains filtered or unexported fields
}
IndividualLink is a hyperlink to an individuals page. The link contains a coloured dot to represent their sex and their full name.
func NewIndividualLink ¶
func NewIndividualLink(document *gedcom.Document, individual *gedcom.IndividualNode, visibility LivingVisibility) *IndividualLink
type IndividualListPage ¶
type IndividualListPage struct {
// contains filtered or unexported fields
}
IndividualListPage is the page that lists of all the individuals.
func NewIndividualListPage ¶
func NewIndividualListPage(document *gedcom.Document, selectedLetter rune, googleAnalyticsID string, options PublishShowOptions, visibility LivingVisibility) *IndividualListPage
type IndividualName ¶
type IndividualName struct {
// contains filtered or unexported fields
}
IndividualName outputs the full name of the individual. This is a wrapper for the String function on the IndividualNode. If the individual does not have any names then "Unknown" will be used. It is safe to use nil for the individual.
func NewIndividualName ¶
func NewIndividualName(individual *gedcom.IndividualNode, visibility LivingVisibility, unknownHTML string) *IndividualName
func (*IndividualName) IsUnknown ¶
func (c *IndividualName) IsUnknown() bool
type IndividualNameAndDates ¶
type IndividualNameAndDates struct {
// contains filtered or unexported fields
}
func NewIndividualNameAndDates ¶
func NewIndividualNameAndDates(individual *gedcom.IndividualNode, visibility LivingVisibility, unknownText string) *IndividualNameAndDates
type IndividualNameAndDatesLink ¶
type IndividualNameAndDatesLink struct {
// contains filtered or unexported fields
}
func NewIndividualNameAndDatesLink ¶
func NewIndividualNameAndDatesLink(individual *gedcom.IndividualNode, visibility LivingVisibility, unknownText string) *IndividualNameAndDatesLink
type IndividualNameAndSex ¶
type IndividualNameAndSex struct {
// contains filtered or unexported fields
}
IndividualNameAndSex shows the name parts and sex of an individual in the "Name & Sex" section of the individuals page.
func NewIndividualNameAndSex ¶
func NewIndividualNameAndSex(individual *gedcom.IndividualNode) *IndividualNameAndSex
type IndividualPage ¶
type IndividualPage struct {
// contains filtered or unexported fields
}
IndividualPage is the page that shows detailed information about an individual.
func NewIndividualPage ¶
func NewIndividualPage(document *gedcom.Document, individual *gedcom.IndividualNode, googleAnalyticsID string, options PublishShowOptions, visibility LivingVisibility) *IndividualPage
type IndividualStatistics ¶
type IndividualStatistics struct {
// contains filtered or unexported fields
}
func NewIndividualStatistics ¶
func NewIndividualStatistics(document *gedcom.Document, visibility LivingVisibility) *IndividualStatistics
type KeyedTableRow ¶
type KeyedTableRow struct {
// contains filtered or unexported fields
}
KeyedTableRow is a table row consisting of two columns where the left column is a header and a key for the data in the right column. It also allows the row to be hidden altogether if needed.
func NewKeyedTableRow ¶
func NewKeyedTableRow(title string, value Component, visible bool) *KeyedTableRow
type LivingVisibility ¶
type LivingVisibility string
func NewLivingVisibility ¶
func NewLivingVisibility(lv string) LivingVisibility
type NavItem ¶
type NavItem struct {
// contains filtered or unexported fields
}
NavItem is a single tab in the tab bar.
type NavPills ¶
type NavPills struct {
// contains filtered or unexported fields
}
func NewNavPills ¶
type NavPillsRow ¶
type NavPillsRow struct {
// contains filtered or unexported fields
}
func NewNavPillsRow ¶
func NewNavPillsRow(links []Component) *NavPillsRow
type NavTabs ¶
type NavTabs struct {
// contains filtered or unexported fields
}
NavTabs is a group of tabs.
func NewNavTabs ¶
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
Page is the entire page wrapped that provides the HTML head and body.
type ParentButtons ¶
type ParentButtons struct {
// contains filtered or unexported fields
}
ParentButtons show two buttons separated by a "T" to be placed above the large individuals name.
func NewParentButtons ¶
func NewParentButtons(document *gedcom.Document, family *gedcom.FamilyNode, visibility LivingVisibility) *ParentButtons
type PartnersAndChildren ¶
type PartnersAndChildren struct {
// contains filtered or unexported fields
}
PartnersAndChildren show the partners and/or children connected to the individual on their individual page.
func NewPartnersAndChildren ¶
func NewPartnersAndChildren(document *gedcom.Document, individual *gedcom.IndividualNode, visibility LivingVisibility) *PartnersAndChildren
type PlaceEvent ¶
type PlaceEvent struct {
// contains filtered or unexported fields
}
func NewPlaceEvent ¶
func NewPlaceEvent(document *gedcom.Document, node gedcom.Node, visibility LivingVisibility) *PlaceEvent
type PlaceInList ¶
type PlaceInList struct {
// contains filtered or unexported fields
}
func NewPlaceInList ¶
func NewPlaceInList(document *gedcom.Document, place *place) *PlaceInList
type PlaceListPage ¶
type PlaceListPage struct {
// contains filtered or unexported fields
}
PlaceListPage lists all places.
func NewPlaceListPage ¶
func NewPlaceListPage(document *gedcom.Document, googleAnalyticsID string, options PublishShowOptions) *PlaceListPage
type PlacePage ¶
type PlacePage struct {
// contains filtered or unexported fields
}
func NewPlacePage ¶
func NewPlacePage(document *gedcom.Document, placeKey string, googleAnalyticsID string, options PublishShowOptions, visibility LivingVisibility) *PlacePage
type PlaceStatistics ¶
type PlaceStatistics struct {
// contains filtered or unexported fields
}
type PlusSVG ¶
type PlusSVG struct {
// contains filtered or unexported fields
}
PlusSVG draws a "+" as an SVG with each line of the "+" being optional.
func NewPlusSVG ¶
type PublishHeader ¶
type PublishHeader struct {
// contains filtered or unexported fields
}
PublishHeader is the tabbed section at the top of each page. The PublishHeader will be the same on all pages except that some pages will use an extra tab for that page.
func NewPublishHeader ¶
func NewPublishHeader(document *gedcom.Document, extraTab string, selectedTab string, options PublishShowOptions) *PublishHeader
type PublishShowOptions ¶
type Row ¶
type Row struct {
// contains filtered or unexported fields
}
Row is a page row for Bootstrap.
type SexBadge ¶
type SexBadge struct {
// contains filtered or unexported fields
}
SexBadge shows a coloured "Male", "Female" or "Unknown" badge.
func NewSexBadge ¶
type SourceInList ¶
type SourceInList struct {
// contains filtered or unexported fields
}
func NewSourceInList ¶
func NewSourceInList(document *gedcom.Document, source *gedcom.SourceNode) *SourceInList
type SourceLink ¶
type SourceLink struct {
// contains filtered or unexported fields
}
func NewSourceLink ¶
func NewSourceLink(source *gedcom.SourceNode) *SourceLink
type SourceListPage ¶
type SourceListPage struct {
// contains filtered or unexported fields
}
func NewSourceListPage ¶
func NewSourceListPage(document *gedcom.Document, googleAnalyticsID string, options PublishShowOptions) *SourceListPage
type SourcePage ¶
type SourcePage struct {
// contains filtered or unexported fields
}
func NewSourcePage ¶
func NewSourcePage(document *gedcom.Document, source *gedcom.SourceNode, googleAnalyticsID string, options PublishShowOptions) *SourcePage
type SourceProperty ¶
type SourceProperty struct {
// contains filtered or unexported fields
}
func NewSourceProperty ¶
func NewSourceProperty(document *gedcom.Document, node gedcom.Node) *SourceProperty
type SourceStatistics ¶
type SourceStatistics struct {
// contains filtered or unexported fields
}
func NewSourceStatistics ¶
func NewSourceStatistics(document *gedcom.Document) *SourceStatistics
type Space ¶
type Space struct{}
Space is an empty row used as a white space separator between other page rows.
type StatisticsPage ¶
type StatisticsPage struct {
// contains filtered or unexported fields
}
func NewStatisticsPage ¶
func NewStatisticsPage(document *gedcom.Document, googleAnalyticsID string, options PublishShowOptions, visibility LivingVisibility) *StatisticsPage
type StyledTableCell ¶
type StyledTableCell struct {
// contains filtered or unexported fields
}
func NewStyledTableCell ¶
func NewStyledTableCell(style, class string, content Component) *StyledTableCell
type SurnameInList ¶
type SurnameInList struct {
// contains filtered or unexported fields
}
func NewSurnameInList ¶
func NewSurnameInList(document *gedcom.Document, surname string) *SurnameInList
type SurnameIndex ¶
type SurnameIndex struct {
// contains filtered or unexported fields
}
func NewSurnameIndex ¶
func NewSurnameIndex(document *gedcom.Document, selectedLetter rune, visibility LivingVisibility) *SurnameIndex
type SurnameLink ¶
type SurnameLink struct {
// contains filtered or unexported fields
}
func NewSurnameLink ¶
func NewSurnameLink(surname string) *SurnameLink
type SurnameListPage ¶
type SurnameListPage struct {
// contains filtered or unexported fields
}
func NewSurnameListPage ¶
func NewSurnameListPage(document *gedcom.Document, googleAnalyticsID string, options PublishShowOptions) *SurnameListPage
type TableCell ¶
type TableCell struct {
// contains filtered or unexported fields
}
func NewTableCell ¶
type TableHead ¶
type TableHead struct {
// contains filtered or unexported fields
}
TableHead is the <thead> section of a table that contains the table heading cells.
func NewTableHead ¶
type TableRow ¶
type TableRow struct {
// contains filtered or unexported fields
}
func NewTableRow ¶
Source Files ¶
- age.go
- all_parent_buttons.go
- anchor.go
- badge_pill.go
- big_title.go
- card.go
- column.go
- component.go
- components.go
- constants.go
- count_badge.go
- diff_page.go
- diff_row.go
- div.go
- doc.go
- empty.go
- event_date.go
- event_dates.go
- event_statistics.go
- family_in_list.go
- family_list_page.go
- family_statistics.go
- footer_row.go
- google_analytics.go
- heading.go
- horizontal_rule.go
- horizontal_rule_row.go
- html.go
- individual_additional_names.go
- individual_button.go
- individual_compare.go
- individual_dates.go
- individual_event.go
- individual_events.go
- individual_in_list.go
- individual_index_header.go
- individual_index_letter.go
- individual_link.go
- individual_list_page.go
- individual_name.go
- individual_name_and_dates.go
- individual_name_and_dates_link.go
- individual_name_and_sex.go
- individual_page.go
- individual_statistics.go
- individuals.go
- keyed_table_row.go
- line_break.go
- lines.go
- link.go
- living_visibility.go
- nav_item.go
- nav_link.go
- nav_pills.go
- nav_pills_row.go
- nav_tabs.go
- number.go
- octicon.go
- page.go
- parent_buttons.go
- partners_and_children.go
- place_event.go
- place_in_list.go
- place_link.go
- place_list_page.go
- place_page.go
- place_statistics.go
- places.go
- plus_svg.go
- publish_header.go
- row.go
- sex_badge.go
- source_in_list.go
- source_link.go
- source_list_page.go
- source_page.go
- source_property.go
- source_statistics.go
- space.go
- span.go
- statistics_page.go
- styled_table_cell.go
- surname_in_list.go
- surname_index.go
- surname_link.go
- surname_list_page.go
- table.go
- table_cell.go
- table_head.go
- table_row.go
- tag.go
- text.go
- util.go