dmitri.shuralyov.com/html/belt

Update for octicon package rename.

Follows https://github.com/shurcooL/octicon/commit/c42b0e3b24d96976ecac81ef691662777b39ef64.
dmitshur committed 6 years ago commit f7d459c86be0d89cab0b8a0694d6f9a5586cd184
Showing partial commit. Full Commit
Collapse all
belt.go
@@ -6,11 +6,11 @@ import (
	"fmt"
	"strings"

	"dmitri.shuralyov.com/state"
	"github.com/shurcooL/htmlg"
	"github.com/shurcooL/octiconssvg"
	"github.com/shurcooL/octicon"
	"golang.org/x/net/html"
	"golang.org/x/net/html/atom"
)

// Issue is a component that displays an issue, with a state icon and title.
@@ -30,14 +30,14 @@ func (i Issue) Render() []*html.Node {
	if i.Short {
		n.Text = shortTitle(i.Title)
	}
	switch i.State {
	case state.IssueOpen:
		n.Icon = octiconssvg.IssueOpened
		n.Icon = octicon.IssueOpened
		n.IconColor = &rgb{R: 0x6c, G: 0xc6, B: 0x44} // Green.
	case state.IssueClosed:
		n.Icon = octiconssvg.IssueClosed
		n.Icon = octicon.IssueClosed
		n.IconColor = &rgb{R: 0xbd, G: 0x2c, B: 0x00} // Red.
	}
	return n.Render()
}

@@ -58,17 +58,17 @@ func (c Change) Render() []*html.Node {
	if c.Short {
		n.Text = shortTitle(c.Title)
	}
	switch c.State {
	case state.ChangeOpen:
		n.Icon = octiconssvg.GitPullRequest
		n.Icon = octicon.GitPullRequest
		n.IconColor = &rgb{R: 0x6c, G: 0xc6, B: 0x44} // Green.
	case state.ChangeClosed:
		n.Icon = octiconssvg.GitPullRequest
		n.Icon = octicon.GitPullRequest
		n.IconColor = &rgb{R: 0xbd, G: 0x2c, B: 0x00} // Red.
	case state.ChangeMerged:
		n.Icon = octiconssvg.GitMerge
		n.Icon = octicon.GitMerge
		n.IconColor = &rgb{R: 0x6e, G: 0x54, B: 0x94} // Purple.
	}
	return n.Render()
}