Got navigation buttons, haha merge conflict
This commit is contained in:
parent
1b2f57e7d0
commit
949e922606
1 changed files with 26 additions and 3 deletions
|
|
@ -2,7 +2,7 @@ import { useState } from "preact/hooks";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Link } from "preact-router";
|
import { Link } from "preact-router";
|
||||||
import { RiPictureInPictureExitFill, RiFullscreenFill } from "react-icons/ri";
|
import { RiPictureInPictureExitFill, RiFullscreenFill } from "react-icons/ri";
|
||||||
import { IoCodeSlashSharp } from "react-icons/io5";
|
import { IoCodeSlashSharp,IoChevronBackSharp,IoChevronForwardSharp, IoReloadSharp } from "react-icons/io5";
|
||||||
import { FaXmark } from "react-icons/fa6";
|
import { FaXmark } from "react-icons/fa6";
|
||||||
|
|
||||||
interface ProxyFrame extends HTMLElement {
|
interface ProxyFrame extends HTMLElement {
|
||||||
|
|
@ -25,7 +25,7 @@ export function IframeHeader(props: { url: string }) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
id="iframeNav"
|
id="iframeNav"
|
||||||
className="flex h-16 flex-row items-center justify-between bg-navbar-color px-4"
|
className="flex h-16 flex-row items-center justify-between bg-navbar-color px-4 gap-3"
|
||||||
>
|
>
|
||||||
<Link href="/" class="w-1/8">
|
<Link href="/" class="w-1/8">
|
||||||
<div className="flex flex-row items-center">
|
<div className="flex flex-row items-center">
|
||||||
|
|
@ -39,7 +39,30 @@ export function IframeHeader(props: { url: string }) {
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
<div id="navItems" class="w-1/2">
|
<div className="gap-3 mr-4 flex flex-row items-center justify-end">
|
||||||
|
<IoChevronBackSharp
|
||||||
|
className="duration-0500 h-6 w-6 cursor-pointer text-navbar-text-color transition-all hover:scale-110 hover:brightness-125"
|
||||||
|
onClick={() => {
|
||||||
|
const proxyFrame: ProxyFrame | null = document.getElementById("iframe") as ProxyFrame;
|
||||||
|
proxyFrame.contentWindow.history.back();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<IoReloadSharp
|
||||||
|
className="duration-0500 h-6 w-6 cursor-pointer text-navbar-text-color transition-all hover:rotate-[360deg] hover:scale-110 hover:brightness-125"
|
||||||
|
onClick={() => {
|
||||||
|
const proxyFrame: ProxyFrame | null = document.getElementById("iframe") as ProxyFrame;
|
||||||
|
proxyFrame.contentWindow.location.reload();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<IoChevronForwardSharp
|
||||||
|
className="duration-0500 h-6 w-6 cursor-pointer text-navbar-text-color transition-all hover:scale-110 hover:brightness-125"
|
||||||
|
onClick={() => {
|
||||||
|
const proxyFrame: ProxyFrame | null = document.getElementById("iframe") as ProxyFrame;
|
||||||
|
proxyFrame.contentWindow.history.forward();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div id="navItems" class="w-1/8">
|
||||||
<div className="mr-4 flex flex-row items-center justify-end gap-3">
|
<div className="mr-4 flex flex-row items-center justify-end gap-3">
|
||||||
<IoCodeSlashSharp
|
<IoCodeSlashSharp
|
||||||
className="duration-0500 h-6 w-6 cursor-pointer text-navbar-text-color transition-all hover:scale-110 hover:brightness-125"
|
className="duration-0500 h-6 w-6 cursor-pointer text-navbar-text-color transition-all hover:scale-110 hover:brightness-125"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue