Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: posthog send event false + some ui fixes #4874

Merged
merged 3 commits into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions website/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import DarkBlueRadialGradient from "../components/Icons/RadialGradients/DarkBlue
export default function Home(): JSX.Element {
return (
<Layout description="Documentation for free and open source OpenBB products.">
<main className="relative min-h-[75vh] py-20 md:py-0 flex flex-col items-center justify-center overflow-hidden">
<article className="min-h-[75vh] w-full relative py-20 md:py-10 flex flex-col items-center justify-center overflow-hidden">
<DarkBlueRadialGradient className="absolute opacity-40 -left-[1000px] w-[1600px] h-[1600px] lg:-left-[1000px] lg:opacity-40 -top-20 xl:-top-60 xl:-left-[800px] 2xl:opacity-50" />
<RubyRedRadialGradient className="absolute opacity-40 -right-[1000px] w-[1600px] h-[1600px] lg:-right-[1000px] lg:opacity-40 -top-20 xl:-top-60 xl:-right-[800px] 2xl:opacity-50" />
<div className="flex mx-auto flex-col items-center justify-center w-full max-w-[906px]">
<div className="flex mx-auto flex-col items-center justify-center w-full max-w-[1100px]">
<div className="z-10 flex flex-col items-center justify-center w-full h-full mb-10 md:mb-0">
<h1 className="mx-6 font-bold text-2xl lg:text-3xl xl:text-4xl leading-10 text-center mb-4 tracking-widest uppercase">
OpenBB Documentation
Expand All @@ -23,15 +23,15 @@ export default function Home(): JSX.Element {
research.
</p>
</div>
<div className="flex flex-col md:flex-row w-full container items-center justify-center gap-6 px-6 sm:mx-0 mt-8 md:!mt-14 lg:!mt-15 md:mb-0">
<div className="flex flex-col md:flex-row w-full container items-center justify-center gap-6 px-6 sm:mx-0 my-8 lg:!my-10">
<Link
style={{
backgroundSize: "100% 110%",
}}
to="/terminal"
className="bg-[url(/img/terminal_bg_light.png)] dark:bg-[url('/img/terminal_bg.png')] bg-no-repeat shadow-sm group !no-underline text-grey-900 dark:text-white hover:text-grey-900 dark:hover:border-white hover:border-grey-600/80 dark:hover:!text-white relative w-full h-[238px] max-w-full p-8 rounded flex flex-col items-start justify-start border border-grey-300 bg-white dark:bg-grey-900"
>
<h3 className="uppercase tracking-widest font-bold mb-3">
<h3 className="uppercase tracking-widest font-bold mb-3 mt-0">
OpenBB Terminal
</h3>
<p className="text-sm lg:text-base dark:text-grey-300">
Expand All @@ -53,7 +53,7 @@ export default function Home(): JSX.Element {
to="/sdk"
className="bg-[url(/img/sdk_bg_light.png)] dark:bg-[url('/img/sdk_bg.png')] bg-no-repeat shadow-sm group !no-underline text-grey-900 dark:text-white hover:text-grey-900 dark:hover:border-white hover:border-grey-600/80 dark:hover:!text-white relative w-full h-[238px] max-w-full p-8 rounded flex flex-col items-start justify-start border border-grey-300 bg-white dark:bg-grey-900"
>
<h3 className="uppercase tracking-widest font-bold mb-3">
<h3 className="uppercase tracking-widest font-bold mb-3 mt-0">
OpenBB SDK
</h3>
<p className="text-sm lg:text-base dark:text-grey-300">
Expand All @@ -75,7 +75,7 @@ export default function Home(): JSX.Element {
to="/bot"
className="bg-[url(/img/bot_bg_light.png)] dark:bg-[url('/img/bot_bg.png')] bg-no-repeat shadow-sm group !no-underline text-grey-900 dark:text-white hover:text-grey-900 dark:hover:border-white hover:border-grey-600/80 dark:hover:!text-white relative w-full h-[238px] max-w-full p-8 rounded flex flex-col items-start justify-start border border-grey-300 bg-white dark:bg-grey-900"
>
<h3 className="uppercase tracking-widest font-bold mb-3">
<h3 className="uppercase tracking-widest font-bold mb-3 mt-0">
OpenBB Bot
</h3>
<p className="text-sm lg:text-base dark:text-grey-300">
Expand All @@ -92,8 +92,17 @@ export default function Home(): JSX.Element {
</p>
</Link>
</div>
<p className="z-20">
Looking for the marketing website?{" "}
<a
href="https://openbb.co"
className="text-burgundy-300 !underline hover:text-burgundy-400 active:text-burgundy-500"
>
Click here
</a>
</p>
</div>
</main>
</article>
</Layout>
);
}
4 changes: 2 additions & 2 deletions website/src/theme/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ posthog.init("phc_EqU3YjnV8OYmBlKanwWq222B8OHQksfmQBUtcVeteHR", {
},
loaded: () => {
posthog.onFeatureFlags(function () {
if (!posthog.isFeatureEnabled("record-web")) {
if (!posthog.isFeatureEnabled("record-web", { send_event: false })) {
posthog.stopSessionRecording();
console.log("Stopped session recording");
}
if (!posthog.isFeatureEnabled("collect-logs-web")) {
if (!posthog.isFeatureEnabled("collect-logs-web", { send_event: false })) {
posthog.opt_out_capturing();
console.log("Opted out of capturing");
} else if (posthog.has_opted_out_capturing()) {
Expand Down
8 changes: 6 additions & 2 deletions website/src/theme/SearchBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,12 @@ export default function SearchBar() {
<div className="flex gap-2">
<DocSearch {...siteConfig.themeConfig.algolia} />
{!isIFrame && (
<a href="https://my.openbb.co/" className="_btn-dark text-xs">
Visit hub
<a
href="https://my.openbb.co/"
className="_btn-dark text-xs hover:text-black"
>
<span className="md:hidden">Hub</span>
<span className="hidden md:inline">OpenBB Hub</span>
</a>
)}
</div>
Expand Down
3 changes: 3 additions & 0 deletions website/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ module.exports = {
"2xl": { css: disabledCss },
},
colors: {
"burgundy-300": "#B47DA0",
"burgundy-400": "#9B5181",
"burgundy-500": "#822661",
"grey-50": "#f6f6f6ff",
"grey-100": "#eaeaeaff",
"grey-200": "#dcdcdcff",
Expand Down
Loading