Skip to content

Commit 58f6061

Browse files
authored
Top bar github & openapi (windmill-labs#511)
* Top bar github & openapi * Added discord & github logo to mobile
1 parent 2208dc9 commit 58f6061

File tree

1 file changed

+63
-25
lines changed

1 file changed

+63
-25
lines changed

src/landing/LandingHeader.jsx

Lines changed: 63 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ import { Bars3Icon, XMarkIcon } from '@heroicons/react/24/outline';
44
import { ChevronDownIcon } from '@heroicons/react/20/solid';
55
import classNames from 'classnames';
66
import { useColorMode } from '@docusaurus/theme-common';
7-
import { SiDiscord } from 'react-icons/si';
7+
import { SiDiscord, SiGithub } from 'react-icons/si';
88
import { motion } from 'framer-motion';
99
import ThemeToggleButton from './ThemeToggleButton';
1010
import SearchBarWrapper from '../theme/SearchBar';
1111
import Banner from './Banner';
1212

1313
const resources = [
14+
{
15+
name: 'OpenAPI',
16+
description: 'Explore our API specs.',
17+
href: 'https://app.windmill.dev/openapi.html',
18+
newtab: true
19+
},
1420
{
1521
name: 'Changelog',
1622
description: 'See the latest changes to Windmill.',
@@ -100,12 +106,6 @@ export default function LandingHeader() {
100106
>
101107
Hub
102108
</a>
103-
<a
104-
href="https://app.windmill.dev/openapi.html"
105-
className="font-medium text-gray-500 hover:text-gray-900 !no-underline dark:text-gray-200 dark:hover:text-gray-300"
106-
>
107-
OpenAPI
108-
</a>
109109

110110
<Popover className="relative">
111111
{({ open }) => (
@@ -138,23 +138,25 @@ export default function LandingHeader() {
138138
<Popover.Panel className="absolute left-1/2 z-10 mt-3 w-screen max-w-xs -translate-x-1/2 transform px-2 sm:px-0">
139139
<div className="overflow-hidden rounded-lg shadow-lg ring-1 ring-black ring-opacity-5">
140140
<div className="relative grid gap-6 bg-white dark:bg-gray-800 px-5 py-6 sm:gap-8 sm:p-8">
141-
{resources.map((resource) => (
142-
<a
143-
key={resource.name}
144-
href={resource.href}
145-
className="-m-3 block rounded-md p-3 hover:bg-gray-50 dark:hover:bg-gray-700 !no-underline"
146-
>
147-
<p className="font-medium text-gray-900 dark:text-gray-100">
148-
{resource.name}
149-
</p>
150-
<p className="mt-1 text-sm text-gray-500 dark:text-gray-300">
151-
{resource.description}
152-
</p>
153-
</a>
154-
))}
141+
{resources.map((resource) => (
142+
<a
143+
key={resource.name}
144+
href={resource.href}
145+
className="-m-3 block rounded-md p-3 hover:bg-gray-50 dark:hover:bg-gray-700 !no-underline"
146+
target={resource.newtab ? "_blank" : undefined}
147+
rel={resource.newtab ? "noopener noreferrer" : undefined}
148+
>
149+
<p className="font-medium text-gray-900 dark:text-gray-100">
150+
{resource.name}
151+
</p>
152+
<p className="mt-1 text-sm text-gray-500 dark:text-gray-300">
153+
{resource.description}
154+
</p>
155+
</a>
156+
))}
155157
</div>
156158
</div>
157-
</Popover.Panel>
159+
</Popover.Panel>
158160
</Transition>
159161
</>
160162
)}
@@ -166,14 +168,26 @@ export default function LandingHeader() {
166168

167169
<ThemeToggleButton colorMode={colorMode} setColorMode={setColorMode} />
168170

171+
<a
172+
href="https://github.com/windmill-labs/windmill"
173+
data-analytics='"github"'
174+
onClick={() => window.plausible('github')}
175+
className="rounded-full hover:bg-indigo-200 dark:hover:bg-indigo-400 p-2"
176+
target="_blank"
177+
>
178+
<SiGithub className="h-5 w-5 dark:text-white text-gray-800" />
179+
</a>
180+
169181
<a
170182
href="https://discord.com/invite/V7PM2YHsPB"
171183
data-analytics='"discord"'
172184
onClick={() => window.plausible('discord')}
173-
className=" rounded-full hover:bg-indigo-200 dark:hover:bg-indigo-400 p-2"
174-
>
185+
className="rounded-full hover:bg-indigo-200 dark:hover:bg-indigo-400 p-2"
186+
target="_blank"
187+
>
175188
<SiDiscord className="h-5 w-5 dark:text-white text-gray-800" />
176189
</a>
190+
177191
<a
178192
href="https://www.windmill.dev/book-demo"
179193
data-analytics='"schedule-demo"'
@@ -248,7 +262,31 @@ export default function LandingHeader() {
248262
</a>
249263
))}
250264
</div>
251-
<div className="mt-6">
265+
<div className="mt-6 flex justify-center items-center space-x-4 mb-4">
266+
<a
267+
href="https://github.com/windmill-labs/windmill"
268+
data-analytics='"github"'
269+
onClick={() => window.plausible('github')}
270+
className="rounded-full hover:bg-indigo-200 dark:hover:bg-indigo-400 p-2"
271+
target="_blank"
272+
rel="noopener noreferrer"
273+
>
274+
<SiGithub className="h-5 w-5 dark:text-white text-gray-800" />
275+
</a>
276+
277+
<a
278+
href="https://discord.com/invite/V7PM2YHsPB"
279+
data-analytics='"discord"'
280+
onClick={() => window.plausible('discord')}
281+
className="rounded-full hover:bg-indigo-200 dark:hover:bg-indigo-400 p-2"
282+
target="_blank"
283+
rel="noopener noreferrer"
284+
>
285+
<SiDiscord className="h-5 w-5 dark:text-white text-gray-800" />
286+
</a>
287+
</div>
288+
289+
<div className="mt-6">
252290
<a
253291
href="https://www.windmill.dev/book-demo"
254292
data-analytics='"schedule-demo"'

0 commit comments

Comments
 (0)