Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Commit

Permalink
Lint SomEnergia theme css (#128)
Browse files Browse the repository at this point in the history
* Added nodejs dependencies.

* Config grunt to lint css in SomEnergia theme
  • Loading branch information
BLACKLEG authored Aug 3, 2017
1 parent b868691 commit 0cd1eea
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .scripts/htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
rm .htaccess
cp htaccess_dist .htaccess
cp htaccess.dist .htaccess
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ php:
services:
- docker

before_install: composer global require fxp/composer-asset-plugin -vvv

before_install:
- npm install -g grunt-cli
- npm install
- composer self-update
- composer global require fxp/composer-asset-plugin -vvv

install:
- composer self-update
- composer validate
- composer install

script:
Expand Down
16 changes: 16 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = function (grunt) {

grunt.initConfig({
csslint: {
somenergiatheme: {
src: ['mod/somenergia-theme/views/default/walled_garden.css',
'mod/somenergia-theme/views/default/elements/*.css'],
nonnull: true
}
}
});

grunt.loadNpmTasks('grunt-contrib-csslint');

grunt.registerTask('default', ['csslint']);
};
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
},
"scripts": {
"post-install-cmd": "\\Elgg\\Composer\\PostInstall::execute",
"post-package-update": "\\Elgg\\Composer\\PostUpdate::execute"
"post-package-update": "\\Elgg\\Composer\\PostUpdate::execute",
"htaccess" : ".scripts/htaccess"
},
"extra": {
"installer-paths": {
Expand Down
42 changes: 21 additions & 21 deletions mod/somenergia-theme/views/default/walled_garden.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
*/

.elgg-body-walledgarden {
margin: 100px auto 0;
position: relative;
width: 530px;
margin: 100px auto 0;
position: relative;
width: 530px;
}
.elgg-module-walledgarden {
position: absolute;
top: 0;
left: 0;
position: absolute;
top: 0;
left: 0;

background-color: #FFF;
border: 1px solid #DEDEDE;
padding: 10px;

border-radius: 3px;
box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.25);
border-radius: 3px;
box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.25);
}
.elgg-module-walledgarden > .elgg-head {
padding: 20px 20px 0 20px;
Expand All @@ -29,30 +29,30 @@
padding: 0 20px 20px 20px;
}
.elgg-menu-walled-garden {
margin: 10px 0;
margin: 10px 0;
}
.elgg-walledgarden-single > .elgg-body {
padding: 0 18px;
padding: 0 18px;
}
.elgg-body-walledgarden h3 {
font-size: 1.5em;
line-height: 1.1em;
padding-bottom: 5px;
font-size: 1.5em;
line-height: 1.1em;
padding-bottom: 5px;
}
.elgg-heading-walledgarden {
line-height: 1.1em;
line-height: 1.1em;
}
.elgg-module-walledgarden .elgg-output img {
width: 100%;
height: auto;
width: 100%;
height: auto;
}

@media (max-width: 600px) {
.elgg-page-walledgarden {
padding: 20px;
}
.elgg-page-walledgarden {
padding: 20px;
}
.elgg-body-walledgarden {
margin: 40px auto 0;
margin: 40px auto 0;
width: auto;
}
}
}
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"devDependencies": {
"grunt": "^1.0.1",
"grunt-contrib-csslint": "^2.0.0"
}
}
14 changes: 0 additions & 14 deletions phpunit.xml

This file was deleted.

0 comments on commit 0cd1eea

Please sign in to comment.