Skip to content

Commit

Permalink
Reduce size of banner images by about 75%
Browse files Browse the repository at this point in the history
- Use 4 spaces indentation as per .editorconfig.
- Ignore some files gulp generates.
  • Loading branch information
sveitser committed Sep 20, 2023
1 parent 6b9ab98 commit 9c20767
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ hackergarten.github.io.iml

# external dependencies
node_modules

# generated by gulp
feed.xml
projects.html
Binary file added pictures/header.1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed pictures/header.1.png
Binary file not shown.
Binary file added pictures/header.2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed pictures/header.2.png
Binary file not shown.
Binary file added pictures/header.3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed pictures/header.3.png
Binary file not shown.
Binary file added pictures/header.4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed pictures/header.4.png
Binary file not shown.
14 changes: 7 additions & 7 deletions scripts/hgMainPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
angular.module('hackergartenPage', ['ngDialog']);

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

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

0 comments on commit 9c20767

Please sign in to comment.