Skip to content

Commit 2f9355b

Browse files
committed
chore: update Docusaurus configuration and CSS for improved documentation layout
- Updated custom CSS to enhance layout consistency, including centering the navbar and main wrapper. - Removed the proxy URL from the configuration. - Adjusted styles for the theme edit button and sidebar to improve user experience. - Deleted the outdated API specification file to streamline documentation.
1 parent 7eaae7c commit 2f9355b

File tree

3 files changed

+49
-2030
lines changed

3 files changed

+49
-2030
lines changed

docs/docusaurus.config.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,18 +154,18 @@ const config = {
154154
forceDarkModeState: 'light',
155155
withDefaultFonts: false,
156156
hideClientButton: true,
157-
searchHotKey: 'l',
158-
proxyUrl: 'https://proxy.scalar.com',
157+
hideTestRequestButton: true,
158+
//proxyUrl: 'https://proxy.scalar.com',
159159
servers: [
160160
{
161161
url: 'http://localhost:8082',
162162
name: 'Local',
163163
},
164164
],
165-
customCss: `* {
166-
--scalar-background-1: transparent;
167-
--scalar-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
168-
}`
165+
customCss: `* {
166+
--scalar-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
167+
}
168+
`
169169

170170

171171
},

docs/src/css/custom.css

Lines changed: 43 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*******************************************************
22
* Global & Theme Variables *
33
*******************************************************/
4-
:root {
4+
:root {
55
/* Primary Grey Colors */
66
--grey-1000: #272727;
77
--grey-800: #404040;
@@ -142,25 +142,20 @@
142142

143143
/* Constrain the navbar content */
144144
.navbar__inner {
145-
max-width: var(--content-max-width);
146-
margin: 0 8%;
145+
max-width: 1800px;
146+
margin: 0 auto;
147147
}
148148

149149
/* Constrain the main wrapper for the whole page content below navbar */
150150
.main-wrapper {
151-
max-width: var(--content-max-width);
152-
margin: 0 8%;
151+
max-width: 1800px;
152+
margin: 0 auto;
153153
display: flex;
154+
justify-content: space-between;
155+
padding: 0 2rem;
156+
width: 100%;
154157
}
155158

156-
/* Keep sidebar width fixed */
157-
.theme-doc-sidebar-container {
158-
width: 300px;
159-
min-width: 300px;
160-
flex-shrink: 0; /* Prevent sidebar from shrinking */
161-
position: sticky; /* should now be relative to the centered main-wrapper */
162-
}
163-
164159
}
165160

166161
h1, h2, h3, h4, h5, h6 {
@@ -831,14 +826,10 @@ html[data-theme='dark'] .choice-card .button--secondary {
831826
color: var(--ifm-color-emphasis-900);
832827
}
833828

834-
.markdown {
835-
padding: 1.68rem;
836-
}
837-
838829
.theme-edit-this-page {
839830
background-color: var(--ifm-color-emphasis-100);
840-
border-radius: 12px;
841-
padding: 8px 12px;
831+
border-radius: 8px;
832+
padding: 8px 2px;
842833
margin-bottom: 12px;
843834
margin-top: 12px;
844835
border: 1px solid var(--ifm-color-emphasis-200);
@@ -850,6 +841,11 @@ html[data-theme='dark'] .choice-card .button--secondary {
850841
transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
851842
cursor: pointer;
852843
user-select: none;
844+
display: flex;
845+
flex-direction: row;
846+
align-items: center;
847+
justify-content: center;
848+
max-width: 152px;
853849
}
854850

855851
/*******************************************************
@@ -1306,17 +1302,40 @@ div[class*='codeBlockContainer'] {
13061302
}
13071303

13081304
[data-theme='dark'] .card {
1309-
background-color: #1c2128;
1310-
border-color: rgba(255, 255, 255, 0.1);
1311-
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
1305+
background-color: rgba(255, 255, 255, 0.03);
1306+
border-color: rgba(255, 255, 255, 0.12);
1307+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
13121308
}
13131309

13141310
[data-theme='dark'] .card:hover {
1315-
background-color: #242a33;
1316-
border-color: rgba(255, 255, 255, 0.15);
1311+
background-color: rgba(255, 255, 255, 0.06);
1312+
border-color: rgba(255, 255, 255, 0.2);
13171313
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
13181314
}
13191315

1316+
/* Hide icons in User Guides category card titles */
1317+
.cardTitle_rnsV {
1318+
font-size: 0 !important;
1319+
line-height: normal;
1320+
}
1321+
1322+
.cardTitle_rnsV::before {
1323+
content: attr(title);
1324+
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
1325+
font-weight: 700;
1326+
font-size: 1.25rem;
1327+
line-height: 1.4;
1328+
}
1329+
1330+
/* Explicit color settings for the ::before pseudo-element, matching h2 styles */
1331+
[data-theme='light'] .cardTitle_rnsV::before {
1332+
color: var(--grey-1000);
1333+
}
1334+
1335+
[data-theme='dark'] .cardTitle_rnsV::before {
1336+
color: #fff;
1337+
}
1338+
13201339
/*******************************************************
13211340
* Override Details Alert Styling *
13221341
*******************************************************/

0 commit comments

Comments
 (0)