wrappings
This commit is contained in:
@@ -174,7 +174,7 @@ function AppLayout(props: { children: any }) {
|
|||||||
>
|
>
|
||||||
<LeftBar />
|
<LeftBar />
|
||||||
<div
|
<div
|
||||||
class="relative min-h-screen rounded-t-lg shadow-2xl"
|
class="bg-base relative min-h-screen rounded-t-lg shadow-2xl"
|
||||||
style={{
|
style={{
|
||||||
width: `${centerWidth()}px`,
|
width: `${centerWidth()}px`,
|
||||||
"margin-left": `${leftBarSize()}px`
|
"margin-left": `${leftBarSize()}px`
|
||||||
|
|||||||
@@ -1,6 +1,30 @@
|
|||||||
import { Title, Meta } from "@solidjs/meta";
|
import { Title, Meta } from "@solidjs/meta";
|
||||||
|
import { onMount, onCleanup } from "solid-js";
|
||||||
|
|
||||||
export default function Resume() {
|
export default function Resume() {
|
||||||
|
let iframeRef: HTMLIFrameElement | undefined;
|
||||||
|
|
||||||
|
onMount(() => {
|
||||||
|
// Prevent iframe errors from bubbling up
|
||||||
|
const handleError = (e: ErrorEvent) => {
|
||||||
|
if (e.filename?.includes("resume.pdf") || e.message === "Script error.") {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
window.addEventListener("error", handleError, true);
|
||||||
|
|
||||||
|
onCleanup(() => {
|
||||||
|
window.removeEventListener("error", handleError, true);
|
||||||
|
|
||||||
|
// Clear iframe source before unmount to prevent script errors
|
||||||
|
if (iframeRef) {
|
||||||
|
iframeRef.src = "about:blank";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Title>Resume | Michael Freno</Title>
|
<Title>Resume | Michael Freno</Title>
|
||||||
@@ -13,6 +37,7 @@ export default function Resume() {
|
|||||||
<Title>Resume - Freno.dev</Title>
|
<Title>Resume - Freno.dev</Title>
|
||||||
<div class="flex h-full w-full items-center justify-center">
|
<div class="flex h-full w-full items-center justify-center">
|
||||||
<iframe
|
<iframe
|
||||||
|
ref={iframeRef}
|
||||||
src="/resume.pdf"
|
src="/resume.pdf"
|
||||||
class="h-full w-full border-0"
|
class="h-full w-full border-0"
|
||||||
title="Resume PDF"
|
title="Resume PDF"
|
||||||
|
|||||||
Reference in New Issue
Block a user