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

remopved nested css #4

Merged
merged 1 commit into from
Sep 17, 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
2 changes: 1 addition & 1 deletion src/components/Showcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ function Showcase() {
}
className=" showcase-5 col-span-full w-full lg:col-span-6 "
>
<div className="showcase-3-width relative gap-3 -mx-10 flex flex-col h-[360px] w-full items-center justify-center bg-transparent ">
<div className="showcase-3-width relative gap-3 -mx-10 flex flex-col h-[360px] w-full items-center justify-center z-10">
<div className="bottom-0 absolute right-0">
<div className="">
<span className="text-[32px] font-medium leading-7 text-white">
Expand Down
28 changes: 14 additions & 14 deletions src/components/showcase/CodeTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,37 @@ const CodeTabs: React.FC<CodeTabsProps> = () => {
switch (activeTab) {
case "python":
return `
def trust_authx():
# Python code
pass
def trust_authx():
# Python code
pass
`;
case "javascript":
return `
function trustAuth() {
// JavaScript code
}
function trustAuth() {
//js code
}
`;
case "go":
return `
func TrustAuthX() {
// Go code
}
func TrustAuthX() {
// Go code
}
`;
default:
return "";
}
};

return (
<div className="">
<div className="flex space-x-2">
<div className=" bg-black z-50 ">
<div className="flex space-x-2 pt-2 px-2">
<button
className={`px-4 py-2 rounded ${
activeTab === "python" ? "bg-gray-300" : "bg-gray-200"
}`}
onClick={() => handleTabClick("python")}
>
Trustauthx.py
TrustAuthx.py
</button>
<button
className={`px-4 py-2 rounded ${
Expand All @@ -60,11 +60,11 @@ const CodeTabs: React.FC<CodeTabsProps> = () => {
}`}
onClick={() => handleTabClick("go")}
>
Trustauthx.go
TrustAuthx.go
</button>
</div>

<div className="mt-4">
<div className="p-4">
<SyntaxHighlighter language="javascript" showLineNumbers>
{getCode()}
</SyntaxHighlighter>
Expand Down
12 changes: 9 additions & 3 deletions src/components/timeline/CarouselSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export default function Carousel({ children }: { children: React.ReactNode }) {
return (
<div className="carousel">
{active > 0 && (
<button className="nav left" onClick={() => setActive((i) => i - 1)}>
<button
className="nav left-nav-carousel"
onClick={() => setActive((i) => i - 1)}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="53"
Expand All @@ -36,7 +39,7 @@ export default function Carousel({ children }: { children: React.ReactNode }) {
"--offset": (active - i) / 5,
"--direction": Math.sign(active - i),
"--abs-offset": Math.abs(active - i) / 3,
"pointerEvents": active === i ? "auto" : "none",
pointerEvents: active === i ? "auto" : "none",
opacity: Math.abs(active - i) >= MAX_VISIBILITY ? "0" : "1",
display: Math.abs(active - i) > MAX_VISIBILITY ? "none" : "block",
}}
Expand All @@ -45,7 +48,10 @@ export default function Carousel({ children }: { children: React.ReactNode }) {
</div>
))}
{active < count - 1 && (
<button className="nav right" onClick={() => setActive((i) => i + 1)}>
<button
className="nav right-nav-carousel"
onClick={() => setActive((i) => i + 1)}
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="53"
Expand Down
15 changes: 7 additions & 8 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,15 @@
user-select: none;
background: unset;
border: unset;
&.left {
transform: translateX(-120%) translatey(-50%);
}

&.right {
right: 0;
transform: translateX(120%) translatey(-50%);
}
}

.left-nav-carousel {
transform: translateX(-120%) translatey(-50%);
}
.right-nav-carousel {
right: 0;
transform: translateX(120%) translatey(-50%);
}
:root {
--background: 0 0% 100%;
--foreground: 240 10% 3.9%;
Expand Down