mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[FIX] runbot_merge: styling on Odoo 17
Fix a few issues with migrated bootstrap classes (left -> start, right -> end), revert a bunch of shitty colors from standard, fixup backgrounds. Tried to remove the background overrides what with having used variables but it does completely wrong for info, and I can't be arsed (also force primary alerts for the same reason, I don't understand what either bootstrap or standard does and how to override it properly but it's shit). It'll keep.
This commit is contained in:
parent
99ae369d69
commit
8ad186c204
@ -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',
|
||||
],
|
||||
|
48
runbot_merge/static/scss/primary_variables.scss
Normal file
48
runbot_merge/static/scss/primary_variables.scss
Normal file
@ -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;
|
@ -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
|
||||
|
@ -429,7 +429,7 @@
|
||||
<a t-att-href="pr.github_url" t-field="pr.display_name">
|
||||
</a>
|
||||
<a t-attf-href="/web#view_type=form&model=runbot_merge.pull_requests&id={{pr.id}}"
|
||||
class="btn btn-sm btn-secondary align-top float-right"
|
||||
class="btn btn-sm btn-secondary align-top float-end"
|
||||
groups="runbot_merge.group_admin">View in backend</a>
|
||||
</h1>
|
||||
<h6>Created by <span t-field="pr.author.display_name"/></h6>
|
||||
|
Loading…
Reference in New Issue
Block a user