diff --git a/runbot_merge/__manifest__.py b/runbot_merge/__manifest__.py index 3dba6c95..35af99ca 100644 --- a/runbot_merge/__manifest__.py +++ b/runbot_merge/__manifest__.py @@ -21,6 +21,9 @@ 'models/staging_cancel/views.xml', ], 'assets': { + 'web._assets_primary_variables': [ + ('prepend', 'runbot_merge/static/scss/primary_variables.scss'), + ], 'web.assets_frontend': [ 'runbot_merge/static/scss/runbot_merge.scss', ], diff --git a/runbot_merge/static/scss/primary_variables.scss b/runbot_merge/static/scss/primary_variables.scss new file mode 100644 index 00000000..1a10edb4 --- /dev/null +++ b/runbot_merge/static/scss/primary_variables.scss @@ -0,0 +1,48 @@ +// colors from the original mergebot +$primary: #276e72; +$secondary: #685563; +$success: #28a745; +$info: #17a2b8; +$warning: #ffc107; +$danger: #dc3545; +$theme-colors: ( + "primary": $primary, + "secondary": $secondary, + "success": $success, + "info": $info, + "warning": $warning, + "danger": $danger, +); + +$o-system-fonts: sans-serif; + +// mostly revets a bunch of shit from the default odoo theming +$link-color: $primary; +$o-community-color: $primary; +$o-enterprise-color: $primary; + +$font-size-root: null; +$font-size-base: 1rem; +$font-size-sm: $font-size-base * .875; +$font-size-lg: $font-size-base * 1.25; + +$font-weight-lighter: lighter; +$font-weight-light: 300; +$font-weight-normal: 400; +$font-weight-bold: 700; +$font-weight-bolder: bolder; + +$font-weight-base: $font-weight-normal; + +$line-height-base: 1.5; +$line-height-sm: 1.25; +$line-height-lg: 2; + +$h1-font-size: $font-size-base * 2.5; +$h2-font-size: $font-size-base * 2; +$h3-font-size: $font-size-base * 1.75; +$h4-font-size: $font-size-base * 1.5; +$h5-font-size: $font-size-base; +$h6-font-size: $font-size-base; + +$border-radius: 0.25rem; diff --git a/runbot_merge/static/scss/runbot_merge.scss b/runbot_merge/static/scss/runbot_merge.scss index ea2a12d4..bb845233 100644 --- a/runbot_merge/static/scss/runbot_merge.scss +++ b/runbot_merge/static/scss/runbot_merge.scss @@ -10,10 +10,9 @@ body { } h1, h2, h3, h4, h5, h6{ color: inherit; - margin-top: 0.66em; - margin-bottom: 0.33em; + margin-top: 0.66em !important; + margin-bottom: 0.33em !important; } -h5 { font-size: 1em; } .bg-success, .bg-info, .bg-warning, .bg-danger, .bg-gray-lighter, .table-success, .table-info, .table-warning, .table-danger { color: inherit; @@ -22,18 +21,24 @@ h5 { font-size: 1em; } color: inherit; } +// FIXME: move these over to the primary variables or some shit, but bg-info is completely fucked $mergebot-colors: ("success": #dff0d8, "danger": #f2dede, "warning": #fcf8e3, "info": #d9edf7); @each $category, $color in $mergebot-colors { .bg-#{$category} { background-color: $color !important; } .table-#{$category} { - background-color: $color !important; + --table-bg: #{$color}; + --table-accent-bg: transparent; &.table-active { - background-color: scale-color($color, $lightness: -5%) !important; + // TODO: make that a runtime operation + --table-bg: #{scale-color($color, $lightness: -5%)}; } } } +.alert-primary { + background-color: #d7eaeb !important; +} .bg-unmerged { background-color: #dcefe8 !important } @@ -124,10 +129,10 @@ dl.runbot-merge-fields { @extend .pt-1; // because there's a trailing space which is annoying to remove, which plays // the role of padding-right - @extend .pl-1; + @extend .ps-1; @extend .text-nowrap; // works better for the left edge of the *box* - @extend .border-left; + @extend .border-start; } // batches sequence table in PR dashboard: mostly uses (customised) bootstrap diff --git a/runbot_merge/views/templates.xml b/runbot_merge/views/templates.xml index 2dff930f..267045b5 100644 --- a/runbot_merge/views/templates.xml +++ b/runbot_merge/views/templates.xml @@ -429,7 +429,7 @@ View in backend
Created by