46
liberay.html
Normal file
46
liberay.html
Normal file
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
iframe {
|
||||
margin: 0;
|
||||
margin: 10px;
|
||||
padding: 0;
|
||||
border-width: 5px;
|
||||
border-color: rgb(67, 0, 67);
|
||||
border-style:groove;
|
||||
border-radius: 10%;
|
||||
box-shadow: 10px 10px 5px 0px rgba(0,0,0,0.75);
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const sketchList = params.get('sketches'); // e.g. liberay.html?sketches=2images.js,calmCircles.js
|
||||
const sketchSize = params.get('size'); // e.g. liberay.html?size=500
|
||||
if (sketchList) {
|
||||
const sketches = sketchList.split(',');
|
||||
for (let sketch of sketches) {
|
||||
const iframe = document.createElement('iframe');
|
||||
iframe.src = `loader.html?sketch=${encodeURIComponent(sketch)}`;
|
||||
// Apply size if provided
|
||||
if (sketchSize) {
|
||||
iframe.style.width = sketchSize + 'px';
|
||||
iframe.style.height = sketchSize + 'px';
|
||||
} else {
|
||||
iframe.style.width = '500px';
|
||||
iframe.style.height = '500px';
|
||||
}
|
||||
document.body.appendChild(iframe);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
Reference in New Issue
Block a user