Skip to content

Commit

Permalink
Merge pull request #2 from Wisembly/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
guillaumepotier committed Dec 5, 2014
2 parents 4b0fd0c + 8cee112 commit 93904ef
Show file tree
Hide file tree
Showing 6 changed files with 173 additions and 63 deletions.
10 changes: 9 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permalink: pretty

# Setup
title: Wisembly
tagline: 'Enlight developement'
tagline: 'Ideas are everywhere'
description: 'Random Wisembly developpers thoughts and more or less useful findings..'

authors:
Expand All @@ -20,6 +20,14 @@ authors:
twitter: guillaumepotier
github: guillaumepotier

gabrielcousin:
name: Gabriel Cousin
display_name: gabrielcousin
gravatar: f8847fb0b810b70d5fbc8f7b97c266b8
email: [email protected]
twitter: gabrielcousin
github: gabrielcousin

paginate: 5
related_limit: 3

Expand Down
42 changes: 5 additions & 37 deletions _includes/sidebar.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
<svg class="logo" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="30 29 265 65" enable-background="new 0 0 323 120" xml:space="preserve">
<g>
<g>
Expand All @@ -28,39 +28,7 @@
</g>
<rect x="137.6" y="41.1" fill="#FFFFFF" width="5.7" height="5.7"/>
</g>
<g>
<path fill="#FFFFFF" d="M115.5,80.9h-0.9v3.8c-0.5-0.7-1.2-1.3-2.4-1.3c-1.5,0-3,1.2-3,3.3c0,2.1,1.5,3.3,3,3.3
c1.2,0,1.9-0.6,2.4-1.4v1.3h0.9V80.9 M107.4,81.1h-1.1v1h1.1V81.1 M229.9,83.4c-1.8,0-3,1.5-3,3.3c0,2,1.4,3.3,3.2,3.3
c1.2,0,2-0.5,2.6-1.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h-1l-1.7,5.1L202.3,83.5 M196.2,83.5L196.2,83.5 M196.3,83.5h-1l-2,5.3l-2.3-5.3h-1l2.9,6.3
c-0.4,0.9-0.7,1.2-1.3,1.2c-0.4,0-0.7-0.1-1-0.2l-0.3,0.7c0.4,0.2,0.8,0.3,1.3,0.3c1,0,1.6-0.5,2.1-1.8L196.3,83.5 M177.1,83.5
L177.1,83.5 M177.1,83.5h-1l-2.1,5.3l-2.1-5.3h-1l2.7,6.4h0.8L177.1,83.5 M107.3,83.5h-0.9v6.3h0.9V83.5 M127,89.2
c-0.9,0-1.6-0.5-1.6-1.3s0.7-1.3,1.8-1.3c0.8,0,1.4,0.1,1.9,0.3v0.6C129.1,88.5,128.1,89.2,127,89.2 M143.8,89.2
c-0.9,0-1.6-0.5-1.6-1.3s0.7-1.3,1.8-1.3c0.8,0,1.4,0.1,1.9,0.3v0.6C145.9,88.5,145,89.2,143.8,89.2 M112.3,89.1
c-1.2,0-2.2-1-2.2-2.5c0-1.5,1-2.4,2.2-2.4c1.2,0,2.3,1,2.3,2.4C114.6,88.1,113.5,89.1,112.3,89.1 M118.2,86.3
c0.1-1.2,1-2.2,2.1-2.2c1.3,0,1.9,1,2,2.2H118.2 M154.1,86.3c0.1-1.2,1-2.2,2.1-2.2c1.3,0,1.9,1,2,2.2H154.1 M165,86.3
c0.1-1.2,1-2.2,2.1-2.2c1.3,0,1.9,1,2,2.2H165 M178.8,86.3c0.1-1.2,1-2.2,2.1-2.2c1.3,0,1.9,1,2,2.2H178.8 M215.9,86.3
c0.1-1.2,1-2.2,2.1-2.2c1.3,0,1.9,1,2,2.2H215.9 M227.8,86.3c0.1-1.2,1-2.2,2.1-2.2c1.3,0,1.9,1,2,2.2H227.8 M208.9,80.9h-0.9
v8.9h0.9v-3.6c0-1.2,0.8-2,1.9-2c1.1,0,1.8,0.7,1.8,1.9v3.7h0.9v-3.9c0-1.5-0.9-2.5-2.4-2.5c-1.1,0-1.8,0.6-2.2,1.2V80.9"/>
</g>

