Merge branch 'refactor/optimise_chunking_build' into 'v3'
ui_migration refactor(build) reduce chuncking size Closes #758 See merge request openflexure/openflexure-microscope-server!575
This commit is contained in:
commit
fb539e9e8e
14 changed files with 483 additions and 458 deletions
|
|
@ -325,11 +325,7 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="less">
|
||||
// Basic UIkit CSS
|
||||
@import "../node_modules/uikit/src/less/uikit.less";
|
||||
// Custom UIkit CSS modifications
|
||||
@import "./assets/less/theme.less";
|
||||
|
||||
// We override the custom-electron-titlebar z-index
|
||||
// UIKit lightbox must be able to draw over the titlebar
|
||||
// as it currently always spawns at the root of the DOM
|
||||
|
|
@ -376,6 +372,10 @@ html {
|
|||
padding: 0;
|
||||
}
|
||||
|
||||
.view-component.uk-padding-small {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.image-fit {
|
||||
height: 80%;
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -1,177 +1,23 @@
|
|||
// UIkit Core
|
||||
@import "../../../node_modules/uikit/src/less/uikit.theme.less";
|
||||
// UIkit Core MUST come before variables.less.
|
||||
// Less uses lazy evaluation: the LAST definition of a variable wins.
|
||||
@import "uikit/src/less/uikit.theme.less";
|
||||
|
||||
// Custom OpenFlexure theming variables
|
||||
@import "./variables.less";
|
||||
|
||||
// Highlight.js
|
||||
@import "./highlight.less";
|
||||
|
||||
// Custom OpenFlexure theming
|
||||
|
||||
//
|
||||
// Colors
|
||||
//
|
||||
|
||||
@global-color: #000;
|
||||
@global-emphasis-color: #C32280;
|
||||
@global-muted-color: #666;
|
||||
|
||||
@global-primary-background: #C32280;
|
||||
|
||||
@inverse-primary-muted-color: lighten(@global-primary-background, 15%);
|
||||
@darkened-primary-color: darken(@global-primary-background, 15%);
|
||||
@inverse-global-color: fade(@global-inverse-color, 80%);
|
||||
|
||||
@global-border: #d5d5d5;
|
||||
|
||||
// UIkit
|
||||
// ========================================================================
|
||||
|
||||
@global-font-family: ProximaNova, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
@global-font-size: 14px;
|
||||
|
||||
@global-xxlarge-font-size: 38px;
|
||||
@global-xlarge-font-size: 30px;
|
||||
@global-large-font-size: 24px;
|
||||
@global-medium-font-size: 20px;
|
||||
@global-small-font-size: 14px;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Base
|
||||
//
|
||||
|
||||
@base-code-font-family: 'Roboto Mono', monospace;
|
||||
@base-code-font-size: 12px;
|
||||
|
||||
@base-heading-font-weight: 300;
|
||||
|
||||
@base-pre-font-size: 12px;
|
||||
@base-pre-padding: 25px;
|
||||
@base-pre-background: @global-muted-background;
|
||||
@base-pre-border-width: 0;
|
||||
@base-pre-border-radius: 0;
|
||||
|
||||
.hook-base-body() {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
|
||||
//
|
||||
// Decorations
|
||||
//
|
||||
@small-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
|
||||
@big-shadow: 0 14px 25px rgba(0, 0, 0, 0.16);
|
||||
|
||||
//
|
||||
// Container
|
||||
//
|
||||
|
||||
@container-max-width: 1380px;
|
||||
@container-small-max-width: 650px;
|
||||
|
||||
//
|
||||
// Navbar
|
||||
//
|
||||
|
||||
@inverse-navbar-nav-item-color: @inverse-global-color;
|
||||
@inverse-navbar-nav-item-hover-color: @inverse-global-emphasis-color;
|
||||
|
||||
//
|
||||
// Nav
|
||||
//
|
||||
|
||||
@nav-header-font-size: 16px;
|
||||
.uk-nav-header{
|
||||
text-transform:none;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Subnav
|
||||
//
|
||||
|
||||
@inverse-subnav-item-color: @inverse-global-color;
|
||||
@inverse-subnav-item-hover-color: @inverse-global-emphasis-color;
|
||||
|
||||
//
|
||||
// Tab
|
||||
//
|
||||
|
||||
@tab-item-padding-horizontal: 10px;
|
||||
@tab-item-padding-vertical: 9px;
|
||||
@tab-item-border-width: 2px;
|
||||
@tab-item-font-size: 12px;
|
||||
|
||||
.hook-tab-item() {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
//
|
||||
// Table
|
||||
//
|
||||
|
||||
@table-header-cell-font-size: 12px;
|
||||
|
||||
//
|
||||
// Label
|
||||
//
|
||||
|
||||
@label-font-size: 12px;
|
||||
|
||||
//
|
||||
// Text
|
||||
//
|
||||
|
||||
.hook-text-lead() {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.hook-text-large() {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
//
|
||||
// Utility
|
||||
//
|
||||
|
||||
@inverse-logo-color: @inverse-global-emphasis-color;
|
||||
@inverse-logo-hover-color: @inverse-global-emphasis-color;
|
||||
|
||||
//
|
||||
// Off-canvas
|
||||
//
|
||||
|
||||
@offcanvas-bar-background: #fff;
|
||||
@offcanvas-bar-color-mode: dark;
|
||||
|
||||
//
|
||||
// Inverse
|
||||
//
|
||||
|
||||
@inverse-global-color: fade(@global-inverse-color, 80%);
|
||||
@inverse-global-muted-color: fade(@global-inverse-color, 60%);
|
||||
|
||||
//
|
||||
// Paper
|
||||
//
|
||||
@paper-border-radius: 4px;
|
||||
@button-border-radius: 3px;
|
||||
|
||||
|
||||
/* ========================================================================
|
||||
Theme
|
||||
========================================================================== */
|
||||
|
||||
@sidebar-left-width: 240px;
|
||||
@sidebar-left-width-xl: 300px;
|
||||
|
||||
@sidebar-right-width: 200px;
|
||||
@sidebar-right-left: 0px;
|
||||
@sidebar-right-left-xl: 60px;
|
||||
|
||||
|
||||
|
||||
/* UIkit modifiers
|
||||
========================================================================== */
|
||||
|
||||
|
|
@ -186,11 +32,6 @@ h4, .uk-h4 {
|
|||
*/
|
||||
|
||||
// Line Mode
|
||||
@navbar-nav-item-line-margin-vertical: 20px;
|
||||
@navbar-nav-item-line-margin-horizontal: @navbar-nav-item-padding-horizontal;
|
||||
@navbar-nav-item-line-height: 1px;
|
||||
@navbar-nav-item-line-background: currentColor;
|
||||
@navbar-nav-item-line-transition-duration: 0.3s;
|
||||
|
||||
.uk-navbar-dropdown.uk-open {
|
||||
border-radius: @paper-border-radius;
|
||||
|
|
@ -220,15 +61,6 @@ h4, .uk-h4 {
|
|||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.hook-inverse() {
|
||||
|
||||
// Override background colour in dark mode
|
||||
.uk-card {
|
||||
background-color: #2a2a2a !important;
|
||||
color: @inverse-global-color;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Modal
|
||||
*/
|
||||
|
|
@ -297,23 +129,6 @@ h4, .uk-h4 {
|
|||
border: 1px solid @notification-message-warning-color
|
||||
}
|
||||
|
||||
.hook-inverse() {
|
||||
.uk-alert {
|
||||
background-color: rgba(180, 180, 180, 0.15);
|
||||
color: @inverse-global-color;
|
||||
border-color: @inverse-global-color;
|
||||
}
|
||||
.uk-alert-danger {
|
||||
color: @notification-message-danger-color;
|
||||
border-color: @notification-message-danger-color
|
||||
}
|
||||
|
||||
.uk-alert-warning {
|
||||
color: @notification-message-warning-color;
|
||||
border-color: @notification-message-warning-color
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Links
|
||||
*/
|
||||
|
|
@ -328,20 +143,6 @@ a:hover {
|
|||
color: @global-primary-background;
|
||||
}
|
||||
|
||||
.hook-inverse() {
|
||||
|
||||
.uk-link:hover,
|
||||
.uk-button-link:hover,
|
||||
a:hover {
|
||||
color: @inverse-primary-muted-color;
|
||||
}
|
||||
|
||||
.uk-alert-success{
|
||||
color: rgba(28, 131, 45);
|
||||
background-color: rgba(130, 221, 145, 0.671);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
*/
|
||||
|
|
@ -376,37 +177,6 @@ a:hover {
|
|||
color: #919191 !important;
|
||||
}
|
||||
|
||||
.hook-inverse() {
|
||||
.uk-button {
|
||||
background-color: rgba(27, 13, 13, 0.15);
|
||||
color: @inverse-primary-muted-color;
|
||||
border-color: @inverse-primary-muted-color;
|
||||
}
|
||||
.uk-button:hover {
|
||||
background-color: @inverse-primary-muted-color;
|
||||
color: #fff;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.uk-button-primary {
|
||||
background-color: rgb(0, 0, 0);
|
||||
color: @inverse-primary-muted-color;
|
||||
border-color: @inverse-primary-muted-color;
|
||||
}
|
||||
|
||||
.uk-button-primary:hover {
|
||||
background-color: @inverse-primary-muted-color;
|
||||
color: #fff;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.uk-button-disabled {
|
||||
border: 1px solid @darkened-primary-color !important;
|
||||
background-color: #333333 !important;
|
||||
color: #777777 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.uk-icon-button,
|
||||
.uk-icon-button:hover {
|
||||
text-decoration: none
|
||||
|
|
@ -446,13 +216,6 @@ a:hover {
|
|||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.hook-inverse() {
|
||||
.uk-accordion-title::before {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Pagination
|
||||
*/
|
||||
|
|
|
|||
262
webapp/src/assets/less/variables.less
Normal file
262
webapp/src/assets/less/variables.less
Normal file
|
|
@ -0,0 +1,262 @@
|
|||
// Custom OpenFlexure theming
|
||||
// UIKit vars imported
|
||||
@import (reference) "uikit/src/less/uikit.theme.less";
|
||||
//
|
||||
// Colors
|
||||
//
|
||||
|
||||
@global-color: #000;
|
||||
@global-emphasis-color: #C32280;
|
||||
@global-muted-color: #666;
|
||||
|
||||
@global-primary-background: #C32280;
|
||||
|
||||
@inverse-primary-muted-color: lighten(@global-primary-background, 15%);
|
||||
@darkened-primary-color: darken(@global-primary-background, 15%);
|
||||
@inverse-global-color: fade(@global-inverse-color, 80%);
|
||||
|
||||
@global-border: #d5d5d5;
|
||||
|
||||
// UIkit
|
||||
// ========================================================================
|
||||
|
||||
@global-font-family: ProximaNova, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
@global-font-size: 14px;
|
||||
|
||||
@global-xxlarge-font-size: 38px;
|
||||
@global-xlarge-font-size: 30px;
|
||||
@global-large-font-size: 24px;
|
||||
@global-medium-font-size: 20px;
|
||||
@global-small-font-size: 14px;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Base
|
||||
//
|
||||
|
||||
@base-code-font-family: 'Roboto Mono', monospace;
|
||||
@base-code-font-size: 12px;
|
||||
|
||||
@base-heading-font-weight: 300;
|
||||
|
||||
@base-pre-font-size: 12px;
|
||||
@base-pre-padding: 25px;
|
||||
@base-pre-background: @global-muted-background;
|
||||
@base-pre-border-width: 0;
|
||||
@base-pre-border-radius: 0;
|
||||
|
||||
.hook-base-body() {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
|
||||
//
|
||||
// Decorations
|
||||
//
|
||||
@small-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
|
||||
@big-shadow: 0 14px 25px rgba(0, 0, 0, 0.16);
|
||||
|
||||
//
|
||||
// Container
|
||||
//
|
||||
|
||||
@container-max-width: 1380px;
|
||||
@container-small-max-width: 650px;
|
||||
|
||||
//
|
||||
// Navbar
|
||||
//
|
||||
|
||||
@inverse-navbar-nav-item-color: @inverse-global-color;
|
||||
@inverse-navbar-nav-item-hover-color: @inverse-global-emphasis-color;
|
||||
|
||||
//
|
||||
// Nav
|
||||
//
|
||||
|
||||
@nav-header-font-size: 16px;
|
||||
|
||||
//
|
||||
// Subnav
|
||||
//
|
||||
|
||||
@inverse-subnav-item-color: @inverse-global-color;
|
||||
@inverse-subnav-item-hover-color: @inverse-global-emphasis-color;
|
||||
|
||||
//
|
||||
// Tab
|
||||
//
|
||||
|
||||
@tab-item-padding-horizontal: 10px;
|
||||
@tab-item-padding-vertical: 9px;
|
||||
@tab-item-border-width: 2px;
|
||||
@tab-item-font-size: 12px;
|
||||
|
||||
.hook-tab-item() {
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
//
|
||||
// Table
|
||||
//
|
||||
|
||||
@table-header-cell-font-size: 12px;
|
||||
|
||||
//
|
||||
// Label
|
||||
//
|
||||
|
||||
@label-font-size: 12px;
|
||||
|
||||
//
|
||||
// Text
|
||||
//
|
||||
|
||||
.hook-text-lead() {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.hook-text-large() {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
//
|
||||
// Utility
|
||||
//
|
||||
|
||||
@inverse-logo-color: @inverse-global-emphasis-color;
|
||||
@inverse-logo-hover-color: @inverse-global-emphasis-color;
|
||||
|
||||
//
|
||||
// Off-canvas
|
||||
//
|
||||
|
||||
@offcanvas-bar-background: #fff;
|
||||
@offcanvas-bar-color-mode: dark;
|
||||
|
||||
//
|
||||
// Inverse
|
||||
//
|
||||
|
||||
@inverse-global-color: fade(@global-inverse-color, 80%);
|
||||
@inverse-global-muted-color: fade(@global-inverse-color, 60%);
|
||||
|
||||
//
|
||||
// Paper
|
||||
//
|
||||
@paper-border-radius: 4px;
|
||||
@button-border-radius: 3px;
|
||||
|
||||
|
||||
/* ========================================================================
|
||||
Theme
|
||||
========================================================================== */
|
||||
|
||||
@sidebar-left-width: 240px;
|
||||
@sidebar-left-width-xl: 300px;
|
||||
|
||||
@sidebar-right-width: 200px;
|
||||
@sidebar-right-left: 0px;
|
||||
@sidebar-right-left-xl: 60px;
|
||||
|
||||
/*
|
||||
* Navbar
|
||||
*/
|
||||
|
||||
// Line Mode
|
||||
@navbar-nav-item-line-margin-vertical: 20px;
|
||||
@navbar-nav-item-line-margin-horizontal: @navbar-nav-item-padding-horizontal;
|
||||
@navbar-nav-item-line-height: 1px;
|
||||
@navbar-nav-item-line-background: currentColor;
|
||||
@navbar-nav-item-line-transition-duration: 0.3s;
|
||||
|
||||
.hook-inverse() {
|
||||
|
||||
// Override background colour in dark mode
|
||||
.uk-card {
|
||||
background-color: #2a2a2a !important;
|
||||
color: @inverse-global-color;
|
||||
}
|
||||
}
|
||||
|
||||
.hook-inverse() {
|
||||
.uk-alert {
|
||||
background-color: rgba(180, 180, 180, 0.15);
|
||||
color: @inverse-global-color;
|
||||
border-color: @inverse-global-color;
|
||||
}
|
||||
.uk-alert-danger {
|
||||
color: @notification-message-danger-color;
|
||||
border-color: @notification-message-danger-color
|
||||
}
|
||||
|
||||
.uk-alert-warning {
|
||||
color: @notification-message-warning-color;
|
||||
border-color: @notification-message-warning-color
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Links
|
||||
*/
|
||||
.hook-inverse() {
|
||||
|
||||
.uk-link:hover,
|
||||
.uk-button-link:hover,
|
||||
a:hover {
|
||||
color: @inverse-primary-muted-color;
|
||||
}
|
||||
|
||||
.uk-alert-success{
|
||||
color: rgba(28, 131, 45);
|
||||
background-color: rgba(130, 221, 145, 0.671);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Buttons
|
||||
*/
|
||||
.hook-inverse() {
|
||||
.uk-button {
|
||||
background-color: rgba(27, 13, 13, 0.15);
|
||||
color: @inverse-primary-muted-color;
|
||||
border-color: @inverse-primary-muted-color;
|
||||
}
|
||||
.uk-button:hover {
|
||||
background-color: @inverse-primary-muted-color;
|
||||
color: #fff;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.uk-button-primary {
|
||||
background-color: rgb(0, 0, 0);
|
||||
color: @inverse-primary-muted-color;
|
||||
border-color: @inverse-primary-muted-color;
|
||||
}
|
||||
|
||||
.uk-button-primary:hover {
|
||||
background-color: @inverse-primary-muted-color;
|
||||
color: #fff;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.uk-button-disabled {
|
||||
border: 1px solid @darkened-primary-color !important;
|
||||
background-color: #333333 !important;
|
||||
color: #777777 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Accordion
|
||||
*/
|
||||
|
||||
|
||||
.hook-inverse() {
|
||||
.uk-accordion-title::before {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -39,7 +39,7 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import "../../assets/less/theme.less";
|
||||
@import "../../assets/less/variables.less";
|
||||
|
||||
.progress {
|
||||
position: relative;
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ export default {
|
|||
|
||||
<style lang="less" scoped>
|
||||
// Custom UIkit CSS modifications
|
||||
@import "../../assets/less/theme.less";
|
||||
@import "../../assets/less/variables.less";
|
||||
|
||||
.tabicon-active {
|
||||
color: #fff !important;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import "../../assets/less/theme.less";
|
||||
@import "../../assets/less/variables.less";
|
||||
|
||||
.in-button {
|
||||
position: absolute;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ export default {
|
|||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
@import "../../assets/less/theme.less";
|
||||
@import "../../assets/less/variables.less";
|
||||
|
||||
#progress-and-cancel-row {
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import "../../assets/less/theme.less";
|
||||
@import "../../assets/less/variables.less";
|
||||
a.uk-button-disabled {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ export default {
|
|||
|
||||
<style lang="less" scoped>
|
||||
// Custom UIkit CSS modifications
|
||||
@import "../../assets/less/theme.less";
|
||||
@import "../../assets/less/variables.less";
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ export default {
|
|||
|
||||
<style lang="less" scoped>
|
||||
// Custom UIkit CSS modifications
|
||||
@import "../../assets/less/theme.less";
|
||||
@import "../../assets/less/variables.less";
|
||||
|
||||
.settings-nav {
|
||||
overflow-y: auto;
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import "../../assets/less/theme.less";
|
||||
@import "../../assets/less/variables.less";
|
||||
|
||||
.matrix-container {
|
||||
display: inline-block;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue