Skip to content

Commit

Permalink
- code format
Browse files Browse the repository at this point in the history
  • Loading branch information
Supraboy981322 authored Feb 29, 2024
1 parent 4e52c31 commit 165dd06
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 35 deletions.
4 changes: 3 additions & 1 deletion dev/devBreak/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

<body>
<div class="main">
<div class="box" id="dev">
Expand All @@ -13,7 +14,7 @@
<iframe class="frame" id="devEnvironmentFrame" src=""></iframe>
</div>
<div class="box" id="preview">
<input class="url urlPreview" id="previewURL" type="text">
<input class="url urlPreview" id="previewURL" type="text">
<button class="bar" onclick="setFrame('preview');">Go</button>
<button class="bar" id="reload" onclick="refreshPreview()">&#x27F3;</button>
<br>
Expand All @@ -22,4 +23,5 @@
</div>
</body>
<script src="script.js"></script>

</html>
14 changes: 7 additions & 7 deletions dev/devBreak/script.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
function setFrame(which) {
let url = document.getElementById(((which == "devEnvironment") ? "devEnvironmentURL" : "previewURL")).value;
let frame = document.getElementById(((which == "devEnvironment") ? "devEnvironmentFrame" : "previewFrame"));
frame.setAttribute("src", url);
console.log("preview loaded");
let url = document.getElementById(((which == "devEnvironment") ? "devEnvironmentURL" : "previewURL")).value;
let frame = document.getElementById(((which == "devEnvironment") ? "devEnvironmentFrame" : "previewFrame"));
frame.setAttribute("src", url);
console.log("preview loaded");
};

function refreshPreview() {
let preview = document.getElementById("previewFrame");
preview.src += '';
console.log("preview refreshed");
let preview = document.getElementById("previewFrame");
preview.src += '';
console.log("preview refreshed");
}
55 changes: 28 additions & 27 deletions dev/devBreak/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body {
padding: 0px;
}

.box {
.box {
background: rgba(192, 243, 252, 0.1);
backdrop-filter: blur(3px);
border-radius: 25px;
Expand All @@ -26,11 +26,11 @@ body {
border-radius: 10px;
border: 5px;
}

.urlDevEnvironment {
width: calc(100% - 96px);
}

.urlPreview {
width: calc(100% - 136px);
}
Expand All @@ -41,62 +41,63 @@ body {
border-radius: 16px;
border: 0px;
}

.bar {
height: 27px;
}

#reload {
margin: 0px 0px 0px 10px;
padding: 0px 4px 0px 6px;
font-size: 15px;
font-weight: bold;
}

@media (orientation: landscape) {

.main {
display: flex;
}
#dev {
margin: 10px 5px 10px 10px;
flex: 1;
}

#preview {
margin: 10px 10px 10px 5px;
flex: 2;
}

.box {
height: calc(100vh - 20px);
width: calc(50vw - 20px);
}

#dev {
margin: 10px 5px 10px 10px;
flex: 1;
}

#preview {
margin: 10px 10px 10px 5px;
flex: 2;
}

.box {
height: calc(100vh - 20px);
width: calc(50vw - 20px);
}

.frame {
height: calc(100vh - 80px);
}

}

@media (orientation: portrait) {
.main {
.main {
display: block;
}

#dev {
margin: 10px 10px 5px 10px;
}

#preview {
margin: 5px 10px 10px 10px;
}

.box {
height: calc(50vh - 20px);
width: calc(100vw - 20px);
}
}

.frame {
height: calc(50vw - 50px);
}
Expand Down

0 comments on commit 165dd06

Please sign in to comment.