octicons_v2 0.0.0.pre.6933f36 → 0.0.0.pre.7355f84
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/{desktop-device-24.svg → device-desktop-24.svg} +0 -0
- data/lib/build/svg/{request-changes-24.svg → diff-24.svg} +0 -0
- data/lib/build/svg/light-bulb-16.svg +1 -1
- data/lib/build/svg/light-bulb-24.svg +3 -0
- data/lib/build/svg/people-24.svg +2 -1
- data/lib/build/svg/person-24.svg +1 -2
- data/lib/octicons_v2/version.rb +1 -1
- metadata +5 -6
- data/lib/build/svg/grabber-3-24.svg +0 -3
- data/lib/build/svg/lightbulb-24.svg +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7335f008a9fa8a2a2ed6fcfb092e162d5ede707216270285149a9c368e4ddd8
|
4
|
+
data.tar.gz: 81e7803a2bc74bffe8d0143c09a32bf5e4de74ef2899421c470af4c9874172e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6303af49c550f46a6d7692fc4fc34398c171f8fe4c9769815b955fb2987e25d8badb815364465051a064dfc8ade6e158eb6a6aad78f1cdc9a2aec672a8ebfb2d
|
7
|
+
data.tar.gz: c5e77b768ef4eb1d105c27cf8be5f8ca17cb706c6bd35ec733f0648ab98eae340b9dd06bd558d0e33a62813499f161f03f90ee09e9eeb274adb241233624037a
|
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
|