documentation/extensions/odoo_theme/static/style.scss
2021-01-28 21:02:32 +01:00

1086 lines
24 KiB
SCSS

@import "scss/_variables";
@import "scss/bootstrap_overridden";
@import "scss/bootstrap_scss/bootstrap";
@import "scss/_mixins";
@import "scss/_typography";
// TODO EDI remove
aside#o_page_toc .active > a{
background-color: red;
}
//------------------------------------------------------------------------------
// icomoon icons
//------------------------------------------------------------------------------
[class^="i-"], [class*=" i-"] {
/* use !important to prevent issues with browser extensions that change fonts */
font-family: '#{$icomoon-font-family}' !important;
speak: never;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
}
.i-accountant {
&:before {
content: $i-accountant;
}
}
.i-advanced {
&:before {
content: $i-advanced;
}
}
.i-app_features {
&:before {
content: $i-app_features;
}
}
.i-app-favorites {
&:before {
content: $i-app-favorites;
}
}
.i-apps_1 {
&:before {
content: $i-apps_1;
}
}
.i-apps_2 {
&:before {
content: $i-apps_2;
}
}
.i-basics {
&:before {
content: $i-basics;
}
}
.i-cart {
&:before {
content: $i-cart;
}
}
.i-certifications {
&:before {
content: $i-certifications;
}
}
.i-check {
&:before {
content: $i-check;
}
}
.i-collaborating {
&:before {
content: $i-collaborating;
}
}
.i-compare {
&:before {
content: $i-compare;
}
}
.i-contact {
&:before {
content: $i-contact;
}
}
.i-customer-reviews {
&:before {
content: $i-customer-reviews;
}
}
.i-developer {
&:before {
content: $i-developer;
}
}
.i-doc-admin {
&:before {
content: $i-doc-admin;
}
}
.i-doc-apps {
&:before {
content: $i-doc-apps;
}
}
.i-doc-contribute {
&:before {
content: $i-doc-contribute;
}
}
.i-doc-dev {
&:before {
content: $i-doc-dev;
}
}
.i-doc-services {
&:before {
content: $i-doc-services;
}
}
.i-documentation {
&:before {
content: $i-documentation;
}
}
.i-elearning_1 {
&:before {
content: $i-elearning_1;
}
}
.i-elearning_2 {
&:before {
content: $i-elearning_2;
}
}
.i-events {
&:before {
content: $i-events;
}
}
.i-exercise {
&:before {
content: $i-exercise;
}
}
.i-finances {
&:before {
content: $i-finances;
}
}
.i-forums {
&:before {
content: $i-forums;
}
}
.i-github {
&:before {
content: $i-github;
}
}
.i-hr {
&:before {
content: $i-hr;
}
}
.i-info {
&:before {
content: $i-info;
}
}
.i-install {
&:before {
content: $i-install;
}
}
.i-jobs {
&:before {
content: $i-jobs;
}
}
.i-knowledge {
&:before {
content: $i-knowledge;
}
}
.i-lightbulb {
&:before {
content: $i-lightbulb;
}
}
.i-marketing {
&:before {
content: $i-marketing;
}
}
.i-money-bag {
&:before {
content: $i-money-bag;
}
}
.i-money-plant {
&:before {
content: $i-money-plant;
}
}
.i-note {
&:before {
content: $i-note;
}
}
.i-o-edu {
&:before {
content: $i-o-edu;
}
}
.i-o-help {
&:before {
content: $i-o-help;
}
}
.i-o-logo {
&:before {
content: $i-o-logo;
}
}
.i-o-services {
&:before {
content: $i-o-services;
}
}
.i-o-tour {
&:before {
content: $i-o-tour;
}
}
.i-operations_1 {
&:before {
content: $i-operations_1;
}
}
.i-operations_2 {
&:before {
content: $i-operations_2;
}
}
.i-overview {
&:before {
content: $i-overview;
}
}
.i-partners {
&:before {
content: $i-partners;
}
}
.i-performance {
&:before {
content: $i-performance;
}
}
.i-release {
&:before {
content: $i-release;
}
}
.i-sales_2 {
&:before {
content: $i-sales_2;
}
}
.i-sales_3 {
&:before {
content: $i-sales_3;
}
}
.i-sales_1 {
&:before {
content: $i-sales_1;
}
}
.i-scaleup {
&:before {
content: $i-scaleup;
}
}
.i-search {
&:before {
content: $i-search;
}
}
.i-services {
&:before {
content: $i-services;
}
}
.i-shop {
&:before {
content: $i-shop;
}
}
.i-showcase {
&:before {
content: $i-showcase;
}
}
.i-support {
&:before {
content: $i-support;
}
}
.i-themes {
&:before {
content: $i-themes;
}
}
.i-time-management_2 {
&:before {
content: $i-time-management_2;
}
}
.i-time-management {
&:before {
content: $i-time-management;
}
}
.i-translate {
&:before {
content: $i-translate;
}
}
.i-tutorial {
&:before {
content: $i-tutorial;
}
}
.i-users {
&:before {
content: $i-users;
}
}
.i-v12 {
&:before {
content: $i-v12;
}
}
.i-v13 {
&:before {
content: $i-v13;
}
}
.i-v14 {
&:before {
content: $i-v14;
}
}
.i-warning {
&:before {
content: $i-warning;
}
}
.i-websites {
&:before {
content: $i-websites;
}
}
div[aria-label="related navigation"] {
display: none;
}
body {
font-size: $font-size-base;
a {
text-decoration: none !important;
}
dd {
margin-left: 1rem;
}
}
//------------------------------------------------------------------------------
// Header with logo, searchbar and switchers
//------------------------------------------------------------------------------
header.o_main_header{
display: flex;
align-items: center;
height: $o-header-height;
position: fixed;
top: 0;
left: 0;
right: 0;
background-color: $o-header-white;
z-index: 10;
padding-right: 3rem;
.o_logo_wrapper {
@include media-breakpoint-up(lg) {
width: $o-side-nav-width;
padding-left: 3rem;
margin-right: 3rem;
> .o_logo {
height: $o-header-height;
display: flex;
align-items: center;
img {
margin-top: -12px;
margin-right: 1rem;
}
span {
font-size: 2rem;
}
}
}
}
.o_search {
position: relative;
width: 90%;
max-width: 500px;
.btn{
@include o-position-absolute($top: 50%, $right: .5rem);
@include transform (translateY(-50%)) ;
&:before{
@include inline-icon('img/icons/search.svg' , 20px, 0);
opacity: .3;
}
}
}
.o_languages {
width: 120px;
}
}
//------------------------------------------------------------------------------
// Left side nav toctree
//------------------------------------------------------------------------------
.o_side_nav {
width: $o-side-nav-width;
height: calc(100vh - #{$o-header-height});
overflow-y: auto;
position: fixed;
top:$o-header-height;
left:-100%;
@include media-breakpoint-up(lg) {
left:0;
}
@include o-transition($duration:.3s);
padding-top: 3rem;
padding-left: 3rem;
background-color: lighten($o-violet-dark, 70%) ;
z-index: 10;
> ul {
padding-left: 30px !important;
> li {
padding: .5rem 0;
}
}
ul {
padding-left: 1rem;
list-style: none;
li {
a{
display: block;
padding: .5rem 0;
color: $o-violet-darker;
text-decoration: none;
opacity: .5;
&.current, &:hover {
opacity: 1;
}
}
}
li.current > a {
font-weight: $fw_bold;
opacity: 1;
}
> .toctree-l1 {
> a:before {
@include inline-icomoon($i-doc-apps, 0 1rem 0 0);
margin-left: -30px;
}
&.o_menu_applications > a:before{
content:'#{$i-doc-apps}';
}
&.o_menu_administration > a:before{
content:'#{$i-doc-admin}';
}
&.o_menu_developer > a:before{
content:'#{$i-doc-dev}';
}
&.o_menu_services > a:before{
content:'#{$i-doc-services}';
}
&.o_menu_contributing > a:before{
content:'#{$i-doc-contribute}';
}
}
}
scrollbar-width: thin;
scrollbar-color: $o-violet-darker transparent;
&::-webkit-scrollbar {
width: 5px;
}
&::-webkit-scrollbar-track {
background: $white;
}
&::-webkit-scrollbar-thumb {
background-color: $o-violet-darker ;
border-radius: 0;
}
}
//------------------------------------------------------------------------------
// Main page content
//------------------------------------------------------------------------------
// TODO EDI this fixes the scroll height issue but surely needs to be re-written
section {
padding-top: $o-header-height;
margin-top: -$o-header-height;
}
dt {
padding-top: $o-header-height;
margin-top: -$o-header-height;
}
// TODO EDI this makes permalinks only visible on hover. Please re-write and sort
a.headerlink {
visibility: hidden;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink,
caption:hover > a.headerlink,
p.caption:hover > a.headerlink,
div.code-block-caption:hover > a.headerlink {
visibility: visible;
}
#wrap {
margin-top: $o-header-height;
display: flex;
justify-content: space-between;
main{
position: relative;
padding-top: 3rem;
@include media-breakpoint-up(lg) {
left: $o-side-nav-width;
width: calc(100vw - #{$o-side-nav-width} - #{$o-on-page-width});
padding: 3rem;
}
h1, h2{
font-size: 24px;
font-weight: $fw_semibold;
}
h1 {
color: $secondary;
}
&.index, &.doc-toc, &.has_code_col {
@include media-breakpoint-up(lg) {
width: calc(100vw - #{$o-side-nav-width});
}
}
// Homepage
&.index{
h2[class*="o_title_"] {
color: $o-violet-darker;
font-weight: $fw_bold;
margin-bottom: 1rem;
&:before {
@include inline-icon('img/icons/full-control.svg' , 50px, 0 1rem 0 0);
display: block;
margin: 0 auto 20px;
}
&.o_title_start:before {
background-image: url('img/icons/full-control.svg');
}
&.o_title_install:before {
background-image: url('img/icons/install.svg');
}
&.o_title_basic:before {
background-image: url('img/icons/basic.svg');
}
&.o_title_tutorial:before {
background-image: url('img/icons/tutorials.svg');
}
&.o_title_advanced:before {
background-image: url('img/icons/tech-knowledge.svg');
}
}
ul {
padding: 1rem;
> li {
position: relative;
padding-bottom: 1rem;
a {
display: block;
color: $gray-700;
font-weight: $fw_bold;
padding-bottom: .5rem;
}
p {
color: $gray-500;
}
&:hover a, &:hover p {
color: $primary;
}
}
}
}
&.doc-toc {
.toctree-wrapper {
> ul {
display: flex;
flex-wrap: wrap;
> li.toctree-l1 {
@include media-breakpoint-up(lg) {
width: 33.3%;
}
padding-bottom: 3rem;
padding-right: 3rem;
}
}
ul {
list-style: none;
padding-left:0;
}
}
.toctree-l1 > a {
display: block;
color: $gray-darker;
font-size: 1.2rem;
padding-bottom: .5rem;
border-bottom: 1px solid $gray-light;
margin-bottom: 1rem;
}
}
&.has_code_col {
article.doc-body {
> *{
max-width: 100%;
}
section {
position: relative;
display:block;
float: left;
width: 100%;
}
@include media-breakpoint-up(lg) {
width: 100%;
padding-right: 0;
&:before {
@include code-col();
}
section {
> * {
width: 54.633333%;
max-width: 600px;
float: left;
clear: left;
}
> h1, > h2, > h3, > h4, > h5, > h6 {
float: none;
clear: none;
}
.doc-aside {
width: 43%;
float: none;
clear: none;
margin-left: 57%;
padding: 1rem;
p, blockquote, tr, th, li {
color: $gray-light;
}
blockquote {
color: $gray-light;
font-family: $font-family-serif;
font-weight: $fw_semibold;
font-style: italic;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
color: $white;
}
pre {
font-size: 12px;
}
.content-switcher {
margin-top:0;
> ul {
margin-bottom: 0;
}
> ul > li {
color: $gray-lightest;
}
}
}
}
}
}
+ aside.o_page_toc{
display: none;
}
}
article {
position: relative;
.o_git_link {
color: $gray-light;
@include o-position-absolute($top: 0, $right: 1rem);
&:before{
@include inline-icon('img/icons/edit.svg' , 18px, 0 .5rem 0 0);
}
}
h1 {
margin-bottom: 2rem;
}
h2 {
color: $gray-darker;
padding-bottom: .5rem;
border-bottom: 1px solid $gray-light;
margin-bottom: 2rem;
margin-top: 2rem;
&::after{
@include inline-icon('img/icons/link.svg' , 24px, 0 0 0 1rem);
}
}
h3 {
font-size: 20px;
font-weight: regular;
color: $gray-darker;
}
.img-fluid {
@include box-shadow(0 3px 6px rgba(0, 0, 0, .16));
margin-bottom: 2rem;
}
}
//------------------------------------------------------------------------------
// Alerts
//------------------------------------------------------------------------------
// alert-info
// alert-warning
// alert-danger
// alert-go_to
// alert-exercise
// alert-success
.alert {
position: relative;
display: block;
border-radius: 0;
border-width: 0 0 0 3px;
> h3, > .alert-title {
font-size: 1.642857143em;
line-height: 1em;
margin: 0 0 10px 0;
font-size: 1rem;
font-weight: $fw_bold;
&:before {
@include inline-icomoon($i-info, 0 .5rem 0 0);
@include media-breakpoint-down(md) {
display:none;
}
}
}
&.alert-success {
border-color: lighten($brand-success, 30%);
background-color: lighten($brand-success, 45%);
color: darken($brand-success, 35%);
> .alert-title, > h3 {
color: $brand-success
}
> .alert-title:before, > h3:before {
content: '#{$i-check}';
}
}
&.alert-info {
border-color: tint-color($brand-info, 30%);
background-color: tint-color($brand-info, 85%);
color: shade-color($brand-info, 35%);
> .alert-title, > h3 {
color: $brand-info
}
> .alert-title:before, > h3:before {
content: '#{$i-info}';
}
}
&.alert-note {
border-color: tint-color($brand-info, 30%);
background-color: tint-color($brand-info, 85%);
color: shade-color($brand-info, 35%);
> .alert-title, > h3 {
color: $brand-info
}
> .alert-title:before, > h3:before {
content: '#{$i-note}';
}
}
&.alert-tip, &.tip {
border-color: tint-color($brand-info, 30%);
background-color: tint-color($brand-info, 85%);
color: shade-color($brand-info, 35%);
> .alert-title, > h3 {
color: $brand-info
}
> .alert-title:before, > h3:before {
content: '#{$i-lightbulb}';
}
}
&.alert-warning, &.warning {
border-color: lighten($brand-warning, 30%);
background-color: lighten($brand-warning, 35%);
color: darken($brand-warning, 35%);
> .alert-title, > h3 {
color: $warning;
}
> .alert-title:before, > h3:before {
content: '#{$i-warning}';
}
}
&.alert-danger {
border-color: lighten($brand-danger, 30%);
background-color: lighten($brand-danger, 40%);
color: darken($brand-danger, 35%);
> .alert-title, > h3 {
color: $brand-danger
}
> .alert-title:before, > h3:before {
content: '#{$i-warning}';
}
}
&.alert-exercise {
border-color: tint-color($doc_exercise, 30%);
background-color: tint-color($doc_exercise, 80%);
color: shade-color($doc_exercise, 35%);
> .alert-title, > h3 {
color: shade-color($doc_exercise, 35%);
}
> .alert-title:before, > h3:before {
content: '#{$i-exercise}';
}
}
&.alert-go_to {
display: inline-block;
border-color: tint-color($secondary, 60%);
background-color: tint-color($secondary, 80%);
border-width: 2px;
margin: 2em auto;
a {
color: shade-color($secondary, 35%);
}
> .alert-title, > h3 {
color: $secondary;
}
> .alert-title:before, > h3:before {
content: '#{$i-overview}';
}
}
}
}
//------------------------------------------------------------------------------
// On this page toc
//------------------------------------------------------------------------------
aside.o_page_toc {
display: none;
@include media-breakpoint-up(lg) {
display: block;
position: -webkit-sticky;
position: sticky;
top: $o-header-height;
right: 0;
width: $o-on-page-width;
height: calc(100% - #{$o-header-height});
padding: 3rem 3rem 3rem 1rem;
font-size: .9rem;
/* &.affix {
z-index : 2;
position : fixed;
backface-visibility: hidden;
// @media (max-width:$screen-md-min) {
// display: none;
// }
} */
}
h3 {
text-transform: uppercase;
font-weight: $fw_bold;
font-size: 1rem;
color: $gray-darker;
}
> ul {
padding-left: 0;
> li > .o_page_toc_title {
display:none;
}
}
ul {
list-style: none;
a {
display: block;
padding: .5rem 0;
font-weight: $fw_regular;
color: $gray-darker;
&.o_page_toc_title {
display:none;
}
}
}
}
}
.highlight {
background: $doc_code-bg;
color: $gray-light;
border-radius: $border-radius;
padding: 1rem;
margin-bottom: ($line-height-base/2)rem;
pre {
margin-bottom: 0;
}
}
pre {
font-size: 0.8em;
color: $gray-light;
font-family: $font-family-monospace;
font-weight: $fw_semibold;
position: relative;
border: none;
max-width: 100%;
overflow: auto;
margin: 0;
margin-bottom: ($line-height-base / 2)rem;
}
//------------------------------------------------------------------------------
// Footer
//------------------------------------------------------------------------------
footer{
> div {
padding: 3rem;
@include media-breakpoint-up(lg) {
padding-left: calc(#{$o-side-nav-width} + 3rem)
}
}
.o_get_help {
background: $gray-100;
h5 {
color: $secondary;
font-size: 20px;
font-weight: $fw_bold;
margin-bottom: 1.5rem;
&::before {
@include inline-icon('img/icons/help.svg' , 30px, 0 1rem 0 0);
}
}
}
.o_footer_nav {
display: flex;
.o_footer_nav_title {
font-weight: $fw_regular;
text-transform: uppercase;
padding: 0 1rem;
}
.accordion {
.accordion-collapse {
border: none;
}
.accordion-body {
background: $gray-lightest;
border-bottom: 1px solid tint-color($primary, 50%);
> li > a {
font-weight: $fw-regular;
}
}
.accordion-button::after {
background-size: .8rem;
width: .8rem;
height: .8rem;
}
}
}
}