gedcom: github.com/elliotchance/gedcom/html Index | Files | Directories

package html

import "github.com/elliotchance/gedcom/html"

Package html is shared HTML rendering components that are shared by the other packages.

Index

Package 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

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>"

func GetIndexLetters Uses

func GetIndexLetters(document *gedcom.Document, livingVisibility LivingVisibility) []rune

func GetIndividuals Uses

func GetIndividuals(document *gedcom.Document) map[string]*gedcom.IndividualNode

func GetPlaces Uses

func GetPlaces(document *gedcom.Document) map[string]*place

func PageFamilies Uses

func PageFamilies() string

func PageIndividual Uses

func PageIndividual(document *gedcom.Document, individual *gedcom.IndividualNode, visibility LivingVisibility) string

func PageIndividuals Uses

func PageIndividuals(firstLetter rune) string

func PagePlace Uses

func PagePlace(document *gedcom.Document, place string) string

func PagePlaces Uses

func PagePlaces() string

func PageSource Uses

func PageSource(source *gedcom.SourceNode) string

func PageSources Uses

func PageSources() string

func PageStatistics Uses

func PageStatistics() string

func PageSurnames Uses

func PageSurnames() string

type Age Uses

type Age struct {
    // contains filtered or unexported fields
}

func NewAge Uses

func NewAge(start, end gedcom.Age) *Age

func (*Age) WriteHTMLTo Uses

func (c *Age) WriteHTMLTo(w io.Writer) (int64, error)

type AllParentButtons Uses

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 Uses

func NewAllParentButtons(document *gedcom.Document, individual *gedcom.IndividualNode, visibility LivingVisibility) *AllParentButtons

func (*AllParentButtons) WriteHTMLTo Uses

func (c *AllParentButtons) WriteHTMLTo(w io.Writer) (int64, error)

type DiffPage Uses

type DiffPage struct {
    // contains filtered or unexported fields
}

func NewDiffPage Uses

func NewDiffPage(comparisons gedcom.IndividualComparisons, filterFlags *gedcom.FilterFlags, googleAnalyticsID string, show, sort string, progress chan gedcom.Progress, compareOptions *gedcom.IndividualNodesCompareOptions, visibility LivingVisibility) *DiffPage

func (*DiffPage) WriteHTMLTo Uses

func (c *DiffPage) WriteHTMLTo(w io.Writer) (int64, error)

type DiffRow Uses

type DiffRow struct {
    // contains filtered or unexported fields
}

func NewDiffRow Uses

func NewDiffRow(name string, nd *gedcom.NodeDiff, hideSame bool) *DiffRow

func (*DiffRow) WriteHTMLTo Uses

func (c *DiffRow) WriteHTMLTo(w io.Writer) (int64, error)

type EventDate Uses

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 Uses

func NewEventDate(event string, dates []*gedcom.DateNode) *EventDate

func (*EventDate) IsBlank Uses

func (c *EventDate) IsBlank() bool

func (*EventDate) WriteHTMLTo Uses

func (c *EventDate) WriteHTMLTo(w io.Writer) (int64, error)

type EventDates Uses

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 Uses

func NewEventDates(items []*EventDate) *EventDates

func (*EventDates) WriteHTMLTo Uses

func (c *EventDates) WriteHTMLTo(w io.Writer) (int64, error)

type EventStatistics Uses

type EventStatistics struct {
    // contains filtered or unexported fields
}

func NewEventStatistics Uses

func NewEventStatistics(document *gedcom.Document) *EventStatistics

func (*EventStatistics) WriteHTMLTo Uses

func (c *EventStatistics) WriteHTMLTo(w io.Writer) (int64, error)

type FamilyInList Uses

type FamilyInList struct {
    // contains filtered or unexported fields
}

func NewFamilyInList Uses

func NewFamilyInList(document *gedcom.Document, family *gedcom.FamilyNode, visibility LivingVisibility) *FamilyInList

func (*FamilyInList) WriteHTMLTo Uses

func (c *FamilyInList) WriteHTMLTo(w io.Writer) (int64, error)

type FamilyListPage Uses

type FamilyListPage struct {
    // contains filtered or unexported fields
}

func NewFamilyListPage Uses

func NewFamilyListPage(document *gedcom.Document, googleAnalyticsID string, options *PublishShowOptions, indexLetters []rune) *FamilyListPage

