-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from ScilifelabDataCentre/ragnar-frontend-1
First RAG page to be included
- Loading branch information
Showing
14 changed files
with
841 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"$schema": "https://ui.shadcn.com/schema.json", | ||
"style": "default", | ||
"rsc": true, | ||
"tsx": true, | ||
"tailwind": { | ||
"config": "tailwind.config.ts", | ||
"css": "src/app/globals.css", | ||
"baseColor": "slate", | ||
"cssVariables": true, | ||
"prefix": "" | ||
}, | ||
"aliases": { | ||
"components": "@/components", | ||
"utils": "@/lib/utils", | ||
"ui": "@/components/ui", | ||
"lib": "@/lib", | ||
"hooks": "@/hooks" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
"use client"; | ||
|
||
import { ReactElement } from "react"; | ||
import { BODY_CLASSES } from "@/constants"; | ||
import { TrackPageViewIfEnabled } from "@/util/cookiesHandling"; | ||
import { ILink } from "@/interfaces/types"; | ||
import Link from "next/link"; | ||
import { Button } from "@/components/ui/button"; | ||
import { Input } from "@/components/ui/input"; | ||
import { | ||
Card, | ||
CardContent, | ||
CardDescription, | ||
CardHeader, | ||
CardTitle, | ||
} from "@/components/ui/card"; | ||
import { Search, Terminal } from "lucide-react"; | ||
|
||
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; | ||
|
||
const RAGnarLogo = "/images/RAGnar.svg"; | ||
|
||
export default function RAGAnswerPage(): ReactElement { | ||
TrackPageViewIfEnabled(); | ||
|
||
const breadcrumbs: { [id: string]: ILink } = { | ||
l1: { text: "Home", classes: "", link: "/" }, | ||
l2: { text: "RAGnar", classes: "", link: "" }, | ||
}; | ||
|
||
return ( | ||
<div> | ||
<div className="text-sm breadcrumbs"> | ||
<ul> | ||
{Object.keys(breadcrumbs).map((key) => ( | ||
<li> | ||
{breadcrumbs[key].link ? ( | ||
<Link href={breadcrumbs[key].link}> | ||
{breadcrumbs[key].text} | ||
</Link> | ||
) : ( | ||
<>{breadcrumbs[key].text}</> | ||
)} | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
<div className="max-w-3xl mx-auto space-y-8"> | ||
<header className="text-center space-y-4"> | ||
<div className="w-full h-40 rounded-lg overflow-hidden"> | ||
<img | ||
src="/placeholder.svg?height=160&width=640" | ||
alt="RAGnar Logo and Name" | ||
className="w-full h-full object-cover" | ||
/> | ||
</div> | ||
</header> | ||
|
||
<div className="flex flex-col md:flex-row gap-4"> | ||
<div className="flex-grow"> | ||
<Input placeholder="Ask another question" className="w-full" /> | ||
</div> | ||
<Button className="w-full md:w-auto"> | ||
<Search className="h-4 w-4" /> | ||
</Button> | ||
</div> | ||
|
||
<Alert> | ||
<Terminal className="h-4 w-4" /> | ||
<AlertTitle className="mb-5">Question asked comes here</AlertTitle> | ||
<AlertDescription>Reply to be streamed in here.</AlertDescription> | ||
</Alert> | ||
|
||
<h1 className="text-xl font-semibold">Sources</h1> | ||
|
||
<div className="flex flex-col space-y-4"> | ||
<Card> | ||
<CardHeader> | ||
<CardTitle className="text-lg font-semibold"> | ||
Artile Title comes here | ||
</CardTitle> | ||
<CardDescription> | ||
Authors, Journal, Year comes here | ||
</CardDescription> | ||
</CardHeader> | ||
</Card> | ||
|
||
<Card> | ||
<CardHeader> | ||
<CardTitle className="text-lg font-semibold"> | ||
Artile Title comes here | ||
</CardTitle> | ||
<CardDescription> | ||
Authors, Journal, Year comes here | ||
</CardDescription> | ||
</CardHeader> | ||
</Card> | ||
<Card> | ||
<CardHeader> | ||
<CardTitle className="text-lg font-semibold"> | ||
Artile Title comes here | ||
</CardTitle> | ||
<CardDescription> | ||
Authors, Journal, Year comes here | ||
</CardDescription> | ||
</CardHeader> | ||
</Card> | ||
<Card> | ||
<CardHeader> | ||
<CardTitle className="text-lg font-semibold"> | ||
Artile Title comes here | ||
</CardTitle> | ||
<CardDescription> | ||
Authors, Journal, Year comes here | ||
</CardDescription> | ||
</CardHeader> | ||
</Card> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
"use client"; | ||
|
||
import { ReactElement } from "react"; | ||
import { BODY_CLASSES } from "@/constants"; | ||
import { TrackPageViewIfEnabled } from "@/util/cookiesHandling"; | ||
import { ILink } from "@/interfaces/types"; | ||
import Link from "next/link"; | ||
import { Button } from "@/components/ui/button"; | ||
import { Input } from "@/components/ui/input"; | ||
import { Card, CardContent } from "@/components/ui/card"; | ||
import { Search } from "lucide-react"; | ||
|
||
const RAGnarLogo = "/images/RAGnar.svg"; | ||
|
||
export default function RAGAskPage(): ReactElement { | ||
TrackPageViewIfEnabled(); | ||
|
||
const breadcrumbs: { [id: string]: ILink } = { | ||
l1: { text: "Home", classes: "", link: "/" }, | ||
l2: { text: "RAGnar", classes: "", link: "" }, | ||
}; | ||
|
||
return ( | ||
<div> | ||
<div className="text-sm breadcrumbs"> | ||
<ul> | ||
{Object.keys(breadcrumbs).map((key) => ( | ||
<li> | ||
{breadcrumbs[key].link ? ( | ||
<Link href={breadcrumbs[key].link}> | ||
{breadcrumbs[key].text} | ||
</Link> | ||
) : ( | ||
<>{breadcrumbs[key].text}</> | ||
)} | ||
</li> | ||
))} | ||
</ul> | ||
</div> | ||
<div className="max-w-3xl mx-auto space-y-8"> | ||
<header className="text-center space-y-4"> | ||
<div className="w-full h-40 rounded-lg overflow-hidden"> | ||
<img | ||
src="/placeholder.svg?height=160&width=640" | ||
alt="RAGnar Logo and Name" | ||
className="w-full h-full object-cover" | ||
/> | ||
</div> | ||
<p className="text-xl"> | ||
Get answers to your precision medicine questions with our AI-powered | ||
search engine. | ||
</p> | ||
</header> | ||
|
||
<div className="flex flex-col md:flex-row gap-4"> | ||
<div className="flex-grow"> | ||
<Input placeholder="Ask a question" className="w-full" /> | ||
</div> | ||
<Button className="w-full md:w-auto"> | ||
<Search className="h-4 w-4" /> | ||
</Button> | ||
</div> | ||
|
||
<div className="flex flex-col space-y-4"> | ||
<Card> | ||
<CardContent className="p-6 text-sm"> | ||
<p> | ||
Question: This is a placeholder for a question. Real questions | ||
would include a full question incl. question mark. | ||
</p> | ||
</CardContent> | ||
</Card> | ||
<Card> | ||
<CardContent className="p-6 text-sm"> | ||
<p> | ||
Question: This is a placeholder for a question. Real questions | ||
would include a full question incl. question mark. | ||
</p> | ||
</CardContent> | ||
</Card> | ||
<Card> | ||
<CardContent className="p-6 text-sm"> | ||
<p> | ||
Question: This is a placeholder for a question. Real questions | ||
would include a full question incl. question mark. | ||
</p> | ||
</CardContent> | ||
</Card> | ||
<Card> | ||
<CardContent className="p-6 text-sm"> | ||
<p> | ||
Question: This is a placeholder for a question. Real questions | ||
would include a full question incl. question mark. | ||
</p> | ||
</CardContent> | ||
</Card> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { BODY_CLASSES } from "@/constants"; | ||
import "../globals.css"; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: Readonly<{ | ||
children: React.ReactNode; | ||
}>) { | ||
return <div className={BODY_CLASSES}>{children}</div>; | ||
} |
Oops, something went wrong.