<g>
<polygon fill="#FFFFFF" points="65.4,29.8 34.8,39.7 34.8,39.7 34.8,39.7 42.3,53.8 42.3,53.8 42.3,53.8 65.4,29.8 65.4,29.8
"/>
Expand All @@ -75,8 +43,8 @@
</svg>

<h1>{{ site.title }}</h1>
<small>{{ site.tagline }}</small>
<!-- <p class="lead">{{ site.description }}</p> -->
<!-- <small>{{ site.tagline }}</small>
<p class="lead">{{ site.description }}</p> -->
</div>

<ul class="sidebar-nav">
Expand Down Expand Up @@ -104,6 +72,6 @@ <h1>{{ site.title }}</h1>
<li class="sidebar-nav-item"><a href="{{ site.urls.corpo }}" target="_blank">Wisembly website</a></li>
</ul>

<p>&copy; {{ site.time | date: '%Y' }}. All rights reserved.</p>
<p class="copyright">&copy; {{ site.time | date: '%Y' }}. All rights reserved.</p>
</div>
</div>
113 changes: 113 additions & 0 deletions _posts/2014-11-03-building-an-iconfont-from-sketch-to-gulp.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
layout: post
title: "Building an iconfont from Sketch to Gulp"
categories:
- frontend
author: gabrielcousin
---

In September, Wisembly started the development of a new product, which will transform your small meetings. Teasing!

To do so, the dev team chose to use various frameworks and task runner such as Ember, Broccoli and Gulp.

In the front-end development of our 'older' app and for now, we used Grunt. But we saw that Gulp offers a lot of benefits: it is way faster and multitask. We decided to give it a try and took the occasion to make both workflows uniform.