func (*FamilyListPage) WriteHTMLTo Uses

func (c *FamilyListPage) WriteHTMLTo(w io.Writer) (int64, error)

type FamilyStatistics Uses

type FamilyStatistics struct {
    // contains filtered or unexported fields
}

func NewFamilyStatistics Uses

func NewFamilyStatistics(document *gedcom.Document) *FamilyStatistics

func (*FamilyStatistics) WriteHTMLTo Uses

func (c *FamilyStatistics) WriteHTMLTo(w io.Writer) (int64, error)

type IndividualAdditionalNames Uses

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 Uses

func NewIndividualAdditionalNames(individual *gedcom.IndividualNode) *IndividualAdditionalNames

func (*IndividualAdditionalNames) WriteHTMLTo Uses

func (c *IndividualAdditionalNames) WriteHTMLTo(w io.Writer) (int64, error)

type IndividualButton Uses

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 Uses

func NewIndividualButton(document *gedcom.Document, individual *gedcom.IndividualNode, visibility LivingVisibility) *IndividualButton

func (*IndividualButton) WriteHTMLTo Uses

func (c *IndividualButton) WriteHTMLTo(w io.Writer) (int64, error)

type IndividualCompare Uses

type IndividualCompare struct {
    // contains filtered or unexported fields
}

func NewIndividualCompare Uses

func NewIndividualCompare(comparison *gedcom.IndividualComparison, filterFlags *gedcom.FilterFlags, progress chan gedcom.Progress, compareOptions *gedcom.IndividualNodesCompareOptions, visibility LivingVisibility) *IndividualCompare

func (*IndividualCompare) WriteHTMLTo Uses

func (c *IndividualCompare) WriteHTMLTo(w io.Writer) (int64, error)

type IndividualDates Uses

type IndividualDates struct {
    // contains filtered or unexported fields
}

func NewIndividualDates Uses

func NewIndividualDates(individual *gedcom.IndividualNode, visibility LivingVisibility) *IndividualDates

func (*IndividualDates) EventDates Uses

func (c *IndividualDates) EventDates() []*EventDate

func (*IndividualDates) IsBlank Uses

func (c *IndividualDates) IsBlank() bool

func (*IndividualDates) WriteHTMLTo Uses

func (c *IndividualDates) WriteHTMLTo(w io.Writer) (int64, error)

type IndividualEvent Uses

type IndividualEvent struct {
    // contains filtered or unexported fields
}

IndividualEvent is a row in the "Events" section of the individuals page.

func NewIndividualEvent Uses

func NewIndividualEvent(date, place string, description core.Component, individual *gedcom.IndividualNode, event gedcom.Node) *IndividualEvent

func (*IndividualEvent) WriteHTMLTo Uses

func (c *IndividualEvent) WriteHTMLTo(w io.Writer) (int64, error)

type IndividualEvents Uses

type IndividualEvents struct {
    // contains filtered or unexported fields
}

IndividualEvents is the table of events show in the "Events" section of the individuals page.

func (*IndividualEvents) WriteHTMLTo Uses

func (c *IndividualEvents) WriteHTMLTo(w io.Writer) (int64, error)

type IndividualInList Uses

type IndividualInList struct {
    // contains filtered or unexported fields
}

IndividualInList is a single row in the table of individuals on the list page.

func NewIndividualInList Uses

func NewIndividualInList(document *gedcom.Document, individual *gedcom.IndividualNode, visibility LivingVisibility) *IndividualInList

func (*IndividualInList) WriteHTMLTo Uses

func (c *IndividualInList) WriteHTMLTo(w io.Writer) (int64, error)

type IndividualIndexHeader Uses

type IndividualIndexHeader struct {
    // contains filtered or unexported fields
}

func NewIndividualIndexHeader Uses

func NewIndividualIndexHeader(document *gedcom.Document, selectedLetter rune, livingVisibility LivingVisibility, indexLetters []rune) *IndividualIndexHeader

func (*IndividualIndexHeader) WriteHTMLTo Uses

func (c *IndividualIndexHeader) WriteHTMLTo(w io.Writer) (int64, error)

type IndividualIndexLetter Uses

type IndividualIndexLetter struct {
    // contains filtered or unexported fields
}

