Skip to content

Commit 90ebae0

Browse files
authored
Merge pull request #401 from sveitser/use-jpg-banner
Reduce size of banner images by about 75%
2 parents cb23e1b + 9c20767 commit 90ebae0

File tree

10 files changed

+11
-7
lines changed

10 files changed

+11
-7
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ hackergarten.github.io.iml
66

77
# external dependencies
88
node_modules
9+
10+
# generated by gulp
11+
feed.xml
12+
projects.html

pictures/header.1.jpg

88.3 KB
Loading

pictures/header.1.png

-354 KB
Binary file not shown.

pictures/header.2.jpg

96.5 KB
Loading

pictures/header.2.png

-436 KB
Binary file not shown.

pictures/header.3.jpg

120 KB
Loading

pictures/header.3.png

-477 KB
Binary file not shown.

pictures/header.4.jpg

112 KB
Loading

pictures/header.4.png

-455 KB
Binary file not shown.

scripts/hgMainPage.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
angular.module('hackergartenPage', ['ngDialog']);
44

55
angular.module('hackergartenPage')
6-
.directive('randomHeaderImage', function () {
7-
return function (scope, element, attrs) {
8-
var image = "pictures/header." + Math.floor((Math.random()*4)+1) + ".png"
6+
.directive('randomHeaderImage', function () {
7+
return function (_scope, element, _attrs) {
8+
var image = `pictures/header.${Math.floor((Math.random() * 4) + 1)}.jpg`;
99

10-
element.css({
11-
'background': 'url("' + image + '") center center no-repeat'
12-
});
13-
};
10+
element.css({
11+
'background': `url("${image}") center center no-repeat`
12+
});
13+
};
1414
});

0 commit comments

Comments
 (0)