Import material-fonts in project for offline usage
authorymh <ymh.work@gmail.com>
Wed, 21 Jun 2017 04:37:30 +0200
changeset 69 2f42063b0869
parent 68 6e18b31b0ad5
child 70 dff58e6bea47
Import material-fonts in project for offline usage
client/package.json
client/public/index.html
client/src/_bootstrap-custom.scss
client/src/index.scss
client/src/sass/_bootstrap-custom.scss
client/src/sass/_material-font.scss
client/yarn.lock
--- a/client/package.json	Wed Jun 21 03:23:24 2017 +0200
+++ b/client/package.json	Wed Jun 21 04:37:30 2017 +0200
@@ -4,7 +4,6 @@
   "private": true,
   "homepage": ".",
   "dependencies": {
-    "bootstrap-sass": "^3.3.7",
     "immutable": "^3.8.1",
     "localforage": "^1.5.0",
     "lodash": "^4.17.4",
@@ -24,7 +23,9 @@
     "uuid": "^3.0.1"
   },
   "devDependencies": {
+    "bootstrap-sass": "^3.3.7",
     "enzyme": "^2.8.2",
+    "material-design-icons": "^3.0.1",
     "node-sass-chokidar": "^0.0.1",
     "npm-run-all": "^4.0.2",
     "react-scripts": "1.0.2",
--- a/client/public/index.html	Wed Jun 21 03:23:24 2017 +0200
+++ b/client/public/index.html	Wed Jun 21 04:37:30 2017 +0200
@@ -10,7 +10,6 @@
     -->
     <link rel="manifest" href="%PUBLIC_URL%/manifest.json">
     <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
-    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
     <!--
       Notice the use of %PUBLIC_URL% in the tags above.
       It will be replaced with the URL of the `public` folder during the build.
--- a/client/src/_bootstrap-custom.scss	Wed Jun 21 03:23:24 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-
-$icon-font-path: '~bootstrap-sass/assets/fonts/bootstrap/';
-
-// Core variables and mixins
-@import "bootstrap/variables";
-@import "bootstrap/mixins";
-
-// Reset and dependencies
-@import "bootstrap/normalize";
-@import "bootstrap/print";
-@import "bootstrap/glyphicons";
-
-// Core CSS
-@import "bootstrap/scaffolding";
-@import "bootstrap/type";
-@import "bootstrap/code";
-@import "bootstrap/grid";
-@import "bootstrap/tables";
-@import "bootstrap/forms";
-@import "bootstrap/buttons";
-
-// Components
-@import "bootstrap/component-animations";
-@import "bootstrap/dropdowns";
-@import "bootstrap/button-groups";
-@import "bootstrap/input-groups";
-@import "bootstrap/navs";
-@import "bootstrap/navbar";
-@import "bootstrap/breadcrumbs";
-@import "bootstrap/pagination";
-@import "bootstrap/pager";
-@import "bootstrap/labels";
-@import "bootstrap/badges";
-@import "bootstrap/jumbotron";
-@import "bootstrap/thumbnails";
-@import "bootstrap/alerts";
-@import "bootstrap/progress-bars";
-@import "bootstrap/media";
-@import "bootstrap/list-group";
-@import "bootstrap/panels";
-@import "bootstrap/responsive-embed";
-@import "bootstrap/wells";
-@import "bootstrap/close";
-
-// Components w/ JavaScript
-@import "bootstrap/modals";
-@import "bootstrap/tooltip";
-@import "bootstrap/popovers";
-@import "bootstrap/carousel";
-
-// Utility classes
-@import "bootstrap/utilities";
-@import "bootstrap/responsive-utilities";
\ No newline at end of file
--- a/client/src/index.scss	Wed Jun 21 03:23:24 2017 +0200
+++ b/client/src/index.scss	Wed Jun 21 04:37:30 2017 +0200
@@ -1,4 +1,5 @@
-@import 'bootstrap-custom';
+@import './sass/bootstrap-custom';
+@import './sass/material-font';
 
 body {
   margin: 0;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/sass/_bootstrap-custom.scss	Wed Jun 21 04:37:30 2017 +0200
@@ -0,0 +1,58 @@
+/*!
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
+ * Copyright 2011-2016 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+$icon-font-path: '~bootstrap-sass/assets/fonts/bootstrap/';
+
+// Core variables and mixins
+@import "bootstrap/variables";
+@import "bootstrap/mixins";
+
+// Reset and dependencies
+@import "bootstrap/normalize";
+@import "bootstrap/print";
+@import "bootstrap/glyphicons";
+
+// Core CSS
+@import "bootstrap/scaffolding";
+@import "bootstrap/type";
+@import "bootstrap/code";
+@import "bootstrap/grid";
+@import "bootstrap/tables";
+@import "bootstrap/forms";
+@import "bootstrap/buttons";
+
+// Components
+@import "bootstrap/component-animations";
+@import "bootstrap/dropdowns";
+@import "bootstrap/button-groups";
+@import "bootstrap/input-groups";
+@import "bootstrap/navs";
+@import "bootstrap/navbar";
+@import "bootstrap/breadcrumbs";
+@import "bootstrap/pagination";
+@import "bootstrap/pager";
+@import "bootstrap/labels";
+@import "bootstrap/badges";
+@import "bootstrap/jumbotron";
+@import "bootstrap/thumbnails";
+@import "bootstrap/alerts";
+@import "bootstrap/progress-bars";
+@import "bootstrap/media";
+@import "bootstrap/list-group";
+@import "bootstrap/panels";
+@import "bootstrap/responsive-embed";
+@import "bootstrap/wells";
+@import "bootstrap/close";
+
+// Components w/ JavaScript
+@import "bootstrap/modals";
+@import "bootstrap/tooltip";
+@import "bootstrap/popovers";
+@import "bootstrap/carousel";
+
+// Utility classes
+@import "bootstrap/utilities";
+@import "bootstrap/responsive-utilities";
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/client/src/sass/_material-font.scss	Wed Jun 21 04:37:30 2017 +0200
@@ -0,0 +1,38 @@
+$material-icon-font-path: '~material-design-icons/iconfont/';
+
+@font-face {
+  font-family: 'Material Icons';
+  font-style: normal;
+  font-weight: 400;
+  src: url('#{$material-icon-font-path}MaterialIcons-Regular.eot'); /* For IE6-8 */
+  src: local('Material Icons'),
+    local('MaterialIcons-Regular'),
+    url('#{$material-icon-font-path}MaterialIcons-Regular.woff2') format('woff2'),
+    url('#{$material-icon-font-path}MaterialIcons-Regular.woff') format('woff'),
+    url('#{$material-icon-font-path}MaterialIcons-Regular.ttf') format('truetype');
+};
+
+.material-icons {
+  font-family: 'Material Icons';
+  font-weight: normal;
+  font-style: normal;
+  font-size: 24px;  /* Preferred icon size */
+  display: inline-block;
+  line-height: 1;
+  text-transform: none;
+  letter-spacing: normal;
+  word-wrap: normal;
+  white-space: nowrap;
+  direction: ltr;
+
+  /* Support for all WebKit browsers. */
+  -webkit-font-smoothing: antialiased;
+  /* Support for Safari and Chrome. */
+  text-rendering: optimizeLegibility;
+
+  /* Support for Firefox. */
+  -moz-osx-font-smoothing: grayscale;
+
+  /* Support for IE. */
+  font-feature-settings: 'liga';
+}
--- a/client/yarn.lock	Wed Jun 21 03:23:24 2017 +0200
+++ b/client/yarn.lock	Wed Jun 21 04:37:30 2017 +0200
@@ -4098,6 +4098,10 @@
   version "0.1.0"
   resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194"
 
+material-design-icons@^3.0.1:
+  version "3.0.1"
+  resolved "https://registry.yarnpkg.com/material-design-icons/-/material-design-icons-3.0.1.tgz#9a71c48747218ebca51e51a66da682038cdcb7bf"
+
 math-expression-evaluator@^1.2.14:
   version "1.2.17"
   resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac"