ick

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	COLOR_NONE         COLOR  = ""
	COLOR_WHITE        COLOR  = "is-white"
	COLOR_WHITE_BIS    COLOR  = "is-white-bis"
	COLOR_WHITE_TER    COLOR  = "is-white-ter"
	COLOR_BLACK        COLOR  = "is-black"
	COLOR_BLACK_BIS    COLOR  = "is-black-bis"
	COLOR_BLACK_TER    COLOR  = "is-black-ter"
	COLOR_LIGHT        COLOR  = "is-light"
	COLOR_DARK         COLOR  = "is-dark"
	COLOR_PRIMARY      COLOR  = "is-primary"
	COLOR_LINK         COLOR  = "is-link"
	COLOR_INFO         COLOR  = "is-info"
	COLOR_SUCCESS      COLOR  = "is-success"
	COLOR_WARNING      COLOR  = "is-warning"
	COLOR_DANGER       COLOR  = "is-danger"
	COLOR_GREY         COLOR  = "is-grey"
	COLOR_GREY_DARKER  COLOR  = "is-grey-darker"
	COLOR_GREY_DARK    COLOR  = "is-grey-dark"
	COLOR_GREY_LIGHT   COLOR  = "is-grey-light"
	COLOR_GREY_LIGHTER COLOR  = "is-grey-lighter"
	COLOR_OPTIONS      string = string(COLOR_GREY + " " + COLOR_WHITE + " " + COLOR_WHITE_BIS + " " + COLOR_WHITE_TER + " " + COLOR_BLACK + " " + COLOR_BLACK_BIS + " " + COLOR_BLACK_TER + " " + COLOR_LIGHT + " " + COLOR_DARK + " " + COLOR_PRIMARY + " " + COLOR_LINK + " " + COLOR_INFO + " " + COLOR_SUCCESS + " " + COLOR_WARNING + " " + COLOR_DANGER + " " + COLOR_GREY_DARKER + " " + COLOR_GREY_DARK + " " + COLOR_GREY_LIGHT + " " + COLOR_GREY_LIGHTER)
)
View Source
const (
	TXTCOLOR_WHITE     TXTCOLOR = "has-text-white"
	TXTCOLOR_WHITE_BIS TXTCOLOR = "has-text-white-bis"
	TXTCOLOR_WHITE_TER TXTCOLOR = "has-text-white-ter"
	TXTCOLOR_BLACK     TXTCOLOR = "has-text-black"
	TXTCOLOR_BLACK_BIS TXTCOLOR = "has-text-black-bis"
	TXTCOLOR_BLACK_TER TXTCOLOR = "has-text-black-ter"
	TXTCOLOR_LIGHT     TXTCOLOR = "has-text-light"
	TXTCOLOR_DARK      TXTCOLOR = "has-text-dark"

	TXTCOLOR_PRIMARY TXTCOLOR = "has-text-primary"
	TXTCOLOR_LINK    TXTCOLOR = "has-text-link"
	TXTCOLOR_INFO    TXTCOLOR = "has-text-info"
	TXTCOLOR_SUCCESS TXTCOLOR = "has-text-success"
	TXTCOLOR_WARNING TXTCOLOR = "has-text-warning"
	TXTCOLOR_DANGER  TXTCOLOR = "has-text-danger"

	TXTCOLOR_PRIMARY_LIGHT TXTCOLOR = "has-text-primary-light"
	TXTCOLOR_LINK_LIGHT    TXTCOLOR = "has-text-link-light"
	TXTCOLOR_INFO_LIGHT    TXTCOLOR = "has-text-info-light"
	TXTCOLOR_SUCCESS_LIGHT TXTCOLOR = "has-text-success-light"
	TXTCOLOR_WARNING_LIGHT TXTCOLOR = "has-text-warning-light"
	TXTCOLOR_DANGER_LIGHT  TXTCOLOR = "has-text-danger-light"

	TXTCOLOR_PRIMARY_DARK TXTCOLOR = "has-text-primary-dark"
	TXTCOLOR_LINK_DARK    TXTCOLOR = "has-text-link-dark"
	TXTCOLOR_INFO_DARK    TXTCOLOR = "has-text-info-dark"
	TXTCOLOR_SUCCESS_DARK TXTCOLOR = "has-text-success-dark"
	TXTCOLOR_WARNING_DARK TXTCOLOR = "has-text-warning-dark"
	TXTCOLOR_DANGER_DARK  TXTCOLOR = "has-text-danger-dark"

	TXTCOLOR_GREY         TXTCOLOR = "has-text-grey"
	TXTCOLOR_GREY_DARKER  TXTCOLOR = "has-text-grey-darker"
	TXTCOLOR_GREY_DARK    TXTCOLOR = "has-text-grey-dark"
	TXTCOLOR_GREY_LIGHT   TXTCOLOR = "has-text-grey-light"
	TXTCOLOR_GREY_LIGHTER TXTCOLOR = "has-text-grey-lighter"
	TXTCOLOR_OPTIONS      string   = string(TXTCOLOR_GREY+" "+TXTCOLOR_WHITE+" "+TXTCOLOR_WHITE_BIS+" "+TXTCOLOR_WHITE_TER+" "+TXTCOLOR_BLACK+" "+TXTCOLOR_BLACK_BIS+" "+TXTCOLOR_BLACK_TER+" "+TXTCOLOR_LIGHT+" "+TXTCOLOR_DARK+" "+TXTCOLOR_PRIMARY+" "+TXTCOLOR_LINK+" "+TXTCOLOR_INFO+" "+TXTCOLOR_SUCCESS+" "+TXTCOLOR_WARNING+" "+TXTCOLOR_DANGER+" "+TXTCOLOR_GREY_DARKER+" "+TXTCOLOR_GREY_DARK+" "+TXTCOLOR_GREY_LIGHT+" "+TXTCOLOR_GREY_LIGHTER) +
		string(TXTCOLOR_PRIMARY_LIGHT+" "+TXTCOLOR_LINK_LIGHT+" "+TXTCOLOR_INFO_LIGHT+" "+TXTCOLOR_SUCCESS_LIGHT+" "+TXTCOLOR_WARNING_LIGHT+" "+TXTCOLOR_DANGER_LIGHT) +
		string(TXTCOLOR_PRIMARY_DARK+" "+TXTCOLOR_LINK_DARK+" "+TXTCOLOR_INFO_DARK+" "+TXTCOLOR_SUCCESS_DARK+" "+TXTCOLOR_WARNING_DARK+" "+TXTCOLOR_DANGER_DARK)
)
View Source
const (
	BKGCOLOR_WHITE     BKGCOLOR = "has-background-white"
	BKGCOLOR_WHITE_BIS BKGCOLOR = "has-background-white-bis"
	BKGCOLOR_WHITE_TER BKGCOLOR = "has-background-white-ter"
	BKGCOLOR_BLACK     BKGCOLOR = "has-background-black"
	BKGCOLOR_BLACK_BIS BKGCOLOR = "has-background-black-bis"
	BKGCOLOR_BLACK_TER BKGCOLOR = "has-background-black-ter"
	BKGCOLOR_LIGHT     BKGCOLOR = "has-background-light"
	BKGCOLOR_DARK      BKGCOLOR = "has-background-dark"

	BKGCOLOR_PRIMARY BKGCOLOR = "has-background-primary"
	BKGCOLOR_LINK    BKGCOLOR = "has-background-link"
	BKGCOLOR_INFO    BKGCOLOR = "has-background-info"
	BKGCOLOR_SUCCESS BKGCOLOR = "has-background-success"
	BKGCOLOR_WARNING BKGCOLOR = "has-background-warning"
	BKGCOLOR_DANGER  BKGCOLOR = "has-background-danger"

	BKGCOLOR_PRIMARY_LIGHT BKGCOLOR = "has-background-primary-light"
	BKGCOLOR_LINK_LIGHT    BKGCOLOR = "has-background-link-light"
	BKGCOLOR_INFO_LIGHT    BKGCOLOR = "has-background-info-light"
	BKGCOLOR_SUCCESS_LIGHT BKGCOLOR = "has-background-success-light"
	BKGCOLOR_WARNING_LIGHT BKGCOLOR = "has-background-warning-light"
	BKGCOLOR_DANGER_LIGHT  BKGCOLOR = "has-background-danger-light"

	BKGCOLOR_PRIMARY_DARK BKGCOLOR = "has-background-primary-dark"
	BKGCOLOR_LINK_DARK    BKGCOLOR = "has-background-link-dark"
	BKGCOLOR_INFO_DARK    BKGCOLOR = "has-background-info-dark"
	BKGCOLOR_SUCCESS_DARK BKGCOLOR = "has-background-success-dark"
	BKGCOLOR_WARNING_DARK BKGCOLOR = "has-background-warning-dark"
	BKGCOLOR_DANGER_DARK  BKGCOLOR = "has-background-danger-dark"

	BKGCOLOR_GREY         BKGCOLOR = "has-background-grey"
	BKGCOLOR_GREY_DARKER  BKGCOLOR = "has-background-grey-darker"
	BKGCOLOR_GREY_DARK    BKGCOLOR = "has-background-grey-dark"
	BKGCOLOR_GREY_LIGHT   BKGCOLOR = "has-background-grey-light"
	BKGCOLOR_GREY_LIGHTER BKGCOLOR = "has-background-grey-lighter"
	BKGCOLOR_OPTIONS      string   = string(BKGCOLOR_GREY+" "+BKGCOLOR_WHITE+" "+BKGCOLOR_WHITE_BIS+" "+BKGCOLOR_WHITE_TER+" "+BKGCOLOR_BLACK+" "+BKGCOLOR_BLACK_BIS+" "+BKGCOLOR_BLACK_TER+" "+BKGCOLOR_LIGHT+" "+BKGCOLOR_DARK+" "+BKGCOLOR_PRIMARY+" "+BKGCOLOR_LINK+" "+BKGCOLOR_INFO+" "+BKGCOLOR_SUCCESS+" "+BKGCOLOR_WARNING+" "+BKGCOLOR_DANGER+" "+BKGCOLOR_GREY_DARKER+" "+BKGCOLOR_GREY_DARK+" "+BKGCOLOR_GREY_LIGHT+" "+BKGCOLOR_GREY_LIGHTER) +
		string(BKGCOLOR_PRIMARY_LIGHT+" "+BKGCOLOR_LINK_LIGHT+" "+BKGCOLOR_INFO_LIGHT+" "+BKGCOLOR_SUCCESS_LIGHT+" "+BKGCOLOR_WARNING_LIGHT+" "+BKGCOLOR_DANGER_LIGHT) +
		string(BKGCOLOR_PRIMARY_DARK+" "+BKGCOLOR_LINK_DARK+" "+BKGCOLOR_INFO_DARK+" "+BKGCOLOR_SUCCESS_DARK+" "+BKGCOLOR_WARNING_DARK+" "+BKGCOLOR_DANGER_DARK)
)
View Source
const (
	SIZE_SMALL   SIZE   = "is-small"
	SIZE_STD     SIZE   = "is-normal"
	SIZE_MEDIUM  SIZE   = "is-medium"
	SIZE_LARGE   SIZE   = "is-large"
	SIZE_OPTIONS string = string(SIZE_STD + " " + SIZE_SMALL + " " + SIZE_MEDIUM + " " + SIZE_LARGE)
)
View Source
const (
	HH_SMALL                   HERO_HEIGHT = "is-small"
	HH_STANDARD                HERO_HEIGHT = ""
	HH_MEDIUM                  HERO_HEIGHT = "is-medium"
	HH_LARGE                   HERO_HEIGHT = "is-large"
	HH_HALFHEIGHT              HERO_HEIGHT = "is-halfheight"
	HH_FULLFHEIGHT             HERO_HEIGHT = "is-fullheight"
	HH_FULLFHEIGHT_WITH_NAVBAR HERO_HEIGHT = "is-fullheight-with-navbar"
	HH_OPTIONS                 string      = string(HH_SMALL + " " + HH_MEDIUM + " " + HH_LARGE + " " + HH_HALFHEIGHT + " " + HH_FULLFHEIGHT + " " + HH_FULLFHEIGHT_WITH_NAVBAR)
)
View Source
const (
	IMG_16x16   IMG_SIZE = "is-16x16"
	IMG_24x24   IMG_SIZE = "is-24x24"
	IMG_32x32   IMG_SIZE = "is-32x32"
	IMG_48x48   IMG_SIZE = "is-48x48"
	IMG_64x64   IMG_SIZE = "is-64x64"
	IMG_96x96   IMG_SIZE = "is-96x96"
	IMG_128x128 IMG_SIZE = "is-128x128"

	IMG_RSQUARE IMG_SIZE = "is-fullwidth is-square"
	IMG_R1by1   IMG_SIZE = "is-fullwidth is-1by1"
	IMG_R5by4   IMG_SIZE = "is-fullwidth is-5by4"
	IMG_R4by3   IMG_SIZE = "is-fullwidth is-4by3"
	IMG_R3by2   IMG_SIZE = "is-fullwidth is-3by2"
	IMG_R5by3   IMG_SIZE = "is-fullwidth is-5by3"
	IMG_R16by9  IMG_SIZE = "is-fullwidth is-16by9"
	IMG_R2by1   IMG_SIZE = "is-fullwidth is-2by1"
	IMG_R3by1   IMG_SIZE = "is-fullwidth is-3by1"
	IMG_R4by5   IMG_SIZE = "is-fullwidth is-4by5"
	IMG_R3by4   IMG_SIZE = "is-fullwidth is-3by4"
	IMG_R2by3   IMG_SIZE = "is-fullwidth is-2by3"
	IMG_R3by5   IMG_SIZE = "is-fullwidth is-3by5"
	IMG_R9by16  IMG_SIZE = "is-fullwidth is-9by16"
	IMG_R1by2   IMG_SIZE = "is-fullwidth is-1by2"
	IMG_R1by3   IMG_SIZE = "is-fullwidth is-1by3"

	IMG_SIZE_OPTIONS string = string(IMG_16x16+" "+IMG_24x24+" "+IMG_32x32+" "+IMG_48x48+" "+IMG_64x64+" "+IMG_96x96+" "+IMG_128x128) + " " +
		string(IMG_RSQUARE+" "+IMG_R1by1+" "+IMG_R5by4+" "+IMG_R4by3+" "+IMG_R3by2+" "+IMG_R5by3+" "+IMG_R16by9+" "+IMG_R2by1+" "+IMG_R3by1+" "+IMG_R4by5+" "+IMG_R3by4+" "+IMG_R2by3+" "+IMG_R3by5+" "+IMG_R9by16+" "+IMG_R1by2+" "+IMG_R1by3)
)
View Source
const (
	TAGLBLSZ_STD     TAGLABEL_SIZE = "is-normal"
	TAGLBLSZ_MEDIUM  TAGLABEL_SIZE = "is-medium"
	TAGLBLSZ_LARGE   TAGLABEL_SIZE = "is-large"
	TAGLBLSZ_OPTIONS string        = string(TAGLBLSZ_STD + " " + TAGLBLSZ_MEDIUM + " " + TAGLBLSZ_LARGE)
)

