geonet_header_basic

package
v0.0.0-...-0885288 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2024 License: MIT Imports: 3 Imported by: 2

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 {
	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 (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 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 (l HeaderBasicLink) GetLinks() []HeaderBasicLink

func (HeaderBasicLink) GetTitle

func (l HeaderBasicLink) GetTitle() string

func (HeaderBasicLink) GetURL

func (l HeaderBasicLink) GetURL() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL