Skip to content

Commit

Permalink
Merge pull request #2 from dfguerrerom/static_files
Browse files Browse the repository at this point in the history
fix: duplicate static files in lab folder. Related with #1
  • Loading branch information
dfguerrerom authored Apr 22, 2024
2 parents 8ddc9d4 + 0766b89 commit ca9d600
Show file tree
Hide file tree
Showing 4 changed files with 168 additions and 0 deletions.
7 changes: 7 additions & 0 deletions share/jupyter/nbconvert/templates/lab/static/jupyter-clip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var tempInput = document.createElement("input");
tempInput.value = _txt;
document.body.appendChild(tempInput);
tempInput.focus();
tempInput.select();
document.execCommand("copy");
document.body.removeChild(tempInput);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
161 changes: 161 additions & 0 deletions share/jupyter/nbconvert/templates/lab/static/sepal_ui_styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
/* ******************************************************************************
* Customization of the provided css from the different libs used by sepal_ui
*/

/* replace the map panel elements on top */
.leaflet-pane,
.leaflet-top,
.leaflet-bottom {
z-index: 2 !important;
}

/* remove the shadow from the widgets on the maps */
.leaflet-widgetcontrol {
box-shadow: none;
}

/* remove extra padding on top of the content */
main.v-content {
padding-top: auto !important;
}

/* remove all the backgrounds from the controls and widget to be colored naturelly by the map */
.leaflet-control-container .vuetify-styles .v-application {
background: rgb(0, 0, 0, 0);
}
.v-alert__wrapper .progress {
background-color: transparent;
}

/* set the bar on top of the map (800) when set to fullscreen */
header.v-app-bar {
z-index: 800 !important;
}

/* set the menu_content on top of the map when it's set to fullscreen */
.v-menu__content {
max-width: 100% !important;
}

/* make sure navigation drawers are always visible when they exist */
nav.v-navigation-drawer {
z-index: 900 !important;
}

/* create extra position for the leaflet map controls */
.leaflet-center {
left: 50%;
transform: translate(-50%, 0%);
}

.leaflet-middle {
top: 50%;
position: absolute;
z-index: 1000;
pointer-events: none;
transform: translate(0%, -50%);
}

.leaflet-center.leaflet-middle {
transform: translate(-50%, -50%);
}

/* create extra classes to customize the layer_control table */
.v-no-hover:hover {
background-color: transparent !important;
}

.v-no-border tbody tr td,
.v-no-border tbody tr th {
border: none !important;
}

/* extra css rules to make the messages disappear beneath the SimpleSlider */
.v-no-messages .v-messages {
display: none;
}

.v-no-messages .v-input__slot {
margin-bottom: 0;
}

/* specific css for the btn placed on maps */
.v-btn.v-size--default.v-map-btn:not(.v-btn--round) {
padding: 0px;
min-width: 0px;
width: 30px;
height: 30px;
}

/* add specific css for the zoom btn of the map */
.v-btn.v-zoom-plus {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}

.v-btn.v-zoom-minus {
margin-top: -1px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}

/* css rules for fullscreen menus */
.v-card.v-menu-fullscreen {
width: calc(100vw - 80px);
height: calc(100vh - 20px);
}

/* hide the disclaimer message placed on top of the ui notebook
* the message will be displayed until the css is loaded */
#loading-app {
display: none !important;
}

/* Related with https://github.com/12rambau/sepal_ui/issues/893 */
#rendered_cells {
contain: revert !important;
padding: 0px !important;
}

#jp-main-content-panel {
contain: revert !important;
}

.jp-Cell {
padding: 0px !important;
}

html {
/* font sizes in vuetify are in rem units. To get the correct font size, the html tag has to have a font size of
* 16px */
font-size: 16px;
}

.v-application--wrap {
/* disable min-height: 100vh set by vuetify */
min-height: unset !important;
}

.sepal-ui-container {
min-height: 100vh;
}

#app > div[data-app="true"] {
min-height: 100vh;
}
/* https://github.com/widgetti/ipyvuetify/blob/38c9d575090f88beb6bd6b5c4dbdec47783ed4e7/js/src/styles.css#L1-L5 */
html {
/* font sizes in vuetify are in rem units. To get the correct font size, the html tag has to have a font size of
* 16px */
font-size: 16px;
overflow: auto;
}

.full-screen-map > .leaflet-container {
position: fixed !important;
width: 100vw;
height: calc(100vh - 48px);
z-index: 200; /* to make it work with dialogs */
bottom: 0;
left: 0;
}

0 comments on commit ca9d600

Please sign in to comment.