Skip to content

Commit 470f18c

Browse files
Add Slack Icon next to GitHub Icon in the Documentation Navbar (#634)
* Add Slack Icon next to GitHub Icon in the Documentation Navbar Signed-off-by: Sanajit Jana <dev.sanajitjana@gmail.com> * Replace slack black-white logo with color logo Signed-off-by: Sanajit Jana <dev.sanajitjana@gmail.com> * Update Slack logo in CSS to a new color version and adjust background size Signed-off-by: Sanajit Jana <dev.sanajitjana@gmail.com> * Re-use and shorten the slack logo svg url --------- Signed-off-by: Sanajit Jana <dev.sanajitjana@gmail.com> Co-authored-by: Achanandhi M <110651321+Achanandhi-M@users.noreply.github.com>
1 parent 2bbabdd commit 470f18c

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

docusaurus.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ module.exports = {
161161
position: "right",
162162
dropdownActiveClassDisabled: true,
163163
},
164+
{
165+
href:
166+
"https://join.slack.com/t/keploy/shared_invite/zt-357qqm9b5-PbZRVu3Yt2rJIa6ofrwWNg",
167+
position: "right",
168+
className: "header-slack-link",
169+
"aria-label": "Join our Slack community",
170+
},
164171
{
165172
href: "https://github.com/keploy/keploy",
166173
position: "right",

src/css/custom.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
--ifm-link-hover-color: inherit;
3333
--site-primary-hue-saturation: 30 100%;
3434
--site-primary-hue-saturation-light: 0 0%; /* do we really need this extra one? */
35+
--slack-logo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1610 1610'%3E%3Cpath fill='%23E01E5A' d='M338 1017c0 93-76 169-169 169S0 1110 0 1017s76-169 169-169h169v169zM423 1017c0-93 76-169 169-169s169 76 169 169v424c0 93-76 169-169 169s-169-76-169-169v-424z'/%3E%3Cpath fill='%2336C5F0' d='M593 338c-93 0-169-76-169-169S500 0 593 0s169 76 169 169v169H593zM593 423c93 0 169 76 169 169s-76 169-169 169H169C76 761 0 685 0 592s76-169 169-169h424z'/%3E%3Cpath fill='%232EB67D' d='M1272 593c0-93 76-169 169-169s169 76 169 169-76 169-169 169h-169V593zM1187 593c0 93-76 169-169 169s-169-76-169-169V169C849 76 925 0 1018 0s169 76 169 169v424z'/%3E%3Cpath fill='%23ECB22E' d='M1017 1272c93 0 169 76 169 169s-76 169-169 169-169-76-169-169v-169h169zM1017 1187c-93 0-169-76-169-169s76-169 169-169h424c93 0 169 76 169 169s-76 169-169 169h-424z'/%3E%3C/svg%3E");
3536
}
3637

3738
html[data-theme="dark"] {
@@ -551,6 +552,25 @@ td img {
551552
no-repeat;
552553
}
553554

555+
/* Slack navbar icon to match GitHub size, spacing, color */
556+
.header-slack-link:hover {
557+
opacity: 0.6;
558+
}
559+
560+
.header-slack-link::before {
561+
content: "";
562+
width: 24px;
563+
height: 24px;
564+
display: flex;
565+
background: var(--slack-logo) no-repeat;
566+
background-size: 24px 24px;
567+
}
568+
569+
[data-theme="dark"] .header-slack-link::before {
570+
background: var(--slack-logo) no-repeat;
571+
background-size: 24px 24px;
572+
}
573+
554574
div[class^="announcementBar_"] {
555575
--site-announcement-bar-stripe-color1: hsl(
556576
var(--site-primary-hue-saturation) 88%

0 commit comments

Comments
 (0)