Variables

View Source
var (
	ErrBadHtmlFileExtention = errors.New("bad html file extension")
	ErrMissingFileName      = errors.New("missing file name")
)

Functions

This section is empty.

Types

type BKGCOLOR

type BKGCOLOR string

func BackgroundColor

func BackgroundColor(c BKGCOLOR) *BKGCOLOR

type COLOR

type COLOR string

func Color

func Color(c COLOR) *COLOR

func (COLOR) IsLight

func (c COLOR) IsLight() bool

func (*COLOR) SetLight

func (c *COLOR) SetLight(f bool) *COLOR

type CONTAINER_WIDTH

type CONTAINER_WIDTH string
const (
	CONTWIDTH_NONE          CONTAINER_WIDTH = ""
	CONTWIDTH_MAXDESKTOP    CONTAINER_WIDTH = "is-max-desktop"    // 960px in any cases
	CONTWIDTH_DESKTOP       CONTAINER_WIDTH = "is-desktop"        // 960px or 1152 px or 1344 px
	CONTWIDTH_MAXWIDESCREEN CONTAINER_WIDTH = "is-max-widescreen" // 1152 px
	CONTWIDTH_WIDESCREEN    CONTAINER_WIDTH = "is-widescreen"     // 1152 px or 1344 px
	CONTWIDTH_FULLHD        CONTAINER_WIDTH = "is-fullhd"         // 1344 px
	CONTWIDTH_FLUID         CONTAINER_WIDTH = "is-fluid"          // fullscreen + 32px margin
	CONTWIDTH_OPTIONS       CONTAINER_WIDTH = CONTWIDTH_MAXDESKTOP + " " + CONTWIDTH_DESKTOP + " " + CONTWIDTH_MAXWIDESCREEN + " " + CONTWIDTH_WIDESCREEN + " " + CONTWIDTH_FULLHD + " " + CONTWIDTH_FLUID
)

type DELETE_TYPE

type DELETE_TYPE string
const (
	DLTTYP_BUTTON DELETE_TYPE = "button"
	DLTTYP_ANCHOR DELETE_TYPE = "anchor"
)

type HERO_HEIGHT

type HERO_HEIGHT string

The height of the hero section

type HeadItem

type HeadItem struct {
	ickcore.BareSnippet
}

func NewHeadItem

func NewHeadItem(tagname string) *HeadItem

func (*HeadItem) BuildTag

func (hi *HeadItem) BuildTag() ickcore.Tag

type ICKButton

type ICKButton struct {
	ickcore.BareSnippet

	OpeningIcon ICKIcon // optional opening icon
	Title       string  // html string
	ClosingIcon ICKIcon // optional closing icon

	// HRef defines the associated url link. HRef can be nil. If HRef is defined then the rendered element is a <a> tag, otherwise it's a <button> tag.
	HRef *url.URL

	IsOutlined bool // Outlined button style
	IsRounded  bool // Rounded button style
	COLOR           // rendering color
	SIZE            // button size

	IsDisabled bool // Disabled state

	IsLoading bool // Loading button state

}

ICKButton is an UISnippet registered with the ick-tag `ick-button`.

According to the ButtonType property, ICKButton can be used either as a standard <button> element but also as an anchor link or a submit or reset form input. The core text is handle with the Title html property, allowing simple text or complex rendering.

The IsDisabled property is directly handled by the embedded UISnippet.

var (
	// IconVisibilityHidden  *ICKIcon = Icon("bi bi-eye-slash-fill").SetColor(TXTCOLOR_PRIMARY)
	// IconVisibilityVisible *ICKIcon = Icon("bi bi-eye-fill").SetColor(TXTCOLOR_PRIMARY)
	BtnVisibilityHidden  *ICKButton = Button("").SetIcon(*Icon("bi bi-eye-slash-fill").SetColor(TXTCOLOR_PRIMARY), false)
	BtnVisibilityVisible *ICKButton = Button("").SetIcon(*Icon("bi bi-eye-fill").SetColor(TXTCOLOR_PRIMARY), false)
)

func Button

func Button(htmltitle string, attrs ...string) *ICKButton

func (*ICKButton) BuildTag

func (btn *ICKButton) BuildTag() ickcore.Tag

BuildTag builds the tag used to render the html element. The tagname depends on the button type.

func (*ICKButton) Clone

func (btn *ICKButton) Clone() *ICKButton

Clone clones the snippet, without the rendering metadata

func (*ICKButton) NeedRendering

func (btn *ICKButton) NeedRendering() bool

func (*ICKButton) ParseHRef

func (btn *ICKButton) ParseHRef(rawurl string) *ICKButton

ParseHRef parses rawurl to HRef. HRef stays nil in case of error.

func (*ICKButton) RenderContent

func (btn *ICKButton) RenderContent(out io.Writer) error

RenderContent writes the HTML string corresponding to the content of the HTML element.

func (*ICKButton) SetColor

func (btn *ICKButton) SetColor(c COLOR) *ICKButton

func (*ICKButton) SetDisabled

func (btn *ICKButton) SetDisabled(f bool) *ICKButton

func (*ICKButton) SetHRef

func (btn *ICKButton) SetHRef(u url.URL) *ICKButton

ParseHRef parses rawurl to HRef. HRef stays nil in case of error.

func (*ICKButton) SetIcon

func (btn *ICKButton) SetIcon(icon ICKIcon, closing bool) *ICKButton

func (*ICKButton) SetId

func (btn *ICKButton) SetId(id string) *ICKButton

func (*ICKButton) SetLoading

func (btn *ICKButton) SetLoading(f bool) *ICKButton

func (*ICKButton) SetOutlined

func (btn *ICKButton) SetOutlined(f bool) *ICKButton

func (*ICKButton) SetRounded

func (btn *ICKButton) SetRounded(f bool) *ICKButton

func (*ICKButton) SetSize

func (btn *ICKButton) SetSize(s SIZE) *ICKButton

func (*ICKButton) SetTitle

func (btn *ICKButton) SetTitle(title string) *ICKButton

type ICKCard

type ICKCard struct {
	ickcore.BareSnippet

	// Optional title to display in the head of the card
	Title ickcore.HTMLString

	// the body of the card
	Body ICKElem // rendered as <div class="card-content">

	// Optional image to display on top of the card
	Image *ICKImage
	// contains filtered or unexported fields
}

The card is an HTMLSnippet. Use AddContent to setup the content of the card

func Card

func Card(content ickcore.ContentComposer, attrs ...string) *ICKCard

Card main factory

func (*ICKCard) AddFooterItem

func (card *ICKCard) AddFooterItem(item ickcore.HTMLString) *ICKCard

func (*ICKCard) BuildTag

func (card *ICKCard) BuildTag() ickcore.Tag

BuildTag builds the tag used to render the html element. Card Tag is a simple <div class="card"></div>

func (*ICKCard) RenderContent

func (card *ICKCard) RenderContent(out io.Writer) error

RenderContent writes the HTML string corresponding to the content of the HTML element. Card rendering renders the optional header withe the Title, the optional Image, the content, and a slice of footers

func (*ICKCard) SetImage

func (card *ICKCard) SetImage(image ICKImage) *ICKCard

func (*ICKCard) SetTitle

func (card *ICKCard) SetTitle(title string) *ICKCard

type ICKDelete

type ICKDelete struct {
	ickcore.BareSnippet

	DELETE_TYPE

	// The element id to remove from the DOM when the delete button is clicked
	TargetId string

	// styling
	SIZE
}

func Delete

func Delete(id string, targetid string) *ICKDelete

func (*ICKDelete) BuildTag

func (del *ICKDelete) BuildTag() ickcore.Tag

BuildTag builds the tag used to render the html element. Delete tag is a simple <button class="delete"></delete>

func (*ICKDelete) RenderContent

func (del *ICKDelete) RenderContent(out io.Writer) error

Delete rendering is made by the tag attributes.

func (*ICKDelete) SetSize

func (t *ICKDelete) SetSize(s SIZE) *ICKDelete

SetSize set the size of the tag

func (*ICKDelete) SetType

func (t *ICKDelete) SetType(typ DELETE_TYPE) *ICKDelete

type ICKElem

type ICKElem struct {
	ickcore.BareSnippet

	Body ickcore.ContentStack // HTML Element body. A stack of content composers to render.
}

ICKElem implements the Composer interface for a basic element

func Container

func Container(w CONTAINER_WIDTH, attrs ...string) *ICKElem

Container allow centering element on larger viewport. See bulma container

func Elem

func Elem(tagname string, attr string, body ...ickcore.ContentComposer) *ICKElem

Elem returns a new HTMLSnippet with a given tag name and a map of attributes.

func (*ICKElem) Append

func (s *ICKElem) Append(content ...ickcore.ContentComposer) *ICKElem

Append

func (*ICKElem) BuildTag

func (s *ICKElem) BuildTag() ickcore.Tag

BuildTag builds the tag used to render the html element. This default implementation of BuildTag does nothing. So as the tag may have been preset before rendering.

func (*ICKElem) Clone

func (s *ICKElem) Clone() *ICKElem

Clone clones the snippet without the rendering metadata nor its id.

func (ICKElem) NeedRendering

func (s ICKElem) NeedRendering() bool

func (*ICKElem) RenderContent

func (s *ICKElem) RenderContent(out io.Writer) error

RenderContent writes the HTML string corresponding to the content of the HTML element. The default implementation for an HTMLSnippet snippet is to render all the internal stack of composers inside an enclosed HTML tag.

func (*ICKElem) SetId

func (s *ICKElem) SetId(id string) *ICKElem

SetId sets the tag id property of the snippet. This is a shortcut to s.Tag().AttributeMap.SetId(id) and enables ICKSnippet call chaining.

type ICKHero

type ICKHero struct {
	ickcore.BareSnippet

	Height HERO_HEIGHT // the height of the hero section,

	InsideHead ickcore.ContentComposer

	Title    ICKTitle
	Subtitle ICKTitle
	Centered bool
	CWidth   CONTAINER_WIDTH

	CTA ICKButton

	InsideFoot ickcore.ContentComposer
}

func Hero

func Hero() *ICKHero

func (*ICKHero) BuildTag

func (h *ICKHero) BuildTag() ickcore.Tag

Tag Builder used by the rendering functions.

func (*ICKHero) RenderContent

func (h *ICKHero) RenderContent(out io.Writer) error

RenderContent writes the HTML string corresponding to the content of the HTML element.

type ICKIcon

type ICKIcon struct {
	ickcore.BareSnippet

	// Key is the icon key that will be added to the <class attribute of the <i> element.
	// Format of this key depends on the icon provider:
	// 	- 'fas fa-{iconname}' for [font awesome icons]
	// 	- 'bi-{iconname}' for [bootstrap icons]
	// 	- 'mdi mdi{iconname}' for [material design icons]
	//
	// If the Key is empty nothing is rendered
	//
	// [font awesome icons]: https://fontawesome.com/icons
	// [bootstrap icons]: https://icons.getbootstrap.com/
	// [material design icons]: https://pictogrammers.com/library/mdi/
	Key string

	Text  string   // optional text
	Color TXTCOLOR // icon color
}

func Icon

func Icon(key string, attrs ...string) *ICKIcon

func (*ICKIcon) BuildTag

func (icon *ICKIcon) BuildTag() ickcore.Tag

Tag Builder used by the rendering functions.

func (ICKIcon) Clone

func (icon ICKIcon) Clone() *ICKIcon

func (*ICKIcon) NeedRendering

func (icon *ICKIcon) NeedRendering() bool

func (*ICKIcon) RenderContent

func (icon *ICKIcon) RenderContent(out io.Writer) error

RenderContent writes the HTML string corresponding to the content of the HTML element.

func (*ICKIcon) SetColor

func (icon *ICKIcon) SetColor(c TXTCOLOR) *ICKIcon

func (*ICKIcon) SetText

func (icon *ICKIcon) SetText(t string) *ICKIcon

type ICKImage

type ICKImage struct {
	ickcore.BareSnippet

	Src       *url.URL // the url for the source of the image
	Alt       string   // the alternative text
	Size      IMG_SIZE // the size or the ratio of the image
	IsRounded bool     // Rounded image style
	NoCrop    bool     // set to true to avoid to crop the image if its size does not fit the Size property. The image may be reduced or distord.
}

ICKImage is a typical img element embedded into a figure container specifying the image size. See bulma image

Background color can be setup by adding snipet classes.

func Image

func Image(rawUrl string, alt string, size IMG_SIZE, attrs ...string) *ICKImage

func (*ICKImage) BuildTag

func (img *ICKImage) BuildTag() ickcore.Tag

BuildTag builds the tag used to render the html element.

func (*ICKImage) NeedRendering

func (img *ICKImage) NeedRendering() bool

func (*ICKImage) ParseSrcURL

func (img *ICKImage) ParseSrcURL(rawUrl string) *ICKImage

ParseSrc parses rawurl to img.Src and returns img to allow chaining. Parsing errors are ignored and if any, Src may stay nil.

func (*ICKImage) RenderContent

func (img *ICKImage) RenderContent(out io.Writer) error

RenderContent writes the HTML string corresponding to the content of the HTML element.

func (*ICKImage) SetAlt

func (img *ICKImage) SetAlt(alt string) *ICKImage

func (*ICKImage) SetNoCrop

func (img *ICKImage) SetNoCrop(f bool) *ICKImage

func (*ICKImage) SetRounded

func (img *ICKImage) SetRounded(f bool) *ICKImage

func (*ICKImage) SetSize

func (img *ICKImage) SetSize(s IMG_SIZE) *ICKImage

type ICKInputField

type ICKInputField struct {
	ickcore.BareSnippet

	// Optional label above the value
	Label string

	OpeningIcon ICKIcon // optional opening icon
	Value       string  // The input value
	IsHidden    bool    // Entered characters are hidden
	ClosingIcon ICKIcon // optional closing icon

	// Optional PlaceHolder string
	PlaceHolder string

	// Optional help text
	Help string

	// Input state: INPUT_STD, INPUT_SUCCESS, INPUT_WARNING, INPUT_ERROR, INPUT_LOADING
	State INPUT_STATE

	// ReadOnly input field
	IsReadOnly bool

	// TODO: ickui - ICKInputField add an icon to show/hide incase of hidden field
	// CanToggleVisibility enables a toggle icon button right to the input.
	// This button toggles the IsHidden status of the input field.
	// ClosingIcon is ignored if CanToggleVisibility is enabled.
	CanToggleVisibility bool
}

func InputField

func InputField(id string, value string, placeholder string, attrs ...string) *ICKInputField

func (*ICKInputField) BuildTag

func (in *ICKInputField) BuildTag() ickcore.Tag

BuildTag builds the tag used to render the html element.

func (*ICKInputField) RenderContent

func (in *ICKInputField) RenderContent(out io.Writer) error

RenderContent writes the HTML string corresponding to the content of the HTML element.

func (*ICKInputField) SetCanToggleVisibility

func (in *ICKInputField) SetCanToggleVisibility(can bool) *ICKInputField

func (*ICKInputField) SetDisabled

func (in *ICKInputField) SetDisabled(f bool) *ICKInputField

func (*ICKInputField) SetHelp

func (in *ICKInputField) SetHelp(help string) *ICKInputField

func (*ICKInputField) SetHidden

func (in *ICKInputField) SetHidden(h bool) *ICKInputField

func (*ICKInputField) SetIcon

func (in *ICKInputField) SetIcon(icon ICKIcon, closing bool) *ICKInputField

func (*ICKInputField) SetLabel

func (in *ICKInputField) SetLabel(lbl string) *ICKInputField

func (*ICKInputField) SetReadOnly

func (in *ICKInputField) SetReadOnly(ro bool) *ICKInputField

func (*ICKInputField) SetState

func (in *ICKInputField) SetState(st INPUT_STATE) *ICKInputField
type ICKLink struct {
	ickcore.BareSnippet

	// HRef defines the associated url link.
	// if nil the <a> tag is rendered without href attribute.
	// Usually HRef is created calling TryParseHRef
	HRef *url.URL

	Body ickcore.ContentStack // HTML Element body. A stack of content composers to render.
}

ICKLink represents an HTML anchor link. It is part of the core icecake snippets.

func Link(child ickcore.ContentComposer, attrlist ...string) *ICKLink

Link returns an HTML anchor link

func (*ICKLink) BuildTag

func (lnk *ICKLink) BuildTag() ickcore.Tag

BuildTag builds the tag used to render the html element.

func (*ICKLink) ParseHRef

func (lnk *ICKLink) ParseHRef(rawUrl string) *ICKLink

