Last active
November 14, 2021 15:32
-
-
Save b3z/a5889ab2d5208991f4e8513e14ef4e2b to your computer and use it in GitHub Desktop.
Crappy OLAT Darkmode. But better than burning Eyes - paste in site inspect console - mod of MartB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
var cssStuff = ""; | |
function addGlobalStyle(css) { | |
cssStuff += css + "\n"; | |
} | |
function loadGlobalStyle(css) { | |
var html, style; | |
html = document.getElementsByTagName('html')[0]; | |
if (!html) { return; } | |
style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.innerHTML = css; | |
html.appendChild(style); | |
} | |
var MutationObserver = null; | |
var iframeInternalCss = 'body.mce-content-body {background-color: #36393F !important; color: #c7c7d6 !important; text-decoration: none;}'; | |
var iframeStyleElement = document.createElement('style'); | |
iframeStyleElement.id = "custom-css"; | |
iframeStyleElement.appendChild(document.createTextNode(iframeInternalCss)); | |
function rgb2hex(rgb) { | |
if (/^#[0-9A-F]{6}$/i.test(rgb)) return rgb; | |
rgb = rgb.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+),?(\s*(\d+))?\)$/); | |
var alpha = rgb[5] !== undefined ? parseFloat(rgb[5]) : 1.0; | |
function hex(x) { | |
return ("0" + parseInt(x).toString(16)).slice(-2); | |
} | |
return "#" + hex(rgb[1] * alpha) + hex(rgb[2] * alpha) + hex(rgb[3] * alpha); | |
} | |
function getLumaFromHexRGB(hexString) { | |
var rgb = parseInt(hexString.substr(1), 16); | |
return 0.2126 * ((rgb >> 16) & 0xff) + 0.7152 * ((rgb >> 8) & 0xff) + 0.0722 * ((rgb >> 0) & 0xff); // per ITU-R BT.709 | |
} | |
function processIframes() { | |
function fixContrastsForFrame(target) { | |
var customCssElement = target.getElementById("custom-css"); | |
if (customCssElement !== null) { | |
return; | |
} | |
var frameHead = target.getElementsByTagName('head')[0]; | |
frameHead.appendChild(iframeStyleElement); | |
var elemens = target.querySelectorAll('*'); | |
for (var j = 0; j < elemens.length; ++j) { | |
var elem = elemens[j]; | |
var backgroundColor = window.getComputedStyle(elem).getPropertyValue("background-color"); | |
var color = window.getComputedStyle(elem).getPropertyValue("color"); | |
if (backgroundColor == undefined || color == undefined) { | |
continue; | |
} | |
var hexBackgroundColor = rgb2hex(backgroundColor); | |
var hexColor = rgb2hex(color) | |
var bgLuma = getLumaFromHexRGB(hexBackgroundColor); | |
var colorLuma = getLumaFromHexRGB(hexColor); | |
if (bgLuma < 50) { | |
//console.log("bGcolor is pretty dark: " + bgLuma + " bgColor:" + hexBackgroundColor + " color: " + hexColor + " colorLuma" + colorLuma); | |
if (colorLuma < 120) { | |
elem.style.removeProperty('color'); | |
} | |
} else if (bgLuma >= 150){ | |
if (colorLuma > 50) { | |
elem.style.color = "#36393F"; | |
} | |
} else { | |
console.log("unhandled color contrast"); | |
} | |
} | |
} | |
// We are an iframe so call this on ourselves | |
var currentWindowIsIframe = window.location !== window.parent.location || window.document.body.classList.contains('o_body_popup'); | |
if (currentWindowIsIframe) { | |
fixContrastsForFrame(window.document); | |
} | |
// Try to process nested iframes aswell | |
var iframes = window.frames; | |
for (var i = 0; i < iframes.length; i++) { | |
var frame = iframes[i].window.document; | |
fixContrastsForFrame(frame); | |
} | |
} | |
window.addEventListener('DOMContentLoaded', function() { | |
processIframes(); | |
if (MutationObserver != null) { | |
return; | |
} | |
MutationObserver = window.MutationObserver || window.WebKitMutationObserver; | |
var style = document.createElement('style'); | |
style.id = "custom-css"; | |
style.appendChild(document.createTextNode(iframeInternalCss)); | |
var observer = new MutationObserver(function(mutations, observer) { | |
mutations.forEach(function(mutation) { | |
[].filter.call(mutation.addedNodes, function(node) { | |
return node.nodeName == 'IFRAME'; | |
}).forEach(function(node) { | |
node.addEventListener('load', function (e) { | |
console.log("iframe done loading" + node); | |
processIframes(); | |
}); | |
}); | |
}); | |
}); | |
observer.observe(document, { | |
subtree: true, | |
childList: true, | |
}); | |
}, false); | |
addGlobalStyle('body.o_dmz #o_bg {filter: invert(100%);}'); | |
addGlobalStyle('html {-webkit-backface-visibility: hidden;}'); | |
addGlobalStyle('fieldset legend,h1,h2,h3,h4,h5,h6, .o_login .o_login_intro h1 {color: #c7c7d6; border-color: #000000;}'); | |
addGlobalStyle('.o_note h2, .o_note h3, .o_note h4, .b_note h2, .b_note h3, .b_note h4 {color: #c7c7d6;}'); | |
addGlobalStyle('.o_login .o_login_provider {background-color: #36393F; border-color: #000000;}'); | |
addGlobalStyle('.o_login .o_login_register {margin: 12px;}'); | |
addGlobalStyle('.o_loginscreen {background-color: transparent !important;}'); | |
addGlobalStyle('p {margin: 2px;}'); | |
addGlobalStyle('.text-muted {color: #b2b2b2; }'); | |
addGlobalStyle('.breadcrumb {background-color: #36393F}'); | |
addGlobalStyle('hr {margin: 5px 0 5px 0;}'); | |
addGlobalStyle('.o_noti .o_label {color: #b2b2b2;}'); | |
addGlobalStyle('.modal-content {background-color: #36393F;}'); | |
addGlobalStyle('.modal-footer {border-color: #000000;}'); | |
// Close button modal offset fix (like h4) | |
addGlobalStyle('.modal-header .close { margin-right: 0px; margin-top: 10px;}'); | |
addGlobalStyle('.close, .close:hover, .close:active, .close:focus {color: #c7c7d6; opacity: 0.8;}'); | |
addGlobalStyle('h1, .h1, h2, .h2, h3, .h3 {margin-top: 5px; margin-bottom: 10px;}'); | |
addGlobalStyle('.o_table_wrapper {background: none;}'); | |
addGlobalStyle('.o_feed .o_date, .o_feed .o_author {color: #b2b2b2;}'); | |
// Right offcanvas fixing | |
addGlobalStyle('#o_offcanvas_right { min-height: 98vh; background-color: #36393F;}'); | |
// Dialog widget | |
addGlobalStyle('.ui-dialog {padding: 0; background-color: #36393F;}'); | |
addGlobalStyle('.ui-dialog .ui-widget-content {border-color: #000000; background: #36393F !important;}'); | |
addGlobalStyle('.ui-dialog.ui-widget-content {border-color: #000000; background: #36393F;}'); | |
addGlobalStyle('.ui-widget-content {color:#c7c7d6; }'); | |
// Friendlist | |
addGlobalStyle('.o_im_buddieslist ul{word-break: break-all; color: #c7c7d6;}'); | |
addGlobalStyle('.ui-dialog .ui-dialog-titlebar {background-color: #36393F !important; }'); | |
addGlobalStyle('.ui-widget-header {border: none;}'); | |
addGlobalStyle('.ui-dialog .ui-widget-header .ui-dialog-title {color: #c7c7d6;}'); | |
// Nicer colors for info etc | |
addGlobalStyle('.o_note, .b_note, p.b_note, div.b_note, .o_form .o_desc, .o_course_run .o_statusinfo, .o_course_stats .o_desc, .o_assessmentitem_wrapper .modalFeedback .o_info.o_empty_modal_feedback, .o_assessment_test_results .o_qti_sections .o_qti_section .o_qti_items .o_qti_item .o_qti_item_comment {color: #36393F;background-color: #4ca7d4; margin: 15px 0; padding: 15px;}'); | |
addGlobalStyle('.o_meta .o_desc {color: #b2b2b2;}'); | |
addGlobalStyle('.o_process .o_meta {color: #b2b2b2;}'); | |
addGlobalStyle('.o_course_run .o_toc .o_entry .o_displaytitle {color: #c7c7d6;}'); | |
addGlobalStyle('.o_block_with_datecomp .o_meta {color: #b2b2b2;}'); | |
addGlobalStyle('.o_important, .b_important, p.b_important, div.b_important, .o_bc_empty, .o_course_run .o_no_scoreinfo {color: #36393F !important;}'); | |
addGlobalStyle('.alert > h3 {color: #36393F; }'); | |
addGlobalStyle('.alert-info {color:#66666E}'); | |
addGlobalStyle('.alert-warning {color: #ecbc68;}'); | |
// Line styling | |
addGlobalStyle('.o_cl_line.o_even {background-color: #36393F;}'); | |
addGlobalStyle('.o_cl_line {margin-bottom: 0px; padding-bottom: 0;}'); | |
addGlobalStyle('.o_cl_line.row {margin-left: 0; margin-right: 0;}'); | |
// Form Styling | |
addGlobalStyle('.form-control, .input-group-addon {border-color: #66666e; color: #b2b2b2; background-color: #36393F;}'); | |
addGlobalStyle('.input-group-addon {background-color: #1e2126;}'); | |
addGlobalStyle('.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {background-color: #36393F;}'); | |
// Togglebox styling | |
// Hide button hack | |
addGlobalStyle('.o_info, .b_info, p.b_info, div.b_info, .o_form .o_info, .o_togglebox_wrapper div.o_togglebox_content, div.o_qti_item_itemfeedback, .o_assessmentitem_wrapper .modalFeedback .o_info {border-left: 3px solid #b2b2b2; background-color: #36393F;}'); | |
// Link styling | |
addGlobalStyle('a, .o_tree a, .o_toolbar .o_tools_container a, .ui-widget-content a, .o_im_buddieslist ul a,.o_user_content_block a { color: #b2b2b2; }'); | |
addGlobalStyle('a:hover, a:focus, .o_toolbar .o_tools_container a:hover, .ui-widget-content a:hover, .o_im_buddieslist ul a:hover, .o_user_content_block a:hover { color: #c7c7d6 !important; text-decoration: none; }'); | |
addGlobalStyle('.o_title a, .o_title a:active, .o_title a:hover { color: #c7c7d6; text-decoration: none; }'); | |
addGlobalStyle('.o_coursetable.o_rendertype_custom .o_table_row .o_meta .o_title a, .o_coursetable.o_rendertype_custom .o_table_row .o_meta .o_title a:hover {color: #c7c7d6; text-decoration: none; }'); | |
// Main Toolbar Styling | |
addGlobalStyle('.o_toolbar .o_tools_container {color: #b2b2b2; background-color: #36393F; border-color: #000000;}'); | |
addGlobalStyle('.o_toolbar .o_breadcrumb + .o_tools_container {border-top: 1px solid #36393F;}'); | |
addGlobalStyle('.o_toolbar .o_tool_next, .o_toolbar .o_tool_previous { border-color: #000000; background-color: #36393F;}'); | |
// Table Styling | |
addGlobalStyle('.table-striped > tbody > tr:nth-child(odd) { background-color: #36393F; }'); | |
addGlobalStyle('.table-hover > tbody > tr:hover {background-color: #1e2126;}'); | |
addGlobalStyle('.table-striped > tbody > tr:nth-child(odd):hover { background-color: #36393F;}'); // Important reset rule | |
addGlobalStyle('.o_table_wrapper th a, .o_table_wrapper th a:hover { color: #c7c7d6}'); | |
addGlobalStyle('.table-bordered {border-color: #000000;}'); | |
addGlobalStyle('table.b_gray td, table.b_gray th { background-color: #36393F !important;}'); | |
// Forum Styling | |
addGlobalStyle('.o_forum .o_forum_message_header, .o_forum_message.o_block_large_bottom div.o_forum_message_header.clearfix { border-color: #000000; background-color: #36393F;}'); | |
addGlobalStyle('.o_forum .o_forum_message { background-color: #36393F; border-color: #000000;}'); | |
addGlobalStyle('.o_table_wrapper .o_row_selected td { background-color: #36393F !important; }'); | |
addGlobalStyle('.o_portrait_dummy, .o_portrait_dummy_female_big, .o_portrait_dummy_male_big, .o_portrait_anonymous .o_portrait_dummy .o_portrait_dummy_female_big .o_portrait_dummy_male_big .o_portrait_anonymous {filter: invert()}'); | |
addGlobalStyle('.o_portrait_dummy_small, .o_portrait_dummy_female_small, .o_portrait_dummy_male_small, .o_portrait_anonymous_small, .o_portrait_dummy_small, .o_portrait_dummy_female_small, .o_portrait_dummy_male_small, .o_portrait_anonymous_small {filter: invert()}'); | |
addGlobalStyle('.o_portrait img {background-color: transparent;}'); | |
addGlobalStyle('.o_forum .o_forum_message_attachments {border-color: #000000; background-color: #36393F;}'); | |
// Panel Styling | |
addGlobalStyle('.panel {background-color: #36393F}'); | |
addGlobalStyle('.panel-default > .panel-heading { color: #f0f0f2; background-color: #36393F; border-color: #000000;}'); | |
addGlobalStyle('.panel-default, .panel-placeholder {border-color: #000000}'); | |
// Additional Stuff | |
addGlobalStyle('.o_failed th, .o_passed th, .o_unknown th {color: #f0f0f2;}'); | |
addGlobalStyle('.o_media img {border-color: #000000; background-color: #36393F; }'); | |
addGlobalStyle('.o_noti_subscribe_link span {color: black !important;}'); | |
// Standby styling | |
addGlobalStyle('.jumbotron, .o_repo_details .o_lead {background-color: #36393F;}'); | |
//Navbar Styling | |
addGlobalStyle('.o_navbar {margin-bottom: 10px}'); | |
addGlobalStyle('#o_navbar_wrapper { color: #c7c7d6; background-color: #36393F;border-color: #000000; width: 100%}'); | |
addGlobalStyle('.o_collapse .o_navbar-nav > li, .o_navbar-nav > li > a, .btn-default, .btn-sm.dropdown-toggle, .o_tree {color: #b2b2b2 !important; background-color: #36393F !important; border-color: #000000 !important;}'); | |
addGlobalStyle('.o_collapse .o_navbar-nav > li:not(#o_navbar_langchooser):hover, .o_collapse .o_navbar-nav > li:not(#o_navbar_langchooser):hover > a, .btn-default:hover, .btn-primary, .o_tree.active {color: #c7c7d6 !important; background-color: #66666E !important; border-color: #000000 !important;}'); | |
addGlobalStyle('.nav:not(.nav-tabs) > li:not(.dropdown-header):not(.divider):not(#o_navbar_langchooser):hover {color: #c7c7d6; background-color: #66666E; border-color: #000000;}'); | |
addGlobalStyle('.nav .dropdown-header {color: #c7c7d6;}'); | |
addGlobalStyle('.o_navbar-nav .o_icon-lg, .o_bookmark .o_icon {margin-right:0px;}'); | |
addGlobalStyle('.btn-default:hover, .btn-default:focus, .btn-default.focus, .btn-default:active, .btn-sm.dropdown-toggle:hover, .btn-default.active, .open > .btn-default.dropdown-toggle {color: #c7c7d6 !important; background-color: #66666E !important; border-color: #000000 !important;}'); | |
addGlobalStyle('.o_navbar-nav > .active > a, .o_navbar-nav > .active > a:hover, .o_navbar-nav > .active > a:focus, .btn-primary, .btn-primary:hover {color: #c7c7d6; background-color: #66666E; border-color: #000000;}'); | |
addGlobalStyle('.o_navbar #o_navbar_tools_permanent #o_navbar_print a, .o_navbar #o_navbar_tools_permanent #o_navbar_impress a, .o_navbar #o_navbar_tools_permanent #o_navbar_help a {padding-left: 10px; padding-right: 10px;}'); | |
addGlobalStyle('.o_collapse .o_navbar-nav > li > a:first-child {border-right: 1px solid; border-color: #000000;}'); | |
addGlobalStyle('.o_navbar #o_navbar_tools_permanent #o_navbar_print a:hover, .o_navbar #o_navbar_tools_permanent #o_navbar_impress a:hover, .o_navbar #o_navbar_tools_permanent #o_navbar_help a:hover {color:#c7c7d6;}'); | |
addGlobalStyle('.o_tree .o_tree_link:last-child:hover, .o_tree .o_tree_link:last-child:focus {color: #c7c7d6; background-color: #66666E; border-color: #000000;}'); | |
addGlobalStyle('.o_tree .o_tree_link:last-child:hover a, .o_tree .o_tree_link:last-child:focus a {color: #c7c7d6;}'); | |
addGlobalStyle('.o_tree ul li div {border-color: #000000;}'); | |
addGlobalStyle('.o_tree ul li .active.o_tree_link {color: #c7c7d6; background-color: #66666E; border-color: #000000; color: #c7c7d6} .o_tree ul li .active.o_tree_link a {color: #c7c7d6 !important; background: none !important;}'); | |
addGlobalStyle('.o_tree ul li .active.o_tree_link:hover, .o_tree ul li .active.o_tree_link:focus {color: #4c4c4c !important; background-color: #66666E; border-color: #000000;}'); | |
addGlobalStyle('.o_tree ul li .active.o_tree_link:hover a, .o_tree ul li .active.o_tree_link:focus a {color: #c7c7d6 !important;}'); | |
addGlobalStyle('#o_body,#o_main_wrapper,#o_footer_wrapper { background-color: #36393F !important; }'); | |
addGlobalStyle('#o_main:not(.o_loginscreen),#o_main_left,#o_footer_container, body, #o_main_wrapper #o_main_container {background-color: #36393F !important; color: #c7c7d6 !important;}'); | |
addGlobalStyle('body.o_dmz #o_main_wrapper, body.o_dmz #o_main_wrapper #o_main_container {background-color: transparent !important;}'); | |
addGlobalStyle('.o_iframedisplay {border: 1px solid #36393F; padding-left: 10px; padding-right: 10px;}'); | |
// Weird toolbar bugfix | |
addGlobalStyle('#o_main_toolbar, .o_segments { margin-top: 10px; margin-bottom: 10px; border-color:#36393F; } .o_toolbar .o_breadcrumb .breadcrumb { background-color: #36393F !important; color:#c7c7d6 !important;}'); | |
// Styling for confirmation | |
addGlobalStyle('.o_important, .o_warning, .o_error, .o_note, .o_success, .o_bc_empty, .b_success, .b_note, .b_error, .b_warning, .b_important, .o_info, .o_togglebox_content {margin: 10px 0 !important; padding: 10px !important;}'); | |
addGlobalStyle('.o_important, .o_warning, .o_error, .o_success, .o_bc_empty, .b_success, .b_note, .b_error, .b_warning, .b_important {color: black !important;}'); | |
// Lifecycle background removal | |
addGlobalStyle(".o_coursetable.o_rendertype_custom .o_table_row .o_meta .o_lifecycle {background: none;}"); | |
// Table styles | |
addGlobalStyle(".o_coursetable.o_rendertype_custom .o_table_row, .o_coursetable.o_rendertype_custom .o_table_row .o_access, .o_coursetable.o_rendertype_custom .o_table_row .o_visual {border-color: #000000;}"); | |
addGlobalStyle(".table > thead > tr > th, .table > thead > tr > td, .table > tbody > tr > th, .table > tbody > tr > td, .table > tfoot > tr > th, .table > tfoot > tr > td {border-color: #000000;}"); | |
// popup styles | |
addGlobalStyle(".popover, .o_dropdown, {background-color: #36393F !important;}"); | |
addGlobalStyle(".popover-title {padding: 12px 14px; font-size: 16px; background-color: #36393F; border-color: #000000;}"); | |
addGlobalStyle(".popover.bottom > .arrow:after {border-bottom-color: #36393F;}"); | |
addGlobalStyle(".popover.top > .arrow:after {border-top-color: #36393F;}"); | |
addGlobalStyle("ul.o_dropdown > li > a {color: #b2b2b2 !important; background-color: #36393F !important;}"); | |
addGlobalStyle("ul.o_dropdown > li > a:hover { color: #c7c7d6 !important; background-color: #36393F !important;}"); | |
addGlobalStyle("ul.o_dropdown .divider {background-color: #36393F !important;}"); | |
addGlobalStyle('.dropdown-menu, .popover {background-color: #36393F !important;}'); | |
addGlobalStyle(".dropdown-menu > li > a {color: #b2b2b2 !important; background-color: #36393F !important;}"); | |
addGlobalStyle(".dropdown-menu > li > a:hover { color: #c7c7d6 !important; background-color: #36393F !important;}"); | |
addGlobalStyle(".dropdown-menu > .divider {background-color: #36393F !important;}"); | |
addGlobalStyle('#o_main_wrapper #o_main_container #o_main_left #o_main_left_content {padding: 0 0 15px 15px;}'); | |
addGlobalStyle(".modal-body {background-color: #36393F; border: none;} .modal-header{border-color: #000000; background-color: #36393F; min-height: 45px;}"); | |
addGlobalStyle('.modal .modal-header h4, .modal .modal-header .o_cal .fc-header-title h2, .o_cal .fc-header-title .modal .modal-header h2 {color: #c7c7d6;}'); | |
// Callout link share | |
addGlobalStyle('#callout_share_link_in { background-color: #36393F; border: none; padding: 4px; max-width: 100%; }'); | |
// Course overview | |
addGlobalStyle('.o_catalog .o_level {border-color: #000000;}'); | |
addGlobalStyle('.o_catalog .o_sublevels .o_sublevel .o_meta { background-color: rgba(0, 0, 0, 0.8); border-color: #000000;}'); | |
addGlobalStyle('.o_catalog .o_sublevels .o_sublevel .o_meta .o_title a, .o_catalog .o_sublevels .o_sublevel .o_meta .o_title a:hover, .o_catalog .o_sublevels .o_sublevel .o_meta .o_title a:focus {color: #c7c7d6;}'); | |
addGlobalStyle('.o_catalog .o_sublevels_list .o_sublevel { margin-bottom: 5px; border-color: #000000;}'); | |
// Max width for course title | |
addGlobalStyle('.o_coursetable.o_rendertype_custom .o_table_row .o_meta .o_title span {display: inline-block; width: 66%; word-wrap: break-word; white-space: normal;}'); | |
// Visitenkarte aka well | |
addGlobalStyle('.well { background-color: #36393F; border-color: #000000;}'); | |
// Loading icon | |
addGlobalStyle('#o_ajax_busy.o_icon {color: #c7c7d6;}'); | |
// Pagination | |
addGlobalStyle('.pagination > li > a, .pagination > li > span {color: #c7c7d6; background-color: #36393F; border-color: #000000;}'); | |
addGlobalStyle('.pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus {color: #c7c7d6; background-color: #36393F !important; border-color: #000000;}'); | |
addGlobalStyle('.pagination > li > a:hover, .pagination > li > a:focus, .pagination > li > span:hover, .pagination > li > span:focus { color: #c7c7d6; background-color: #66666E !important; border-color: #000000;} '); | |
addGlobalStyle('.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus, .pagination > .active > span, .pagination > .active > span:hover, .pagination > .active > span:focus {color: #c7c7d6; background-color: #66666E; border-color: #000000;}'); | |
addGlobalStyle('.o_copy_code, .b_copy_code, p.b_copy_code, div.b_copy_code, code, pre {background-color: #36393F;}'); | |
addGlobalStyle('pre {border-color: #000000}'); | |
// External iframe fixing | |
addGlobalStyle('body span[style*="color"] {color: #c7c7d6 !important;}'); | |
addGlobalStyle('body:not(#o_body) span a, .o_content span a {color: #b2b2b2 !important;}'); | |
addGlobalStyle('body:not(#o_body) span a:hover, .o_content span a:hover {color: #c7c7d6 !important; text-decoration: none;}'); | |
addGlobalStyle('.o_content_popup { right: 25px; color: #c7c7d6; }'); | |
// Calendar | |
addGlobalStyle('.fc-state-highlight {background-color: #36393F;}'); | |
addGlobalStyle('.fc-button {color: #c7c7d6 !important; background-color: #36393F; border-color: #000000;}'); | |
addGlobalStyle('.fc-button:hover, .fc-button.fc-state-active:hover {color: #c7c7d6 !important; background-color: #66666E; border-color: #000000;}'); | |
addGlobalStyle('.fc-button.fc-state-disabled {color: #c7c7d6; background-color: #36393F !important; border-color: #000000;}'); | |
addGlobalStyle('.fc-button.fc-state-default {background-image: none;}'); | |
addGlobalStyle('.fc-button.fc-state-active {color: #c7c7d6; background-color: #66666E; border-color: #000000;}'); | |
addGlobalStyle('.fc-header-title, .fc-header-title h4, .o_cal .fc-header-title h2 {color: #c7c7d6 !important;}'); | |
addGlobalStyle('.fc-widget-header, .fc-widget-content {border-color: #000000;}'); | |
addGlobalStyle('.fc-widget-header .fc-agenda-divider-inner {background-color: #66666E;}'); | |
// Datepicker | |
addGlobalStyle('.ui-datepicker {background-color: #36393F; background: #36393F; border-color: #000000;}'); | |
addGlobalStyle('.ui-datepicker .ui-state-default {color: #c7c7d6; background: #36393F; border-color: #000000;}'); | |
addGlobalStyle('.ui-datepicker .ui-state-active, .ui-datepicker .ui-state-default:hover {background: #66666e;}'); | |
addGlobalStyle('.ui-datepicker .ui-datepicker-header {background-color: #36393F; color: #c7c7d6;}'); | |
addGlobalStyle('.ui-datepicker .ui-widget-header .ui-corner-all, .ui-datepicker .ui-widget-header .ui-datepicker-next.ui-corner-all {background-color: #36393F !important;}'); | |
addGlobalStyle('.ui-datepicker .ui-widget-header .ui-icon:before {color: #c7c7d6 !important;}'); | |
addGlobalStyle('.ui-datepicker .ui-widget-header .ui-icon.ui-icon-circle-triangle-e, .ui-datepicker .ui-widget-header .ui-icon.ui-icon-circle-triangle-w {color: transparent;}'); | |
// Toolbar next prev | |
addGlobalStyle('.panel-body:nth-child(n+2) {border-color: #000000}'); | |
// autocomplete | |
addGlobalStyle('.tt-menu {background-color: #36393F; border: 1px solid #36393F; color: #c7c7d6;}'); | |
addGlobalStyle('#o_main_wrapper #o_main_container #o_main_left #o_main_left_toggle {border-color: #000000; background-color: #36393F; color: #c7c7d6; }'); | |
addGlobalStyle('.o_icon-lg {margin-right:15px; color: inherit !important;}'); | |
addGlobalStyle('.o_search .o_icon-lg {margin-right:0;}'); | |
// Nav tabs | |
addGlobalStyle('.nav-tabs {border-color: #000000;}'); | |
addGlobalStyle('.nav-tabs > li > a { color: #c7c7d6 !important; background-color: #36393F !important; border-color: #000000; }'); | |
addGlobalStyle('.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus{ color: #c7c7d6 !important; background-color: #66666e !important; border-color: #000000;}'); | |
addGlobalStyle('.nav > li > a:hover, .nav > li > a:focus { color: #c7c7d6 !important; background-color: #66666e !important; border-color: #000000;}'); | |
addGlobalStyle('.text-warning {color: #d4a451}'); | |
addGlobalStyle('.o_block_with_datecomp .o_content {border-color: #66666E}'); | |
// List Group styling | |
addGlobalStyle('.list-group-item, .pager li > a, .pager li > span {background-color: #36393F; border-color: #000000;}'); | |
addGlobalStyle('.pager li > a:hover, .pager li > a:focus {background-color: #66666e;}'); | |
addGlobalStyle('.list-group-item, .pager li > a.o_disabled, .pager li > span {background-color: #36393F;}'); | |
// Code container fix | |
addGlobalStyle('pre {white-space: pre-wrap;}'); | |
// Course overview | |
addGlobalStyle('.o_coursetable.o_rendertype_custom .o_table_row .o_meta .o_author, .o_coursetable.o_rendertype_custom .o_table_row .o_meta .o_desc { background: none;}'); | |
addGlobalStyle('.o_coursetable.o_rendertype_custom .o_table_row .o_meta { border-left: 1px solid #36393F;}'); | |
addGlobalStyle('.o_coursetable.o_rendertype_custom .o_table_row { border: 1px solid #36393F;}'); | |
addGlobalStyle('.o_coursetable.o_rendertype_custom .o_table_row .o_visual .o_visual_not_available { background-color: #36393F;}'); | |
addGlobalStyle('.o_coursetable.o_rendertype_custom .o_table_row, .o_coursetable.o_rendertype_custom .o_table_row .o_access, .o_coursetable.o_rendertype_custom .o_table_row .o_visual { background-color: #36393F;}'); | |
addGlobalStyle('.o_coursetable.o_rendertype_custom .o_table_row .o_meta {background: #36393F;}'); | |
// Forum new message | |
addGlobalStyle('.o_forum .o_forum_message_new{-webkit-box-shadow: 0 1px 10px rgba(173,255,244,0.7); box-shadow: 0 1px 10px rgba(173, 255, 244, 0.7);}'); | |
addGlobalStyle('.o_icon_new:before, .o_forum .o_newindicator{color: rgba(173,255,244,0.7);}'); | |
// Back to top | |
addGlobalStyle('#o_main_wrapper #o_toplink {bottom: 5px;}'); | |
// Header mixins | |
addGlobalStyle('.o_togglebox_wrapper div.o_togglebox_content h4 {color: #ffffff;}'); | |
// Correct unavailable color | |
addGlobalStyle('.o_icon_status_unavailable:before {color: #ff3e3e;}'); | |
addGlobalStyle('.o_im_message_group {background-color: #36393F;}'); | |
// Edit mode | |
addGlobalStyle('.o_edit_mode .o_toolbar .o_tools_container { background: repeating-linear-gradient(300deg, #36393F, #36393F 10px, #36393F 10px, #36393F 20px);}'); | |
// MCE Panel | |
addGlobalStyle('.mce-panel { background-color: #36393F; border-color: #66666e;}'); | |
addGlobalStyle('.mce-menubar .mce-menubtn button span, .mce-container, .mce-container *, .mce-widget, .mce-widget *, .mce-reset { color: #c7c7d6;}'); | |
addGlobalStyle('.mce-menubar .mce-caret { border-top-color: #b2b2b2;}'); | |
addGlobalStyle('.mce-menu-item .mce-caret { border-left-color: #b2b2b2;}'); | |
addGlobalStyle('.mce-menubar .mce-menubtn:hover, .mce-menubar .mce-menubtn.mce-active, .mce-menubar .mce-menubtn:focus { border-color: #000000; background: #66666e;}'); | |
addGlobalStyle('.mce-menu { background-color: #36393F !important;}'); | |
addGlobalStyle('.mce-menu-item, .mce-menu-item .mce-ico, .mce-menu-item .mce-text { color: #c7c7d6;}'); | |
addGlobalStyle('.mce-menu-item.mce-disabled:hover { background: #252525;}'); | |
addGlobalStyle('.mce-menu-item:hover, .mce-menu-item.mce-selected, .mce-menu-item:focus {background-color: #36393F;}'); | |
addGlobalStyle('.mce-menu-item-normal.mce-active {background-color: #66666e;}'); | |
addGlobalStyle('.mce-btn {border-color: #66666e; background-color: #36393F;}'); | |
addGlobalStyle('.mce-ico, .mce-menubtn button, .mce-btn button {color: #c7c7d6;}'); | |
addGlobalStyle('.mce-btn:hover, .mce-btn:focus, .mce-btn.mce-active, .mce-btn.mce-active:hover {background-color: #66666e; border-color: #000000; color: #c7c7d6;}'); | |
addGlobalStyle('i.mce-i-backcolor {background-color: #36393F;}'); | |
addGlobalStyle('.mce-colorbutton:hover .mce-open {border-color: #000000;}'); | |
addGlobalStyle('.mce-splitbtn .mce-open.mce-active {background-color: #66666e; outline: none;}'); | |
addGlobalStyle('.mce-splitbtn:hover .mce-open {border-left-color: #36393F;}'); | |
addGlobalStyle('.mce-btn .mce-caret { border-top-color: #b2b2b2;}'); | |
addGlobalStyle('.mce-btn-group:not(:first-child) {border-left-color: #b2b2b2;}'); | |
addGlobalStyle('.mce-floatpanel.mce-popover {background-color: #36393F;}'); | |
addGlobalStyle('.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after {border-bottom-color: #36393F;}'); | |
addGlobalStyle('.mce-textbox {background: #36393F; border-color: #000000;}'); | |
addGlobalStyle('.mce-colorpicker-sv {border-color: #000000;}'); | |
addGlobalStyle('.mce-colorpicker-h-marker {left: -2px; border: 2px solid #36393F; background: #fff;}'); | |
addGlobalStyle('.mce-window-head {border-color: #66666e;}'); | |
addGlobalStyle('.o_warning, .b_warning, p.b_warning, div.b_warning, .o_instruction, .o_form .o_warning, p.o_gta_reopen_warning {background-color: #292303; color: #c7c7d6 !important;}'); | |
addGlobalStyle('.o_coursetable.o_rendertype_custom .o_table_row .o_access .o_details:hover, .o_coursetable.o_rendertype_custom .o_table_row .o_access .o_details:focus, .o_coursetable.o_rendertype_custom .o_table_row .o_access .o_details.focus, .o_coursetable.o_rendertype_custom .o_table_row .o_access .o_details:active, .o_coursetable.o_rendertype_custom .o_table_row .o_access .o_details.active, .open>.o_coursetable.o_rendertype_custom .o_table_row .o_access .o_details.dropdown-toggle {color: white !important;}'); | |
addGlobalStyle('.o_coursetable.o_rendertype_custom .o_table_row .o_access .o_start:hover, .o_coursetable.o_rendertype_custom .o_table_row .o_access .o_start:focus, .o_coursetable.o_rendertype_custom .o_table_row .o_access .o_start.focus, .o_coursetable.o_rendertype_custom .o_table_row .o_access .o_start:active, .o_coursetable.o_rendertype_custom .o_table_row .o_access .o_start.active, .open>.o_coursetable.o_rendertype_custom .o_table_row .o_access .o_start.dropdown-toggle {color: white !important;}'); | |
addGlobalStyle('.o_passed, .o_coursetable.o_rendertype_custom .o_table_row .o_meta .o_lifecycle.o_active, .o_coursetable.o_rendertype_custom .o_table_row .o_meta .o_author { color: #5cb85c; } .o_failed { color: #bc2d0c; }'); | |
addGlobalStyle('.o_info h2, .o_info h3, .o_info h4, .o_info .o_cal .fc-header-title h2, .o_cal .fc-header-title .o_info h2, .o_info h5, .b_info h2, .o_form .o_info h2, .o_togglebox_wrapper div.o_togglebox_content h2, div.o_qti_item_itemfeedback h2, .o_assessmentitem_wrapper .modalFeedback .o_info h2, .b_info h3, .o_form .o_info h3, .o_togglebox_wrapper div.o_togglebox_content h3, div.o_qti_item_itemfeedback h3, .o_assessmentitem_wrapper .modalFeedback .o_info h3, .b_info h4, .o_form .o_info h4, .o_togglebox_wrapper div.o_togglebox_content h4, div.o_qti_item_itemfeedback h4, .o_assessmentitem_wrapper .modalFeedback .o_info h4, .b_info .o_cal .fc-header-title h2, .o_cal .fc-header-title .b_info h2, .o_form .o_info .o_cal .fc-header-title h2, .o_cal .fc-header-title .o_form .o_info h2, .o_togglebox_wrapper div.o_togglebox_content .o_cal .fc-header-title h2, .o_cal .fc-header-title .o_togglebox_wrapper div.o_togglebox_content h2, div.o_qti_item_itemfeedback .o_cal .fc-header-title h2, .o_cal .fc-header-title div.o_qti_item_itemfeedback h2, .o_assessmentitem_wrapper .modalFeedback .o_info .o_cal .fc-header-title h2, .o_cal .fc-header-title .o_assessmentitem_wrapper .modalFeedback .o_info h2, .b_info h5, .o_form .o_info h5, .o_togglebox_wrapper div.o_togglebox_content h5, div.o_qti_item_itemfeedback h5, .o_assessmentitem_wrapper .modalFeedback .o_info h5, .o_coursetable.o_rendertype_custom .o_table_row .o_access .o_bookings .o_label, .o_coursetable.o_rendertype_custom .o_table_row .o_meta .o_lifecycle, h1 small, h1 .small, h2 small, h2 .small, h3 small, h3 .small, h4 small, .o_cal .fc-header-title h2 small, h4 .small, .o_cal .fc-header-title h2 .small, h5 small, h5 .small, h6 small, h6 .small, .h1 small, .h1 .small, .h2 small, .h2 .small, .h3 small, .h3 .small, .h4 small, .h4 .small, .h5 small, .h5 .small, .h6 small, .h6 .small {color: #b2b2b2;}'); | |
// Proper description truncation | |
addGlobalStyle('.o_coursetable.o_rendertype_custom .o_table_row .o_meta .o_desc {text-overflow: ellipsis; white-space: nowrap; overflow: hidden;}'); | |
addGlobalStyle('.o_disclaimer .o_disclaimer_content { background: #36393F; border-color: #000000; }'); | |
addGlobalStyle('.o_im_chat_history {border-color: #000000;}'); | |
addGlobalStyle('.bootstrap-tagsinput {color: #c7c7d6; background-color: transparent;} .bootstrap-tagsinput input::placeholder {color: #afafb6; }'); | |
loadGlobalStyle(cssStuff); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment