Skip to content

Commit f293ac2

Browse files
letzyaTyk Bot
authored and
Tyk Bot
committed
Implement top navigation tabs (#6354) (#6394)
* Implement top navigation tabs (#6354) (cherry picked from commit 2d8363a)
1 parent 989f72a commit f293ac2

16 files changed

+538
-393
lines changed

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ services:
1313
entrypoint: ["make", "run"]
1414

1515
volumes:
16-
- .:/src
16+
- .:/src

tyk-docs/assets/scss/_bespoke.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -6091,7 +6091,7 @@ body {
60916091
width: 100%;
60926092
padding-left: 0;
60936093
float: none;
6094-
padding-top: 110px;
6094+
padding-top: 80px;
60956095
}
60966096

60976097
.page-aside img {
+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
$tab-spacing: 20px;
2+
$border-color: #e3ceff;
3+
$hover-bg: #f3f4f6;
4+
$active-color: #8438fa;
5+
$text-color: #374151;
6+
7+
.tabs-menu {
8+
z-index: 100;
9+
background: #fff;
10+
transition: top 0.3s ease;
11+
position: fixed;
12+
left: 0;
13+
width: 100%;
14+
z-index: 999;
15+
border-bottom: 1px solid #e3ceff;
16+
}
17+
18+
body.has-hubspot-banner .tabs-menu {
19+
top: calc(64px + 68px);
20+
}
21+
22+
.sidebar-tab-title {
23+
display: none !important;
24+
}
25+
26+
.tabs-wrapper {
27+
width: 100%;
28+
overflow: hidden;
29+
background: #fff;
30+
margin: 20px 15px 0 15px;
31+
}
32+
33+
.tabs-container {
34+
display: flex;
35+
flex-wrap: nowrap;
36+
overflow-x: auto;
37+
gap: $tab-spacing;
38+
background: #fff;
39+
-webkit-overflow-scrolling: touch;
40+
scrollbar-width: none;
41+
-ms-overflow-style: none;
42+
43+
&::-webkit-scrollbar {
44+
display: none;
45+
}
46+
}
47+
48+
.tab-item {
49+
white-space: nowrap;
50+
transition: transform 0.2s ease;
51+
52+
&:hover {
53+
transform: translateY(-1px);
54+
}
55+
}
56+
57+
.tab-link {
58+
color: $text-color;
59+
text-decoration: none;
60+
border-radius: 4px;
61+
padding: 6px 8px;
62+
transition: all 0.3s ease;
63+
font-weight: 500;
64+
65+
&:hover {
66+
background: $hover-bg;
67+
color: darken($text-color, 10%);
68+
}
69+
}
70+
@media (max-width: 768px) {
71+
.tab-item {
72+
font-size: 13px;
73+
}
74+
75+
.tab-link {
76+
padding: 8px 10px;
77+
}
78+
79+
}
80+
81+
@media (max-width: 1024px) {
82+
.documentation-table-of-contents-container {
83+
order: -1;
84+
width: 100%;
85+
margin-bottom: 1rem;
86+
position: relative;
87+
top: 0;
88+
left: 0;
89+
right: 0;
90+
padding: 0 1rem;
91+
}
92+
93+
.tab-link {
94+
padding: 0;
95+
}
96+
97+
.documentation-table-of-contents {
98+
position: relative;
99+
width: 100%;
100+
max-height: none;
101+
overflow: visible;
102+
background: transparent;
103+
padding: 0;
104+
}
105+
106+
.page-content__main {
107+
display: flex;
108+
flex-direction: column;
109+
}
110+
111+
.tabs-wrapper .nav_sub_active {
112+
border-bottom: 2px solid $active-color;
113+
}
114+
}

tyk-docs/assets/scss/_side-menu.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Tree View
136136
flex-grow: 1;
137137
padding-inline-end: 1rem;
138138
overflow-y: scroll;
139-
padding-top: 1.5rem;
139+
padding-top: 2.5rem;
140140
}
141141

142142
.version-selector {

tyk-docs/assets/scss/_structure.scss

+11-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ body {
8181

8282
.hasSidebar &__container {
8383
padding-right: 20px;
84-
padding-top: 10px;
8584
padding-left: 20px;
8685
}
8786
}
@@ -94,7 +93,6 @@ body {
9493

9594
.hasSidebar &__container {
9695
padding-right: 20px;
97-
padding-top: 60px;
9896
padding-left: 100px;
9997
}
10098
}
@@ -147,6 +145,17 @@ body {
147145
color: #44546f;
148146
}
149147

148+
.page-content,
149+
.section-page {
150+
padding-top: 40px;
151+
}
152+
153+
.page-content {
154+
h4 {
155+
scroll-margin-top: 10px;
156+
}
157+
}
158+
150159
.metadata_heading {
151160
font-size: 22px;
152161
font-family: "Inter", sans-serif;

tyk-docs/assets/scss/_table-of-contents.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
}
3030

3131
.documentation-table-of-contents {
32-
padding: 60px 1rem 0.5rem 1.5rem;
32+
padding: 0 1rem 0.5rem 1.5rem;
3333

3434
.sub_toc__item:hover,
3535
.sub-sub-toc-item:hover,

tyk-docs/assets/scss/home.scss

+4
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ ol, ul {
201201
color: $brand-black;
202202
}
203203

204+
.home-mobile-margin {
205+
margin-top: 40px;
206+
}
207+
204208
@media (min-width: 992px) {
205209
.section-padding {
206210
padding-inline: 1%;

tyk-docs/assets/scss/main.scss

+2
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414
@import 'print';
1515
@import 'footer';
1616
@import 'directory-links';
17+
@import 'navigation-tabs';
18+

0 commit comments

Comments
 (0)