ParseHRef tries to parse rawUrl to HRef ignoring error.

func (*ICKLink) RenderContent

func (lnk *ICKLink) RenderContent(out io.Writer) error

RenderContent writes the HTML string corresponding to the content of the HTML element. The default implementation for an HTMLSnippet snippet is to render all the internal stack of composers inside an enclosed HTML tag.

func (*ICKLink) SetHRef

func (lnk *ICKLink) SetHRef(href *url.URL) *ICKLink

SetHRef sets the href url

type ICKMedia

type ICKMedia struct {
	ickcore.BareSnippet

	Left   ickcore.TagProvider
	Middle ickcore.TagProvider
	Right  ickcore.TagProvider
}

func Media

func Media(left ickcore.TagProvider, middle ickcore.TagProvider, right ickcore.TagProvider, attrs ...string) *ICKMedia

func (*ICKMedia) BuildTag

func (m *ICKMedia) BuildTag() ickcore.Tag

BuildTag returns <span class="tag {classes}" {attributes}>

func (*ICKMedia) RenderContent

func (t *ICKMedia) RenderContent(out io.Writer) error

RenderContent writes the HTML string corresponding to the content of the HTML element.

type ICKMenu

type ICKMenu struct {
	ickcore.BareSnippet

	MENU_TYPE
	SIZE
	// contains filtered or unexported fields
}

ICKMenu is an icecake snippet providing the HTML rendering for a bulma menu.

func Menu(id string, attrs ...string) *ICKMenu

func (*ICKMenu) AddItem

func (mnu *ICKMenu) AddItem(key string, itmtyp MENUITEM_TYPE, txt string) *IckMenuItem

AddItem adds the item to the Menu

func (*ICKMenu) At

func (mnu *ICKMenu) At(index int) *IckMenuItem

At returns the item at a given index. returns nil if index is out of range.

func (*ICKMenu) BuildTag

func (mnu *ICKMenu) BuildTag() ickcore.Tag

BuildTag builds the tag used to render the html element.

func (ICKMenu) Clone

func (src ICKMenu) Clone() *ICKMenu

Clone clones this Menu and all its items and subitem, keeping their attributes their item index and their key.

func (*ICKMenu) Item

func (mnu *ICKMenu) Item(key string) *IckMenuItem

Item returns the first item found with the given key, walking through all levels. returns nil if key is not found

func (*ICKMenu) NeedRendering

func (mnu *ICKMenu) NeedRendering() bool

func (*ICKMenu) RenderContent

func (mnu *ICKMenu) RenderContent(out io.Writer) error

RenderContent writes the HTML string corresponding to the content of the HTML element.

func (*ICKMenu) SetActiveItem

func (mnu *ICKMenu) SetActiveItem(key string) *ICKMenu

SetActiveItem look for the key item (or subitem) and sets its IsActive flag. warning: does not unset other actve items if any.

func (*ICKMenu) SetSize

func (mnu *ICKMenu) SetSize(sz SIZE) *ICKMenu

func (*ICKMenu) SetType

func (mnu *ICKMenu) SetType(t MENU_TYPE) *ICKMenu

type ICKMessage

type ICKMessage struct {
	ickcore.BareSnippet

	// optional header to display on top of the message
	Header ickcore.HTMLString

	// the body of the message
	Msg ickcore.ContentStack

	// set to true to display the delete button and allow user to delete the message
	CanDelete bool

	// COLOR define the color of the message
	COLOR

	// SIZE define the size of the message
	SIZE
}

ICKMessage is an icecake snippet providing the HTML rendering for a bulma message.

func Message

func Message(cnt ickcore.ContentComposer) *ICKMessage

func (*ICKMessage) BuildTag

func (msg *ICKMessage) BuildTag() ickcore.Tag

BuildTag returns tag <div class="message {classes}" {attributes}>

func (*ICKMessage) RenderContent

func (msg *ICKMessage) RenderContent(out io.Writer) error

RenderContent writes the HTML string corresponding to the content of the HTML element.

func (*ICKMessage) SetColor

func (msg *ICKMessage) SetColor(c COLOR) *ICKMessage

SetColor set a message color

func (*ICKMessage) SetDeletable

func (msg *ICKMessage) SetDeletable(id string) *ICKMessage

SetDeletable make this message delatable by rendering the delete button. A deletable message must have an id. Dos nothing if id is empty.

func (*ICKMessage) SetHeader

func (msg *ICKMessage) SetHeader(header ickcore.HTMLString) *ICKMessage

SetHeader set a message header

func (*ICKMessage) SetSize

func (msg *ICKMessage) SetSize(s SIZE) *ICKMessage

SetSize set the size of the message

type ICKNavbar

type ICKNavbar struct {
	ickcore.BareSnippet

	// Styling properties
	IsTransparent bool // renders a transparent navbar
	HasShadow     bool // renders a shadow below the navbar
	// contains filtered or unexported fields
}

ICKNavbar is an icecake snippet providing the HTML rendering for a bulma navbar.

func NavBar(attrs ...string) *ICKNavbar

func (*ICKNavbar) AddItem

func (nav *ICKNavbar) AddItem(key string, itmtyp NAVBARITEM_TYPE, content ickcore.ContentComposer) *ICKNavbarItem

AddItem adds the item to the navbar

func (*ICKNavbar) At

func (nav *ICKNavbar) At(index int) *ICKNavbarItem

At returns the item at a given index. returns nil if index is out of range.

func (*ICKNavbar) BuildTag

func (nav *ICKNavbar) BuildTag() ickcore.Tag

BuildTag builds the tag used to render the html element.

func (ICKNavbar) Clone

func (src ICKNavbar) Clone() *ICKNavbar

Clone clones this navbar and all its items and subitem, keeping their attributes their item index and their key.

func (*ICKNavbar) Item

func (nav *ICKNavbar) Item(key string) *ICKNavbarItem

Item returns the first item found with the given key, walking through all levels. returns nil if key is not found

func (*ICKNavbar) NeedRendering

func (nav *ICKNavbar) NeedRendering() bool

func (*ICKNavbar) RenderContent

func (nav *ICKNavbar) RenderContent(out io.Writer) error

RenderContent writes the HTML string corresponding to the content of the HTML element.

func (*ICKNavbar) SetActiveItem

func (nav *ICKNavbar) SetActiveItem(key string) *ICKNavbar

SetActiveItem look for the key item (or subitem) and sets its IsActive flag. warning: does not unset other actve items if any.

