Documentation ¶
Overview ¶
Package html is shared HTML rendering components that are shared by the other packages.
Index ¶
- Constants
- func GetIndexLetters(document *gedcom.Document, livingVisibility LivingVisibility) []rune
- func GetIndividuals(document *gedcom.Document, placesMap map[string]*place) map[string]*gedcom.IndividualNode
- func PageFamilies() string
- func PageIndividual(document *gedcom.Document, individual *gedcom.IndividualNode, ...) string
- func PageIndividuals(firstLetter rune) string
- func PagePlace(place string, places map[string]*place) string
- func PagePlaces() string
- func PageSource(source *gedcom.SourceNode) string
- func PageSources() string
- func PageStatistics() string
- func PageSurnames() string
- type Age
- type AllParentButtons
- type DiffPage
- type DiffRow
- type EventDate
- type EventDates
- type EventStatistics
- type FamilyInList
- type FamilyListPage
- type FamilyStatistics
- 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 LivingVisibility
- type ParentButtons
- type PartnersAndChildren
- type PlaceEvent
- type PlaceInList
- type PlaceLink
- type PlaceListPage
- type PlacePage
- type PlaceStatistics
- type PlusSVG
- type PublishHeader
- type PublishShowOptions
- type Publisher
- type SexBadge
- type SourceInList
- type SourceLink
- type SourceListPage
- type SourcePage
- type SourceProperty
- type SourceStatistics
- type StatisticsPage
- type SurnameInList
- type SurnameIndex
- type SurnameLink
- type SurnameListPage
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 UnknownEmphasis = "<em>Unknown</em>"
Variables ¶
This section is empty.
Functions ¶
func GetIndexLetters ¶
func GetIndexLetters(document *gedcom.Document, livingVisibility LivingVisibility) []rune
func GetIndividuals ¶
func PageFamilies ¶
func PageFamilies() string
func PageIndividual ¶
func PageIndividual(document *gedcom.Document, individual *gedcom.IndividualNode, visibility LivingVisibility, placesMap map[string]*place) 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, placesMap map[string]*place) *AllParentButtons
func (*AllParentButtons) WriteHTMLTo ¶
func (c *AllParentButtons) WriteHTMLTo(w io.Writer) (int64, error)
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 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.
func NewEventDate ¶
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
func (*EventDates) WriteHTMLTo ¶
func (c *EventDates) WriteHTMLTo(w io.Writer) (int64, error)
type EventStatistics ¶
type EventStatistics struct {
// contains filtered or unexported fields
}
func NewEventStatistics ¶
func NewEventStatistics(document *gedcom.Document) *EventStatistics
func (*EventStatistics) WriteHTMLTo ¶
func (c *EventStatistics) WriteHTMLTo(w io.Writer) (int64, error)
type FamilyInList ¶
type FamilyInList struct {
// contains filtered or unexported fields
}
func NewFamilyInList ¶
func NewFamilyInList(document *gedcom.Document, family *gedcom.FamilyNode, visibility LivingVisibility, placesMap map[string]*place) *FamilyInList
func (*FamilyInList) WriteHTMLTo ¶
func (c *FamilyInList) WriteHTMLTo(w io.Writer) (int64, error)
type FamilyListPage ¶
type FamilyListPage struct {
// contains filtered or unexported fields
}
func NewFamilyListPage ¶
func NewFamilyListPage(document *gedcom.Document, googleAnalyticsID string, options *PublishShowOptions, indexLetters []rune, placesMap map[string]*place) *FamilyListPage
func (*FamilyListPage) WriteHTMLTo ¶
func (c *FamilyListPage) WriteHTMLTo(w io.Writer) (int64, error)
type FamilyStatistics ¶
type FamilyStatistics struct {
// contains filtered or unexported fields
}
func NewFamilyStatistics ¶
func NewFamilyStatistics(document *gedcom.Document) *FamilyStatistics
func (*FamilyStatistics) WriteHTMLTo ¶
func (c *FamilyStatistics) WriteHTMLTo(w io.Writer) (int64, error)
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
func (*IndividualAdditionalNames) WriteHTMLTo ¶
func (c *IndividualAdditionalNames) WriteHTMLTo(w io.Writer) (int64, error)
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, placesMap map[string]*place) *IndividualButton
func (*IndividualButton) WriteHTMLTo ¶
func (c *IndividualButton) WriteHTMLTo(w io.Writer) (int64, error)
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
func (*IndividualCompare) WriteHTMLTo ¶
func (c *IndividualCompare) WriteHTMLTo(w io.Writer) (int64, error)
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
func (*IndividualDates) WriteHTMLTo ¶
func (c *IndividualDates) WriteHTMLTo(w io.Writer) (int64, error)
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 core.Component, individual *gedcom.IndividualNode, event gedcom.Node, placesMap map[string]*place) *IndividualEvent
func (*IndividualEvent) WriteHTMLTo ¶
func (c *IndividualEvent) WriteHTMLTo(w io.Writer) (int64, error)
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.
func NewIndividualEvents ¶
func NewIndividualEvents(document *gedcom.Document, individual *gedcom.IndividualNode, visibility LivingVisibility, placesMap map[string]*place) *IndividualEvents
func (*IndividualEvents) WriteHTMLTo ¶
func (c *IndividualEvents) WriteHTMLTo(w io.Writer) (int64, error)
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, placesMap map[string]*place) *IndividualInList
func (*IndividualInList) WriteHTMLTo ¶
func (c *IndividualInList) WriteHTMLTo(w io.Writer) (int64, error)
type IndividualIndexHeader ¶
type IndividualIndexHeader struct {
// contains filtered or unexported fields
}
func NewIndividualIndexHeader ¶
func NewIndividualIndexHeader(document *gedcom.Document, selectedLetter rune, livingVisibility LivingVisibility, indexLetters []rune) *IndividualIndexHeader
func (*IndividualIndexHeader) WriteHTMLTo ¶
func (c *IndividualIndexHeader) WriteHTMLTo(w io.Writer) (int64, error)
type IndividualIndexLetter ¶
type IndividualIndexLetter struct {
// contains filtered or unexported fields
}
func NewIndividualIndexLetter ¶
func NewIndividualIndexLetter(letter rune, isSelected bool) *IndividualIndexLetter
func (*IndividualIndexLetter) WriteHTMLTo ¶
func (c *IndividualIndexLetter) WriteHTMLTo(w io.Writer) (int64, error)
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, placesMap map[string]*place) *IndividualLink
func (*IndividualLink) WriteHTMLTo ¶
func (c *IndividualLink) WriteHTMLTo(w io.Writer) (int64, error)
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, indexLetters []rune, placesMap map[string]*place) *IndividualListPage
func (*IndividualListPage) WriteHTMLTo ¶
func (c *IndividualListPage) WriteHTMLTo(w io.Writer) (int64, error)
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
func (*IndividualName) WriteHTMLTo ¶
func (c *IndividualName) WriteHTMLTo(w io.Writer) (int64, error)
type IndividualNameAndDates ¶
type IndividualNameAndDates struct {
// contains filtered or unexported fields
}
func NewIndividualNameAndDates ¶
func NewIndividualNameAndDates(individual *gedcom.IndividualNode, visibility LivingVisibility, unknownText string) *IndividualNameAndDates
func (*IndividualNameAndDates) WriteHTMLTo ¶
func (c *IndividualNameAndDates) WriteHTMLTo(w io.Writer) (int64, error)
type IndividualNameAndDatesLink ¶
type IndividualNameAndDatesLink struct {
// contains filtered or unexported fields
}
func NewIndividualNameAndDatesLink ¶
func NewIndividualNameAndDatesLink(individual *gedcom.IndividualNode, visibility LivingVisibility, unknownText string) *IndividualNameAndDatesLink
func (*IndividualNameAndDatesLink) WriteHTMLTo ¶
func (c *IndividualNameAndDatesLink) WriteHTMLTo(w io.Writer) (int64, error)
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
func (*IndividualNameAndSex) WriteHTMLTo ¶
func (c *IndividualNameAndSex) WriteHTMLTo(w io.Writer) (int64, error)
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, indexLetters []rune, placesMap map[string]*place) *IndividualPage
func (*IndividualPage) WriteHTMLTo ¶
func (c *IndividualPage) WriteHTMLTo(w io.Writer) (int64, error)
type IndividualStatistics ¶
type IndividualStatistics struct {
// contains filtered or unexported fields
}
func NewIndividualStatistics ¶
func NewIndividualStatistics(document *gedcom.Document, visibility LivingVisibility) *IndividualStatistics
func (*IndividualStatistics) WriteHTMLTo ¶
func (c *IndividualStatistics) WriteHTMLTo(w io.Writer) (int64, error)
type LivingVisibility ¶
type LivingVisibility string
func NewLivingVisibility ¶
func NewLivingVisibility(lv string) LivingVisibility
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, placesMap map[string]*place) *ParentButtons
func (*ParentButtons) WriteHTMLTo ¶
func (c *ParentButtons) WriteHTMLTo(w io.Writer) (int64, error)
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, placesMap map[string]*place) *PartnersAndChildren
func (*PartnersAndChildren) WriteHTMLTo ¶
func (c *PartnersAndChildren) WriteHTMLTo(w io.Writer) (int64, error)
type PlaceEvent ¶
type PlaceEvent struct {
// contains filtered or unexported fields
}
func NewPlaceEvent ¶
func NewPlaceEvent(document *gedcom.Document, node gedcom.Node, visibility LivingVisibility, placesMap map[string]*place) *PlaceEvent
func (*PlaceEvent) WriteHTMLTo ¶
func (c *PlaceEvent) WriteHTMLTo(w io.Writer) (int64, error)
type PlaceInList ¶
type PlaceInList struct {
// contains filtered or unexported fields
}
func NewPlaceInList ¶
func NewPlaceInList(document *gedcom.Document, place *place, placesMap map[string]*place) *PlaceInList
func (*PlaceInList) WriteHTMLTo ¶
func (c *PlaceInList) WriteHTMLTo(w io.Writer) (int64, error)
type PlaceLink ¶
type PlaceLink struct {
// contains filtered or unexported fields
}
func NewPlaceLink ¶
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, indexLetters []rune, placesMap map[string]*place) *PlaceListPage
func (*PlaceListPage) WriteHTMLTo ¶
func (c *PlaceListPage) WriteHTMLTo(w io.Writer) (int64, error)
type PlacePage ¶
type PlacePage struct {
// contains filtered or unexported fields
}
func NewPlacePage ¶
type PlaceStatistics ¶
type PlaceStatistics struct {
// contains filtered or unexported fields
}
func (*PlaceStatistics) WriteHTMLTo ¶
func (c *PlaceStatistics) WriteHTMLTo(w io.Writer) (int64, error)
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, indexLetters []rune, placesMap map[string]*place) *PublishHeader
func (*PublishHeader) WriteHTMLTo ¶
func (c *PublishHeader) WriteHTMLTo(w io.Writer) (int64, error)
type PublishShowOptions ¶
type Publisher ¶
type Publisher struct { GoogleAnalyticsID string // contains filtered or unexported fields }
func NewPublisher ¶
func NewPublisher(doc *gedcom.Document, options *PublishShowOptions) *Publisher
NewPublisher generates the pages to be rendered for a published website.
The fileWriter will be responsible for rendering the pages to their destination. Which may be a file system, or somewhere else of your choosing. If you only wish to generate files you should use a DirectoryFileWriter.
type SexBadge ¶
type SexBadge struct {
// contains filtered or unexported fields
}
SexBadge shows a coloured "Male", "Female" or "Unknown" badge.
func NewSexBadge ¶
func NewSexBadge(sex *gedcom.SexNode) *SexBadge
type SourceInList ¶
type SourceInList struct {
// contains filtered or unexported fields
}
func NewSourceInList ¶
func NewSourceInList(document *gedcom.Document, source *gedcom.SourceNode) *SourceInList
func (*SourceInList) WriteHTMLTo ¶
func (c *SourceInList) WriteHTMLTo(w io.Writer) (int64, error)
type SourceLink ¶
type SourceLink struct {
// contains filtered or unexported fields
}
func NewSourceLink ¶
func NewSourceLink(source *gedcom.SourceNode) *SourceLink
func (*SourceLink) WriteHTMLTo ¶
func (c *SourceLink) WriteHTMLTo(w io.Writer) (int64, error)
type SourceListPage ¶
type SourceListPage struct {
// contains filtered or unexported fields
}
func NewSourceListPage ¶
func NewSourceListPage(document *gedcom.Document, googleAnalyticsID string, options *PublishShowOptions, indexLetters []rune, placesMap map[string]*place) *SourceListPage
func (*SourceListPage) WriteHTMLTo ¶
func (c *SourceListPage) WriteHTMLTo(w io.Writer) (int64, error)
type SourcePage ¶
type SourcePage struct {
// contains filtered or unexported fields
}
func NewSourcePage ¶
func NewSourcePage(document *gedcom.Document, source *gedcom.SourceNode, googleAnalyticsID string, options *PublishShowOptions, indexLetters []rune, placesMap map[string]*place) *SourcePage
func (*SourcePage) WriteHTMLTo ¶
func (c *SourcePage) WriteHTMLTo(w io.Writer) (int64, error)
type SourceProperty ¶
type SourceProperty struct {
// contains filtered or unexported fields
}
func NewSourceProperty ¶
func NewSourceProperty(document *gedcom.Document, node gedcom.Node) *SourceProperty
func (*SourceProperty) WriteHTMLTo ¶
func (c *SourceProperty) WriteHTMLTo(w io.Writer) (int64, error)
type SourceStatistics ¶
type SourceStatistics struct {
// contains filtered or unexported fields
}
func NewSourceStatistics ¶
func NewSourceStatistics(document *gedcom.Document) *SourceStatistics
func (*SourceStatistics) WriteHTMLTo ¶
func (c *SourceStatistics) WriteHTMLTo(w io.Writer) (int64, error)
type StatisticsPage ¶
type StatisticsPage struct {
// contains filtered or unexported fields
}
func NewStatisticsPage ¶
func NewStatisticsPage(document *gedcom.Document, googleAnalyticsID string, options *PublishShowOptions, indexLetters []rune, placesMap map[string]*place) *StatisticsPage
func (*StatisticsPage) WriteHTMLTo ¶
func (c *StatisticsPage) WriteHTMLTo(w io.Writer) (int64, error)
type SurnameInList ¶
type SurnameInList struct {
// contains filtered or unexported fields
}
func NewSurnameInList ¶
func NewSurnameInList(document *gedcom.Document, surname string) *SurnameInList
func (*SurnameInList) WriteHTMLTo ¶
func (c *SurnameInList) WriteHTMLTo(w io.Writer) (int64, error)
type SurnameIndex ¶
type SurnameIndex struct {
// contains filtered or unexported fields
}
func NewSurnameIndex ¶
func NewSurnameIndex(document *gedcom.Document, selectedLetter rune, visibility LivingVisibility) *SurnameIndex
func (*SurnameIndex) WriteHTMLTo ¶
func (c *SurnameIndex) WriteHTMLTo(w io.Writer) (int64, error)
type SurnameLink ¶
type SurnameLink struct {
// contains filtered or unexported fields
}
func NewSurnameLink ¶
func NewSurnameLink(surname string) *SurnameLink
func (*SurnameLink) WriteHTMLTo ¶
func (c *SurnameLink) WriteHTMLTo(w io.Writer) (int64, error)
type SurnameListPage ¶
type SurnameListPage struct {
// contains filtered or unexported fields
}
func NewSurnameListPage ¶
func NewSurnameListPage(document *gedcom.Document, googleAnalyticsID string, options *PublishShowOptions, indexLetters []rune, placesMap map[string]*place) *SurnameListPage
func (*SurnameListPage) WriteHTMLTo ¶
func (c *SurnameListPage) WriteHTMLTo(w io.Writer) (int64, error)
Source Files ¶
- age.go
- all_parent_buttons.go
- constants.go
- diff_page.go
- diff_row.go
- doc.go
- event_date.go
- event_dates.go
- event_statistics.go
- family_in_list.go
- family_list_page.go
- family_statistics.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
- living_visibility.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.go
- publish_header.go
- sex_badge.go
- source_in_list.go
- source_link.go
- source_list_page.go
- source_page.go
- source_property.go
- source_statistics.go
- statistics_page.go
- surname_in_list.go
- surname_index.go
- surname_link.go
- surname_list_page.go
- util.go