octicons 0.0.0.pre.ba54359 → 0.0.0.pre.cb263c2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -116
- data/lib/build/data.json +1 -1
- data/lib/build/svg/browser-16.svg +3 -0
- data/lib/build/svg/bug-16.svg +3 -0
- data/lib/build/svg/device-camera-16.svg +3 -0
- data/lib/build/svg/internal-repo.svg +1 -0
- data/lib/build/svg/north-star.svg +1 -0
- data/lib/build/svg/repo-clone-16.svg +3 -0
- data/lib/build/svg/repo-pull-16.svg +3 -0
- data/lib/octicons/version.rb +1 -1
- metadata +9 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc5f41e49a6194ea1513a81bf25667c4dafc2c2c492ce6a65da9df2d81a000f2
|
4
|
+
data.tar.gz: 38ca839afd044e4af580acc4ae29d01dc20535f91543e7cb82d0749be20b428a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3ef97127115eaabb1b40e9169eb82129b29094106686385b4f5a11fb05bf4aa4a85eae43b018783e34093095293856b5cb738a6bd9339c45ce33ea484cec064
|
7
|
+
data.tar.gz: b28e52455262e5a249235781ae23fe6399a657becfad09f7c5a79d0c29c2652458915e2116bd823883f1b4e86629a6a2e1b01e48550d34959f006039a95a8b28
|
data/README.md
CHANGED
@@ -1,119 +1,5 @@
|
|
1
|
-
#
|
1
|
+
# octicons
|
2
2
|
|
3
3
|
[](https://rubygems.org/gems/octicons)
|
4
|
-
[](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="M6 3H7V4H6V3V3ZM4 3H5V4H4V3V3ZM2 3H3V4H2V3V3ZM14 13H2V5H14V13V13ZM14 4H8V3H14V4V4ZM15 3C15 2.45 14.55 2 14 2H2C1.45 2 1 2.45 1 3V13C1 13.55 1.45 14 2 14H14C14.55 14 15 13.55 15 13V3V3Z" fill="#1B1F23"/>
|
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="M11.0001 10H14.0001V9H11.0001V8L14.1701 6.97L13.8301 6.03L11.0001 7V6C11.0001 5.45 10.5501 5 10.0001 5V4C10.0001 3.52 9.64008 3.12 9.17008 3.03L10.2001 2H12.0001V1H9.80008L7.80008 3H7.21008L5.20008 1H3.00008V2H4.80008L5.83008 3.03C5.36008 3.12 5.00008 3.51 5.00008 4V5C4.45008 5 4.00008 5.45 4.00008 6V7L1.17008 6.03L0.830078 6.97L4.00008 8V9H1.00008V10H4.00008V11L0.830078 12.03L1.17008 12.97L4.00008 12V13C4.00008 13.55 4.45008 14 5.00008 14H6.00008L7.00008 13V6H8.00008V13L9.00008 14H10.0001C10.5501 14 11.0001 13.55 11.0001 13V12L13.8301 12.97L14.1701 12.03L11.0001 11V10V10ZM9.00008 5H6.00008V4H9.00008V5V5Z" fill="#1B1F23"/>
|
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="M15 3H7C7 2.45 6.55 2 6 2H2C1.45 2 1 2.45 1 3C0.45 3 0 3.45 0 4V13C0 13.55 0.45 14 1 14H15C15.55 14 16 13.55 16 13V4C16 3.45 15.55 3 15 3V3ZM6 5H2V4H6V5V5ZM10.5 12C8.56 12 7 10.44 7 8.5C7 6.56 8.56 5 10.5 5C12.44 5 14 6.56 14 8.5C14 10.44 12.44 12 10.5 12V12ZM13 8.5C13 9.88 11.87 11 10.5 11C9.13 11 8 9.87 8 8.5C8 7.13 9.13 6 10.5 6C11.87 6 13 7.13 13 8.5V8.5Z" fill="#1B1F23"/>
|
3
|
+
</svg>
|
@@ -0,0 +1 @@
|
|
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>
|
@@ -0,0 +1 @@
|
|
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>
|
@@ -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="M15 0H9V7C9 7.55 9.45 8 10 8H11V9H12V8H15C15.55 8 16 7.55 16 7V1C16 0.45 15.55 0 15 0V0ZM11 7H10V6H11V7V7ZM15 7H12V6H15V7V7ZM15 5H11V1H15V5V5ZM4 5H3V4H4V5V5ZM4 3H3V2H4V3V3ZM2 1H8V0H1C0.45 0 0 0.45 0 1V13C0 13.55 0.45 14 1 14H3V16L4.5 14.5L6 16V14H11C11.55 14 12 13.55 12 13V10H2V1V1ZM11 11V13H6V12H3V13H1V11H11V11ZM3 8H4V9H3V8V8ZM4 7H3V6H4V7V7Z" fill="#1B1F23"/>
|
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="M13 8V6H7V4H13V2L16 5L13 8V8ZM4 2H3V3H4V2V2ZM11 7H12V13C12 13.55 11.55 14 11 14H6V16L4.5 14.5L3 16V14H1C0.45 14 0 13.55 0 13V1C0 0.45 0.45 0 1 0H11C11.55 0 12 0.45 12 1V3H11V1H2V10H11V7V7ZM11 11H1V13H3V12H6V13H11V11V11ZM4 6H3V7H4V6V6ZM4 4H3V5H4V4V4ZM3 9H4V8H3V9V9Z" fill="#1B1F23"/>
|
3
|
+
</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.cb263c2
|
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-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -52,7 +52,9 @@ files:
|
|
52
52
|
- lib/build/svg/bookmark.svg
|
53
53
|
- lib/build/svg/briefcase.svg
|
54
54
|
- lib/build/svg/broadcast.svg
|
55
|
+
- lib/build/svg/browser-16.svg
|
55
56
|
- lib/build/svg/browser.svg
|
57
|
+
- lib/build/svg/bug-16.svg
|
56
58
|
- lib/build/svg/bug.svg
|
57
59
|
- lib/build/svg/calendar.svg
|
58
60
|
- lib/build/svg/check.svg
|
@@ -76,6 +78,7 @@ files:
|
|
76
78
|
- lib/build/svg/database.svg
|
77
79
|
- lib/build/svg/dependent.svg
|
78
80
|
- lib/build/svg/desktop-download.svg
|
81
|
+
- lib/build/svg/device-camera-16.svg
|
79
82
|
- lib/build/svg/device-camera-video.svg
|
80
83
|
- lib/build/svg/device-camera.svg
|
81
84
|
- lib/build/svg/device-desktop.svg
|
@@ -125,6 +128,7 @@ files:
|
|
125
128
|
- lib/build/svg/inbox.svg
|
126
129
|
- lib/build/svg/infinity.svg
|
127
130
|
- lib/build/svg/info.svg
|
131
|
+
- lib/build/svg/internal-repo.svg
|
128
132
|
- lib/build/svg/issue-closed.svg
|
129
133
|
- lib/build/svg/issue-opened.svg
|
130
134
|
- lib/build/svg/issue-reopened.svg
|
@@ -159,6 +163,7 @@ files:
|
|
159
163
|
- lib/build/svg/mortar-board.svg
|
160
164
|
- lib/build/svg/mute.svg
|
161
165
|
- lib/build/svg/no-newline.svg
|
166
|
+
- lib/build/svg/north-star.svg
|
162
167
|
- lib/build/svg/note.svg
|
163
168
|
- lib/build/svg/octoface.svg
|
164
169
|
- lib/build/svg/organization.svg
|
@@ -180,9 +185,11 @@ files:
|
|
180
185
|
- lib/build/svg/quote.svg
|
181
186
|
- lib/build/svg/radio-tower.svg
|
182
187
|
- lib/build/svg/reply.svg
|
188
|
+
- lib/build/svg/repo-clone-16.svg
|
183
189
|
- lib/build/svg/repo-clone.svg
|
184
190
|
- lib/build/svg/repo-force-push.svg
|
185
191
|
- lib/build/svg/repo-forked.svg
|
192
|
+
- lib/build/svg/repo-pull-16.svg
|
186
193
|
- lib/build/svg/repo-pull.svg
|
187
194
|
- lib/build/svg/repo-push.svg
|
188
195
|
- lib/build/svg/repo-template-private.svg
|