type ICKNavbarItem

type ICKNavbarItem struct {
	ickcore.BareSnippet

	// Optional Key allows to access a specific navbaritem, whatever it's level in the hierarchy, directly from the navbar.
	Key string

	// The Item Type defines the location of the item in the navbar or if it's a simple divider.
	// If Type is empty, NAVBARIT_START is used for rendering.
	Type NAVBARITEM_TYPE

	// Item Content
	Content ickcore.ContentComposer

	// HRef defines the optional associated url link.
	// If HRef is defined the item become an anchor link <a>, otherwise it's a <div>
	// HRef can be nil. Usually it's created calling NavbarItem.TryParseHRef
	HRef *url.URL

	// ImageSrc defines an optional image to display at the begining of the Item
	ImageSrc *url.URL // the url for the source of the image

	// Highlight this item
	IsActive bool
	// contains filtered or unexported fields
}

ICKNavbarItem is an icecake snippet providing the HTML rendering for a bulma navbar item.

func (*ICKNavbarItem) AddItem

func (navi *ICKNavbarItem) AddItem(key string, itmtyp NAVBARITEM_TYPE, content ickcore.ContentComposer) *ICKNavbarItem

AddItem adds the item as a subitem within the navbar item

func (*ICKNavbarItem) At

func (navi *ICKNavbarItem) At(index int) *ICKNavbarItem

At returns the item at a given index. returns nil if index is out of range.

func (*ICKNavbarItem) BuildTag

func (navi *ICKNavbarItem) BuildTag() ickcore.Tag

BuildTag builds the tag used to render the html element. The Navbar Item tag depends on the item properties:

  • it's <hr> for a NAVBARIT_DIVIDER item type, otherwise
  • it's <a> when an HRef is provided,
  • it's <div> in other cases

func (ICKNavbarItem) Clone

func (navi ICKNavbarItem) Clone() *ICKNavbarItem

Clone clones this navbar and all its items and subitem, keeping their attributes their item index and their key.

func (*ICKNavbarItem) Item

func (navi *ICKNavbarItem) Item(key string) *ICKNavbarItem

Item returns the first item found with the given key, walking through all levels. returns nil if key is not found

func (*ICKNavbarItem) ParseHRef

func (navi *ICKNavbarItem) ParseHRef(rawUrl string) *ICKNavbarItem

ParseHRef tries to parse rawUrl to HRef ignoring error.

func (*ICKNavbarItem) ParseImageSrc

func (navi *ICKNavbarItem) ParseImageSrc(rawUrl string) *ICKNavbarItem

ParseImageSrc tries to parse rawUrl to image src ignoring error.

func (*ICKNavbarItem) RenderContent

func (navi *ICKNavbarItem) RenderContent(out io.Writer) error

RenderContent writes the HTML string corresponding to the content of the HTML element.

func (*ICKNavbarItem) SetHRef

func (navi *ICKNavbarItem) SetHRef(u url.URL) *ICKNavbarItem

func (*ICKNavbarItem) SetImageSrc

func (navi *ICKNavbarItem) SetImageSrc(u url.URL) *ICKNavbarItem

type ICKSpinner

type ICKSpinner struct {
	ickcore.BareSnippet
}

func Spinner

func Spinner() *ICKSpinner

func (*ICKSpinner) BuildTag

func (spin *ICKSpinner) BuildTag() ickcore.Tag

Tag Builder used by the rendering functions.

func (*ICKSpinner) RenderContent

func (*ICKSpinner) RenderContent(out io.Writer) error

RenderContent writes the ickcore string corresponding to the content of the ickcore element.

type ICKTagLabel

type ICKTagLabel struct {
	ickcore.BareSnippet

	Header string // optional text to render on the left side of the taglabel
	Text   string // the tag text

	CanDelete bool // set to true to display the delete button and allow user to delete the message

	IsRounded   bool
	HeaderColor COLOR
	TextColor   COLOR
	TAGLABEL_SIZE
	// contains filtered or unexported fields
}

func TagLabel

func TagLabel(text string, c COLOR, attrs ...string) *ICKTagLabel

func (*ICKTagLabel) BuildTag

func (t *ICKTagLabel) BuildTag() ickcore.Tag

BuildTag returns <span class="tag {classes}" {attributes}>

func (*ICKTagLabel) RenderContent

func (t *ICKTagLabel) RenderContent(out io.Writer) error

RenderContent writes the HTML string corresponding to the content of the HTML element.

func (*ICKTagLabel) SetCanDelete

func (t *ICKTagLabel) SetCanDelete(can bool) *ICKTagLabel

func (*ICKTagLabel) SetHeader

func (t *ICKTagLabel) SetHeader(text string, c COLOR) *ICKTagLabel

func (*ICKTagLabel) SetRounded

func (t *ICKTagLabel) SetRounded(f bool) *ICKTagLabel

func (*ICKTagLabel) SetSize

func (t *ICKTagLabel) SetSize(s TAGLABEL_SIZE) *ICKTagLabel

SetSize set the size of the tag

type ICKTitle

type ICKTitle struct {
	ickcore.BareSnippet

	Title string

	// IsSubtitle allows to render the title with the class subtitle rather than title.
	IsSubtitle bool

	// Heading allows to render the title within a <h> tag, otherwise it's in a <p> tag.
	Heading bool

	// Size define the size of the title. Bounded between 1 and 6.
	Size int
}

ICKTitle is an icecake snippet providing the HTML rendering for a bulma title. The title is an HTMLSnippet. Use AddContent to setup the content of the body of the title element.

func SubTitle

func SubTitle(size int, title string, attrs ...string) *ICKTitle

func Title

func Title(size int, title string, attrs ...string) *ICKTitle

func (*ICKTitle) BuildTag

func (t *ICKTitle) BuildTag() ickcore.Tag

func (*ICKTitle) RenderContent

func (t *ICKTitle) RenderContent(out io.Writer) error

type IMG_SIZE

type IMG_SIZE string

type INPUT_STATE

type INPUT_STATE string
const (
	INPUT_STD      INPUT_STATE = "" // the default input state
	INPUT_SUCCESS  INPUT_STATE = "success"
	INPUT_WARNING  INPUT_STATE = "warning"
	INPUT_ERROR    INPUT_STATE = "error"
	INPUT_LOADING  INPUT_STATE = "loading"
	INPUT_DISABLED INPUT_STATE = "disabled"
	INPUT_STATIC   INPUT_STATE = "static"
)

type IckMenuItem

type IckMenuItem struct {
	ickcore.BareSnippet

	// Optional Key allows to access a specific navbaritem, whatever it's level in the hierarchy, directly from the navbar.
	Key string

	// The Item Type defines the location of the item in the navbar or if it's a simple divider.
	// If Type is empty, NAVBARIT_START is used for rendering.
	Type MENUITEM_TYPE

	// Item Text
	Text string

	// HRef defines the optional associated url link.
	// If HRef is defined the item become an anchor link <a>, otherwise it's a <div>
	// HRef can be nil. Usually it's created calling MenuItem.ParseHRef
	HRef *url.URL

	// Highlight this item
	IsActive bool
}

IckMenuItem is an icecake snippet providing the HTML rendering for a bulma navbar item.

Can't be used for inline rendering.

func (*IckMenuItem) BuildTag

func (mnui *IckMenuItem) BuildTag() ickcore.Tag

BuildTag builds the tag used to render the html element.

func (IckMenuItem) Clone

func (mnui IckMenuItem) Clone() *IckMenuItem

Clone clones this navbar and all its items and subitem, keeping their attributes their item index and their key.

func (*IckMenuItem) ParseHRef

func (mnui *IckMenuItem) ParseHRef(rawUrl string) *IckMenuItem

ParseHRef tries to parse rawUrl to HRef ignoring error.

func (*IckMenuItem) RenderContent

func (mnui *IckMenuItem) RenderContent(out io.Writer) error

RenderContent writes the HTML string corresponding to the content of the HTML element.

type MENUITEM_TYPE string
const (
	MENUIT_LABEL      MENUITEM_TYPE = "label"  // informative label, a <p> tag at the top level
	MENUIT_LINK       MENUITEM_TYPE = "link"   // interactive menu item, a <li><a> tag at the 1st level
	MENUIT_NESTEDLINK MENUITEM_TYPE = "nested" // interactive menu item nested in a second level, a <li><a> tag at a 2nd level
	MENUIT_FOOTER     MENUITEM_TYPE = "footer" // informative text, a <p> tag inserted in the foot of the menu
)
type MENU_TYPE string
const (
	MENUTYP_MENU  MENU_TYPE = "menu"
	MENUTYP_NAV   MENU_TYPE = "nav"
	MENUTYP_ASIDE MENU_TYPE = "aside"
)
type NAVBARITEM_TYPE string
const (
	NAVBARIT_DIVIDER NAVBARITEM_TYPE = "divider" // creates a divider between two navbar items. other navbar properties are ignored.
	NAVBARIT_BRAND   NAVBARITEM_TYPE = "brand"   // item stacked in the brand area of the navbar.
	NAVBARIT_START   NAVBARITEM_TYPE = "start"   // item stacked at the start (left) of the navbar, this is the default behaviour
	NAVBARIT_END     NAVBARITEM_TYPE = "end"     // item stacked at the end (right) of the navbar,
)

type Page

type Page struct {
	*WebSite

	Lang        string     // the html "lang" value.
	Title       string     // the html "head/title" value.
	Description string     // the html "head/meta description" value.
	HeadItems   []HeadItem // the list of tags in the section <head>
	// contains filtered or unexported fields
}

An HTML5 file with its content.

func NewPage

func NewPage(w *WebSite, lang string, rawUrl string) *Page

NewPage is the Page factory, seeting up the lang for the doctype tag, and the url of the page. Return nil if unable to parse the url of the page.

func (Page) AbsURL

func (pg Page) AbsURL() *url.URL

AbsURL returns the absolute URL of the page, excluding the query and the fragments if any.

func (*Page) AddHeadItem

func (f *Page) AddHeadItem(tagname string, attributes string) *Page

AddHeadItem add a line in the <head> section of the HtmlFile

func (*Page) Body

func (pg *Page) Body() *ICKElem

Body returns the HTMLSnippet used to render the body tag. Attributes can be setup. The tag will be forced to body during rendering.

func (*Page) ParseURL

func (pg *Page) ParseURL(rawHTMLUrl string) (err error)

ParseURL parses rawHTMLUrl to the URL of the page. The page URL stays nil in case of error. Only the relative path will be used. The path extention must be html or nothing, otherwise fails.

func (*Page) RMeta

func (pg *Page) RMeta() *ickcore.RMetaData

Meta provides a reference to the RenderingMeta object associated with this composer. This is required by the icecake rendering process.

func (Page) RelURL

func (pg Page) RelURL() *url.URL

RelURL returns the relative URL of the page, excluding the query and the fragments if any.

func (*Page) RenderContent

func (pg *Page) RenderContent(out io.Writer) (err error)

Render turns HtmlFile into a valid HTML syntax and write it to the output stream. Declared required CSS files and styles are automatically added.

func (*Page) WasmScript

func (pg *Page) WasmScript() *ickcore.HTMLString

WasmScript returns the wasm script to be added ad the end of the page to enable loading of a wasm code

func (Page) WriteFile

func (pg Page) WriteFile(outputpath string) (err error)

WriteHTMLFile creates or overwrites the file with htmlfilename name, adding the html extension if missing, and feeds it with the HtmlFile content including the header and the body. If path is provided, htmlfilename is joint to make an absolute path, otherwise htmlfilename is used in the current dir (unless it contains itself an absolute path). returns an error if ther's no filename

type SIZE

type SIZE string

type TAGLABEL_SIZE

type TAGLABEL_SIZE string

type TXTCOLOR

type TXTCOLOR string

func TextColor

func TextColor(c TXTCOLOR) *TXTCOLOR

type WebSite

type WebSite struct {
	OutPath string   // output path where generated websites files will be saved
	WebURL  *url.URL // website URL
	// contains filtered or unexported fields
}

func NewWebSite

func NewWebSite(outpath string) *WebSite

func (*WebSite) AddPage

func (w *WebSite) AddPage(lang string, rawUrl string) *Page

func (*WebSite) CopyToAssets

func (w *WebSite) CopyToAssets(srcs ...string) error

func (*WebSite) Page

func (w *WebSite) Page(rawUrl string) *Page

func (WebSite) ToAbsURL

func (w WebSite) ToAbsURL(rawurl string) *url.URL

func (WebSite) ToAbsURLString

func (w WebSite) ToAbsURLString(rawurl string) string

func (WebSite) WriteFiles

func (w WebSite) WriteFiles() (n int, err error)

returns the number of pages written and errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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