Skip to content

Commit 572af14

Browse files
hackurjadjoubran
authored andcommitted
SASS implementation (#350)
* rename pre-existing *.less files to *.scss * Added gulp-sass npm package. * updated to latest generators * Updated NPM packages * Changed config.less to config.sass * Updated variable declarations & references to support sass * Changed @imports to use relative paths * Changed gulpfile.js to use elixir's sass task * Made various fixes and optimizations to the landing page styles
1 parent 8b894a8 commit 572af14

File tree

21 files changed

+50
-52
lines changed

21 files changed

+50
-52
lines changed

angular/app/pages/footer/footer.less renamed to angular/app/pages/footer/footer.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
@import "./angular/material/project";
1+
@import "../../../material/project";
22

33
.Footer{
44
text-align: center;
5-
background-color: @background;
6-
border-top: 1px solid @border;
5+
background-color: $background;
6+
border-top: 1px solid $border;
77
padding-top: 40px;
88
padding-bottom: 40px;
9-
color: @grey;
9+
color: $grey;
1010
font-weight: 300;
1111
}
1212

1313
.Footer-text{
1414
padding-top: 10px;
1515
opacity: 0.8;
16-
color: @grey;
16+
color: $grey;
1717
}
1818

1919
.Footer-link{
2020
text-decoration: none;
21-
color: @grey !important;
21+
color: $grey !important;
2222
font-weight: 400;
2323
}
2424

angular/app/pages/header/header.less renamed to angular/app/pages/header/header.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import "./angular/material/project";
1+
@import "../../../material/project";
22

33
.DemoHeader {
44
height: 64px;
@@ -22,15 +22,15 @@
2222

2323
.DemoHeader-link{
2424
text-decoration: none;
25-
color: @black !important;
25+
color: $black !important;
2626
padding: 0 20px;
2727
display: inline-block;
2828
transition: 250ms background-color;
2929
line-height: 64px;
3030
}
3131

3232
.DemoHeader-link:hover{
33-
background-color: @background;
33+
background-color: $background;
3434
}
3535

3636
.DemoHeader-github{

angular/app/pages/landing/landing.less renamed to angular/app/pages/landing/landing.scss

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
@import "./angular/material/project";
1+
@import "../../../material/project";
22

33
body{
4-
font-family: 'Lato';
4+
font-family: 'Lato', sans-serif;
55
}
66

77
.Landing{
88
height: 100%;
99
}
1010

1111
.Landing-cover{
12-
background-image: url('/img/cover.jpg');
1312
background-size: cover;
14-
background-attachment: fixed;
15-
background-position: center;
13+
background: url('/img/cover.jpg') fixed center;
1614
width: 100%;
1715
height: 700px;
1816
}
@@ -42,9 +40,9 @@ body{
4240
.Landing-getStarted{
4341
padding: 12px 30px;
4442
font-weight: bold;
45-
color: @black !important;
43+
color: $black !important;
4644
border-radius: 4px;
47-
text-transform: box-shadow 250ms;
45+
transition: box-shadow 250ms;
4846
}
4947

5048
.Landing-getStarted:hover{
@@ -59,7 +57,7 @@ body{
5957

6058
.Landing-ampersand{
6159
font-size: 50px;
62-
color: @brand;
60+
color: $brand;
6361
position: absolute;
6462
top: 70px;
6563
left: 0;
@@ -69,27 +67,27 @@ body{
6967
}
7068

7169
.Landing-angular{
72-
background-color: @background;
73-
border-left: 1px solid @border;
70+
background-color: $background;
71+
border-left: 1px solid $border;
7472
}
7573

7674
.Landing-laravel,
7775
.Landing-angular{
7876
text-align: center;
79-
color: @navy;
80-
border-bottom: 1px solid @border;
77+
color: $navy;
78+
border-bottom: 1px solid $border;
8179
}
8280

8381
.Landing-laravelAngular-title{
8482
padding-top: 30px;
8583
margin-bottom: 15px;
8684
font-weight: 300;
8785
letter-spacing: -1px;
88-
color: @navy;
86+
color: $navy;
8987
}
9088

9189
.Landing-laravelAngular-subtitle{
92-
color: @black;
90+
color: $black;
9391
padding-left: 30px;
9492
padding-right: 30px;
9593
font-weight: 300;
@@ -98,7 +96,7 @@ body{
9896
.DemoCode{
9997
font-family: "Lucida Console", Monaco, monospace;
10098
overflow: auto !important;
101-
padding: 10px;
99+
padding: 10px 10px 10px 20px;
102100
line-height: 1.428571429;
103101
color: #333333;
104102
word-break: break-all;
@@ -109,7 +107,6 @@ body{
109107
width: 80%;
110108
margin: 30px auto 100px;
111109
text-align: left;
112-
padding-left: 20px;
113110
font-size: 14px;
114111
}
115112

@@ -118,11 +115,11 @@ body{
118115
}
119116

120117
.DemoCode-comment{
121-
color: @grey;
118+
color: $grey;
122119
}
123120

124121
.DemoCode-operator{
125-
color: @grey;
122+
color: $grey;
126123
}
127124

128125
.DemoCode-string{
@@ -142,13 +139,13 @@ body{
142139
font-weight: 300;
143140
letter-spacing: -1px;
144141
margin-bottom: 15px;
145-
color: @navy;
142+
color: $navy;
146143
}
147144

148145
.Landing-featuresMainDescription{
149146
width: 70%;
150147
margin: 0 auto 30px;
151-
color: @black;
148+
color: $black;
152149
font-weight: 300;
153150
}
154151

@@ -164,7 +161,7 @@ body{
164161
}
165162

166163
.Landing-featuresTitle{
167-
color: @navy;
164+
color: $navy;
168165
letter-spacing: -1px;
169166
margin-top: 40px;
170167
}
@@ -174,11 +171,11 @@ body{
174171
padding-left: 50px;
175172
padding-right: 50px;
176173
font-weight: 300;
177-
color: @black;
174+
color: $black;
178175
}
179176

180177
.Landing-featuresEntry--restful{
181-
background-color: @brand;
178+
background-color: $brand;
182179
}
183180

184181
.Landing-featuresEntry--jwt{
File renamed without changes.

angular/material/project.less

Lines changed: 0 additions & 6 deletions
This file was deleted.

angular/material/project.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
$brand: #00A4C6;
2+
$black: #535362;
3+
$grey: #888888;
4+
$navy: #21455B;
5+
$border: #E9F0F3;
6+
$background: #F6F9FA;
File renamed without changes.
File renamed without changes.
File renamed without changes.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"laravel/framework": "5.2.*",
1010
"tymon/jwt-auth": "0.5.*",
1111
"barryvdh/laravel-cors": "0.7.x",
12-
"laravelangular/generators": "2.5.x",
12+
"laravelangular/generators": "2.6.x",
1313
"dingo/api": "1.0.x@dev"
1414
},
1515
"require-dev": {

elixir.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
},
55
"css": {
66
"outputFolder": "public/css",
7-
"less": {
7+
"sass": {
88
"folder": "../../angular/"
99
}
1010
}

gulpfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ elixir(function(mix) {
3737
.bower()
3838
.angular('./angular/')
3939
.ngHtml2Js('./angular/**/*.html')
40-
.less('./angular/**/*.less', 'public/css')
40+
.sass('./angular/**/*.scss', 'public/css')
4141
.version(assets)
4242
.browserSync({
4343
proxy: 'localhost:8000'

package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,18 @@
1818
"vinyl-source-stream": "~1.0.0"
1919
},
2020
"dependencies": {
21-
"gulp-add-src": "^0.2.0",
22-
"gulp-concat": "^2.6.0",
23-
"gulp-sourcemaps": "^1",
24-
"gulp-uglify": "^1",
25-
"gulp-util": "^3.0.3",
2621
"babel": "^4.0.2",
2722
"babel-core": "^6.4.5",
2823
"babel-loader": "^6.2.1",
2924
"babel-preset-es2015": "^6.3.13",
3025
"babelify": "^5.0.3",
3126
"browserify": "~8.1.3",
32-
"gulp": "^3.8.8",
33-
"webpack": "^1.12.11",
34-
"webpack-dev-server": "^1.14.1",
35-
"webpack-stream": "^3.1.0",
3627
"eslint": "^1.10.3",
3728
"eslint-plugin-angular": "^0.15.0",
29+
"gulp": "^3.9.1",
30+
"gulp-sass": "^2.3.2",
31+
"gulp-add-src": "^0.2.0",
32+
"gulp-concat": "^2.6.0",
3833
"gulp-concat-sourcemap": "^1.3.1",
3934
"gulp-cssnano": "^2.1.1",
4035
"gulp-eslint": "^1.1.1",
@@ -44,9 +39,15 @@
4439
"gulp-ng-annotate": "^1",
4540
"gulp-ng-html2js": "^0.2.0",
4641
"gulp-notify": "^2.0.0",
47-
"laravel-elixir": "^4.2.1",
42+
"gulp-sourcemaps": "^1",
43+
"gulp-uglify": "^1",
44+
"gulp-util": "^3.0.3",
45+
"laravel-elixir": "^5.0.0",
4846
"main-bower-files": "^2.1.0",
49-
"underscore": "^1.8.3"
47+
"underscore": "^1.8.3",
48+
"webpack": "^1.12.11",
49+
"webpack-dev-server": "^1.14.1",
50+
"webpack-stream": "^3.1.0"
5051
},
5152
"engines": {
5253
"npm": ">=3"

0 commit comments

Comments
 (0)