octicons 0.0.0.pre.ba54359 → 0.0.0.pre.c903cc8
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/internal-repo.svg +1 -0
- data/lib/build/svg/north-star.svg +1 -0
- data/lib/build/svg/paintbrush-16.svg +11 -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: ea00684e9785123598c8428136cec177bbac8ce65c58434465d7bc3b4bfb70ed
|
4
|
+
data.tar.gz: b9a647df54f760777c756daf463f9a1beb1c6b6f5818b260043b44b064c57263
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44448a7804775bb3da43463f4050dc12bd0185ce6bc9a8c19bc232f7c7a910529c9608aa16f962b885c9ce9f0ef110262d8adc6abc6fb97ba357eeb78030f356
|
7
|
+
data.tar.gz: 94913420342a0f82c7620de801b1df8d823fff5a898ecf2ed3e6a9b1581240ec42e3517eb0ab57f3b91a927d019210b102b1b18dc800393b11f503d8862248f8
|
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 @@
|
|
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,11 @@
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
+
<g clip-path="url(#clip0)">
|
3
|
+
<rect width="16" height="16" fill="white"/>
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.86504 1.53511C6.27715 2.56157 7.83864 4.05716 9.10994 5.3122C10.1993 6.38768 10.9587 7.40111 11.4246 8.29416C12.5657 8.11791 13.7726 8.46931 14.6517 9.34835C15.0827 9.77939 15.3425 10.4135 15.5127 11.0048C15.6895 11.6191 15.7999 12.2995 15.8702 12.9191C15.9408 13.5424 15.9731 14.1245 15.9878 14.5495C15.9952 14.7626 15.9982 14.9375 15.9994 15.0601C16 15.1214 16.0001 15.1697 16.0001 15.2032L15.9999 15.2422L15.9999 15.2529L15.9998 15.2561L15.9998 15.2574L15.2499 15.25L15.2573 15.9999L15.2559 15.9999L15.2528 16L15.2421 16L15.2031 16.0002C15.1696 16.0002 15.1213 16.0001 15.06 15.9995C14.9374 15.9983 14.7625 15.9953 14.5494 15.9879C14.1244 15.9732 13.5423 15.9409 12.9191 15.8702C12.2994 15.7999 11.6191 15.6895 11.0048 15.5127C10.4135 15.3425 9.77938 15.0827 9.34835 14.6517C8.47194 13.7752 8.12002 12.573 8.29259 11.4348C7.38486 10.9745 6.35098 10.2201 5.252 9.13515C3.9732 7.8727 2.4878 6.30941 1.47712 4.88584C0.97602 4.18003 0.554167 3.45747 0.352218 2.78985C0.152841 2.13072 0.116666 1.32087 0.72017 0.718928C1.32668 0.112373 2.14023 0.170263 2.78881 0.379806C3.44898 0.593092 4.16474 1.02606 4.86504 1.53511ZM8.81678 10.0161C8.96493 9.77886 9.14212 9.55458 9.34835 9.34835C9.55154 9.14516 9.77225 8.97016 10.0056 8.82336C9.82501 8.50104 9.59082 8.14648 9.29576 7.7649L7.74254 9.31812C8.12993 9.60857 8.48978 9.83888 8.81678 10.0161ZM15.2573 15.9999C15.2574 15.9999 15.2575 15.9999 15.2499 15.25C15.9998 15.2576 15.9998 15.2575 15.9998 15.2574C15.9956 15.6656 15.6655 15.9958 15.2573 15.9999ZM8.05612 6.37966C8.14231 6.46476 8.22587 6.54904 8.30686 6.63248L6.59389 8.34545C6.49893 8.25608 6.40289 8.16352 6.30582 8.0677C5.03701 6.8151 3.63074 5.32815 2.70022 4.01749C2.23071 3.35618 1.91958 2.79063 1.78797 2.35555C1.65379 1.91196 1.75654 1.80381 1.78016 1.78026C1.79385 1.76629 1.89184 1.66636 2.32767 1.80716C2.76016 1.94689 3.32286 2.26852 3.98308 2.74843C5.29201 3.69989 6.7798 5.11966 8.05612 6.37966ZM14.3797 13.0882C14.4386 13.6071 14.4689 14.0997 14.4844 14.4844C14.0996 14.469 13.607 14.4386 13.0882 14.3798C12.5115 14.3143 11.9222 14.2158 11.4196 14.0712C10.894 13.9199 10.5638 13.7457 10.409 13.591C9.53033 12.7123 9.53033 11.2877 10.409 10.409C11.2877 9.53033 12.7123 9.53033 13.591 10.409C13.7457 10.5638 13.9199 10.894 14.0712 11.4196C14.2158 11.9223 14.3143 12.5115 14.3797 13.0882Z" fill="black"/>
|
5
|
+
</g>
|
6
|
+
<defs>
|
7
|
+
<clipPath id="clip0">
|
8
|
+
<rect width="16" height="16" fill="white"/>
|
9
|
+
</clipPath>
|
10
|
+
</defs>
|
11
|
+
</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.c903cc8
|
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-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -125,6 +125,7 @@ files:
|
|
125
125
|
- lib/build/svg/inbox.svg
|
126
126
|
- lib/build/svg/infinity.svg
|
127
127
|
- lib/build/svg/info.svg
|
128
|
+
- lib/build/svg/internal-repo.svg
|
128
129
|
- lib/build/svg/issue-closed.svg
|
129
130
|
- lib/build/svg/issue-opened.svg
|
130
131
|
- lib/build/svg/issue-reopened.svg
|
@@ -159,10 +160,12 @@ files:
|
|
159
160
|
- lib/build/svg/mortar-board.svg
|
160
161
|
- lib/build/svg/mute.svg
|
161
162
|
- lib/build/svg/no-newline.svg
|
163
|
+
- lib/build/svg/north-star.svg
|
162
164
|
- lib/build/svg/note.svg
|
163
165
|
- lib/build/svg/octoface.svg
|
164
166
|
- lib/build/svg/organization.svg
|
165
167
|
- lib/build/svg/package.svg
|
168
|
+
- lib/build/svg/paintbrush-16.svg
|
166
169
|
- lib/build/svg/paintcan.svg
|
167
170
|
- lib/build/svg/pencil.svg
|
168
171
|
- lib/build/svg/person.svg
|