Skip to content

Commit

Permalink
[Docs] add sign up button to nav bar (#1485)
Browse files Browse the repository at this point in the history
* [Docs] add sign up button to nav bar

* update nav and add sign up button for small screens

* address comments
  • Loading branch information
ryancurtis1 authored Oct 9, 2024
1 parent cb5c078 commit fe0e100
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 44 deletions.
29 changes: 14 additions & 15 deletions components/Search/Search.module.scss
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
.icon {
width: 14px;
margin-right: 6px;
width: 14px;
margin-right: 6px;
}

.searchBar:focus {
box-shadow: none;

box-shadow: none;
}

.inputContainer {
display: flex;
flex-direction: row;
display: flex;
flex-direction: row;
}

@media (max-width: 768px) {
.searchBar {
display: none;
}
.icon {
width: 20px;
}
}
@media (max-width: 800px) {
.searchBar {
display: none;
}

.icon {
width: 20px;
}
}
18 changes: 18 additions & 0 deletions components/SignUpButton/SignUpButton.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@use "../../pages/theme/colors.scss" as colors;

.signUpButton {
box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
background-color: colors.$purple50;
font-weight: 600;
font-size: 1rem;
line-height: 1.5rem;
color: colors.$white;
padding: 10px 22px;
text-wrap: nowrap;
border-radius: 100px;

&:hover {
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
background-color: colors.$purple100;
}
}
9 changes: 9 additions & 0 deletions components/SignUpButton/SignUpButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import style from "./SignUpButton.module.scss";

export default function SignUpButton() {
return (
<a className={style.signUpButton} href="https://mixpanel.com/register">
Sign Up
</a>
);
}
2 changes: 1 addition & 1 deletion pages/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"api-reference": {
"title": "API Reference",
"title": "API Docs",
"type": "page",
"href": "https://developer.mixpanel.com/reference",
"newWindow": true
Expand Down
58 changes: 30 additions & 28 deletions pages/overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ $border-radius-lg: 100px;
}
}

.top-nav-search-bar {
@media (max-width: 400px) {
display: none;
}
}

//actively selected tab
.nx-text-sm[aria-current="true"] span {
font-weight: 700;
Expand Down Expand Up @@ -287,7 +293,6 @@ article img {
background-color: colors.$lightbg;
}


//##############################Light Theme Starts Here##################################
.light {
line-height: 1.8;
Expand Down Expand Up @@ -395,16 +400,15 @@ article img {
.nx-w-full > main {
color: colors.$grey100;
background-color: colors.$lightbg;


//ID management banner style
.idManagementBanner {
position: sticky !important;
top: 55px;
opacity: 1 !important;
background-color: #fefce8 !important;
color: #713f11;
}

//ID management banner style
.idManagementBanner {
position: sticky !important;
top: 55px;
opacity: 1 !important;
background-color: #fefce8 !important;
color: #713f11;
}

.nx-mt-6 {
border-bottom: colors.$black;
Expand Down Expand Up @@ -436,7 +440,6 @@ article img {
}
}


// Modify breadcrumbs
.nextra-breadcrumb {
text-transform: uppercase;
Expand Down Expand Up @@ -464,7 +467,7 @@ article img {
color: colors.$white;
pointer-events: none;
}

// //for the little arrows between breadcrumbs
// svg {
// opacity: 0.4;
Expand Down Expand Up @@ -589,7 +592,7 @@ article img {
}

.submitButton {
background: colors.$purple100 ;
background: colors.$purple100;
color: white;
}

Expand Down Expand Up @@ -1032,7 +1035,7 @@ article img {
//##############################Dark Theme Top Nav###################################

.nextra-nav-container {
background-color: colors.$purple50;
background-color: #2b273f !important;
// box-shadow: unset;
border-color: #1f1f24;
border-width: 1px;
Expand All @@ -1043,7 +1046,7 @@ article img {
}

.nextra-nav-container-blur {
background-color: colors.$purple50;
background-color: #2b273f !important; //colors.$darkbg;
box-shadow: none;
}

Expand Down Expand Up @@ -1123,16 +1126,16 @@ article img {
}
}

//ID management banner style
.idManagementBanner {
.nextra-callout {
background-color: #49342d !important;
color: #fef089;
//ID management banner style
.idManagementBanner {
.nextra-callout {
background-color: #49342d !important;
color: #fef089;
}
position: sticky !important;
top: 55px;
opacity: 1 !important;
}
position: sticky !important;
top: 55px;
opacity: 1 !important;
}

//modify anchor links hastags
a.subheading-anchor {
Expand Down Expand Up @@ -1262,7 +1265,6 @@ article img {

//Modify Bottom Feedback Area
.feedbackCollectorContainer {

.feedbackTextArea {
color: black;
}
Expand All @@ -1272,13 +1274,13 @@ article img {
}

.submitButton {
background: colors.$purple100 ;
background: colors.$purple100;
color: white;
}

.feedbackButtonContainer {
.feedbackButton {
background-color: #2B273F;
background-color: #2b273f;
color: colors.$purple20;

&:hover {
Expand Down
4 changes: 4 additions & 0 deletions theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
SupportIcon,
} from "./components/svg/NavIcon";
import MainContent from "./components/MainContent/MainContent";
import SignUpButton from "./components/SignUpButton/SignUpButton";

function renderComponent<T>(ComponentOrNode: FC<T> | ReactNode, props?: T) {
if (!ComponentOrNode) return null;
Expand Down Expand Up @@ -71,6 +72,9 @@ const config: DocsThemeConfig = {
project: {
link: "https://github.com/mixpanel/docs",
},
navbar: {
extraContent: SignUpButton,
},
primaryHue: { dark: 256, light: 256 },
// primarySaturation: { dark: 50, light: 100 },
sidebar: {
Expand Down

0 comments on commit fe0e100

Please sign in to comment.