Skip to content

Commit 8ccd01e

Browse files
authored
Merge pull request #12 from dereknola/suse_dropdown
Rework Navbar
2 parents fd91d3e + 7a09943 commit 8ccd01e

11 files changed

+122
-63
lines changed

docusaurus.config.js

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,45 @@ module.exports = {
3232
to: 'https://k3s-io.github.io/docs',
3333
position: 'right',
3434
label: 'Docs',
35-
className: 'navbar__docs',
35+
className: 'navbar__icon navbar__docs',
3636
},
3737
{
3838
to: 'https://github.com/k3s-io/k3s/',
3939
label: 'GitHub',
4040
position: 'right',
41-
className: 'navbar__github btn btn-secondary icon-github',
41+
className: 'navbar__icon navbar__github',
42+
},
43+
{
44+
type: 'dropdown',
45+
label: 'More From SUSE',
46+
position: 'right',
47+
className: 'navbar__docs',
48+
items: [
49+
{
50+
label: 'Rancher',
51+
to: 'https://www.rancher.com',
52+
className: 'navbar__icon navbar__rancher',
53+
},
54+
{
55+
label: 'Rancher Desktop',
56+
to: "https://rancherdesktop.io",
57+
className: 'navbar__icon navbar__rd',
58+
},
59+
{
60+
label: 'Longhorn',
61+
to: "https://longhorn.io",
62+
className: 'navbar__icon navbar__longhorn',
63+
},
64+
{
65+
type: 'html',
66+
value: '<hr style="margin: 0.3rem 0;">',
67+
},
68+
{
69+
label: 'More Projects...',
70+
to: "https://opensource.suse.com",
71+
className: 'navbar__icon navbar__suse',
72+
},
73+
],
4274
},
4375
],
4476
},

src/css/custom.css

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* bundles Infima by default. Infima is a CSS framework designed to
55
* work well for content-centric websites.
66
*/
7-
/* Import fonts. */
7+
@import "icon_dropdown.css";
88

