This repository has been archived by the owner on Jul 23, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 533
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated to 1.0.6, adding spritesheet and related files
- Loading branch information
Showing
9 changed files
with
2,608 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
node_modules/ | ||
/node_modules/ | ||
node_modules | ||
.sass-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,6 @@ lib/php | |
composer.json | ||
.gitignore | ||
emojis.json | ||
.idea | ||
.idea | ||
node_modules | ||
.sass-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
module.exports = function (grunt) { | ||
|
||
grunt.initConfig({ | ||
|
||
|
||
|
||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
sass: { // Task | ||
dist: { // Target | ||
options: { // Target options | ||
style: 'compressed' | ||
}, | ||
files: { // Dictionary of files | ||
'assets/sprites/emojione.sprites.css': 'assets/sprites/emojione.sprites.scss' | ||
} | ||
} | ||
}, | ||
|
||
//Sprite Creator, run 'grunt sprite': | ||
sprite:{ | ||
all: { | ||
src: 'assets/png/*.png', | ||
destImg: 'assets/sprites/emojione.sprites.png', | ||
destCSS: 'assets/sprites/emojione.sprites.scss', | ||
'cssTemplate': 'assets/sprites/emojione.sprites.mustache', | ||
'algorithm': 'binary-tree', | ||
'cssVarMap': function (sprite) { | ||
sprite.name = 'emojione-' + sprite.name; | ||
} | ||
} | ||
} | ||
|
||
}); | ||
|
||
// Load in `grunt-spritesmith` | ||
grunt.loadNpmTasks('grunt-spritesmith'); | ||
grunt.loadNpmTasks('grunt-contrib-sass'); | ||
|
||
grunt.registerTask('default', ['sprite', 'sass']); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
// Default options | ||
'functions': true | ||
} | ||
|
||
[class*=emojione-] { | ||
image-rendering: optimizeQuality; | ||
width: 1.3em; | ||
height: 1.3em; | ||
background-image: url('emojione.sprites.png'); | ||
background-size: 3000%; | ||
background-repeat: no-repeat; | ||
} | ||
|
||
{{#items}} | ||
.{{name}} { | ||
background-position: (({{px.x}} * 100 / ({{px.total_width}} * (29/30))))#{"%"} (({{px.y}} * 100 / ({{px.total_height}} * (28/29))))#{"%"}; | ||
} | ||
{{/items}} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.