Package navcatalog

import "gitlab.com/zoralab/bissetii/pkg/components/internal/navcatalog"

Constants

All Bissetii Compressed Compiled CSS

const (
	CSSAMP = `nav.nav-catalog{margin:var(--nav-catalog-margin);padding:var(--nav-catalog-padding);border:var(--nav-catalog-border);background:var(--nav-catalog-background)}`

	CSSCritical = `nav.nav-catalog{margin:var(--nav-catalog-margin);padding:var(--nav-catalog-padding);border:var(--nav-catalog-border);background:var(--nav-catalog-background)}`

	CSSTablet = ``

	CSSDesktop = ``

	CSSWidescreen = ``

	CSSPrint = `nav.nav-catalog .row{display:table;width:100%}nav.nav-catalog .row .column{display:inline-block;break-inside:avoid}nav.nav-catalog .row .column *{break-inside:avoid}`

	CSSVariables    = ``

	CSSVariablesAMP = ``
)

Constants for managing the package as a whole.

const (
	// Name is the block name (`{{- define "this-name" -}}`).
	Name = "nav-catalog"

	// AMPName is the AMP HTML block name.
	AMPName = internal.AMPPrefix + Name

	// ParametersComment are the list of comment headers
	// describing inputs.
	ParametersComment = `
{{- /* .Class        = Nav-Catalog class attribute              */ -}}
{{- /* .ID           = Nav-Catalog id attribute                 */ -}}
{{- /* .Style        = Nav-Catalog style attribute              */ -}}
{{- /* .Cards        = Nav-Catalog .Card rendered deck (slice)  */ -}}
`
)

Dependencies are the dependent codes for building independent template.

This is useful for rendering portable template usage like Hugo partials where they do not share a common definition source.

const (
	// DepHTML is the vanilla HTML output type.
	DepHTML = `
`

	// DepAMPHTML is the Accelerated Mobile Pages HTML output
	// type.
	DepAMPHTML = `
`
)

Full HTML codes for rendering templates without needing to parse file.

const (
	// HTML is the vanilla HTML output type.
	HTML = `
<nav class="nav-catalog {{- if .Class }} {{ .Class -}}{{- end -}}"
{{- if .ID }}

	id="{{- .ID -}}"
{{- end }}
{{- if .Style }}

	style="{{- .Style -}}"
{{- end -}}
><div class="row">

	{{- range $card := .Cards }}

	<div class="column">

		{{ $card }}

	</div>

	{{- end }}
</div></nav>
`

	// AMPHTML is the Accelerated Mobile Pages HTML output type.
	AMPHTML = `
<nav class="nav-catalog {{- if .Class }} {{ .Class -}}{{- end -}}"
{{- if .ID }}

	id="{{- .ID -}}"
{{- end }}
{{- if .Style }}

	style="{{- .Style -}}"
{{- end -}}
><div class="row">

	{{- range $card := .Cards }}

	<div class="column">

		{{ $card }}

	</div>

	{{- end }}
</div></nav>
`
)

Data

type Data struct {
	Cards []string
}

Data is the data structure for rendering the component.