Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReturnGeoNetHeaderBasic ¶
func ReturnGeoNetHeaderBasic(config HeaderBasicConfig) (template.HTML, error)
ReturnGeoNetHeaderBasic returns HTML for the basic GeoNet header that can be inserted into a webpage. The config is used to set certain properties.
Types ¶
type HeaderBasicConfig ¶
type HeaderBasicConfig struct {
// The HTML for the logo to use.
Logo template.HTML
// Items to display for navigation. Can be either a link
// or a dropdown. Note: If the first item is a link, it's
// considered the 'home' page link.
Items []HeaderBasicItem
// The HTML for the home icon. This should not be changed.
HomeIcon template.HTML
}
type HeaderBasicDropdown ¶
type HeaderBasicDropdown struct {
Title string
Links []HeaderBasicLink
}
Defines a dropdown that is displayed on the header for navigation. Contains a number of links.
func (HeaderBasicDropdown) External ¶
func (d HeaderBasicDropdown) External() bool
func (HeaderBasicDropdown) GetLinks ¶
func (d HeaderBasicDropdown) GetLinks() []HeaderBasicLink
func (HeaderBasicDropdown) GetTitle ¶
func (d HeaderBasicDropdown) GetTitle() string
func (HeaderBasicDropdown) GetURL ¶
func (d HeaderBasicDropdown) GetURL() string
type HeaderBasicItem ¶
type HeaderBasicItem interface {
GetTitle() string
GetURL() string
External() bool
GetLinks() []HeaderBasicLink
}
type HeaderBasicLink ¶
type HeaderBasicLink struct {
Title string
URL string
// Whether or not the link is external (displays an external icon next to it).
IsExternal bool
}
Defines a link that is displayed on the header for navigation.
func (HeaderBasicLink) External ¶
func (l HeaderBasicLink) External() bool
func (HeaderBasicLink) GetLinks ¶
func (l HeaderBasicLink) GetLinks() []HeaderBasicLink
func (HeaderBasicLink) GetTitle ¶
func (l HeaderBasicLink) GetTitle() string
func (HeaderBasicLink) GetURL ¶
func (l HeaderBasicLink) GetURL() string
Click to show internal directories.
Click to hide internal directories.