logo

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package logo renders a GOLAZO wordmark in a stylized way.

Package logo renders a GOLAZO wordmark in a stylized way.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(version string, compact bool, o Opts) string

Render renders the GOLAZO logo. The compact argument determines whether it renders compact (for sidebar) or wider (for main pane).

func RenderCompact

func RenderCompact(width int) string

RenderCompact renders a smaller inline version suitable for headers.

Types

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

AnimatedLogo wraps a rendered logo and reveals it progressively. It uses logo.Render() internally and does not modify the render logic.

func NewAnimatedLogo(version string, compact bool, opts Opts, durationMs int, maxPlays int) *AnimatedLogo

NewAnimatedLogo creates a new animated logo that wraps logo.Render(). Uses AnimationWave as the default animation type. Parameters:

  • version: version string to display
  • compact: whether to render in compact mode
  • opts: logo rendering options
  • durationMs: total animation duration in milliseconds (e.g., 1000 for 1 second)
  • maxPlays: number of times to play animation (1 = once, 0 = infinite)

func NewAnimatedLogoWithType

func NewAnimatedLogoWithType(version string, compact bool, opts Opts, durationMs int, maxPlays int, animationType AnimationType) *AnimatedLogo

NewAnimatedLogoWithType creates a new animated logo with a specific animation type. Parameters:

  • version: version string to display
  • compact: whether to render in compact mode
  • opts: logo rendering options
  • durationMs: total animation duration in milliseconds (e.g., 1000 for 1 second)
  • maxPlays: number of times to play animation (1 = once, 0 = infinite)
  • animationType: the type of animation to use

func (*AnimatedLogo) GetAnimationType

func (a *AnimatedLogo) GetAnimationType() AnimationType

GetAnimationType returns the current animation type.

func (*AnimatedLogo) IsComplete

func (a *AnimatedLogo) IsComplete() bool

IsComplete returns whether the animation has finished.

func (*AnimatedLogo) Reset

func (a *AnimatedLogo) Reset()

Reset resets the animation state for potential replay.

func (*AnimatedLogo) Tick

func (a *AnimatedLogo) Tick()

Tick advances the animation by one frame. The behavior depends on the animation type.

func (*AnimatedLogo) View

func (a *AnimatedLogo) View() string

View returns the current animation frame. When complete, returns the full logo content.

type AnimationType

type AnimationType int

AnimationType defines the style of animation for the logo reveal.

const (
	// AnimationWave reveals characters left-to-right with staggered line delays (default)
	AnimationWave AnimationType = iota
	// AnimationTypewriter reveals character-by-character across all lines sequentially
	AnimationTypewriter
	// AnimationLineByLine reveals full lines one at a time
	AnimationLineByLine
	// AnimationCenterOut reveals from center of each line outward
	AnimationCenterOut
	// AnimationRandom reveals characters in random order
	AnimationRandom
)

func AllAnimationTypes

func AllAnimationTypes() []AnimationType

AllAnimationTypes returns all available animation types.

func (AnimationType) String

func (a AnimationType) String() string

String returns the name of the animation type.

type Opts

type Opts struct {
	FieldColorHex    string // diagonal lines color
	GradientStartHex string // left gradient ramp point
	GradientEndHex   string // right gradient ramp point
	Width            int    // width of the rendered logo
}

Opts are the options for rendering the GOLAZO title art.

func DefaultOpts

func DefaultOpts() Opts

DefaultOpts returns default options using the theme colors.

Jump to

Keyboard shortcuts

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