99
/* poppins */
1010
@font-face {
@@ -107,66 +107,6 @@ hr {
107107
height: 40px;
108108
}
109109

110-
.btn.navbar__github {
111-
display: inline-block;
112-
font-weight: 400;
113-
color: #212529;
114-
text-align: center;
115-
vertical-align: middle;
116-
user-select: none;
117-
background-color: initial;
118-
border: 2px solid transparent;
119-
padding: .375rem .75rem;
120-
font-size: 1rem;
121-
line-height: 1.66;
122-
border-radius: 3px;
123-
transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
124-
}
125-
126-
a.btn.navbar__github {
127-
border: 2px solid transparent;
128-
padding: 8px 20px 7px 47px;
129-
font-size: 1rem;
130-
line-height: 1.66;
131-
font-weight: 400;
132-
position: relative;
133-
font-family: poppins,sans-serif;
134-
text-decoration: none;
135-
align-items: center;
136-
border-radius: 3px;
137-
}
138-
139-
.clear-btn {
140-
padding: 100px;
141-
}
142-
143-
.btn-secondary.navbar__github:hover {
144-
color: #fff;
145-
background-color: #273230;
146-
border-color: #222a29;
147-
}
148-
149-
a.btn.navbar__github::before {
150-
content: "";
151-
background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 20.5 20%22%3E%3Cdefs/%3E%3Cpath fill=%22%23fff%22 d=%22M10.3.0C4.6.0.0 4.6.0 10.3c0 4.4 2.8 8.3 7 9.7.5.1.7-.2.7-.5v-1.9c-2.6.5-3.2-.6-3.4-1.2-.2-.6-.6-1.1-1-1.5-.4-.2-.9-.7.0-.7.7.1 1.3.5 1.6 1 .6 1.1 1.9 1.4 3 .8.0-.5.3-1 .7-1.4-2.3-.3-4.7-1.1-4.7-5.1.0-1 .4-2 1.1-2.8-.5-.6-.5-1.6-.1-2.5.0.0.9-.3 2.8 1.1 1.7-.5 3.4-.5 5.1.0 2-1.3 2.8-1.1 2.8-1.1.4.9.5 1.9.2 2.8.7.7 1.1 1.7 1.1 2.8.0 3.9-2.4 4.8-4.7 5.1.5.5.7 1.2.7 1.9v2.8c0 .3.2.6.7.5 5.4-1.8 8.3-7.6 6.5-13C18.6 2.8 14.7.0 10.3.0z%22/%3E%3C/svg%3E");
152-
height: 20px;
153-
width: 20px;
154-
position: absolute;
155-
left: 15px;
156-
top: 10px;
157-
}
158-
159-
.icon-github.navbar__github {
160-
margin-left: 20px;
161-
}
162-
163-
.btn-secondary.navbar__github {
164-
color: #fff!important;
165-
border-color: #384745;
166-
background-color: #384745;
167-
box-shadow: inset 0 1px rgb(255 255 255 / 15%), 0 1px 1px rgb(0 0 0 / 8%);
168-
}
169-
170110
.docusaurus-highlight-code-line {
171111
background-color: rgb(72, 77, 91);
172112
display: block;

src/css/icon_dropdown.css

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
2+
.navbar__icon {
3+
font-size: 16px;
4+
}
5+
6+
.navbar__icon:before {
7+
content: "";
8+
display: inline-flex;
9+
height: 20px;
10+
width: 35px;
11+
margin-right: 4px;
12+
padding-bottom: 7px;
13+
background-color: var(--ifm-navbar-link-color);
14+
}
15+
16+
.navbar__docs {
17+
font-size: 18px;
18+
}
19+
20+
.navbar__docs:hover:before {
21+
background-color: var(--ifm-link-color);
22+
}
23+
24+
.navbar__docs:before {
25+
mask: url(/static/img/icon-docs-mask.png) no-repeat 100% 100%;
26+
mask-size: cover;
27+
height: 20px;
28+
width: 30px;
29+
padding-right: 1px;
30+
padding-bottom: 9px;
31+
}
32+
33+
.navbar__github {
34+
font-size: 18px;
35+
}
36+
37+
.navbar__github:hover:before {
38+
background-color: var(--ifm-link-color);
39+
}
40+
41+
.navbar__github:before {
42+
mask: url(/static/img/icon-github-mask.png) no-repeat 100% 100%;
43+
mask-size: cover;
44+
height: 19px;
45+
width: 22px;
46+
padding-right: 1px;
47+
padding-bottom: 4px;
48+
}
49+
50+
.navbar__rancher:hover:before {
51+
background-color: #2e68e9;
52+
}
53+
.navbar__rancher:before {
54+
mask: url(/static/img/icon-rancher-mask.png) no-repeat 100% 100%;
55+
mask-size: cover;
56+
height: 14px;
57+
padding-bottom: 2px;
58+
}
59+
60+
.navbar__rd:hover:before {
61+
background-color: #0081be;
62+
}
63+
.navbar__rd:before {
64+
mask: url(/static/img/icon-rd-mask.png) no-repeat 100% 100%;
65+
mask-size: cover;
66+
height: 22px;
67+
}
68+
69+
.navbar__longhorn:hover:before {
70+
background-color: #5f224a;
71+
}
72+
.navbar__longhorn:before {
73+
mask: url(/static/img/icon-longhorn-mask.png) no-repeat 100% 100%;
74+
mask-size: cover;
75+
height: 20px;
76+
padding-bottom: 9px;
77+
}
78+
79+
.navbar__suse:hover:before {
80+
background-color: #30ba78;
81+
}
82+
.navbar__suse:before {
83+
mask: url(/static/img/icon-suse-mask.png) no-repeat 100% 100%;
84+
mask-size: cover;
85+
height: 15px;
86+
padding-bottom: 4px;
87+
}

static/img/icon-docs-mask.png

665 Bytes
Loading

static/img/icon-github-mask.png

6.24 KB
Loading

static/img/icon-longhorn-mask.png

3.96 KB
Loading

static/img/icon-rancher-mask.png

4.56 KB
Loading

static/img/icon-rd-mask.png

8.11 KB
Loading

static/img/icon-suse-mask.png

13.7 KB
Loading
-38.4 KB
Loading

0 commit comments

Comments
 (0)