mirror of
https://github.com/liriliri/eruda.git
synced 2026-03-20 09:38:37 +08:00
feat: inline mode
This commit is contained in:
@@ -44,6 +44,9 @@
|
||||
<li>
|
||||
<a href="manual.html">manual</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="inline.html">inline</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<script>
|
||||
|
||||
37
test/inline.html
Normal file
37
test/inline.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Inline</title>
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/luna-window/luna-window.css"
|
||||
/>
|
||||
<script src="assets/eruda.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/luna-window/luna-window.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
const content = document.createElement('div')
|
||||
const win = new LunaWindow({
|
||||
title: 'Window Title',
|
||||
x: 50,
|
||||
y: 50,
|
||||
width: window.innerWidth - 100,
|
||||
height: window.innerHeight - 100,
|
||||
content,
|
||||
})
|
||||
win.show()
|
||||
win.$container
|
||||
.parent()
|
||||
.addClass('__chobitsu-hide__')
|
||||
.css('z-index', '200000')
|
||||
eruda.init({
|
||||
container: content,
|
||||
inline: true,
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user