Skip to content

Commit 76af1ee

Browse files
committed
fix: code review comments
1 parent 5028d01 commit 76af1ee

File tree

5 files changed

+60
-27
lines changed

5 files changed

+60
-27
lines changed

apify-docs-theme/src/config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ const themeConfig = {
137137
},
138138
],
139139
},
140+
{
141+
href: 'https://discord.com/invite/jyEM2PRvMU',
142+
label: 'Discord',
143+
title: 'Chat on Discord',
144+
position: 'right',
145+
className: 'icon',
146+
},
140147
],
141148
},
142149
colorMode: {

apify-docs-theme/src/theme/Footer/index.module.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
}
55

66
.container {
7-
max-width: var(--max-layout-width);
7+
max-width: calc(var(--max-layout-width) - var(--ifm-spacing-horizontal) * 2);
88
width: 100%;
99
margin: 0 auto;
1010
display: flex;
@@ -90,6 +90,10 @@ html[data-theme='dark'] .logo {
9090
.bottom {
9191
padding-top: 0;
9292
gap: 1.6rem;
93+
94+
:global(.col) {
95+
justify-content: center;
96+
}
9397
}
9498

9599
.toggle {

apify-docs-theme/src/theme/Navbar/MobileSidebar/Header/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default function NavbarMobileSidebarHeader() {
2020
<button
2121
type="button"
2222
className="clean-btn navbar-sidebar__close"
23-
onClick={() => mobileSidebar.toggle()}
23+
onClick={mobileSidebar.toggle}
2424
aria-label="Close navigation bar"
2525
>
2626
<IconClose />

apify-docs-theme/src/theme/SearchBar/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import React, { useCallback } from 'react';
88
import { ApifySearch } from '@apify/docs-search-modal';
99

1010
// needs to be imported as the last thing, so that it can override the default styles
11+
// TODO: update simple-import-sort to allow importing css as last.
1112
import './styles.css';
1213

1314
/**

apify-docs-theme/src/theme/custom.css

Lines changed: 46 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ html[data-theme='dark'] {
163163
--ifm-footer-background-color: #272c3d;
164164
--ifm-footer-title-color: #60626e;
165165
--ifm-footer-link-color: #6b6e80;
166-
--max-layout-width: 1200px;
166+
--ifm-spacing-horizontal: 2.4rem;
167+
--max-layout-width: 1440px;
167168

168169
--ifm-code-background: var(--ifm-pre-background);
169170

@@ -424,7 +425,7 @@ footer .col {
424425
}
425426

426427
.navbar__container {
427-
max-width: var(--max-layout-width);
428+
max-width: calc(var(--max-layout-width) - var(--ifm-spacing-horizontal) * 2);
428429
display: flex;
429430
margin: 0 auto;
430431
width: 100%;
@@ -629,13 +630,25 @@ article .card h2 {
629630
color: #f2f3fb;
630631
}
631632

632-
.menu__caret:before,
633-
.menu__link--sublist:after {
634-
float: right;
633+
.menu__caret {
634+
margin-right: 0.8rem;
635+
padding: 0.6rem;
636+
}
637+
638+
.menu__caret,
639+
.menu__link--sublist-caret {
640+
border-radius: 1.2rem;
641+
}
642+
643+
.menu__caret:before {
644+
width: 1.2rem;
645+
height: 1.2rem;
635646
}
636647

637648
.menu__link--sublist-caret:after {
649+
width: 2rem;
638650
height: 2.4rem;
651+
float: right;
639652
}
640653

641654
aside button[class*="collapseSidebarButton"] svg {
@@ -928,28 +941,45 @@ div[class*="searchBox"] {
928941
font-weight: 500;
929942
}
930943

944+
.navbar__item.navbar__link.icon {
945+
padding: 0.8rem;
946+
font-size: 0;
947+
line-height: 0;
948+
flex-shrink: 0;
949+
}
950+
951+
@media (max-width: 996px) {
952+
.navbar__item.navbar__link.icon {
953+
font-size: 1.4rem;
954+
line-height: 2.4rem;
955+
font-weight: 500;
956+
}
957+
958+
.menu__link.icon::before {
959+
display: none;
960+
}
961+
962+
.navbar__inner .navbar__item.navbar__link.icon {
963+
display: none;
964+
}
965+
}
966+
967+
931968
.menu__list-item-collapsible {
932969
padding: unset;
933970
}
934971

935972
.menu__list {
936973
width: 100%;
937-
display: flex;
938-
flex-direction: column;
939-
gap: 0.4rem;
940974
}
941975

942-
.menu__list .menu__list {
943-
margin-top: unset;
944-
padding-left: 1.6rem;
945-
}
946-
947-
.menu__list .menu__list .menu__list-item {
976+
.menu__list > .menu__list-item {
948977
margin-top: 0.4rem;
949978
}
950979

951-
.menu__caret {
952-
margin-right: 0.8rem;
980+
.menu__list .menu__list {
981+
margin-top: unset;
982+
padding-left: 1.6rem;
953983
}
954984

955985
.navbar-sidebar__back {
@@ -997,11 +1027,6 @@ html .theme-doc-sidebar-container {
9971027
border: 0;
9981028
}
9991029

1000-
html .theme-doc-sidebar-container button {
1001-
border: 0;
1002-
border-radius: 10px;
1003-
}
1004-
10051030
html .table-of-contents {
10061031
border-left: 0;
10071032
}
@@ -1135,10 +1160,6 @@ aside li.section-header > .menu__list {
11351160
padding-left: 0;
11361161
}
11371162

1138-
.theme-doc-sidebar-menu > li.section-header > ul > li.theme-doc-sidebar-item-category-level-2 {
1139-
margin-bottom: 1rem;
1140-
}
1141-
11421163
.beta-chip {
11431164
display: inline-block;
11441165
border: 1px solid #ccc;

0 commit comments

Comments
 (0)