Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

add jcrop to ext dir and lint cleanup, move vendors to own sass file and refactor

Ed Platodc1e5a53e556
diff --git a/web/css/main.css b/web/css/main.css
index d88ef0b8d..03d0a0a26 100644
--- a/web/css/main.css
+++ b/web/css/main.css
@@ -1,20 +1,3 @@
-/* Dependency CSS */
-@import url("../../node_modules/bootstrap/dist/css/bootstrap.css");
-
-/* @import url("../../node_modules/font-awesome/css/font-awesome.css"); import via webpack */
-@import url("../../node_modules/jquery-ui/themes/base/jquery-ui.css");
-@import url("../../node_modules/jquery-ui/themes/ui-darkness/jquery-ui.css");
-@import url("../../node_modules/icheck/skins/square/grey.css");
-@import url("../../node_modules/icheck/skins/square/red.css");
-@import url("../../node_modules/icheck/skins/line/red.css");
-@import url("../../node_modules/jscrollpane/style/jquery.jscrollpane.css");
-@import url("../../node_modules/perfect-scrollbar/dist/css/perfect-scrollbar.css");
-@import url("../ext/mobiscroll-2.6.0/mobiscroll.css");
-@import url("../../node_modules/jquery.joyride/jquery.joyride.css");
-@import url("../../node_modules/jquery-jcrop/css/jquery.Jcrop.css");
-@import url("../../node_modules/ol/ol.css");
-@import url("../../node_modules/nouislider/src/jquery.nouislider.css");
-
/* App CSS */
@import url("fonts.css");
@import url("reset.css");
diff --git a/web/css/vendors.scss b/web/css/vendors.scss
new file mode 100644
index 000000000..3cba77edf
--- /dev/null
+++ b/web/css/vendors.scss
@@ -0,0 +1,16 @@
+/* Dependency CSS */
+@import "bootstrap/dist/css/bootstrap.css";
+// @import "font-awesome/css/font-awesome.css"; import via webpack
+@import "jquery-ui/themes/base/jquery-ui.css";
+@import "jquery-ui/themes/ui-darkness/jquery-ui.css";
+@import "icheck/skins/square/grey.css";
+@import "icheck/skins/square/red.css";
+@import "icheck/skins/line/red.css";
+@import "jscrollpane/style/jquery.jscrollpane.css";
+@import "perfect-scrollbar/dist/css/perfect-scrollbar.css";
+@import "../ext/mobiscroll-2.6.0/mobiscroll.css";
+@import "../ext/jquery-jcrop/jquery.Jcrop.css";
+@import "jquery.joyride/jquery.joyride.css";
+// @import "jquery-jcrop/css/jquery.Jcrop.css"; import via 'ext' dir
+@import "ol/ol.css";
+@import "nouislider/src/jquery.nouislider.css";
diff --git a/web/ext/jquery-jcrop/Jcrop.gif b/web/ext/jquery-jcrop/Jcrop.gif
new file mode 100644
index 000000000..72ea7ccb5
Binary files /dev/null and b/web/ext/jquery-jcrop/Jcrop.gif differ
diff --git a/web/ext/jquery-jcrop/jquery.Jcrop.css b/web/ext/jquery-jcrop/jquery.Jcrop.css
new file mode 100644
index 000000000..ba2cfa42d
--- /dev/null
+++ b/web/ext/jquery-jcrop/jquery.Jcrop.css
@@ -0,0 +1,181 @@
+/* jquery.Jcrop.css v0.9.12 - MIT License
+
+ EDITED VERSION FOR WEBPACK CSS IMPORT
+
+ The outer-most container in a typical Jcrop instance
+ If you are having difficulty with formatting related to styles
+ on a parent element, place any fixes here or in a like selector
+
+ You can also style this element if you want to add a border, etc
+ A better method for styling can be seen below with .jcrop-light
+ (Add a class to the holder and style elements for that extended class)
+*/
+.jcrop-holder {
+ direction: ltr;
+ text-align: left;
+
+ /* IE10 touch compatibility */
+ -ms-touch-action: none;
+}
+
+/* Selection Border */
+.jcrop-vline,
+.jcrop-hline {
+ background: #fff url("../images/Jcrop.gif");
+ font-size: 0;
+ position: absolute;
+}
+.jcrop-vline {
+ height: 100%;
+ width: 1px !important;
+}
+.jcrop-vline.right {
+ right: 0;
+}
+.jcrop-hline {
+ height: 1px !important;
+ width: 100%;
+}
+.jcrop-hline.bottom {
+ bottom: 0;
+}
+
+/* Invisible click targets */
+.jcrop-tracker {
+ height: 100%;
+ width: 100%;
+
+ /* "turn off" link highlight */
+ -webkit-tap-highlight-color: transparent;
+
+ /* disable callout, image save panel */
+ -webkit-touch-callout: none;
+
+ /* disable cut copy paste */
+ -webkit-user-select: none;
+}
+
+/* Selection Handles */
+.jcrop-handle {
+ background-color: #333;
+ border: 1px #eee solid;
+ width: 7px;
+ height: 7px;
+ font-size: 1px;
+}
+.jcrop-handle.ord-n {
+ left: 50%;
+ margin-left: -4px;
+ margin-top: -4px;
+ top: 0;
+}
+.jcrop-handle.ord-s {
+ bottom: 0;
+ left: 50%;
+ margin-bottom: -4px;
+ margin-left: -4px;
+}
+.jcrop-handle.ord-e {
+ margin-right: -4px;
+ margin-top: -4px;
+ right: 0;
+ top: 50%;
+}
+.jcrop-handle.ord-w {
+ left: 0;
+ margin-left: -4px;
+ margin-top: -4px;
+ top: 50%;
+}
+.jcrop-handle.ord-nw {
+ left: 0;
+ margin-left: -4px;
+ margin-top: -4px;
+ top: 0;
+}
+.jcrop-handle.ord-ne {
+ margin-right: -4px;
+ margin-top: -4px;
+ right: 0;
+ top: 0;
+}
+.jcrop-handle.ord-se {
+ bottom: 0;
+ margin-bottom: -4px;
+ margin-right: -4px;
+ right: 0;
+}
+.jcrop-handle.ord-sw {
+ bottom: 0;
+ left: 0;
+ margin-bottom: -4px;
+ margin-left: -4px;
+}
+
+/* Dragbars */
+.jcrop-dragbar.ord-n,
+.jcrop-dragbar.ord-s {
+ height: 7px;
+ width: 100%;
+}
+.jcrop-dragbar.ord-e,
+.jcrop-dragbar.ord-w {
+ height: 100%;
+ width: 7px;
+}
+.jcrop-dragbar.ord-n {
+ margin-top: -4px;
+}
+.jcrop-dragbar.ord-s {
+ bottom: 0;
+ margin-bottom: -4px;
+}
+.jcrop-dragbar.ord-e {
+ margin-right: -4px;
+ right: 0;
+}
+.jcrop-dragbar.ord-w {
+ margin-left: -4px;
+}
+
+/* The "jcrop-light" class/extension */
+.jcrop-light .jcrop-vline,
+.jcrop-light .jcrop-hline {
+ background: #fff;
+ filter: alpha(opacity=70) !important;
+ opacity: 0.7 !important;
+}
+.jcrop-light .jcrop-handle {
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ background-color: #000;
+ border-color: #fff;
+ border-radius: 3px;
+}
+
+/* The "jcrop-dark" class/extension */
+.jcrop-dark .jcrop-vline,
+.jcrop-dark .jcrop-hline {
+ background: #000;
+ filter: alpha(opacity=70) !important;
+ opacity: 0.7 !important;
+}
+.jcrop-dark .jcrop-handle {
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ background-color: #fff;
+ border-color: #000;
+ border-radius: 3px;
+}
+
+/* Simple macro to turn off the antlines */
+.solid-line .jcrop-vline,
+.solid-line .jcrop-hline {
+ background: #fff;
+}
+
+/* Fix for twitter bootstrap et al. */
+.jcrop-holder img,
+img.jcrop-preview {
+ max-width: none;
+}
diff --git a/web/ext/jquery-jcrop/jquery.Jcrop.min.css b/web/ext/jquery-jcrop/jquery.Jcrop.min.css
new file mode 100644
index 000000000..68fe4bca2
--- /dev/null
+++ b/web/ext/jquery-jcrop/jquery.Jcrop.min.css
@@ -0,0 +1,2 @@
+/* jquery.Jcrop.min.css v0.9.12 (build:20140524) */
+.jcrop-holder{direction:ltr;text-align:left;-ms-touch-action:none}.jcrop-hline,.jcrop-vline{background:#fff url(./Jcrop.gif);font-size:0;position:absolute}.jcrop-vline{height:100%;width:1px!important}.jcrop-vline.right{right:0}.jcrop-hline{height:1px!important;width:100%}.jcrop-hline.bottom{bottom:0}.jcrop-tracker{height:100%;width:100%;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none}.jcrop-handle{background-color:#333;border:1px #eee solid;width:7px;height:7px;font-size:1px}.jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0}.jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px}.jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%}.jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%}.jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0}.jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0}.jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0}.jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px}.jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%}.jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px}.jcrop-dragbar.ord-n{margin-top:-4px}.jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px}.jcrop-dragbar.ord-e{margin-right:-4px;right:0}.jcrop-dragbar.ord-w{margin-left:-4px}.jcrop-light .jcrop-hline,.jcrop-light .jcrop-vline{background:#fff;filter:alpha(opacity=70)!important;opacity:.7!important}.jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#fff;border-radius:3px}.jcrop-dark .jcrop-hline,.jcrop-dark .jcrop-vline{background:#000;filter:alpha(opacity=70)!important;opacity:.7!important}.jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#fff;border-color:#000;border-radius:3px}.solid-line .jcrop-hline,.solid-line .jcrop-vline{background:#fff}.jcrop-holder img,img.jcrop-preview{max-width:none}
\ No newline at end of file
diff --git a/web/images/Jcrop.gif b/web/images/Jcrop.gif
new file mode 100644
index 000000000..72ea7ccb5
Binary files /dev/null and b/web/images/Jcrop.gif differ
diff --git a/web/js/main.js b/web/js/main.js
index 3554c6657..215df6314 100644
--- a/web/js/main.js
+++ b/web/js/main.js
@@ -89,6 +89,7 @@ import { uiInfo } from './ui/info';
// App and Dependency CSS imports
import 'font-awesome-webpack';
+import '../css/vendors.scss';
import '../css/main.css';
import { polyfill } from './polyfill';