Skip to content

Commit 48345f1

Browse files
committed
optimized structure and dependencies
1 parent 1a1679e commit 48345f1

15 files changed

+144
-11
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
node_modules
22
bower_components
3-
source/iconfont/*
43
source/scss/.sass-cache
54
source/js/vendor/*
65
dist

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ At first, clone this repository to the location of your choice. Then install req
66
```sh
77
sudo apt-get install nodejs npm librsvg2-bin phantomjs build-essential ruby1.9.1-dev fontforge
88
sudo ln -s /usr/bin/nodejs /usr/bin/node
9+
npm install gulp bower -g
910
wget http://people.mozilla.com/~jkew/woff/woff-code-latest.zip
1011
unzip woff-code-latest.zip -d sfnt2woff && cd sfnt2woff && make && sudo mv sfnt2woff /usr/local/bin/
1112
gem install fontcustom
1213
gem install scss_lint
14+
gem install scss_lint_reporter_checkstyle
1315
```
1416

1517
Then, install all Bower and NPM dependencies by moving to the cloned folder and run the install routines:
1618
```sh
17-
bower install
1819
sudo npm install
20+
bower install
1921
```
2022

2123
Now you can make a build by the following command (See gulp.js for included tasks):

gulpfile.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ var gulp = require('gulp'),
1616
jquery = require('gulp-jquery'),
1717
localScreenshots = require('gulp-local-screenshots'),
1818
twig = require('gulp-twig'),
19-
csso = require('gulp-csso'),
2019
spritesmith = require('gulp.spritesmith'),
2120
merge = require('merge-stream'),
2221
autoprefixer = require('gulp-autoprefixer'),
@@ -52,7 +51,6 @@ gulp.task('compile-sass', function() {
5251
.pipe(sourcemaps.init())
5352
.pipe(sass())
5453
.pipe(autoprefixer('last 2 version', 'safari 5', 'ie 9', 'opera 12.1', 'ios 6', 'android 4'))
55-
.pipe(csso())
5654
.pipe(gulp.dest('../dist/css'))
5755
.pipe(minifyCss())
5856
.pipe(rename({suffix:'.min'}))
@@ -76,7 +74,7 @@ gulp.task('compile-jquery', function() {
7674
});
7775

7876
gulp.task('compile-js', function(){
79-
gulp.src('source/js/*.js')
77+
gulp.src(['source/js/**/*.js', '!source/js/vendor/*.js'])
8078
.pipe(jshint('.jshintrc'))
8179
.pipe(jshint.reporter(stylish))
8280
.pipe(jscs())
@@ -100,9 +98,9 @@ gulp.task('compile-js', function(){
10098
});
10199

102100
gulp.task('beautify-js', function() {
103-
gulp.src('source/js/*.js')
104-
.pipe(jscs({fix:true}))
101+
gulp.src(['source/js/**/*.js', '!source/js/vendor/*.js'])
105102
.pipe(jsBeautify({collapseWhitespace: true}))
103+
.pipe(jscs({fix:true}))
106104
.pipe(gulp.dest('source/js'));
107105
});
108106

@@ -162,7 +160,7 @@ gulp.task('screens', function () {
162160
});
163161

164162
gulp.task('default', function(callback){
165-
runSequence('clean', 'select-icons', 'compile-iconfont', 'compile-sprites', 'optimize-images', 'compile-sass', 'compile-jquery', 'compile-js', 'html', 'screens', callback)
163+
runSequence('clean', 'compile-iconfont', 'compile-sprites', 'optimize-images', 'compile-sass', 'compile-jquery', 'compile-js', 'html', 'screens', callback)
166164
});
167165

168166
gulp.task('watch', function(){

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"gulp-jshint": "~1.11.2",
3838
"gulp-autoprefixer": "~3.0.2",
3939
"gulp-html5-lint": "~1.0.1",
40-
"gulp-csso": "~1.0.0",
4140
"es6-promise": "~3.0.2",
4241
"gulp-sassbeautify": "~0.1.0",
4342
"gulp-js-prettify": "~0.1.0",

source/iconfont/_myfont.scss

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
//
2+
// Icon Font: myfont
3+
//
4+
5+
@font-face {
6+
font-family: "myfont";
7+
src: url("../iconfont/myfont.eot");
8+
src: url("../iconfont/myfont.eot?#iefix") format("embedded-opentype"),
9+
url("../iconfont/myfont.woff") format("woff"),
10+
url("../iconfont/myfont.ttf") format("truetype"),
11+
url("../iconfont/myfont.svg#myfont") format("svg");
12+
font-weight: normal;
13+
font-style: normal;
14+
}
15+
16+
@media screen and (-webkit-min-device-pixel-ratio:0) {
17+
@font-face {
18+
font-family: "myfont";
19+
src: url("../iconfont/myfont.svg#myfont") format("svg");
20+
}
21+
}
22+
23+
[data-icon]:before { content: attr(data-icon); }
24+
25+
[data-icon]:before,
26+
.icon-500px:before,
27+
.icon-adjust:before,
28+
.icon-adn:before,
29+
.icon-align-center:before,
30+
.icon-align-justify:before {
31+
display: inline-block;
32+
font-family: "myfont";
33+
font-style: normal;
34+
font-weight: normal;
35+
font-variant: normal;
36+
line-height: 1;
37+
text-decoration: inherit;
38+
text-rendering: optimizeLegibility;
39+
text-transform: none;
40+
-moz-osx-font-smoothing: grayscale;
41+
-webkit-font-smoothing: antialiased;
42+
font-smoothing: antialiased;
43+
}
44+
45+
.icon-500px:before { content: "\f100"; }
46+
.icon-adjust:before { content: "\f101"; }
47+
.icon-adn:before { content: "\f105"; }
48+
.icon-align-center:before { content: "\f106"; }
49+
.icon-align-justify:before { content: "\f107"; }
50+
51+
$font-myfont-500px: "\f100";
52+
$font-myfont-adjust: "\f101";
53+
$font-myfont-adn: "\f105";
54+
$font-myfont-align-center: "\f106";
55+
$font-myfont-align-justify: "\f107";

source/iconfont/icons/500px.svg

+1
Loading

source/iconfont/icons/adjust.svg

+1
Loading

source/iconfont/icons/adn.svg

+1
Loading
+1
Loading
+1
Loading

source/iconfont/myfont.eot

2.6 KB
Binary file not shown.

source/iconfont/myfont.svg

+75
Loading

source/iconfont/myfont.ttf

2.44 KB
Binary file not shown.

source/iconfont/myfont.woff

1.58 KB
Binary file not shown.

source/templates/partials/layout.twig

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!doctype html>
2-
<html class="no-js" lang="">
2+
<html class="no-js" lang="en">
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@@ -10,7 +10,7 @@
1010
<link rel="stylesheet" href="css/frontend.min.css">
1111
</head>
1212
<body>
13-
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
13+
<nav class="navbar navbar-inverse navbar-fixed-top">
1414
<div class="container">
1515
<div class="navbar-header">
1616
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">

0 commit comments

Comments
 (0)