octicons 0.0.0.pre.19403cb → 0.0.0.pre.312033e
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -116
- data/lib/build/data.json +1 -1
- data/lib/build/svg/git-pull-reque-16.svg +3 -0
- data/lib/build/svg/git-pull-reques-16.svg +3 -0
- data/lib/build/svg/git-pull-request-16.svg +3 -0
- data/lib/build/svg/internal-repo.svg +1 -3
- data/lib/build/svg/north-star.svg +1 -3
- data/lib/octicons/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 471fc042c7e74e1f4cda3dc2ec6c87f04f73d2d9e0c1998d15fcc2116568a9e4
|
4
|
+
data.tar.gz: 1f698b662179c2c93fe997e73aefc2fb5f544cebe4d2c2a2e7baf3cbe1e5f14a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e5cac57005e0d334bb0fa99e1e82b30d8de2cb3255d3687b500e6ac53d81910c207df61b7fb2450a634cc6a55063a206c60cfecf9d4e5528278401973e515a8
|
7
|
+
data.tar.gz: 24b59580330eb3081f55f5403cd5ce632f173c10c19926cc7bf3965c40057fcb2336366d319ea21b5150f4b493c7480fb23cfc62c42ce937ed54861eb44554bd
|
data/README.md
CHANGED
@@ -1,119 +1,5 @@
|
|
1
|
-
#
|
1
|
+
# octicons
|
2
2
|
|
3
3
|
[![Gem version](https://img.shields.io/gem/v/octicons.svg)](https://rubygems.org/gems/octicons)
|
4
|
-
[![Build Status](https://travis-ci.org/primer/octicons.svg?branch=master)](https://travis-ci.org/primer/octicons)
|
5
4
|
|
6
|
-
|
7
|
-
|
8
|
-
## Install
|
9
|
-
|
10
|
-
Add this to your `Gemfile`
|
11
|
-
|
12
|
-
```rb
|
13
|
-
gem 'octicons'
|
14
|
-
```
|
15
|
-
|
16
|
-
Then `bundle install`.
|
17
|
-
|
18
|
-
## Usage
|
19
|
-
|
20
|
-
```rb
|
21
|
-
require 'octicons'
|
22
|
-
icon = Octicons::Octicon.new("x")
|
23
|
-
icon.to_svg
|
24
|
-
# <svg class="octicon octicon-x" viewBox="0 0 16 16" width="16" height="16" version="1.1" "aria-hidden"="true"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
|
25
|
-
```
|
26
|
-
|
27
|
-
## Documentation
|
28
|
-
|
29
|
-
The `Octicon` class takes two arguments. The first is the symbol of the icon, and the second is a hash of arguments representing html attributes
|
30
|
-
|
31
|
-
#### `symbol` _(required)_
|
32
|
-
|
33
|
-
This is the name of the octicon you want to use. For example `alert`. [Full list of icons][octicons-docs]
|
34
|
-
|
35
|
-
#### Options
|
36
|
-
|
37
|
-
* `:height` - When setting the height to a number, the icon will scale to that size. For example, passing `32`, will calculate the width based on the icon's natural size.
|
38
|
-
* `:width` - When setting the width to a number, the icon will scale to that size. For example, passing `32`, will calculate the width based on the icon's natural size.
|
39
|
-
|
40
|
-
If both `:width, :height` are passed into the options hash, then the icon will be sized exactly at those dimensions.
|
41
|
-
|
42
|
-
#### Attributes
|
43
|
-
|
44
|
-
Once initialized, you can read a few properties from the icon.
|
45
|
-
|
46
|
-
##### `symbol`
|
47
|
-
|
48
|
-
Returns the string of the symbol name
|
49
|
-
|
50
|
-
```rb
|
51
|
-
icon = Octicons::Octicon.new("x")
|
52
|
-
icon.symbol
|
53
|
-
# "x"
|
54
|
-
```
|
55
|
-
|
56
|
-
##### `path`
|
57
|
-
|
58
|
-
Path returns the string representation of the path of the icon.
|
59
|
-
|
60
|
-
```rb
|
61
|
-
icon = Octicons::Octicon.new("x")
|
62
|
-
icon.path
|
63
|
-
# <path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path>
|
64
|
-
```
|
65
|
-
|
66
|
-
##### `options`
|
67
|
-
|
68
|
-
This is a hash of all the `options` that will be added to the output tag.
|
69
|
-
|
70
|
-
```rb
|
71
|
-
icon = Octicons::Octicon.new("x")
|
72
|
-
icon.options
|
73
|
-
# {:class=>"octicon octicon-x", :viewBox=>"0 0 12 16", :version=>"1.1", :width=>12, :height=>16, :"aria-hidden"=>"true"}
|
74
|
-
```
|
75
|
-
|
76
|
-
##### `width`
|
77
|
-
|
78
|
-
Width is the icon's true width. Based on the svg view box width. _Note, this doesn't change if you scale it up with size options, it only is the natural width of the icon_
|
79
|
-
|
80
|
-
##### `height`
|
81
|
-
|
82
|
-
Height is the icon's true height. Based on the svg view box height. _Note, this doesn't change if you scale it up with size options, it only is the natural height of the icon_
|
83
|
-
|
84
|
-
##### `keywords`
|
85
|
-
|
86
|
-
Returns an array of keywords for the icon. The data comes from the [data file in lib](../data.json). Consider contributing more aliases for the icons.
|
87
|
-
|
88
|
-
```rb
|
89
|
-
icon = Octicons::Octicon.new("x")
|
90
|
-
icon.keywords
|
91
|
-
# ["remove", "close", "delete"]
|
92
|
-
```
|
93
|
-
|
94
|
-
#### Methods
|
95
|
-
|
96
|
-
##### `to_svg`
|
97
|
-
|
98
|
-
Returns a string of the svg tag
|
99
|
-
|
100
|
-
```rb
|
101
|
-
icon = Octicons::Octicon.new("x")
|
102
|
-
icon.to_svg
|
103
|
-
# <svg class="octicon octicon-x" viewBox="0 0 16 16" width="16" height="16" version="1.1" "aria-hidden"="true"><path d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48z"></path></svg>
|
104
|
-
```
|
105
|
-
|
106
|
-
## Documentation
|
107
|
-
|
108
|
-
For a full list of options available, see the [octicons_gem documentation](../octicons_gem/#documentation)
|
109
|
-
|
110
|
-
## License
|
111
|
-
|
112
|
-
(c) GitHub, Inc.
|
113
|
-
|
114
|
-
When using the GitHub logos, be sure to follow the [GitHub logo guidelines](https://github.com/logos).
|
115
|
-
|
116
|
-
[MIT](./LICENSE)
|
117
|
-
|
118
|
-
[octicons]: https://github.com/primer/octicons
|
119
|
-
[octicons-docs]: https://octicons.github.com/
|
5
|
+
See https://primer.style/octicons/packages/ruby
|
data/lib/build/data.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"alert":{"name":"alert","keywords":["warning","triangle","exclamation","point"],"width":16,"height":16,"path":"
|
1
|
+
{"alert":{"name":"alert","keywords":["warning","triangle","exclamation","point"],"width":16,"height":16,"path":"
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.17677 3.07322L9.57322 0.676753C9.73071 0.51926 9.99999 0.630802 9.99999 0.853529V5.64642C9.99999 5.86915 9.73071 5.98069 9.57322 5.8232L7.17677 3.42677C7.07914 3.32914 7.07914 3.17085 7.17677 3.07322ZM3.25 2.5C2.83579 2.5 2.5 2.83579 2.5 3.25C2.5 3.66421 2.83579 4 3.25 4C3.66421 4 4 3.66421 4 3.25C4 2.83579 3.66421 2.5 3.25 2.5ZM1 3.25C1 2.00736 2.00736 1 3.25 1C4.49264 1 5.5 2.00736 5.5 3.25C5.5 4.22966 4.87389 5.06309 4 5.37197V10.628C4.87389 10.9369 5.5 11.7703 5.5 12.75C5.5 13.9926 4.49264 15 3.25 15C2.00736 15 1 13.9926 1 12.75C1 11.7703 1.62611 10.9369 2.5 10.628V5.37197C1.62611 5.06309 1 4.22966 1 3.25ZM11 2.5H10V4H11C11.5523 4 12 4.44772 12 5V10.628C11.1261 10.9369 10.5 11.7703 10.5 12.75C10.5 13.9926 11.5074 15 12.75 15C13.9926 15 15 13.9926 15 12.75C15 11.7703 14.3739 10.9369 13.5 10.628V5C13.5 3.61929 12.3807 2.5 11 2.5ZM2.5 12.75C2.5 12.3358 2.83579 12 3.25 12C3.66421 12 4 12.3358 4 12.75C4 13.1642 3.66421 13.5 3.25 13.5C2.83579 13.5 2.5 13.1642 2.5 12.75ZM12 12.75C12 12.3358 12.3358 12 12.75 12C13.1642 12 13.5 12.3358 13.5 12.75C13.5 13.1642 13.1642 13.5 12.75 13.5C12.3358 13.5 12 13.1642 12 12.75Z" fill="black"/>
|
3
|
+
</svg>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.17677 3.07322L9.57322 0.676753C9.73071 0.51926 9.99999 0.630802 9.99999 0.853529V5.64642C9.99999 5.86915 9.73071 5.98069 9.57322 5.8232L7.17677 3.42677C7.07914 3.32914 7.07914 3.17085 7.17677 3.07322ZM3.25 2.5C2.83579 2.5 2.5 2.83579 2.5 3.25C2.5 3.66421 2.83579 4 3.25 4C3.66421 4 4 3.66421 4 3.25C4 2.83579 3.66421 2.5 3.25 2.5ZM1 3.25C1 2.00736 2.00736 1 3.25 1C4.49264 1 5.5 2.00736 5.5 3.25C5.5 4.22966 4.87389 5.06309 4 5.37197V10.628C4.87389 10.9369 5.5 11.7703 5.5 12.75C5.5 13.9926 4.49264 15 3.25 15C2.00736 15 1 13.9926 1 12.75C1 11.7703 1.62611 10.9369 2.5 10.628V5.37197C1.62611 5.06309 1 4.22966 1 3.25ZM11 2.5H10V4H11C11.5523 4 12 4.44772 12 5V10.628C11.1261 10.9369 10.5 11.7703 10.5 12.75C10.5 13.9926 11.5074 15 12.75 15C13.9926 15 15 13.9926 15 12.75C15 11.7703 14.3739 10.9369 13.5 10.628V5C13.5 3.61929 12.3807 2.5 11 2.5ZM2.5 12.75C2.5 12.3358 2.83579 12 3.25 12C3.66421 12 4 12.3358 4 12.75C4 13.1642 3.66421 13.5 3.25 13.5C2.83579 13.5 2.5 13.1642 2.5 12.75ZM12 12.75C12 12.3358 12.3358 12 12.75 12C13.1642 12 13.5 12.3358 13.5 12.75C13.5 13.1642 13.1642 13.5 12.75 13.5C12.3358 13.5 12 13.1642 12 12.75Z" fill="black"/>
|
3
|
+
</svg>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.17677 3.07322L9.57322 0.676753C9.73071 0.51926 9.99999 0.630802 9.99999 0.853529V5.64642C9.99999 5.86915 9.73071 5.98069 9.57322 5.8232L7.17677 3.42677C7.07914 3.32914 7.07914 3.17085 7.17677 3.07322ZM3.25 2.5C2.83579 2.5 2.5 2.83579 2.5 3.25C2.5 3.66421 2.83579 4 3.25 4C3.66421 4 4 3.66421 4 3.25C4 2.83579 3.66421 2.5 3.25 2.5ZM1 3.25C1 2.00736 2.00736 1 3.25 1C4.49264 1 5.5 2.00736 5.5 3.25C5.5 4.22966 4.87389 5.06309 4 5.37197V10.628C4.87389 10.9369 5.5 11.7703 5.5 12.75C5.5 13.9926 4.49264 15 3.25 15C2.00736 15 1 13.9926 1 12.75C1 11.7703 1.62611 10.9369 2.5 10.628V5.37197C1.62611 5.06309 1 4.22966 1 3.25ZM11 2.5H10V4H11C11.5523 4 12 4.44772 12 5V10.628C11.1261 10.9369 10.5 11.7703 10.5 12.75C10.5 13.9926 11.5074 15 12.75 15C13.9926 15 15 13.9926 15 12.75C15 11.7703 14.3739 10.9369 13.5 10.628V5C13.5 3.61929 12.3807 2.5 11 2.5ZM2.5 12.75C2.5 12.3358 2.83579 12 3.25 12C3.66421 12 4 12.3358 4 12.75C4 13.1642 3.66421 13.5 3.25 13.5C2.83579 13.5 2.5 13.1642 2.5 12.75ZM12 12.75C12 12.3358 12.3358 12 12.75 12C13.1642 12 13.5 12.3358 13.5 12.75C13.5 13.1642 13.1642 13.5 12.75 13.5C12.3358 13.5 12 13.1642 12 12.75Z" fill="black"/>
|
3
|
+
</svg>
|
@@ -1,3 +1 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="16" viewBox="0 0 13 16" >
|
2
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 0H9v1a1 1 0 00-1 1H7a1 1 0 00-1 1v1H1c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h1v1l1-.5 1 .5v-1h4c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1H7V3h1a1 1 0 001-1h1a1 1 0 001 1h1v13h1V3a1 1 0 00-1-1h-1a1 1 0 00-1-1V0zM8 12H2V5h6v7zm-7 1h1v1H1v-1zm7 0v1H4v-1h4zm3-9h-1v2h1V4zm0 3h-1v2h1V7zm0 3h-1v2h1v-2zm0 3h-1v2h1v-2zm-7-2H3v-1h1v1zm0-5H3v1h1V6zm0 2H3v1h1V8z"/>
|
3
|
-
</svg>
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="16" viewBox="0 0 13 16"><path fill-rule="evenodd" d="M10 0H9v1a1 1 0 00-1 1H7a1 1 0 00-1 1v1H1c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h1v1l1-.5 1 .5v-1h4c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1H7V3h1a1 1 0 001-1h1a1 1 0 001 1h1v13h1V3a1 1 0 00-1-1h-1a1 1 0 00-1-1V0zM8 12H2V5h6v7zm-7 1h1v1H1v-1zm7 0v1H4v-1h4zm3-9h-1v2h1V4zm0 3h-1v2h1V7zm0 3h-1v2h1v-2zm0 3h-1v2h1v-2zm-7-2H3v-1h1v1zm0-5H3v1h1V6zm0 2H3v1h1V8z"/></svg>
|
@@ -1,3 +1 @@
|
|
1
|
-
<svg width="16" height="16" viewBox="0 0 16 16"
|
2
|
-
<path d="M8.5 0.75C8.5 0.335786 8.16421 0 7.75 0C7.33579 0 7 0.335786 7 0.75V5.93933L4.39125 3.33058C4.09836 3.03768 3.62348 3.03768 3.33059 3.33058C3.03769 3.62347 3.0377 4.09835 3.33059 4.39124L5.93935 7H0.75C0.335787 7 0 7.33579 0 7.75C0 8.16421 0.335787 8.5 0.75 8.5H5.93936L3.33059 11.1088C3.0377 11.4017 3.0377 11.8765 3.33059 12.1694C3.62349 12.4623 4.09836 12.4623 4.39125 12.1694L7 9.56068V14.75C7 15.1642 7.33579 15.5 7.75 15.5C8.16421 15.5 8.5 15.1642 8.5 14.75V9.56065L11.1088 12.1694C11.4017 12.4623 11.8765 12.4623 12.1694 12.1694C12.4623 11.8765 12.4623 11.4016 12.1694 11.1088L9.56067 8.5H14.75C15.1642 8.5 15.5 8.16421 15.5 7.75C15.5 7.33579 15.1642 7 14.75 7H9.56068L12.1694 4.39125C12.4623 4.09836 12.4623 3.62349 12.1694 3.33059C11.8765 3.0377 11.4017 3.0377 11.1088 3.33059L8.5 5.93936V0.75Z" />
|
3
|
-
</svg>
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M8.5.75a.75.75 0 00-1.5 0v5.19L4.391 3.33a.75.75 0 10-1.06 1.061L5.939 7H.75a.75.75 0 000 1.5h5.19l-2.61 2.609a.75.75 0 101.061 1.06L7 9.561v5.189a.75.75 0 001.5 0V9.56l2.609 2.61a.75.75 0 101.06-1.061L9.561 8.5h5.189a.75.75 0 000-1.5H9.56l2.61-2.609a.75.75 0 00-1.061-1.06L8.5 5.939V.75z"/></svg>
|
data/lib/octicons/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octicons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.0.pre.
|
4
|
+
version: 0.0.0.pre.312033e
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -111,6 +111,9 @@ files:
|
|
111
111
|
- lib/build/svg/git-commit.svg
|
112
112
|
- lib/build/svg/git-compare.svg
|
113
113
|
- lib/build/svg/git-merge.svg
|
114
|
+
- lib/build/svg/git-pull-reque-16.svg
|
115
|
+
- lib/build/svg/git-pull-reques-16.svg
|
116
|
+
- lib/build/svg/git-pull-request-16.svg
|
114
117
|
- lib/build/svg/git-pull-request.svg
|
115
118
|
- lib/build/svg/github-action.svg
|
116
119
|
- lib/build/svg/globe.svg
|