func NewIndividualIndexLetter Uses

func NewIndividualIndexLetter(letter rune, isSelected bool) *IndividualIndexLetter

func (*IndividualIndexLetter) WriteHTMLTo Uses

func (c *IndividualIndexLetter) WriteHTMLTo(w io.Writer) (int64, error)
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(document *gedcom.Document, individual *gedcom.IndividualNode, visibility LivingVisibility) *IndividualLink

func (*IndividualLink) WriteHTMLTo Uses

func (c *IndividualLink) WriteHTMLTo(w io.Writer) (int64, error)

type IndividualListPage Uses

type IndividualListPage struct {
    // contains filtered or unexported fields
}

IndividualListPage is the page that lists of all the individuals.

func NewIndividualListPage Uses

func NewIndividualListPage(document *gedcom.Document, selectedLetter rune, googleAnalyticsID string, options *PublishShowOptions, indexLetters []rune) *IndividualListPage

func (*IndividualListPage) WriteHTMLTo Uses

func (c *IndividualListPage) WriteHTMLTo(w io.Writer) (int64, error)

type IndividualName Uses

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 Uses

func NewIndividualName(individual *gedcom.IndividualNode, visibility LivingVisibility, unknownHTML string) *IndividualName

func (*IndividualName) IsUnknown Uses

func (c *IndividualName) IsUnknown() bool

func (*IndividualName) WriteHTMLTo Uses

func (c *IndividualName) WriteHTMLTo(w io.Writer) (int64, error)

type IndividualNameAndDates Uses

type IndividualNameAndDates struct {
    // contains filtered or unexported fields
}

func NewIndividualNameAndDates Uses

func NewIndividualNameAndDates(individual *gedcom.IndividualNode, visibility LivingVisibility, unknownText string) *IndividualNameAndDates

func (*IndividualNameAndDates) WriteHTMLTo Uses

func (c *IndividualNameAndDates) WriteHTMLTo(w io.Writer) (int64, error)
type IndividualNameAndDatesLink struct {
    // contains filtered or unexported fields
}
func NewIndividualNameAndDatesLink(individual *gedcom.IndividualNode, visibility LivingVisibility, unknownText string) *IndividualNameAndDatesLink

func (*IndividualNameAndDatesLink) WriteHTMLTo Uses

func (c *IndividualNameAndDatesLink) WriteHTMLTo(w io.Writer) (int64, error)

type IndividualNameAndSex Uses

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 Uses

func NewIndividualNameAndSex(individual *gedcom.IndividualNode) *IndividualNameAndSex

func (*IndividualNameAndSex) WriteHTMLTo Uses

func (c *IndividualNameAndSex) WriteHTMLTo(w io.Writer) (int64, error)

type IndividualPage Uses

type IndividualPage struct {
    // contains filtered or unexported fields
}

IndividualPage is the page that shows detailed information about an individual.

func NewIndividualPage Uses

func NewIndividualPage(document *gedcom.Document, individual *gedcom.IndividualNode, googleAnalyticsID string, options *PublishShowOptions, indexLetters []rune) *IndividualPage

func (*IndividualPage) WriteHTMLTo Uses

func (c *IndividualPage) WriteHTMLTo(w io.Writer) (int64, error)

type IndividualStatistics Uses

type IndividualStatistics struct {
    // contains filtered or unexported fields
}

func NewIndividualStatistics Uses

func NewIndividualStatistics(document *gedcom.Document, visibility LivingVisibility) *IndividualStatistics

func (*IndividualStatistics) WriteHTMLTo Uses

func (c *IndividualStatistics) WriteHTMLTo(w io.Writer) (int64, error)

type LivingVisibility Uses

type LivingVisibility string

func NewLivingVisibility Uses

func NewLivingVisibility(lv string) LivingVisibility

type ParentButtons Uses

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 Uses

func NewParentButtons(document *gedcom.Document, family *gedcom.FamilyNode, visibility LivingVisibility) *ParentButtons

func (*ParentButtons) WriteHTMLTo Uses

func (c *ParentButtons) WriteHTMLTo(w io.Writer) (int64, error)

type PartnersAndChildren Uses

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 Uses

func NewPartnersAndChildren(document *gedcom.Document, individual *gedcom.IndividualNode, visibility LivingVisibility) *PartnersAndChildren

func (*PartnersAndChildren) WriteHTMLTo Uses

func (c *PartnersAndChildren) WriteHTMLTo(w io.Writer) (int64, error)

type PlaceEvent Uses

type PlaceEvent struct {
    // contains filtered or unexported fields
}

func NewPlaceEvent Uses

func NewPlaceEvent(document *gedcom.Document, node gedcom.Node, visibility LivingVisibility) *PlaceEvent

func (*PlaceEvent) WriteHTMLTo Uses

func (c *PlaceEvent) WriteHTMLTo(w io.Writer) (int64, error)

type PlaceInList Uses

type PlaceInList struct {
    // contains filtered or unexported fields
}

func NewPlaceInList Uses

func NewPlaceInList(document *gedcom.Document, place *place) *PlaceInList

func (*PlaceInList) WriteHTMLTo Uses

func (c *PlaceInList) WriteHTMLTo(w io.Writer) (int64, error)
type PlaceLink struct {
    // contains filtered or unexported fields
}
func NewPlaceLink(document *gedcom.Document, place string) *PlaceLink

func (*PlaceLink) WriteHTMLTo Uses

func (c *PlaceLink) WriteHTMLTo(w io.Writer) (int64, error)

type PlaceListPage Uses

type PlaceListPage struct {
    // contains filtered or unexported fields
}

PlaceListPage lists all places.

func NewPlaceListPage Uses

func NewPlaceListPage(document *gedcom.Document, googleAnalyticsID string, options *PublishShowOptions, indexLetters []rune) *PlaceListPage

func (*PlaceListPage) WriteHTMLTo Uses

func (c *PlaceListPage) WriteHTMLTo(w io.Writer) (int64, error)

type PlacePage Uses

type PlacePage struct {
    // contains filtered or unexported fields
}

func NewPlacePage Uses

func NewPlacePage(document *gedcom.Document, placeKey string, googleAnalyticsID string, options *PublishShowOptions, indexLetters []rune) *PlacePage

func (*PlacePage) WriteHTMLTo Uses

func (c *PlacePage) WriteHTMLTo(w io.Writer) (int64, error)

type PlaceStatistics Uses

type PlaceStatistics struct {
    // contains filtered or unexported fields
}

func (*PlaceStatistics) WriteHTMLTo Uses

func (c *PlaceStatistics) WriteHTMLTo(w io.Writer) (int64, error)

type PlusSVG Uses

type PlusSVG struct {
    // contains filtered or unexported fields
}

PlusSVG draws a "+" as an SVG with each line of the "+" being optional.

func NewPlusSVG Uses

func NewPlusSVG(top, left, right, bottom bool) *PlusSVG

func (*PlusSVG) WriteHTMLTo Uses

func (c *PlusSVG) WriteHTMLTo(w io.Writer) (int64, error)

type PublishHeader Uses

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 Uses

func NewPublishHeader(document *gedcom.Document, extraTab string, selectedTab string, options *PublishShowOptions, indexLetters []rune) *PublishHeader

func (*PublishHeader) WriteHTMLTo Uses

func (c *PublishHeader) WriteHTMLTo(w io.Writer) (int64, error)

type PublishShowOptions Uses

type PublishShowOptions struct {
    ShowIndividuals  bool
    ShowPlaces       bool
    ShowFamilies     bool
    ShowSurnames     bool
    ShowSources      bool
    ShowStatistics   bool
    LivingVisibility LivingVisibility
}

type Publisher Uses

type Publisher struct {
    GoogleAnalyticsID string
    // contains filtered or unexported fields
}

func NewPublisher Uses

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.

func (*Publisher) Files Uses

func (publisher *Publisher) Files(channelSize int) chan *core.File

func (*Publisher) Publish Uses

func (publisher *Publisher) Publish(fileWriter core.FileWriter, parallel int) (err error)

type SexBadge Uses

type SexBadge struct {
    // contains filtered or unexported fields
}

SexBadge shows a coloured "Male", "Female" or "Unknown" badge.

func NewSexBadge Uses

func NewSexBadge(sex *gedcom.SexNode) *SexBadge

func (*SexBadge) WriteHTMLTo Uses

func (c *SexBadge) WriteHTMLTo(w io.Writer) (int64, error)

type SourceInList Uses

