octicon

package module
v0.0.0-...-66bff05 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: MIT Imports: 3 Imported by: 14 modules, 20 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

octicon

Go Reference

Package octicon provides GitHub Octicons.

Installation

go get github.com/shurcooL/octicon

License

Documentation

Overview

Package octicon provides GitHub Octicons.

Example
package main

import (
	"io"
	"log"
	"os"

	"github.com/shurcooL/octicon"
	"golang.org/x/net/html"
)

func main() {
	var w io.Writer = os.Stdout // Or, e.g., http.ResponseWriter in your HTTP handler, etc.

	err := html.Render(w, octicon.Alert())
	if err != nil {
		log.Fatalln(err)
	}

}
Output:
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" style="fill: currentColor; vertical-align: top;"><path d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 000 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 00.01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg>

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alert

func Alert() *html.Node

Alert returns an "alert" Octicon SVG node.

func Archive

func Archive() *html.Node

Archive returns an "archive" Octicon SVG node.

func ArrowBoth

func ArrowBoth() *html.Node

ArrowBoth returns an "arrow-both" Octicon SVG node.

func ArrowDown

func ArrowDown() *html.Node

ArrowDown returns an "arrow-down" Octicon SVG node.

func ArrowLeft

func ArrowLeft() *html.Node

ArrowLeft returns an "arrow-left" Octicon SVG node.

func ArrowRight

func ArrowRight() *html.Node

ArrowRight returns an "arrow-right" Octicon SVG node.

func ArrowSmallDown

func ArrowSmallDown() *html.Node

ArrowSmallDown returns an "arrow-small-down" Octicon SVG node.

func ArrowSmallLeft

func ArrowSmallLeft() *html.Node

ArrowSmallLeft returns an "arrow-small-left" Octicon SVG node.

func ArrowSmallRight

func ArrowSmallRight() *html.Node

ArrowSmallRight returns an "arrow-small-right" Octicon SVG node.

func ArrowSmallUp

func ArrowSmallUp() *html.Node

ArrowSmallUp returns an "arrow-small-up" Octicon SVG node.

func ArrowUp

func ArrowUp() *html.Node

ArrowUp returns an "arrow-up" Octicon SVG node.

func Beaker

func Beaker() *html.Node

Beaker returns an "beaker" Octicon SVG node.

func Bell

func Bell() *html.Node

Bell returns an "bell" Octicon SVG node.

func Bold

func Bold() *html.Node

Bold returns an "bold" Octicon SVG node.

func Book

func Book() *html.Node

Book returns an "book" Octicon SVG node.

func Bookmark

func Bookmark() *html.Node

Bookmark returns an "bookmark" Octicon SVG node.

func Briefcase

func Briefcase() *html.Node

Briefcase returns an "briefcase" Octicon SVG node.

func Broadcast

func Broadcast() *html.Node

Broadcast returns an "broadcast" Octicon SVG node.

func Browser

func Browser() *html.Node

Browser returns an "browser" Octicon SVG node.

func Bug

func Bug() *html.Node

Bug returns an "bug" Octicon SVG node.

func Calendar

func Calendar() *html.Node

Calendar returns an "calendar" Octicon SVG node.

func Check

func Check() *html.Node

Check returns an "check" Octicon SVG node.

func Checklist

func Checklist() *html.Node

Checklist returns an "checklist" Octicon SVG node.

func ChevronDown

func ChevronDown() *html.Node

ChevronDown returns an "chevron-down" Octicon SVG node.

func ChevronLeft

func ChevronLeft() *html.Node

ChevronLeft returns an "chevron-left" Octicon SVG node.

func ChevronRight

func ChevronRight() *html.Node

ChevronRight returns an "chevron-right" Octicon SVG node.

func ChevronUp

func ChevronUp() *html.Node

ChevronUp returns an "chevron-up" Octicon SVG node.

func CircleSlash

func CircleSlash() *html.Node

CircleSlash returns an "circle-slash" Octicon SVG node.

func CircuitBoard

func CircuitBoard() *html.Node

CircuitBoard returns an "circuit-board" Octicon SVG node.

func Clippy

func Clippy() *html.Node

Clippy returns an "clippy" Octicon SVG node.

func Clock

func Clock() *html.Node

Clock returns an "clock" Octicon SVG node.

func CloudDownload

func CloudDownload() *html.Node

CloudDownload returns an "cloud-download" Octicon SVG node.

func CloudUpload

func CloudUpload() *html.Node

