1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-16 10:04:45 +02:00

Adding grid as data image

This commit is contained in:
Antonio Laguna
2017-03-19 22:35:53 +01:00
parent dff7b2b771
commit 3d549d7b97
3 changed files with 12 additions and 8 deletions

View File

@@ -28,18 +28,18 @@
}, },
"homepage": "https://github.com/jlantunez/webslides#readme", "homepage": "https://github.com/jlantunez/webslides#readme",
"devDependencies": { "devDependencies": {
"babel-cli": "^6.23.0", "babel-cli": "^6.24.0",
"babel-core": "^6.23.1", "babel-core": "^6.24.0",
"babel-loader": "^6.4.0", "babel-loader": "^6.4.1",
"babel-preset-env": "^1.2.1", "babel-preset-env": "^1.2.2",
"babel-preset-es2015": "^6.22.0", "babel-preset-es2015": "^6.24.0",
"eslint": "^3.17.1", "eslint": "^3.18.0",
"eslint-loader": "^1.6.3", "eslint-loader": "^1.6.3",
"npm-run-all": "^4.0.2", "npm-run-all": "^4.0.2",
"rimraf": "^2.6.1", "rimraf": "^2.6.1",
"smart-banner-webpack-plugin": "^3.0.1", "smart-banner-webpack-plugin": "^3.0.1",
"webpack": "^2.2.1", "webpack": "^2.2.1",
"webpack-dev-server": "^2.4.1" "webpack-dev-server": "^2.4.2"
}, },
"scripts": { "scripts": {
"prebuild": "rimraf static/js/webslide*", "prebuild": "rimraf static/js/webslide*",

View File

@@ -1,5 +1,9 @@
import Keys from '../utils/keys'; import Keys from '../utils/keys';
const GRID_IMAGE = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYAg' +
'MAAACdGdVrAAAACVBMVEUAAAAtXsUtXcPDDPUWAAAAA3RSTlMAZmHzZFkxAAAAFklEQVQI12M' +
'AA9bBR3ExhAJB1iooBQBGwgVEs/QtuAAAAABJRU5ErkJggg==';
/** /**
* Grid plugin. * Grid plugin.
*/ */
@@ -16,7 +20,7 @@ export default class Grid {
this.ws_ = wsInstance; this.ws_ = wsInstance;
const CSS = `body.baseline { const CSS = `body.baseline {
background: url(../images/baseline.png) left top .8rem/.8rem; background: url(${GRID_IMAGE}) left top .8rem/.8rem;
}`; }`;
const head = document.head || document.getElementsByTagName('head')[0]; const head = document.head || document.getElementsByTagName('head')[0];
const style = document.createElement('style'); const style = document.createElement('style');

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 B