type SourceInList struct {
    // contains filtered or unexported fields
}

func NewSourceInList Uses

func NewSourceInList(document *gedcom.Document, source *gedcom.SourceNode) *SourceInList

func (*SourceInList) WriteHTMLTo Uses

func (c *SourceInList) WriteHTMLTo(w io.Writer) (int64, error)
type SourceLink struct {
    // contains filtered or unexported fields
}
func NewSourceLink(source *gedcom.SourceNode) *SourceLink

func (*SourceLink) WriteHTMLTo Uses

func (c *SourceLink) WriteHTMLTo(w io.Writer) (int64, error)

type SourceListPage Uses

type SourceListPage struct {
    // contains filtered or unexported fields
}

func NewSourceListPage Uses

func NewSourceListPage(document *gedcom.Document, googleAnalyticsID string, options *PublishShowOptions, indexLetters []rune) *SourceListPage

func (*SourceListPage) WriteHTMLTo Uses

func (c *SourceListPage) WriteHTMLTo(w io.Writer) (int64, error)

type SourcePage Uses

type SourcePage struct {
    // contains filtered or unexported fields
}

func NewSourcePage Uses

func NewSourcePage(document *gedcom.Document, source *gedcom.SourceNode, googleAnalyticsID string, options *PublishShowOptions, indexLetters []rune) *SourcePage

func (*SourcePage) WriteHTMLTo Uses

func (c *SourcePage) WriteHTMLTo(w io.Writer) (int64, error)

type SourceProperty Uses

type SourceProperty struct {
    // contains filtered or unexported fields
}

func NewSourceProperty Uses

func NewSourceProperty(document *gedcom.Document, node gedcom.Node) *SourceProperty

func (*SourceProperty) WriteHTMLTo Uses

func (c *SourceProperty) WriteHTMLTo(w io.Writer) (int64, error)

type SourceStatistics Uses

type SourceStatistics struct {
    // contains filtered or unexported fields
}

func NewSourceStatistics Uses

func NewSourceStatistics(document *gedcom.Document) *SourceStatistics

func (*SourceStatistics) WriteHTMLTo Uses

func (c *SourceStatistics) WriteHTMLTo(w io.Writer) (int64, error)

type StatisticsPage Uses

type StatisticsPage struct {
    // contains filtered or unexported fields
}

func NewStatisticsPage Uses

func NewStatisticsPage(document *gedcom.Document, googleAnalyticsID string, options *PublishShowOptions, indexLetters []rune) *StatisticsPage

func (*StatisticsPage) WriteHTMLTo Uses

func (c *StatisticsPage) WriteHTMLTo(w io.Writer) (int64, error)

type SurnameInList Uses

type SurnameInList struct {
    // contains filtered or unexported fields
}

func NewSurnameInList Uses

func NewSurnameInList(document *gedcom.Document, surname string) *SurnameInList

func (*SurnameInList) WriteHTMLTo Uses

func (c *SurnameInList) WriteHTMLTo(w io.Writer) (int64, error)

type SurnameIndex Uses

type SurnameIndex struct {
    // contains filtered or unexported fields
}

func NewSurnameIndex Uses

func NewSurnameIndex(document *gedcom.Document, selectedLetter rune, visibility LivingVisibility) *SurnameIndex

func (*SurnameIndex) WriteHTMLTo Uses

func (c *SurnameIndex) WriteHTMLTo(w io.Writer) (int64, error)
type SurnameLink struct {
    // contains filtered or unexported fields
}
func NewSurnameLink(surname string) *SurnameLink

func (*SurnameLink) WriteHTMLTo Uses

func (c *SurnameLink) WriteHTMLTo(w io.Writer) (int64, error)

type SurnameListPage Uses

type SurnameListPage struct {
    // contains filtered or unexported fields
}

func NewSurnameListPage Uses

func NewSurnameListPage(document *gedcom.Document, googleAnalyticsID string, options *PublishShowOptions, indexLetters []rune) *SurnameListPage

func (*SurnameListPage) WriteHTMLTo Uses

func (c *SurnameListPage) WriteHTMLTo(w io.Writer) (int64, error)

Directories

PathSynopsis
core

Package html imports 11 packages (graph) and is imported by 2 packages. Updated 2019-04-01. Refresh now. Tools for package owners.