CloudUpload returns an "cloud-upload" Octicon SVG node.

func Code

func Code() *html.Node

Code returns an "code" Octicon SVG node.

func Comment

func Comment() *html.Node

Comment returns an "comment" Octicon SVG node.

func CommentDiscussion

func CommentDiscussion() *html.Node

CommentDiscussion returns an "comment-discussion" Octicon SVG node.

func CreditCard

func CreditCard() *html.Node

CreditCard returns an "credit-card" Octicon SVG node.

func Dash

func Dash() *html.Node

Dash returns an "dash" Octicon SVG node.

func Dashboard

func Dashboard() *html.Node

Dashboard returns an "dashboard" Octicon SVG node.

func Database

func Database() *html.Node

Database returns an "database" Octicon SVG node.

func Dependent

func Dependent() *html.Node

Dependent returns an "dependent" Octicon SVG node.

func DesktopDownload

func DesktopDownload() *html.Node

DesktopDownload returns an "desktop-download" Octicon SVG node.

func DeviceCamera

func DeviceCamera() *html.Node

DeviceCamera returns an "device-camera" Octicon SVG node.

func DeviceCameraVideo

func DeviceCameraVideo() *html.Node

DeviceCameraVideo returns an "device-camera-video" Octicon SVG node.

func DeviceDesktop

func DeviceDesktop() *html.Node

DeviceDesktop returns an "device-desktop" Octicon SVG node.

func DeviceMobile

func DeviceMobile() *html.Node

DeviceMobile returns an "device-mobile" Octicon SVG node.

func Diff

func Diff() *html.Node

Diff returns an "diff" Octicon SVG node.

func DiffAdded

func DiffAdded() *html.Node

DiffAdded returns an "diff-added" Octicon SVG node.

func DiffIgnored

func DiffIgnored() *html.Node

DiffIgnored returns an "diff-ignored" Octicon SVG node.

func DiffModified

func DiffModified() *html.Node

DiffModified returns an "diff-modified" Octicon SVG node.

func DiffRemoved

func DiffRemoved() *html.Node

DiffRemoved returns an "diff-removed" Octicon SVG node.

func DiffRenamed

func DiffRenamed() *html.Node

DiffRenamed returns an "diff-renamed" Octicon SVG node.

func Ellipsis

func Ellipsis() *html.Node

Ellipsis returns an "ellipsis" Octicon SVG node.

func Eye

func Eye() *html.Node

Eye returns an "eye" Octicon SVG node.

func EyeClosed

func EyeClosed() *html.Node

EyeClosed returns an "eye-closed" Octicon SVG node.

func File

func File() *html.Node

File returns an "file" Octicon SVG node.

func FileBinary

func FileBinary() *html.Node

FileBinary returns an "file-binary" Octicon SVG node.

func FileCode

func FileCode() *html.Node

FileCode returns an "file-code" Octicon SVG node.

func FileDirectory

func FileDirectory() *html.Node

FileDirectory returns an "file-directory" Octicon SVG node.

func FileMedia

func FileMedia() *html.Node

FileMedia returns an "file-media" Octicon SVG node.

func FilePdf

func FilePdf() *html.Node

FilePdf returns an "file-pdf" Octicon SVG node.

func FileSubmodule

func FileSubmodule() *html.Node

FileSubmodule returns an "file-submodule" Octicon SVG node.

func FileSymlinkDirectory

func FileSymlinkDirectory() *html.Node

FileSymlinkDirectory returns an "file-symlink-directory" Octicon SVG node.

func FileSymlinkFile

func FileSymlinkFile() *html.Node

FileSymlinkFile returns an "file-symlink-file" Octicon SVG node.

func FileZip

func FileZip() *html.Node

FileZip returns an "file-zip" Octicon SVG node.

func Flame

func Flame() *html.Node

Flame returns an "flame" Octicon SVG node.

func Fold

func Fold() *html.Node

Fold returns an "fold" Octicon SVG node.

func FoldDown

func FoldDown() *html.Node

FoldDown returns an "fold-down" Octicon SVG node.

func FoldUp

func FoldUp() *html.Node

FoldUp returns an "fold-up" Octicon SVG node.

func Gear

func Gear() *html.Node

Gear returns an "gear" Octicon SVG node.

func Gift

func Gift() *html.Node

Gift returns an "gift" Octicon SVG node.

func Gist

func Gist() *html.Node

Gist returns an "gist" Octicon SVG node.

func GistSecret

func GistSecret() *html.Node

GistSecret returns an "gist-secret" Octicon SVG node.

func GitBranch

func GitBranch() *html.Node

GitBranch returns an "git-branch" Octicon SVG node.

func GitCommit

func GitCommit() *html.Node

GitCommit returns an "git-commit" Octicon SVG node.

func GitCompare

func GitCompare() *html.Node

GitCompare returns an "git-compare" Octicon SVG node.

func GitHubAction

func GitHubAction() *html.Node

GitHubAction returns an "github-action" Octicon SVG node.

func GitMerge

func GitMerge() *html.Node

GitMerge returns an "git-merge" Octicon SVG node.

func GitPullRequest

func GitPullRequest() *html.Node

GitPullRequest returns an "git-pull-request" Octicon SVG node.

func Globe

func Globe() *html.Node

Globe returns an "globe" Octicon SVG node.

func Grabber

func Grabber() *html.Node

Grabber returns an "grabber" Octicon SVG node.

func Graph

func Graph() *html.Node

Graph returns an "graph" Octicon SVG node.

func Heart

func Heart() *html.Node

Heart returns an "heart" Octicon SVG node.

func History

func History() *html.Node

History returns an "history" Octicon SVG node.

func Home

func Home() *html.Node

Home returns an "home" Octicon SVG node.

func HorizontalRule

func HorizontalRule() *html.Node

HorizontalRule returns an "horizontal-rule" Octicon SVG node.

func Hubot

func Hubot() *html.Node

Hubot returns an "hubot" Octicon SVG node.

func Icon

func Icon(name string) *html.Node

Icon returns the named Octicon SVG node. It returns nil if name is not a valid Octicon symbol name.

func Inbox

func Inbox() *html.Node

Inbox returns an "inbox" Octicon SVG node.

func Info

func Info() *html.Node

Info returns an "info" Octicon SVG node.

func IssueClosed

func IssueClosed() *html.Node

IssueClosed returns an "issue-closed" Octicon SVG node.

func IssueOpened

func IssueOpened() *html.Node

IssueOpened returns an "issue-opened" Octicon SVG node.

func IssueReopened

func IssueReopened() *html.Node

IssueReopened returns an "issue-reopened" Octicon SVG node.

func Italic

func Italic() *html.Node

Italic returns an "italic" Octicon SVG node.

func Jersey

func Jersey() *html.Node

Jersey returns an "jersey" Octicon SVG node.

func KebabHorizontal

func KebabHorizontal() *html.Node

KebabHorizontal returns an "kebab-horizontal" Octicon SVG node.

func KebabVertical

func KebabVertical() *html.Node

KebabVertical returns an "kebab-vertical" Octicon SVG node.

func Key

func Key() *html.Node

Key returns an "key" Octicon SVG node.

func Keyboard

func Keyboard() *html.Node

Keyboard returns an "keyboard" Octicon SVG node.

func Law

func Law() *html.Node

Law returns an "law" Octicon SVG node.

func LightBulb

func LightBulb() *html.Node

LightBulb returns an "light-bulb" Octicon SVG node.

func Link() *html.Node

Link returns an "link" Octicon SVG node.

func LinkExternal

func LinkExternal() *html.Node

LinkExternal returns an "link-external" Octicon SVG node.

func ListOrdered

func ListOrdered() *html.Node

ListOrdered returns an "list-ordered" Octicon SVG node.

func ListUnordered

func ListUnordered() *html.Node

ListUnordered returns an "list-unordered" Octicon SVG node.

func Location

func Location() *html.Node

Location returns an "location" Octicon SVG node.

func Lock

func Lock() *html.Node

Lock returns an "lock" Octicon SVG node.

func LogoGist

func LogoGist() *html.Node

LogoGist returns an "logo-gist" Octicon SVG node.

func LogoGitHub

func LogoGitHub() *html.Node

LogoGitHub returns an "logo-github" Octicon SVG node.

func Mail

func Mail() *html.Node

Mail returns an "mail" Octicon SVG node.

func MailRead

func MailRead() *html.Node

MailRead returns an "mail-read" Octicon SVG node.

func MarkGitHub

func MarkGitHub() *html.Node

MarkGitHub returns an "mark-github" Octicon SVG node.

func Markdown

func Markdown() *html.Node

Markdown returns an "markdown" Octicon SVG node.

func Megaphone

func Megaphone() *html.Node

Megaphone returns an "megaphone" Octicon SVG node.

func Mention

func Mention() *html.Node

Mention returns an "mention" Octicon SVG node.

func Milestone

