File tree Expand file tree Collapse file tree 6 files changed +134
-19
lines changed
theme/DocRoot/Layout/Main Expand file tree Collapse file tree 6 files changed +134
-19
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ import type * as Preset from '@docusaurus/preset-classic';
66// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
77
88const config : Config = {
9- title : 'My Site ' ,
10- tagline : 'Dinosaurs are cool ' ,
9+ title : 'Codacy Docs ' ,
10+ tagline : 'Documentation for the Codacy automated code review tool. ' ,
1111 favicon : 'img/codacy-favicon.ico' ,
1212
1313 // Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
Original file line number Diff line number Diff line change 1313@import './imports/components/search.css' ;
1414@import './imports/components/navbar.css' ;
1515@import './imports/components/nav-multistep.css' ;
16+ @import './imports/components/main-section.css' ;
1617
17-
18+ @layer docusaurus. infima , docusaurus . custom ;
1819
1920.table-of-contents__left-border {
2021 border : none;
2526 background-repeat : no-repeat;
2627}
2728
28- .menu {
29- padding : 0.5rem
30- }
31-
32- .theme-layout-main .container {
33- padding : 0 4rem ;
34- margin : 4rem auto;
35- }
36-
37- @media (max-width : 1200px ){
38- .theme-layout-main .container {
39- padding : 1.5rem ;
40- margin : 0 ;
41- }
42- }
4329
Original file line number Diff line number Diff line change 1+ @media (min-width : 997px ) {
2+ .main-wrapper {
3+ margin : 0 2rem ;
4+ }
5+
6+ .menu {
7+ border : 1px solid var (--ifm-color-emphasis-300 );
8+ border-radius : 1rem 0 0 1rem ;
9+ padding : 1rem 0.5rem !important ;
10+ }
11+ }
12+
13+ @media (max-width : 1200px ){
14+ .theme-layout-main .container {
15+ padding : 1.5rem ;
16+ margin : 0 ;
17+ }
18+ }
19+
20+ @layer docusaurus.infima {
21+ @media (min-width : 997px ) {
22+ .theme-layout-main .container {
23+ padding-top : 4rem !important ;
24+ padding-left : 4rem ;
25+ padding-right : 4rem ;
26+ }
27+ }
28+ }
Original file line number Diff line number Diff line change 66
77.navbar {
88 box-shadow : none;
9- border-bottom : 1px solid var (--ifm-toc-border-color );
109}
1110
1211.navbar__title {
Original file line number Diff line number Diff line change 1+ import React , { type ReactNode } from 'react' ;
2+ import clsx from 'clsx' ;
3+ import { useDocsSidebar } from '@docusaurus/plugin-content-docs/client' ;
4+ import type { Props } from '@theme/DocRoot/Layout/Main' ;
5+
6+ import styles from './styles.module.css' ;
7+
8+ export default function DocRootLayoutMain ( {
9+ hiddenSidebarContainer,
10+ children,
11+ } : Props ) : ReactNode {
12+ const sidebar = useDocsSidebar ( ) ;
13+ const isEnhanced = hiddenSidebarContainer || ! sidebar ;
14+
15+ return (
16+ < main
17+ className = { clsx (
18+ styles . docMainContainer ,
19+ isEnhanced && styles . docMainContainerEnhanced ,
20+ ) } >
21+ < div className = { styles . docItemWrapperOuter } >
22+ < div
23+ className = { clsx (
24+ 'container' ,
25+ styles . docItemWrapper ,
26+ hiddenSidebarContainer && styles . docItemWrapperEnhanced ,
27+ ) } >
28+ < div className = { styles . docItemWrapperInner } > { children } </ div >
29+ </ div >
30+ </ div >
31+ </ main >
32+ ) ;
33+ }
Original file line number Diff line number Diff line change 1+ .docMainContainer {
2+ display : flex;
3+ width : 100% ;
4+ }
5+
6+ .docItemWrapperOuter {
7+ width : 100% ;
8+ }
9+
10+ .docItemWrapper {
11+ width : 100% ;
12+ }
13+
14+ .docItemWrapperInner {
15+ width : 100% ;
16+ }
17+
18+ @media (min-width : 997px ) {
19+
20+ .docItemWrapperOuter {
21+ border-radius : 0 1rem 1rem 0 ;
22+ border-color : var (--ifm-color-emphasis-300 );
23+ border-style : solid;
24+ border-width : 1px 1px 1px 0 ;
25+ position : relative;
26+ z-index : 0 ;
27+ }
28+
29+ .docItemWrapperOuter ::after {
30+ content : '' ;
31+ position : fixed;
32+ display : block;
33+ width : calc (100% - var (--doc-sidebar-width ) - 2rem - 2rem - 1px );
34+ height : 2rem ;
35+ clip-path : inset (0 0 1rem 0 );
36+ border-color : var (--ifm-color-emphasis-300 );
37+ border-style : solid;
38+ border-width : 1px 1px 0 0 ;
39+ border-radius : 0 1rem 1rem 0 ;
40+ top : calc (var (--ifm-navbar-height ));
41+ z-index : 2 ;
42+ }
43+
44+ .docItemWrapperOuter ::before {
45+ content : '' ;
46+ position : fixed;
47+ width : 1rem ;
48+ height : 10rem ;
49+ background : var (--ifm-background-surface-color );
50+ top : calc (var (--ifm-navbar-height ) - 9rem );
51+ right : 2rem ;
52+ z-index : 1 ;
53+ }
54+
55+ .docMainContainer {
56+ flex-grow : 1 ;
57+ max-width : calc (100% - var (--doc-sidebar-width ));
58+ }
59+
60+ .docMainContainerEnhanced {
61+ max-width : calc (100% - var (--doc-sidebar-hidden-width ));
62+ }
63+
64+ .docItemWrapperEnhanced {
65+ max-width : calc (
66+ var (--ifm-container-width ) + var (--doc-sidebar-width )
67+ ) !important ;
68+ }
69+ }
You can’t perform that action at this time.
0 commit comments