Skip to content

Commit d506b31

Browse files
committed
Fixes css and sidebar for landing page
1 parent 1d6c34c commit d506b31

File tree

2 files changed

+40
-15
lines changed

2 files changed

+40
-15
lines changed

src/css/helios-gcx.css

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
@media screen and (min-width:769px) {
5454
.nav-container {
5555
width: 294px;
56-
5756
}
5857
}
5958

@@ -289,9 +288,20 @@ ul#ds_sites_list li a:active {
289288
border-width: 1.5px;
290289
}
291290

291+
.nav.pagination {
292+
margin-bottom: 20px;
293+
}
294+
295+
@media screen and (min-width: 1024px) {
296+
.doc {
297+
--doc-max-width--desktop: calc(1028 / var(--rem-base) * 1rem);
298+
}
299+
}
300+
292301

293302
/*Card Styles*/
294-
.helios-card.mdc-card--outlined{
303+
304+
.helios-card.mdc-card--outlined {
295305
margin-top: 4rem;
296306
}
297307

@@ -481,6 +491,9 @@ a.ds_buttons_button:hover {
481491
.nav-item.toggler>button {
482492
padding: 0;
483493
margin: 0 10px;
494+
position: absolute;
495+
top: 10px;
496+
right: 0;
484497
}
485498

486499
.nav-item.toggler .nav-text {
@@ -618,7 +631,6 @@ label.collapse_label:after {
618631
display: inline-block;
619632
}
620633

621-
622634
.dark-mode .collapse[type="checkbox"]+label {
623635
background-image: url(../img/open-white.svg);
624636
}
@@ -627,6 +639,7 @@ label.collapse_label:after {
627639
background-image: url(../img/close-white.svg);
628640
}
629641

642+
630643
/* Header Navbar */
631644

632645

@@ -751,7 +764,9 @@ label.switch_label:after {
751764

752765
/*Dark mode: Mobile Header */
753766

767+
754768
/* gcx-schema-sample-app-gallery */
769+
755770
.dark-mode gcx-schema-sample-app-gallery {
756771
--gcx-app-appgallery-h4-color: var(--white);
757772
--gcx-app-gallery-p-color: var(--color-interface-night-300);
@@ -763,22 +778,23 @@ label.switch_label:after {
763778
--gcx-sample-appgallery-card-border: 0;
764779
}
765780

766-
.dark-mode .mdc-card--outlined{
781+
.dark-mode .mdc-card--outlined {
767782
border: 2px solid #2E394E;
768783
}
769784

770-
.dark-mode .doc h2:not(.discrete){
785+
.dark-mode .doc h2:not(.discrete) {
771786
border-bottom: 1px solid #2E394E;
772787
}
773788

789+
774790
/* Dark mode: Navigation*/
775791

776792
.dark-mode .nav {
777793
background: var(--color-interface-night-900);
778794
box-shadow: 2px 0px 0px #2e394e;
779795
}
780796

781-
.dark-mode .nav-container{
797+
.dark-mode .nav-container {
782798
box-shadow: 2px 0px 0px #2E394E;
783799
}
784800

@@ -840,7 +856,6 @@ label.switch_label:after {
840856
}
841857

842858

843-
844859
/* Dark mode: Toolbar*/
845860

846861
.dark-mode .toolbar {
@@ -851,6 +866,8 @@ label.switch_label:after {
851866
.dark-mode .breadcrumbs li {
852867
color: var(--color-interface-night-300);
853868
}
869+
870+
854871
/* Dark mode: Body*/
855872

856873
.dark-mode body {
@@ -925,17 +942,15 @@ label.switch_label:after {
925942
background: var(--color-interface-night-800);
926943
}
927944

928-
.dark-mode .doc .admonitionblock td.content {
929-
/* background: var(--gray-dark);*/
930-
}
931-
932-
.dark-mode .doc .sidebarblock > .content > .title{
945+
.dark-mode .doc .sidebarblock>.content>.title {
933946
color: var(--white);
934947
}
935948

936-
.dark-mode .doc .sidebarblock > .content > .title a{
949+
.dark-mode .doc .sidebarblock>.content>.title a {
937950
color: var(--white);
938951
}
952+
953+
939954
/*Dark Mode Aside Menu*/
940955

941956
.dark-mode .toc .toc-menu a {
@@ -1040,5 +1055,4 @@ label.switch_label:after {
10401055

10411056
.dark-mode .enlighter-t-bootstrap4 .enlighter-k10 {
10421057
color: var(--white)!important;
1043-
}
1044-
1058+
}

src/js/08-gcx-helios.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
/*Dark theme verification*/
22
var theme = window.localStorage.getItem('theme')
33
window.addEventListener('DOMContentLoaded', (event) => {
4+
var path = window.location.pathname
5+
var page = path.split('/').pop()
6+
var name = page.replace('.html', '')
7+
console.log(name)
8+
const sidebar = document.querySelector('.sidebar')
9+
const col = document.getElementById('collapse')
410
var checkbox = document.getElementById('switch')
511
var root = document.getElementsByTagName('html')[0]
612
if (theme) {
@@ -10,6 +16,11 @@ window.addEventListener('DOMContentLoaded', (event) => {
1016
checkbox.checked = false
1117
}
1218

19+
if (name === 'landing') {
20+
col.checked = true
21+
sidebar.classList.add('small-container')
22+
}
23+
1324
document.addEventListener('click', function (event) {
1425
if (event.target.matches('.switch')) {
1526
var root = document.getElementsByTagName('html')[0]

0 commit comments

Comments
 (0)