func Milestone() *html.Node

Milestone returns an "milestone" Octicon SVG node.

func Mirror

func Mirror() *html.Node

Mirror returns an "mirror" Octicon SVG node.

func MortarBoard

func MortarBoard() *html.Node

MortarBoard returns an "mortar-board" Octicon SVG node.

func Mute

func Mute() *html.Node

Mute returns an "mute" Octicon SVG node.

func NoNewline

func NoNewline() *html.Node

NoNewline returns an "no-newline" Octicon SVG node.

func Note

func Note() *html.Node

Note returns an "note" Octicon SVG node.

func Octoface

func Octoface() *html.Node

Octoface returns an "octoface" Octicon SVG node.

func Organization

func Organization() *html.Node

Organization returns an "organization" Octicon SVG node.

func Package

func Package() *html.Node

Package returns an "package" Octicon SVG node.

func Paintcan

func Paintcan() *html.Node

Paintcan returns an "paintcan" Octicon SVG node.

func Pencil

func Pencil() *html.Node

Pencil returns an "pencil" Octicon SVG node.

func Person

func Person() *html.Node

Person returns an "person" Octicon SVG node.

func Pin

func Pin() *html.Node

Pin returns an "pin" Octicon SVG node.

func Play

func Play() *html.Node

Play returns an "play" Octicon SVG node.

func Plug

func Plug() *html.Node

Plug returns an "plug" Octicon SVG node.

func Plus

func Plus() *html.Node

Plus returns an "plus" Octicon SVG node.

func PlusSmall

func PlusSmall() *html.Node

PlusSmall returns an "plus-small" Octicon SVG node.

func PrimitiveDot

func PrimitiveDot() *html.Node

PrimitiveDot returns an "primitive-dot" Octicon SVG node.

func PrimitiveDotStroke

func PrimitiveDotStroke() *html.Node

PrimitiveDotStroke returns an "primitive-dot-stroke" Octicon SVG node.

func PrimitiveSquare

func PrimitiveSquare() *html.Node

PrimitiveSquare returns an "primitive-square" Octicon SVG node.

func Project

func Project() *html.Node

Project returns an "project" Octicon SVG node.

func Pulse

func Pulse() *html.Node

Pulse returns an "pulse" Octicon SVG node.

func Question

func Question() *html.Node

Question returns an "question" Octicon SVG node.

func Quote

func Quote() *html.Node

Quote returns an "quote" Octicon SVG node.

func RSS

func RSS() *html.Node

RSS returns an "rss" Octicon SVG node.

func RadioTower

func RadioTower() *html.Node

RadioTower returns an "radio-tower" Octicon SVG node.

func Reply

func Reply() *html.Node

Reply returns an "reply" Octicon SVG node.

func Repo

func Repo() *html.Node

Repo returns an "repo" Octicon SVG node.

func RepoClone

func RepoClone() *html.Node

RepoClone returns an "repo-clone" Octicon SVG node.

func RepoForcePush

func RepoForcePush() *html.Node

RepoForcePush returns an "repo-force-push" Octicon SVG node.

func RepoForked

func RepoForked() *html.Node

RepoForked returns an "repo-forked" Octicon SVG node.

func RepoPull

func RepoPull() *html.Node

RepoPull returns an "repo-pull" Octicon SVG node.

func RepoPush

func RepoPush() *html.Node

RepoPush returns an "repo-push" Octicon SVG node.

func RepoTemplate

func RepoTemplate() *html.Node

RepoTemplate returns an "repo-template" Octicon SVG node.

func RepoTemplatePrivate

func RepoTemplatePrivate() *html.Node

RepoTemplatePrivate returns an "repo-template-private" Octicon SVG node.

func Report

func Report() *html.Node

Report returns an "report" Octicon SVG node.

func RequestChanges

func RequestChanges() *html.Node

RequestChanges returns an "request-changes" Octicon SVG node.

func Rocket

func Rocket() *html.Node

Rocket returns an "rocket" Octicon SVG node.

func Ruby

func Ruby() *html.Node

Ruby returns an "ruby" Octicon SVG node.

func Saved

func Saved() *html.Node

Saved returns an "saved" Octicon SVG node.

func ScreenFull

func ScreenFull() *html.Node

ScreenFull returns an "screen-full" Octicon SVG node.

func ScreenNormal

func ScreenNormal() *html.Node

ScreenNormal returns an "screen-normal" Octicon SVG node.

func Search() *html.Node

Search returns an "search" Octicon SVG node.

func Server

func Server() *html.Node

Server returns an "server" Octicon SVG node.

func SetSize

func SetSize(icon *html.Node, size int) *html.Node

SetSize sets size of icon, and returns a reference to it.

Example
package main

import (
	"io"
	"log"
	"os"

	"github.com/shurcooL/octicon"
	"golang.org/x/net/html"
)

func main() {
	var w io.Writer = os.Stdout // Or, e.g., http.ResponseWriter in your HTTP handler, etc.

	err := html.Render(w, octicon.SetSize(octicon.MarkGitHub(), 24))
	if err != nil {
		log.Fatalln(err)
	}

}
Output:
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16" style="fill: currentColor; vertical-align: top;"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg>

func Settings

func Settings() *html.Node

Settings returns an "settings" Octicon SVG node.

func Shield

func Shield() *html.Node

Shield returns an "shield" Octicon SVG node.

func ShieldCheck

func ShieldCheck() *html.Node

ShieldCheck returns an "shield-check" Octicon SVG node.

func ShieldLock

func ShieldLock() *html.Node

ShieldLock returns an "shield-lock" Octicon SVG node.

func ShieldX

func ShieldX() *html.Node

ShieldX returns an "shield-x" Octicon SVG node.

func SignIn

func SignIn() *html.Node

SignIn returns an "sign-in" Octicon SVG node.

func SignOut

func SignOut() *html.Node

SignOut returns an "sign-out" Octicon SVG node.

func Skip

func Skip() *html.Node

Skip returns an "skip" Octicon SVG node.

func Smiley

func Smiley() *html.Node

Smiley returns an "smiley" Octicon SVG node.

func Squirrel

func Squirrel() *html.Node

Squirrel returns an "squirrel" Octicon SVG node.

func Star

func Star() *html.Node

Star returns an "star" Octicon SVG node.

func Stop

func Stop() *html.Node

Stop returns an "stop" Octicon SVG node.

func Sync

func Sync() *html.Node

Sync returns an "sync" Octicon SVG node.

func Tag

func Tag() *html.Node

Tag returns an "tag" Octicon SVG node.

func Tasklist

func Tasklist() *html.Node

Tasklist returns an "tasklist" Octicon SVG node.

func Telescope

func Telescope() *html.Node

Telescope returns an "telescope" Octicon SVG node.

func Terminal

func Terminal() *html.Node

Terminal returns an "terminal" Octicon SVG node.

func TextSize

func TextSize() *html.Node

TextSize returns an "text-size" Octicon SVG node.

func ThreeBars

func ThreeBars() *html.Node

ThreeBars returns an "three-bars" Octicon SVG node.

func Thumbsdown

func Thumbsdown() *html.Node

Thumbsdown returns an "thumbsdown" Octicon SVG node.

func Thumbsup

func Thumbsup() *html.Node

Thumbsup returns an "thumbsup" Octicon SVG node.

func Tools

func Tools() *html.Node

Tools returns an "tools" Octicon SVG node.

func Trashcan

func Trashcan() *html.Node

Trashcan returns an "trashcan" Octicon SVG node.

func TriangleDown

func TriangleDown() *html.Node

TriangleDown returns an "triangle-down" Octicon SVG node.

func TriangleLeft

func TriangleLeft() *html.Node

TriangleLeft returns an "triangle-left" Octicon SVG node.

func TriangleRight

func TriangleRight() *html.Node

TriangleRight returns an "triangle-right" Octicon SVG node.

func TriangleUp

func TriangleUp() *html.Node

TriangleUp returns an "triangle-up" Octicon SVG node.

func Unfold

func Unfold() *html.Node

Unfold returns an "unfold" Octicon SVG node.

func Unmute

func Unmute() *html.Node

Unmute returns an "unmute" Octicon SVG node.

func Unsaved

func Unsaved() *html.Node

Unsaved returns an "unsaved" Octicon SVG node.

func Unverified

func Unverified() *html.Node

Unverified returns an "unverified" Octicon SVG node.

func Verified

func Verified() *html.Node

Verified returns an "verified" Octicon SVG node.

func Versions

func Versions() *html.Node

Versions returns an "versions" Octicon SVG node.

func Watch

func Watch() *html.Node

Watch returns an "watch" Octicon SVG node.

func X

func X() *html.Node

X returns an "x" Octicon SVG node.

func Zap

func Zap() *html.Node

Zap returns an "zap" Octicon SVG node.

Types

This section is empty.

Jump to

Keyboard shortcuts

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