octicons 0.0.0.pre.162f0a7 → 0.0.0.pre.270a30a
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/briefcase-16.svg +3 -0
- data/lib/build/svg/internal-repo.svg +1 -0
- data/lib/build/svg/north-star.svg +1 -0
- 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: fb8333b004ff1a27eea909756c2c7845b36e7f4a270d769e1d7a1c823e7273cb
|
4
|
+
data.tar.gz: 767b3a9e198ec30422b15ea7d40710d3aa5f752dc281e863fa774a2b287140d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4fe3619a1233c7a3e64a49d8fd8e59d2cb00c011c0cdbd45863132dc8a6a61bb73016d25a6fe192b6d92dd3f120b5457ace46e79f8485d17b16c98b89a1fd57
|
7
|
+
data.tar.gz: d1e81fed4c9697ca1b717e98aa1f3d57fb6d9fe4fe83492bf1534c78383ceea08fa968572b6d67a6eb276862f540fcffd2924fd67e2faa5cac72b5dfc7034364
|
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.75 0C5.7835 0 5 0.783502 5 1.75V3H1.75C0.783502 3 0 3.7835 0 4.75V6V14.25C0 15.2165 0.783501 16 1.75 16H14.25C15.2165 16 16 15.2165 16 14.25V6V4.75C16 3.7835 15.2165 3 14.25 3H11V1.75C11 0.783502 10.2165 0 9.25 0H6.75ZM9.5 3V1.75C9.5 1.61193 9.38807 1.5 9.25 1.5H6.75C6.61193 1.5 6.5 1.61193 6.5 1.75V3H9.5ZM5 4.5H1.75C1.61193 4.5 1.5 4.61193 1.5 4.75V6C1.5 7.10457 2.39543 8 3.5 8H12.5C13.6046 8 14.5 7.10457 14.5 6V4.75C14.5 4.61193 14.3881 4.5 14.25 4.5H11H5ZM3.5 9.5C2.75638 9.5 2.06692 9.26809 1.5 8.87265V14.25C1.5 14.3881 1.61193 14.5 1.75 14.5H14.25C14.3881 14.5 14.5 14.3881 14.5 14.25V8.87266C13.9331 9.26809 13.2436 9.5 12.5 9.5H3.5Z" fill="black"/>
|
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>
|
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.270a30a
|
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-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -50,6 +50,7 @@ files:
|
|
50
50
|
- lib/build/svg/bold.svg
|
51
51
|
- lib/build/svg/book.svg
|
52
52
|
- lib/build/svg/bookmark.svg
|
53
|
+
- lib/build/svg/briefcase-16.svg
|
53
54
|
- lib/build/svg/briefcase.svg
|
54
55
|
- lib/build/svg/broadcast.svg
|
55
56
|
- lib/build/svg/browser.svg
|
@@ -125,6 +126,7 @@ files:
|
|
125
126
|
- lib/build/svg/inbox.svg
|
126
127
|
- lib/build/svg/infinity.svg
|
127
128
|
- lib/build/svg/info.svg
|
129
|
+
- lib/build/svg/internal-repo.svg
|
128
130
|
- lib/build/svg/issue-closed.svg
|
129
131
|
- lib/build/svg/issue-opened.svg
|
130
132
|
- lib/build/svg/issue-reopened.svg
|
@@ -159,6 +161,7 @@ files:
|
|
159
161
|
- lib/build/svg/mortar-board.svg
|
160
162
|
- lib/build/svg/mute.svg
|
161
163
|
- lib/build/svg/no-newline.svg
|
164
|
+
- lib/build/svg/north-star.svg
|
162
165
|
- lib/build/svg/note.svg
|
163
166
|
- lib/build/svg/octoface.svg
|
164
167
|
- lib/build/svg/organization.svg
|