belt

package module
v0.0.0-...-d8009a3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: BSD-3-Clause Imports: 7 Imported by: 3

Documentation

Overview

Package belt is an opinionated collection of HTML components for shared use by multiple web apps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Change

type Change struct {
	State   state.Change
	Title   string
	HTMLURL string
	OnClick string // Optional.
	Short   bool
}

Change is a component that displays a change, with a state icon and title.

func (Change) Render

func (c Change) Render() []*html.Node

type Commit

type Commit struct {
	SHA             string
	Message         string
	AuthorAvatarURL string
	HTMLURL         string // Optional.
	Short           bool
}

Commit is a component that displays a commit, with an author and title.

func (Commit) Render

func (c Commit) Render() []*html.Node

type CommitID

type CommitID struct {
	SHA     string
	HTMLURL string // Optional.
	OnClick string // Optional.
}

CommitID is a component that displays a commit ID. E.g., "c0de1234".

func (CommitID) Render

func (c CommitID) Render() []*html.Node

type Issue

type Issue struct {
	State   state.Issue
	Title   string
	HTMLURL string
	OnClick string // Optional.
	Short   bool
}

Issue is a component that displays an issue, with a state icon and title.

func (Issue) Render

func (i Issue) Render() []*html.Node

type Reference

type Reference struct {
	Name          string
	Strikethrough bool
}

Reference is a component that displays a reference (branch or tag). E.g., "main".

func (Reference) Render

func (r Reference) Render() []*html.Node

Jump to

Keyboard shortcuts

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