-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathhelpers.rb
More file actions
43 lines (43 loc) · 777 Bytes
/
helpers.rb
File metadata and controls
43 lines (43 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
def git_commit_grayscale(contribution_count, opts = {})
if opts[:framework_v2] == false # @lucian opt-in to v1 colors
case contribution_count
when 1..3
'bg--gray-5'
when 4..7
'bg--gray-4'
when 8..10
'bg--gray-3'
when 11..20
'bg--gray-2'
when 20..1000
'bg-black'
end
else
case contribution_count
when 1
'bg--gray-60'
when 2
'bg--gray-55'
when 3
'bg--gray-50'
when 4
'bg--gray-45'
when 5
'bg--gray-40'
when 6
'bg--gray-35'
when 7..8
'bg--gray-30'
when 9..10
'bg--gray-25'
when 11..12
'bg--gray-20'
when 13..15
'bg--gray-15'
when 16..20
'bg--gray-10'
when 21..1000
'bg-black'
end
end
end