documentation/extensions/odoo_theme/static/style.scss
Elisabeth Dickinson 76baf3ae3a pygments edi
2021-02-19 10:47:12 +01:00

686 lines
18 KiB
SCSS

@import "scss/_sphinx_basic";
@import "scss/_variables";
@import "scss/bootstrap_overridden";
@import "scss/bootstrap_scss/bootstrap";
@import "scss/_mixins";
@import "scss/_typography";
@import "scss/_iconfont";
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 {
img {
margin-right: 0.2rem;
vertical-align: text-bottom;
}
span {
font-size: 2rem;
}
}
}
}
.o_search {
position: relative;
width: 90%;
max-width: 500px;
.btn{
@include o-position-absolute($top: 50%, $right: 1rem);
@include transform (translateY(-50%)) ;
padding: 0;
font-size: 1.2rem;
color: $gray;
}
}
.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-dark;
text-decoration: none;
opacity: .75;
&.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 -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
//------------------------------------------------------------------------------
#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;
}
&.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-dark;
font-weight: $fw_bold;
margin-bottom: 1rem;
&:before {
@include inline-icomoon($i-o-services , 0 1rem 0 0);
display: block;
font-size: 50px;
margin: 0 auto 20px;
}
&.o_title_start:before {
content: '#{$i-o-services}';
}
&.o_title_install:before {
content: '#{$i-install}';
}
&.o_title_basic:before {
content: '#{$i-basics}';
}
&.o_title_tutorial:before {
content: '#{$i-elearning_1}';
}
&.o_title_advanced:before {
content: '#{$i-advanced}';
}
}
ul {
padding: 1rem;
> li {
position: relative;
padding-bottom: 1rem;
a {
display: block;
font-weight: $fw_bold;
padding-bottom: .5rem;
}
}
}
}
&.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;
@include o-position-absolute($top: 0, $right: 1rem);
i {
font-size: 1.2rem;
margin-right: .2rem;
}
}
dt {
padding-top: $o-header-height;
margin-top: -$o-header-height;
}
section {
// This fixes the scroll position
padding-top: $o-header-height;
margin-top: -$o-header-height;
> h1 {
color: $o-violet-dark;
font-weight: $fw_semibold;
max-width: calc(100% - 120px);
}
> h2 {
color: $gray-darker;
padding-bottom: .5rem;
border-bottom: 1px solid $gray-light;
}
a.headerlink {
visibility: hidden !important;
&:after {
@include inline-icomoon($i-link, 0 1rem 0 0);
visibility: hidden;
font-size: 1rem;
color: $gray-light;
opacity: 0;
transition: .1s
}
}
// This makes permalinks only visible on hover.
h1, h2, h3, h4, h5, h6, dt, caption, p.caption, div.code-block-caption {
&:hover > a.headerlink:after{
visibility: visible;
opacity: 1;
}
}
}
.img-fluid {
@include box-shadow(0 3px 6px rgba(0, 0, 0, .16));
margin-bottom: 2rem;
}
}
&:not(.has_code_col) {
div[class^="highlight"] {
border: 1px solid $gray-light;
}
}
div[class^="highlight"] {
// This styles the consoles like read-the-doc's consoles
overflow-x: auto;
margin: 1px 0 24px 0;
div[class^="highlight"] {
padding: 0px;
border: none;
margin: 0;
}
pre {
white-space: pre;
margin: 0;
padding: 1rem;
display: block;
overflow: auto;
}
}
//------------------------------------------------------------------------------
// 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;
> p {
margin-bottom: 0;
}
> 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 .2rem 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: $warning;
> .alert-title, > h3 {
color: $brand-warning;
}
> .alert-title:before, > h3:before {
content: '#{$i-warning}';
}
}
&.alert-danger {
border-color: $danger;
> .alert-title, > h3 {
color: $brand-danger
}
> .alert-title:before, > h3:before {
content: '#{$i-danger}';
}
}
&.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-view-more}';
}
}
}
}
//------------------------------------------------------------------------------
// 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;
}
.o_page_toc_nav > ul {
padding-left: 0;
}
h3 {
text-transform: uppercase;
font-weight: $fw_bold;
font-size: 1rem;
color: $gray-darker;
}
ul {
list-style: none;
a {
display: block;
padding: .5rem 0;
font-weight: $fw_regular;
color: $gray-darker;
&.o_page_toc_title {
display:none;
+ ul {
padding-left: 0;
}
}
}
}
.active > a{
font-weight: $fw_bold;
}
}
}
//------------------------------------------------------------------------------
// 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;
}
}
.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-100;
> li > a {
font-weight: $fw-regular;
}
}
.accordion-button::after {
background-size: .8rem;
width: .8rem;
height: .8rem;
}
}
}
}