Skip to content

Commit 5386244

Browse files
committed
Merge branches 'feature/update-depends' and 'feature/update-depends' of https://github.com/rocky-linux/rockylinux.org into feature/update-depends
2 parents 4343e5c + 486043f commit 5386244

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+11686
-140
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"editor.formatOnPaste": true
3+
}

app/[locale]/Footer.tsx

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,23 @@ export default function Footer() {
1212
{ name: tFooter("nav.TrademarksName"), href: "/legal/trademarks" },
1313
],
1414
social: [
15+
{
16+
name: tFooter("socialNav.bluesky"),
17+
href: "https://bsky.app/profile/rockylinux.org",
18+
icon: (props: JSX.IntrinsicAttributes & SVGProps<SVGSVGElement>) => (
19+
<svg
20+
fill="currentColor"
21+
viewBox="0 0 600 530"
22+
className="h-5 w-5"
23+
{...props}
24+
>
25+
<path
26+
fill="currentColor"
27+
d="m135.72 44.03c66.496 49.921 138.02 151.14 164.28 205.46 26.262-54.316 97.782-155.54 164.28-205.46 47.98-36.021 125.72-63.892 125.72 24.795 0 17.712-10.155 148.79-16.111 170.07-20.703 73.984-96.144 92.854-163.25 81.433 117.3 19.964 147.14 86.092 82.697 152.22-122.39 125.59-175.91-31.511-189.63-71.766-2.514-7.3797-3.6904-10.832-3.7077-7.8964-0.0174-2.9357-1.1937 0.51669-3.7077 7.8964-13.714 40.255-67.233 197.36-189.63 71.766-64.444-66.128-34.605-132.26 82.697-152.22-67.108 11.421-142.55-7.4491-163.25-81.433-5.9562-21.282-16.111-152.36-16.111-170.07 0-88.687 77.742-60.816 125.72-24.795z"
28+
/>
29+
</svg>
30+
),
31+
},
1532
{
1633
name: tFooter("socialNav.mastodon"),
1734
href: "https://fosstodon.org/@rockylinux",
@@ -109,20 +126,6 @@ export default function Footer() {
109126
</svg>
110127
),
111128
},
112-
{
113-
name: tFooter("socialNav.x"),
114-
href: "https://x.com/rocky_linux",
115-
icon: (props: JSX.IntrinsicAttributes & SVGProps<SVGSVGElement>) => (
116-
<svg
117-
fill="currentColor"
118-
viewBox="0 0 24 24"
119-
className="h-6 w-6"
120-
{...props}
121-
>
122-
<path d="M13.6823 10.6218L20.2391 3H18.6854L12.9921 9.61788L8.44486 3H3.2002L10.0765 13.0074L3.2002 21H4.75404L10.7663 14.0113L15.5685 21H20.8131L13.6819 10.6218H13.6823ZM11.5541 13.0956L10.8574 12.0991L5.31391 4.16971H7.70053L12.1742 10.5689L12.8709 11.5655L18.6861 19.8835H16.2995L11.5541 13.096V13.0956Z" />
123-
</svg>
124-
),
125-
},
126129
{
127130
name: tFooter("socialNav.github"),
128131
href: "https://github.com/rocky-linux",
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
"use client"; // Mark the component as a Client Component
2+
3+
import { useState } from "react";
4+
import { Button } from "@/components/ui/button";
5+
import { QuizInterests } from "./QuizInterestTypes";
6+
7+
type Interests =
8+
| "chat"
9+
| "reporting"
10+
| "webdev"
11+
| "design"
12+
| "release"
13+
| "sig"
14+
| "docs";
15+
16+
export interface QuizProps {
17+
translations: QuizInterests;
18+
}
19+
20+
const Quiz = ({ translations: t }: QuizProps) => {
21+
const [selectedInterest, setSelectedInterest] = useState<Interests | null>(
22+
null
23+
);
24+
25+
const handleSelect = (interest: Interests) => {
26+
setSelectedInterest(interest);
27+
};
28+
29+
return (
30+
<div className="max-w-7xl mx-auto p-4">
31+
<div className="flex flex-col md:flex-row md:space-x-4">
32+
{/* Left column with buttons */}
33+
<div className="md:w-1/2 w-full">
34+
<Button
35+
className="mb-2 mr-2 w-full md:w-auto"
36+
variant={"outline"}
37+
onClick={() => handleSelect("chat")}
38+
>
39+
{t.chatting}
40+
</Button>
41+
42+
<Button
43+
className="mb-2 mr-2 w-full md:w-auto"
44+
variant={"outline"}
45+
onClick={() => handleSelect("reporting")}
46+
>
47+
{t.bugs}
48+
</Button>
49+
50+
<Button
51+
className="mb-2 mr-2 w-full md:w-auto"
52+
variant={"outline"}
53+
onClick={() => handleSelect("webdev")}
54+
>
55+
{t.webdev}
56+
</Button>
57+
58+
<Button
59+
className="mb-2 mr-2 w-full md:w-auto"
60+
variant={"outline"}
61+
onClick={() => handleSelect("design")}
62+
>
63+
{t.graphics}
64+
</Button>
65+
66+
<Button
67+
className="mb-2 mr-2 w-full md:w-auto"
68+
variant={"outline"}
69+
onClick={() => handleSelect("release")}
70+
>
71+
{t.release}
72+
</Button>
73+
74+
<Button
75+
className="mb-2 mr-2 w-full md:w-auto"
76+
variant={"outline"}
77+
onClick={() => handleSelect("sig")}
78+
>
79+
{t.sig}
80+
</Button>
81+
82+
<Button
83+
className="mb-2 mr-2 w-full md:w-auto"
84+
variant={"outline"}
85+
onClick={() => handleSelect("docs")}
86+
>
87+
{t.docs}
88+
</Button>
89+
</div>
90+
91+
{/* Right column with the relevant answer */}
92+
<div className="md:w-1/2 w-full border p-4 rounded-lg mt-4 md:mt-0 prose prose-ol:text-white prose-p:text-white">
93+
{selectedInterest === "chat" && <p>{t.chattingDescription}</p>}
94+
{selectedInterest === "reporting" && <p>{t.bugsDescription}</p>}
95+
{selectedInterest === "webdev" && <p>{t.webDevDescription}</p>}
96+
{selectedInterest === "design" && <p>{t.graphicsDescription}</p>}
97+
{selectedInterest === "release" && <p>{t.releaseDescription}</p>}
98+
{selectedInterest === "sig" && <p>{t.sigDescription}</p>}
99+
{selectedInterest === "docs" && <p>{t.docsDescription}</p>}
100+
{!selectedInterest && <p>{t.noSelection}</p>}
101+
</div>
102+
</div>
103+
</div>
104+
);
105+
};
106+
107+
export default Quiz;
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { JSXElementConstructor, ReactElement, ReactNodeArray } from "react";
2+
3+
export interface QuizInterests {
4+
chatting: string;
5+
chattingDescription:
6+
| string
7+
| ReactElement<any, string | JSXElementConstructor<any>>
8+
| ReactNodeArray;
9+
bugs: string;
10+
bugsDescription:
11+
| string
12+
| ReactElement<any, string | JSXElementConstructor<any>>
13+
| ReactNodeArray;
14+
webdev: string;
15+
webDevDescription:
16+
| string
17+
| ReactElement<any, string | JSXElementConstructor<any>>
18+
| ReactNodeArray;
19+
graphics: string;
20+
graphicsDescription:
21+
| string
22+
| ReactElement<any, string | JSXElementConstructor<any>>
23+
| ReactNodeArray;
24+
release: string;
25+
releaseDescription:
26+
| string
27+
| ReactElement<any, string | JSXElementConstructor<any>>
28+
| ReactNodeArray;
29+
sig: string;
30+
sigDescription:
31+
| string
32+
| ReactElement<any, string | JSXElementConstructor<any>>
33+
| ReactNodeArray;
34+
docs: string;
35+
docsDescription:
36+
| string
37+
| ReactElement<any, string | JSXElementConstructor<any>>
38+
| ReactNodeArray;
39+
noSelection: string;
40+
}

0 commit comments

Comments
 (0)