Skip to content

Commit ebe10ff

Browse files
committed
style: enhance sidebar method labels with visual indicators
1 parent 6fe93cd commit ebe10ff

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

src/css/custom.css

+65
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,71 @@
2929
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
3030
}
3131

32+
33+
/* Sidebar Method labels */
34+
.api-method > .menu__link,
35+
.schema > .menu__link {
36+
align-items: center;
37+
justify-content: start;
38+
}
39+
40+
.api-method>.menu__link::before {
41+
width: 50px;
42+
height: 20px;
43+
font-size: 12px;
44+
line-height: 20px;
45+
text-transform: uppercase;
46+
font-weight: 600;
47+
border-radius: 0.25rem;
48+
border: 1px solid;
49+
margin-right: var(--ifm-spacing-horizontal);
50+
text-align: center;
51+
flex-shrink: 0;
52+
border-color: transparent;
53+
color: white;
54+
}
55+
56+
.get>.menu__link::before {
57+
content: "get";
58+
background-color: var(--ifm-color-primary);
59+
}
60+
61+
.put>.menu__link::before {
62+
content: "put";
63+
background-color: var(--openapi-code-blue);
64+
}
65+
66+
.post>.menu__link::before {
67+
content: "post";
68+
background-color: var(--openapi-code-green);
69+
}
70+
71+
.delete>.menu__link::before {
72+
content: "del";
73+
background-color: var(--openapi-code-red);
74+
}
75+
76+
.patch>.menu__link::before {
77+
content: "patch";
78+
background-color: var(--openapi-code-orange);
79+
}
80+
81+
.head > .menu__link::before {
82+
content: "head";
83+
background-color: var(--ifm-color-secondary-darkest);
84+
}
85+
86+
.event > .menu__link::before {
87+
content: "event";
88+
background-color: var(--ifm-color-secondary-darkest);
89+
}
90+
91+
.schema > .menu__link::before {
92+
content: "schema";
93+
background-color: var(--ifm-color-secondary-darkest);
94+
}
95+
/* ---------------------------------- */
96+
3297
.header-github-link:hover {
3398
opacity: 0.6;
3499
}

0 commit comments

Comments
 (0)