Skip to content

Commit 6191ff1

Browse files
authored
Merge pull request #26 from sddevx/floating-talk-request-widget
Added global site config and a floating Give a Talk CTA
2 parents e9ef9a7 + ad53b54 commit 6191ff1

File tree

5 files changed

+75
-37
lines changed

5 files changed

+75
-37
lines changed

app/components/Footer.tsx

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1+
import { links } from "../siteConfig"
2+
13
const Footer = () => {
24
return (
3-
<footer className="footer flex justify-between bg-neutral text-neutral-content p-4">
4-
<aside className="flex devx-logo-copyright">
5+
<footer className="footer flex items-center p-4 justify-between bg-neutral text-neutral-content p-4">
6+
<aside className="flex items-center devx-logo-copyright">
57
<img src="/images/logo.jpeg" className="w-8 rounded mr-2" />
68
<p className="flex items-center">
79
© Copyright {new Date().getFullYear()}. All rights reserved
810
</p>
911
</aside>
10-
<nav className="flex">
11-
<a
12-
href="https://www.youtube.com/@sddevx"
13-
aria-label="Youtube"
14-
className="mr-4"
15-
target="_blank"
16-
>
12+
<nav className="flex grid-flow-col gap-4 md:place-self-center md:justify-self-end">
13+
<a href={links.youtube} aria-label="Youtube" className="mr-4" target="_blank">
1714
<svg
1815
xmlns="http://www.w3.org/2000/svg"
1916
width="24"
@@ -25,7 +22,7 @@ const Footer = () => {
2522
</svg>
2623
</a>
2724

28-
<a href="https://lu.ma/DEVxSD" aria-label="Luma" className="mr-4" target="_blank">
25+
<a href={links.lumaUrl} aria-label="Luma" className="mr-4" target="_blank">
2926
<svg
3027
xmlns="http://www.w3.org/2000/svg"
3128
fill="none"
@@ -41,12 +38,7 @@ const Footer = () => {
4138
</svg>
4239
</a>
4340

44-
<a
45-
href="https://www.meetup.com/san-diego-devx/"
46-
aria-label="Meetup"
47-
className="mr-4"
48-
target="_blank"
49-
>
41+
<a href={links.meetupUrl} aria-label="Meetup" className="mr-4" target="_blank">
5042
<svg
5143
xmlns="http://www.w3.org/2000/svg"
5244
width="24"
@@ -61,12 +53,7 @@ const Footer = () => {
6153
</svg>
6254
</a>
6355

64-
<a
65-
href="https://discord.gg/J3YrrErwjc"
66-
aria-label="Discord"
67-
className="mr-4"
68-
target="_blank"
69-
>
56+
<a href={links.discord} aria-label="Discord" className="mr-4" target="_blank">
7057
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 24 24">
7158
<path
7259
fill="currentColor"
@@ -75,7 +62,7 @@ const Footer = () => {
7562
</svg>
7663
</a>
7764

78-
<a href="https://github.com/sddevx" aria-label="Github" target="_blank">
65+
<a href={links.github} aria-label="Github" target="_blank">
7966
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24">
8067
<path
8168
fill="currentColor"

app/components/GiveATalkCTA.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React from "react"
2+
import { links } from "../siteConfig"
3+
4+
const GiveATalkCTA: React.FC = () => {
5+
return (
6+
<a
7+
href={links.talkSubmissionUrl}
8+
target="_blank"
9+
rel="noopener noreferrer"
10+
className="fixed flex items-center px-6 py-3 space-x-2 font-bold text-white transition-all duration-300 ease-in-out transform -translate-x-1/2 rounded-full shadow-lg bg-gradient-to-r from-blue-500 to-purple-600 sm:bottom-12 bottom-6 left-1/2 hover:from-blue-600 hover:to-purple-700 hover:scale-105 animate-pulse"
11+
>
12+
<svg
13+
xmlns="http://www.w3.org/2000/svg"
14+
className="w-6 h-6"
15+
fill="none"
16+
viewBox="0 0 24 24"
17+
stroke="currentColor"
18+
>
19+
<path
20+
strokeLinecap="round"
21+
strokeLinejoin="round"
22+
strokeWidth={2}
23+
d="M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"
24+
/>
25+
</svg>
26+
<span>Give a Talk!</span>
27+
</a>
28+
)
29+
}
30+
31+
export default GiveATalkCTA

app/components/Header.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { links } from "../siteConfig"
2+
13
const Header = () => {
24
return (
35
<header>
@@ -7,7 +9,7 @@ const Header = () => {
79
<div tabIndex={0} role="button" className="btn btn-ghost lg:hidden">
810
<svg
911
xmlns="http://www.w3.org/2000/svg"
10-
className="h-5 w-5"
12+
className="w-5 h-5"
1113
fill="none"
1214
viewBox="0 0 24 24"
1315
stroke="currentColor"
@@ -27,17 +29,17 @@ const Header = () => {
2729
<NavLinks />
2830
</ul>
2931
</div>
30-
<a className="btn btn-ghost inline p-0" href="/">
32+
<a className="inline p-0 btn btn-ghost" href="/">
3133
<img src="/images/logo.jpeg" className="w-12 rounded" />
3234
</a>
3335
</div>
34-
<div className="navbar-center hidden lg:flex">
35-
<ul className="menu menu-horizontal px-1">
36+
<div className="hidden navbar-center lg:flex">
37+
<ul className="px-1 menu menu-horizontal">
3638
<NavLinks />
3739
</ul>
3840
</div>
3941
<div className="navbar-end">
40-
<a className="btn" href="https://discord.gg/J3YrrErwjc">
42+
<a className="btn" href={links.discord}>
4143
Join Us on Discord
4244
</a>
4345
</div>
@@ -56,7 +58,7 @@ const NavLinks = () => {
5658
<a href="/about">About</a>
5759
</li>
5860
<li>
59-
<a target="_blank" href="https://lu.ma/DEVxSD">
61+
<a target="_blank" href={links.lumaUrl}>
6062
Event Calendar
6163
</a>
6264
</li>
@@ -65,8 +67,8 @@ const NavLinks = () => {
6567
<a href="/events">Events</a>
6668
</li> */}
6769
<li>
68-
<a target="_blank" href="https://forms.gle/6gtGEuL7XExHvc6c9">
69-
Submit Your Talk
70+
<a target="_blank" href={links.talkSubmissionUrl}>
71+
Give a Talk!
7072
</a>
7173
</li>
7274
</>

app/layout.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ import type { Metadata } from "next"
33
import "./globals.css"
44
import Header from "./components/Header"
55
import Footer from "./components/Footer"
6+
import { siteConfig } from "./siteConfig"
7+
import GiveATalkCTA from "./components/GiveATalkCTA"
68

79
export const metadata: Metadata = {
8-
title: "San Diego DEVx",
9-
description: "Fostering developer community through events and open-source projects.",
10+
title: siteConfig.title,
11+
description: siteConfig.description,
1012
openGraph: {
1113
type: "website",
12-
url: "https://devx.network",
13-
title: "San Diego DEVx",
14-
description: "Fostering developer community through events and open-source projects.",
15-
images: "https://devx.network/images/devx-og-image.png"
14+
url: siteConfig.url,
15+
title: siteConfig.title,
16+
description: siteConfig.description,
17+
images: siteConfig.ogImage
1618
}
1719
}
1820

@@ -27,6 +29,7 @@ export default function RootLayout({
2729
<Header />
2830
{children}
2931
<Footer />
32+
<GiveATalkCTA />
3033
</body>
3134
</html>
3235
)

app/siteConfig.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export const siteConfig = {
2+
title: "San Diego DEVx",
3+
description: "Fostering developer community through events and open-source projects.",
4+
url: "https://devx.network",
5+
ogImage: "https://devx.network/images/devx-og-image.png"
6+
}
7+
8+
export const links = {
9+
talkSubmissionUrl: "https://forms.gle/6gtGEuL7XExHvc6c9",
10+
meetupUrl: "https://meetup.com/san-diego-devx",
11+
lumaUrl: "https://lu.ma/DEVxSD",
12+
discord: "https://discord.gg/J3YrrErwjc",
13+
github: "https://github.com/sddevx",
14+
youtube: "https://www.youtube.com/@sddevx"
15+
}

0 commit comments

Comments
 (0)