Skip to content

Commit

Permalink
fix: Support auto full-screen in iframe (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
HashCookie authored Jul 20, 2024
1 parent 0751482 commit fa2535d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
18 changes: 18 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -322,3 +322,21 @@ html[data-theme="dark"] .theme-doc-sidebar-container div[title="Expand sidebar"]
--ifm-spacing-horizontal: 1rem;
}
}

.editor-container {
height: calc(100vh - var(--ifm-navbar-height));
overflow: hidden;
}

.editor-iframe {
width: 100%;
height: 100%;
border: none;
display: block;
}

.comments-container {
width: 60vw;
margin: 0 auto;
padding-top: 20px;
}
8 changes: 3 additions & 5 deletions src/pages/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ import Giscus from "@giscus/react";
function Editor() {
return (
<Layout title="Editor" description="Casbin Online Editor">
<div>
<div className="editor-container">
<iframe
src="https://editor.casbin.org/"
style={{width: "100%", height: "850px", display: "block"}}
className="editor-iframe"
title="Casbin-editor"
scrolling="no"
/>
</div>
<br />
<div style={{width: "60vw", margin: "0 auto"}}>
<div className="comments-container">
<Giscus
id="comments"
repo="casbin/casbin"
Expand Down

0 comments on commit fa2535d

Please sign in to comment.