### Less talk, more action!
CSS optimization will be detailed in a further post. This post is about building a homemade iconfont with Sketch and Gulp. [By the way, you can fork this project on GitHub.](https://github.com/Wisembly/wisemblyiconfont)

We had some constraints like supporting IE7/8. It means that you have to build SVG, WOFF and... EOT. You will notice the original task is building SVG, WOFF, TTF and EOT:

1. [SVG fonts](http://caniuse.com/#feat=svg-fonts) are only supported by Safari and Android browsers.
2. [WOFF](http://caniuse.com/#feat=woff) is well supported (excepted IE8)
3. [EOT](http://caniuse.com/#feat=eot) is supported by all IE.
4. For the record: WOFF2 is coming soon with a great compression feature (about 30% more than WOFF), but is [not really well supported](http://caniuse.com/#feat=woff2) on recent browsers.

… so, you may cover a wide range of users with WOFF and EOT. That is why we decided not to import SVG and TTF into our CSS files.


Until we discovered [Sketchtool](http://bohemiancoding.com/sketch/tool/), we had to manually export each icon in SVG. Now, the Gulp task is directly using your Sketchfile.

Also, with Sketch 3.1, file type and extension were reviewed. Sketchfiles are no more a kind of zip file, so you can use it even more easily on GitHub.

### File structure
Tidy your bedroom, prepare your files and sort them, as done in this example:

| dist *
|- css *
|- font *
|- svg *
| src
|- sketch
|- templates

(*) these folders will be created by Gulp.

### Plugins
For our spectific task, we will used the following plugins:

* [gulp-sketch](https://github.com/cognitom/gulp-sketch)
* [gulp-iconfont](https://github.com/nfroidure/gulp-iconfont)
* gulp-consolidate
* gulp-loadash

You need to have Sketch and Sketchtool installed.

__Before you launch the task : get your Sketchfile ready by flattening your icons and be sure you have one artboard per icon.__

### Script

gulp.task('icons', function(){

return gulp.src('src/sketch/icons.sketch')

// extracting SVG from Sketchfile
.pipe(sketch({
export: 'slices',
formats: 'svg',
compact: 'yes',
saveForWeb: 'yes'
}))
.pipe(gulp.dest('dist/svg/'))

// creating SVG, TTF, WOFF, EOT
.pipe(iconfont({
fontName: 'icons',
appendCodepoints: false,
normalize: true,
centerHorizontally: true,
fontHeight: 100 // IMPORTANT
}))

// creating CSS files and sample page
.on('codepoints', function(codepoints, options) {

// options
var iconsOptions = {
glyphs: codepoints,
fontName: 'WisemblyIconfont',
fontPath: '../font/',
className: 'icon',
}

// template for modern browsers
gulp.src('src/templates/icon-template.css')
.pipe(consolidate('lodash', iconsOptions))
.pipe(rename('icons.css'))
.pipe(gulp.dest('dist/css/'));

// template for IE
gulp.src('src/templates/icon-template-ie.css')
.pipe(consolidate('lodash', iconsOptions))
.pipe(rename('icons-ie.css'))
.pipe(gulp.dest('dist/css/'));

// creating a sample page
gulp.src('src/templates/icon-template.html')
.pipe(consolidate('lodash', iconsOptions))
.pipe(rename({ basename:'sample' }))
.pipe(gulp.dest('dist/'));

})
.pipe(gulp.dest('dist/font/'));

});
12 changes: 0 additions & 12 deletions public/css/hyde.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,6 @@
* Update the foundational and global aspects of the page.
*/

@media (min-width: 48rem) {
html {
font-size: 16px;
}
}
@media (min-width: 58rem) {
html {
font-size: 20px;
}
}


/*
* Sidebar
*
Expand Down
11 changes: 1 addition & 10 deletions public/css/poole.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ html {
font-size: 16px;
line-height: 1.5;
}
@media (min-width: 38rem) {
html {
font-size: 20px;
}
}

body {
color: #515151;
Expand Down Expand Up @@ -307,11 +302,7 @@ tbody tr:nth-child(odd) th {
}

/* Blog post or page title */
.page-title,
.post-title,
.post-title a {
color: #303030;
}

.page-title,
.post-title {
margin-top: 0;
Expand Down
48 changes: 45 additions & 3 deletions public/css/wisembly.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ html {
/* General */
@media (min-width: 58rem) {
html {
font-size: 18px;
font-size: 16px;
}
}

Expand All @@ -16,6 +16,10 @@ html {
display: inline-block;
}

a {
color: #f1bc33;
}

/* Sidebar */

h1 {
Expand All @@ -24,22 +28,60 @@ h1 {

.sidebar {
background: #07698D;
color: #46B489;
color: #ffffff;
}

@media (max-width: 48rem) {
.logo {
max-width: 200px;
margin: 0 auto;
}
}


.sidebar-about h1 {
margin: 0 0 0 -15px;
padding: 0;
}

.sidebar-about {
border-bottom: 1px solid #ffffff;
padding-bottom: 1em;
}

.sidebar-nav {
margin-top: 20px;
}

.copyright {
border-top: 1px solid #ffffff;
padding-top: 1.75em;
font-size: .8em;
}

/* Posts */

.page, .post {
margin-bottom: 2em;
margin-bottom: 4em;
}

.post {
border-top: 1px solid #07698d;
padding-top: 4em;
}

.post:first-child {
border-top: 0;
padding-top: 0;
}

.post-title a{
color: #07698d;
}

pre {
color: #ffffff;
background: #46b489;
}

.author {
Expand Down

0 comments on commit 93904ef

Please sign in to comment.