Skip to content
Open
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
77 changes: 40 additions & 37 deletions config/krakend/demo-redesign/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,47 +43,50 @@ const Page: FC<any> = () => {

<main className="section--xl bg-brand-neutral-900 relative">
<div className="container--boxed">
<div className="flex flex-col md:flex-row items-stretch gap-8 justify-between">
<div className="md:w-1/3 ">
<div className="flex items-center gap-1.5 mb-2.5">
<button
className={`px-4 py-2 font-medium rounded-md rounded-l-full ${
currentTab === "use-cases"
? "bg-white text-brand-neutral-900"
: "bg-brand-neutral-600 text-brand-neutral-300"
}`}
onClick={() => setCurrentTab("use-cases")}
>
Use-cases
</button>
<button
className={`px-4 py-2 font-medium rounded-r-full rounded-l-md ${
currentTab === "integrations"
? "bg-white text-brand-neutral-900"
: "bg-brand-neutral-600 text-brand-neutral-300"
}`}
onClick={() => setCurrentTab("integrations")}
>
Integrations
</button>
<div className="grid grid-cols-12 w-full gap-8">
<div className="col-span-12 md:col-span-5 lg:col-span-4 flex">
<div className="max-w-full">
<div className="flex items-center gap-1.5 mb-2.5">
<button
className={`px-4 py-2 font-medium rounded-md rounded-l-full ${
currentTab === "use-cases"
? "bg-white text-brand-neutral-900"
: "bg-brand-neutral-600 text-brand-neutral-300"
}`}
onClick={() => setCurrentTab("use-cases")}
>
Use-cases
</button>
<button
className={`px-4 py-2 font-medium rounded-r-full rounded-l-md ${
currentTab === "integrations"
? "bg-white text-brand-neutral-900"
: "bg-brand-neutral-600 text-brand-neutral-300"
}`}
onClick={() => setCurrentTab("integrations")}
>
Integrations
</button>
</div>
{currentTab === "use-cases" && <UseCases />}
{currentTab === "integrations" && <Integration />}
</div>
{currentTab === "use-cases" && <UseCases />}
{currentTab === "integrations" && <Integration />}
</div>

{/* Line */}
<div
className="h-auto"
style={{
width: "1px",
backgroundImage:
"linear-gradient(to bottom, #0b0c10 0%, #545d78 25%, #545d78 51%, #545d78 75%, #0b0c10 100%)",
}}
/>
{/* Line */}
{/* <div
className="h-auto ml-8 shrink-0"
style={{
width: "1px",
minWidth: 1,
backgroundImage:
"linear-gradient(to bottom, #0b0c10 0%, #545d78 25%, #545d78 51%, #545d78 75%, #0b0c10 100%)",
}}
/> */}
</div>

{/* Diagram */}
<div className="flex-1 flex items-start">
<div className="sticky top-4 w-full max-h-full h-[95vh] flex items-center justify-center">
<div className="col-span-12 md:col-span-7 lg:col-span-8 ">
<div className="sticky top-0 h-screen flex items-center justify-center">
<Architecture />
</div>
</div>
Expand Down
8 changes: 6 additions & 2 deletions config/krakend/demo-redesign/src/app/use-cases/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";
import React, { useState, useEffect } from "react";
import React, { useState, useEffect, ReactNode } from "react";
import { useRouter, usePathname } from "next/navigation";

import userCases from "@/data/krakend.json";
Expand All @@ -10,7 +10,11 @@ import { ArrowLeftIcon } from "@heroicons/react/20/solid";

require("prismjs/components/prism-json");

const Layout = ({ children }) => {
interface UseCasesLayoutProps {
children: ReactNode;
}

const Layout = ({ children }: UseCasesLayoutProps) => {
const pathname = usePathname();
const router = useRouter();
const slug = pathname.replace("/use-cases/", "");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const Architecture = () => (
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 715 910"
fill="none"
className="h-full w-auto"
className=""
>
<rect
width={229}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const UseCases = () => {
return (
<Link
href={`/use-cases/${useCase.custom_fields.slug}`}
className="text-white text-base p-3 rounded-md hover:outline hover:outline-brand-neutral-300 transition-colors shadow-md"
className="text-white text-base p-3 rounded-md hover:outline hover:outline-brand-neutral-300 transition-colors shadow-md break-words"
key={`${useCase.custom_fields.slug}-${index}`}
style={{ background: "#272B3A" }}
>
Expand All @@ -73,7 +73,7 @@ const UseCases = () => {
<Link
href={`/use-cases/${useCase.custom_fields.slug}`}
key={`others-${useCase.custom_fields.slug}-${index}`}
className="text-white text-base p-3 rounded-md hover:outline hover:outline-brand-neutral-300 transition-colors shadow-md"
className="text-white text-base p-3 rounded-md hover:outline hover:outline-brand-neutral-300 transition-colors shadow-md break-words"
style={{ background: "#272B3A" }}
>
{useCase.title}
Expand Down