Skip to content

Commit

Permalink
Merge pull request #87 from ScilifelabDataCentre/fix-kiarva-frame
Browse files Browse the repository at this point in the history
Quick fix for iFrame. It has double scrollbars again but it works on …
  • Loading branch information
JanProgrammierung authored Nov 13, 2024
2 parents 7197975 + 0863048 commit 0529141
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
15 changes: 15 additions & 0 deletions next-app/src/app/kiarva/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default function Layout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<div className="kiarva-page h-screen flex flex-col overflow-hidden h-screen overflow-hidden w-screen relative -ml-[50vw] left-1/2">
<main className="flex-1 overflow-hidden">
<section className="outer w-[100%] h-[100%] overflow-hidden">
{children}
</section>
</main>
</div>
);
}
27 changes: 25 additions & 2 deletions next-app/src/app/kiarva/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@ import { TrackPageViewIfEnabled } from "@/util/cookiesHandling";

// simport Iframe from "react-iframe";

export default function KiarvaIFramePage(): ReactElement {
TrackPageViewIfEnabled();

const kiarva_hostname = "https://kiarva.scilifelab.se/";

return (
<iframe
src={kiarva_hostname}
className="w-screen h-screen overflow-auto"
></iframe>
);
} /*
// The following code is not used in the current version of the app. It is kept here for reference.
/*
"use client";
import { ReactElement } from "react";
import { TrackPageViewIfEnabled } from "@/util/cookiesHandling";
// simport Iframe from "react-iframe";
export default function KiarvaIFramePage(): ReactElement {
TrackPageViewIfEnabled();
Expand All @@ -14,8 +36,8 @@ export default function KiarvaIFramePage(): ReactElement {
<>
<style jsx>{`
.kiarva-page {
height: 100vh; /* Full page height */
overflow: hidden; /* Prevent scrollbars for the page */
height: 100vh; /* Full page height */ /*
overflow: hidden; /* Prevent scrollbars for the page */ /*
}
`}</style>
<div className="kiarva-page h-screen flex flex-col overflow-hidden">
Expand Down Expand Up @@ -48,3 +70,4 @@ export default function KiarvaIFramePage(): ReactElement {
</>
);
}
*/

0 comments on commit 0529141

Please sign in to comment.