Skip to content

Commit db284c9

Browse files
committed
Fix portfolio hover to use primary color
1 parent aa1d5bf commit db284c9

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

_includes/css/agency.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,10 @@ section h3.section-subheading {
368368
width: 100%;
369369
height: 100%;
370370
opacity: 0;
371-
background: rgba(254,209,54,.9);
372371
-webkit-transition: all ease .5s;
373372
-moz-transition: all ease .5s;
374373
transition: all ease .5s;
374+
background: rgba({{ site.color.primary | hex_to_rgb | join: ',' }}, .9);
375375
}
376376

377377
#portfolio .portfolio-item .portfolio-link .portfolio-hover:hover {

_plugins/hex_to_rgb.rb

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Simple hex conversion Liquid filter plugin
2+
#
3+
# Convert a string of hex values into an array of decimal values.
4+
#
5+
# Examples:
6+
# {{ "aabbcc" | hex_to_rgb }}
7+
# # => [170, 187, 204]
8+
#
9+
# {{ "abc" | hex_to_rgb }}
10+
# # => [170, 187, 204]
11+
#
12+
# {{ "0a0b0c" | hex_to_rgb }}
13+
# # => [10, 11, 12]
14+
#
15+
# hexval - string of valid hexidecimal characters
16+
#
17+
# Returns an array of decimal values for the parse hex characters
18+
#
19+
20+
module Jekyll
21+
module HexToRGB
22+
def hex_to_rgb(hexval)
23+
if hexval.length.even?
24+
hexval.scan(/../).map {|color| color.to_i(16)}
25+
else
26+
hexval.scan(/./).map {|color| (color+color).to_i(16)}
27+
end
28+
end
29+
end
30+
end
31+
32+
Liquid::Template.register_filter(Jekyll::HexToRGB)

0 commit comments

Comments
 (0)