Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

feature tab style fixes

Jason Kentb78e41489c5d
diff --git a/web/css/layer-categories.css b/web/css/layer-categories.css
index 2f30afcf1..05c004925 100644
--- a/web/css/layer-categories.css
+++ b/web/css/layer-categories.css
@@ -1,8 +1,7 @@
/* Categories view */
.categories-nav {
- margin: 0 auto;
- max-width: 960px;
- padding-top: 5px;
+ margin: 0;
+ padding: 5px 5px 0 12px;
& .nav-item {
height: 31px;
line-height: 35px;
diff --git a/web/css/layers.css b/web/css/layers.css
index 661d5b3b7..a563aae10 100644
--- a/web/css/layers.css
+++ b/web/css/layers.css
@@ -348,6 +348,12 @@
}
}
+.category-width {
+ & .layer-list-container.browse {
+ padding: 3px 5px 0 0;
+ }
+}
+
.layer-detail-container {
overflow-y: auto;
padding-right: 2px;
@@ -548,6 +554,12 @@
}
}
+@media (min-width: 768px) {
+ .category-width .search-layers-container {
+ height: calc(var(--vh, 1vh) * 100 - 172px);
+ }
+}
+
/* Mobile Styles Begin Here */
@media (max-width: 768px) {
.modal-content {
@@ -564,6 +576,7 @@
.layer-modal-content > .results-text {
font-size: 12px !important;
}
+
.custom-layer-dialog {
&.browse-search-width, &.category-width {
width: 100%;
@@ -575,9 +588,14 @@
padding: 0;
height: calc(var(--vh, 1vh) * 100 - 70px);
}
- & .product-outter-list-case {
+ &.browse-search-width .product-outter-list-case {
width: 100%;
- padding: 0 6px 0 0;
+ }
+ &.category-width .search-layers-container {
+ height: initial;
+ }
+ &.category-width .modal-body {
+ padding: 0 4px;
}
}
.category-masonry-case .layer-category {
@@ -586,10 +604,15 @@
.category-background-cover {
background-size: cover;
}
- .layer-modal-content .categories-nav .nav-link {
- font-size: 11px;
- padding: 1px 7px;
- margin: 0 12px 0 0;
+ .layer-modal-content .categories-nav {
+ .nav-item {
+ margin: 0 8px 0 0;
+ }
+ .nav-link {
+ font-size: 11px;
+ padding: 1px 7px;
+ margin: 0;
+ }
}
.layers-all-layer .search-row .wv-checkbox {
left: 4px;
diff --git a/web/js/components/layer/product-picker/product-picker.js b/web/js/components/layer/product-picker/product-picker.js
index 32cb50a05..407d53a56 100644
--- a/web/js/components/layer/product-picker/product-picker.js
+++ b/web/js/components/layer/product-picker/product-picker.js
@@ -51,12 +51,11 @@ class ProductPicker extends React.Component {
setModalClass() {
const { modalElement } = this.state;
- const { mode } = this.props;
- if (mode === 'category') {
+ const { mode, categoryType } = this.props;
+ if (mode === 'category' || categoryType === 'featured') {
modalElement.classList.remove('browse-search-width');
modalElement.classList.add('category-width');
- }
- if (mode === 'search' || mode === 'measurements') {
+ } else if (mode === 'search' || mode === 'measurements') {
modalElement.classList.remove('category-width');
modalElement.classList.add('browse-search-width');
}
@@ -114,11 +113,12 @@ const mapStateToProps = (state) => {
} = state;
const { screenWidth } = browser;
const width = getModalWidth(screenWidth);
- const { mode, category } = productPicker;
+ const { mode, category, categoryType } = productPicker;
return {
browser,
category,
+ categoryType,
mode,
width,
};
diff --git a/web/js/modules/product-picker/reducers.js b/web/js/modules/product-picker/reducers.js
index 245d367ac..6144a1993 100644
--- a/web/js/modules/product-picker/reducers.js
+++ b/web/js/modules/product-picker/reducers.js
@@ -112,6 +112,8 @@ export function productPickerReducer(state = productPickerState, action) {
mode: 'search',
selectedLayer: null,
showMobileFacets: true,
+ category: null,
+ categoryType: 'hazards and disasters',
};
}