Skip to content

Commit ffece8e

Browse files
authored
Merge branch 'main' into Remove-legacy-wallets-from-Network-section
2 parents 1053ae9 + ac7ab8b commit ffece8e

File tree

13 files changed

+139
-52
lines changed

13 files changed

+139
-52
lines changed

source/_static/css/custom.css

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ html {
131131

132132
/* Tutorial page styling */
133133
.tutorial-section {
134-
background-color: #edf2f7; /* Slightly darker background */
134+
background-color: var(--pst-color-on-background);
135+
border-color: var(--pst-color-border);
135136
padding: 25px 25px 25px 40px !important; /* top right bottom left - more padding on left */
136137
margin: 20px 0;
137138
border-radius: 8px;
@@ -160,6 +161,28 @@ html {
160161
background-color: #fefce8 !important; /* Light yellow */
161162
border: 1px solid #fef9c3 !important;
162163
}
164+
165+
/* Dark mode variants */
166+
html[data-theme="dark"] .tutorial-section-blue {
167+
background-color: #1e2937 !important; /* Dark blue */
168+
border: 1px solid #2d3748 !important;
169+
}
170+
171+
html[data-theme="dark"] .tutorial-section-green {
172+
background-color: #1a2e1a !important; /* Dark green */
173+
border: 1px solid #2d482d !important;
174+
}
175+
176+
html[data-theme="dark"] .tutorial-section-purple {
177+
background-color: #2d1a2e !important; /* Dark purple */
178+
border: 1px solid #482d48 !important;
179+
}
180+
181+
html[data-theme="dark"] .tutorial-section-yellow {
182+
background-color: #2e2d1a !important; /* Dark yellow */
183+
border: 1px solid #48482d !important;
184+
}
185+
163186
/* Main layout fixes - these were working well */
164187
.bd-container__inner.bd-page-width {
165188
max-width: none;
@@ -203,16 +226,34 @@ html {
203226
left: 0;
204227
padding-left: 1rem;
205228
z-index: 1; /* Reduced z-index */
206-
background: white;
229+
background: var(--pst-color-on-background);
207230
max-width: 167px; /* Match logo's natural width*/
208231
}
209232

233+
/* Dark mode switching */
234+
html[data-theme="dark"] .light-logo {
235+
display: none;
236+
}
237+
238+
html[data-theme="dark"] .dark-logo {
239+
display: block;
240+
}
241+
210242
/* Menu positioning */
211243
.navbar-header-items:not(.navbar-header-items__start) {
212244
margin-left: 200px;
213245
position: relative;
214246
z-index: 2; /* Higher than logo */
215-
background: white;
247+
background: var(--pst-color-on-background);
248+
}
249+
250+
/* Logo handling for dark/light mode */
251+
.light-logo {
252+
display: block;
253+
}
254+
255+
.dark-logo {
256+
display: none;
216257
}
217258

218259
img.logo {
@@ -225,10 +266,17 @@ img.logo {
225266
.navbar-header-items__start{
226267
max-width: 120px; /* Smaller width on mobile */
227268
margin-left: 3rem; /* Make space for menu button */
269+
background: var(--pst-color-on-background); /* Single background property */
228270
}
229271

230272
img.logo{
231273
width: 100%;
232274
height: auto;
233275
}
276+
}
277+
278+
/* Dark mode specific adjustments if needed */
279+
html[data-theme="dark"] .navbar-header-items__start,
280+
html[data-theme="dark"] .navbar-header-items:not(.navbar-header-items__start) {
281+
background: var(--pst-color-on-background); /* Ensures correct dark mode background */
234282
}

source/_static/css/style.css

Lines changed: 69 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
--pst-font-family-base: var(--pst-font-family-base-system);
1212
--pst-font-family-heading: var(--pst-font-family-base);
1313
--pst-font-family-monospace: var(--pst-font-family-monospace-system);
14+
}
1415

16+
/* Light theme (default) - keeping previous values*/
17+
html[data-theme="light"] {
1518
/*****************************************************************************
1619
* Colors
1720
**/
@@ -31,20 +34,21 @@
3134
--heading-color: #333333;
3235
}
3336

34-
html {
35-
--pst-color-primary: #48A2AE;
36-
--pst-color-primary-text: #333333;
37-
--pst-color-secondary: #052535;
38-
--pst-color-link: #48A2AE;
39-
--pst-color-link-hover: #48A2AE;
40-
--pst-color-inline-code: 178, 34, 34;
41-
--pst-color-sidebar-link-hover: #48A2AE;
42-
--pst-color-toc-link-hover: #48A2AE;
43-
--pst-color-toc-link-active: #48A2AE;
44-
--pst-color-headerlink: #48A2AE;
45-
--pst-color-headerlink-hover: #48A2AE;
46-
--bg-color: #ffffff;
47-
--heading-color: #333333;
37+
/* Dark theme */
38+
html[data-theme="dark"] {
39+
--pst-color-primary: #5CBFCC;
40+
--pst-color-primary-text: #ffffff;
41+
--pst-color-secondary: #7FB9C2;
42+
--pst-color-link: #5CBFCC;
43+
--pst-color-link-hover: #7FB9C2;
44+
--pst-color-inline-code: rgb(255, 99, 99);
45+
--pst-color-sidebar-link-hover: #5CBFCC;
46+
--pst-color-toc-link-hover: #5CBFCC;
47+
--pst-color-toc-link-active: #5CBFCC;
48+
--pst-color-headerlink: #5CBFCC;
49+
--pst-color-headerlink-hover: #5CBFCC;
50+
--bg-color: #1a1a1a;
51+
--heading-color: #ffffff;
4852
}
4953

5054
html {
@@ -56,49 +60,48 @@ html {
5660
body{
5761
font-family: var(--pst-font-family-base-system);
5862
background-color: var(--bg-color);
59-
color: #333333;
60-
;
63+
color: var(--pst-color-primary-text);
6164
}
6265

6366
/* Text styling */
6467
p{
6568
line-height: 1.7em;
6669
font-size: 16px;
67-
color: #333333;
70+
color: var(--pst-color-primary-text);
6871
font-family: var(--pst-font-family-base-system);
6972
}
7073

7174
h1{
7275
font-family: var(--pst-font-family-base-system);
73-
color: #333333;
76+
color: var(--pst-color-on-background);
7477
margin-bottom: 34px;
7578
}
7679

7780
h2{
7881
font-family: var(--pst-font-family-base-system);
79-
color: #333333;
82+
color: var(--pst-color-on-background);
8083
margin-bottom: 28px;
8184
}
8285

8386
h3{
8487
font-family: var(--pst-font-family-base-system);
85-
color: #333333;
88+
color: var(--pst-color-on-background);
8689
margin-bottom: 24px;
8790
}
8891

8992
h4{
9093
font-family: var(--pst-font-family-base-system);
91-
color: #333333;
94+
color: var(--pst-color-on-background);
9295
}
9396

9497
h5{
9598
font-family: var(--pst-font-family-base-system);
96-
color: #333333;
99+
color: var(--pst-color-on-background);
97100
}
98101

99102
h6{
100103
font-family: var(--pst-font-family-base-system);
101-
color: #333333;
104+
color: var(--pst-color-on-background);
102105
}
103106

104107
a{
@@ -148,6 +151,10 @@ p.prev-next-title:hover{
148151
--pst-color-accent: #48A2AE;
149152
}
150153

154+
html[data-theme="dark"] .bd-search input {
155+
--pst-color-accent: #5CBFCC;
156+
}
157+
151158
.toc-entry a.nav-link.active {
152159
box-shadow: none;
153160
}
@@ -163,6 +170,20 @@ p.prev-next-title:hover{
163170
padding-right: 0.5em;
164171
}
165172

173+
/* Dark mode styles for code */
174+
html[data-theme="dark"] .highlight .hll {
175+
background-color: #1e3d1e;
176+
}
177+
178+
html[data-theme="dark"] pre {
179+
background-color: var(--pst-color-on-background);
180+
color: var(--pst-color-primary-text);
181+
}
182+
183+
html[data-theme="dark"] .highlight {
184+
background-color: var(--pst-color-on-background);
185+
}
186+
166187
/*Video handling*/
167188

168189
iframe {
@@ -178,16 +199,26 @@ iframe {
178199
padding: 0;
179200
display: flex;
180201
align-items: center;
202+
background-color: var(--pst-color-on-background);
203+
background: var(--pst-color-background);
181204
}
182205

183206
.nav-item{
184207
--pst-color-link-hover: #48A2AE;
185208
}
186209

210+
html[data-theme="dark"] .nav-item {
211+
--pst-color-link-hover: #5CBFCC;
212+
}
213+
187214
.search-button__button{
188215
--pst-color-link-hover: #48A2AE;
189216
}
190217

218+
html[data-theme="dark"] .search-button__button {
219+
--pst-color-link-hover: #5CBFCC;
220+
}
221+
191222
.navbar-end{
192223
width: 33%;
193224
}
@@ -206,7 +237,7 @@ iframe {
206237
}
207238

208239
.fa-chevron-down:before {
209-
color: #888888;
240+
color: var(--pst-color-text-muted, #888888); /* Add variable with fallback */
210241
}
211242

212243
.bd-sidebar label {
@@ -270,7 +301,7 @@ ul.list-caption li.selected > label i:before {
270301

271302
.bd-sidebar .nav li>a {
272303
padding: 4px 0 0 22px;
273-
color: #888888;
304+
color: var(--pst-color-text-muted, #888888); /* Add variable with fallback */
274305
}
275306

276307
.bd-sidebar .nav li.has-children>a {
@@ -286,7 +317,7 @@ nav.bd-links p.caption {
286317
text-transform: unset;
287318
font-weight: unset;
288319
font-size: 14px;
289-
color: #888888;
320+
color: var(--pst-color-text-muted, #888888); /* Add variable with fallback */
290321
}
291322

292323
nav.bd-links .current>a {
@@ -300,9 +331,15 @@ nav.bd-links .current>a {
300331

301332
.bd-search input {
302333
border-radius: 16px;
303-
border: 1px solid #e7e7e7;
334+
border: 1px solid var(--pst-color-border, #e7e7e7);
304335
padding: 24px 24px 24px 50px;
305336
font-size: 15px;
337+
background-color: var(--pst-color-background);
338+
color: var(--pst-color-text);
339+
}
340+
341+
html[data-theme="dark"] .bd-search input {
342+
border-color: var(--pst-color-border, #404040);
306343
}
307344

308345
.rst-versions.shift-up {
@@ -346,7 +383,7 @@ div.admonition {
346383
}
347384

348385
.admonition.warning {
349-
background: #ffffff;
386+
background: var(--pst-color-on-background);
350387
border-color: #F6DB9A;
351388
border: 1px solid;
352389
}
@@ -356,7 +393,7 @@ div.admonition {
356393
}
357394

358395
.admonition.note {
359-
background: #ffffff;
396+
background: var(--pst-color-on-background);
360397
border-color: #acceed;
361398
border: 1px solid;
362399
}
@@ -469,7 +506,7 @@ div.admonition {
469506
.row .bd-sidebar .sidebar-start-items {
470507
width: 100vw;
471508
height: 100vh;
472-
background-color: #ededed;
509+
background-color: var(--pst-color-background);
473510
margin-left: -15px;
474511
padding: 0 15px;
475512
}
@@ -485,11 +522,12 @@ div.admonition {
485522

486523
.bd-search .icon {
487524
left: 22px;
525+
color: var(--pst-color-text-muted);
488526
}
489527

490528
.bd-links {
491-
background-color: #ededed;
492529
padding-left: 15px;
530+
background-color: var(--pst-color-background);
493531
}
494532

495533
.bd-search {
@@ -506,7 +544,6 @@ div.admonition {
506544
position: absolute;
507545
top: calc(100vh - 65px);
508546
width: 100%;
509-
background-color: #dbdbdb;
510547
}
511548

512549
.bd-toc-item.active {

source/_static/css/tippy.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.tippy-box {
2-
background-color: #e5e5e5;
3-
color:var(--pst-font-color);
2+
background-color: var(--pst-color-on-background);
3+
color: var(--pst-color-on-surface);
44
}

source/_templates/navbar-logo.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
<div>
99
<a href="https://developer.concordium.software/">
10-
<img class="logo" src="{{pathto('_static/concordium-logo-dark.svg', 1)}}" />
10+
<img class="logo light-logo" src="{{pathto('_static/concordium-logo-dark.svg', 1)}}" />
11+
<img class="logo dark-logo" src="{{pathto('_static/concordium-logo.svg', 1)}}" />
1112
</a>
1213
</div>

source/mainnet/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
"navigation_depth": 5,
157157
"navbar_start": ["navbar-logo"],
158158
"navbar_center": ["navbar-nav"],
159-
"navbar_end": ["navbar-icon-links"],
159+
"navbar_end": ["navbar-icon-links", "theme-switcher"],
160160
"secondary_sidebar_items": ["page-toc", "edit-this-page"],
161161
"article_footer_items": ["footer-article"],
162162
"show_prev_next": True,
@@ -256,7 +256,7 @@
256256
"github_version": "main",
257257
"doc_path": "source/mainnet",
258258
"conf_py_path": "/source/",
259-
"default_mode": "light",
259+
"default_mode": "auto",
260260
}
261261

262262
# Add any paths that contain custom static files (such as style sheets) here,

source/mainnet/docs/smart-contracts/contract-instances.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ transaction for attempting to create the instance is visible on-chain.
9191

9292
.. seealso::
9393

94-
See :ref:`initialize-contract` guide for how to initialize a
94+
See the :ref:`initialize-contract` guide for how to initialize a
9595
contract in practice. You can also watch a video about initializing smart contract instances.
9696

9797
.. raw:: html

0 commit comments

Comments
 (0)