Skip to content

Commit f59f790

Browse files
author
Nikita Stepochkin
committed
feat: style changes; json example
1 parent 6f9d059 commit f59f790

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

index.html

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
}
1818

1919
.box {
20-
width: 600px;
20+
width: 700px;
2121
height: 600px;
2222
background-color: #fff;
2323
border: 1px solid lightblue;
2424
border-radius: 5px;
25-
box-shadow: 0 15px 15px lightgrey;
25+
box-shadow: 0 0 15px darkgrey;
2626
position: absolute;
2727
top: 50px;
2828
left: 50px;
@@ -59,10 +59,11 @@
5959

6060
.btn {
6161
border: 1px solid #ccc;
62-
padding: 5px 10px;
62+
padding: 3px 6px; /* Adjusted padding for smaller buttons */
6363
background-color: white;
6464
cursor: pointer;
6565
flex-shrink: 0;
66+
font-size: 15px; /* Adjusted font size for smaller buttons */
6667
}
6768

6869
.btn:hover {
@@ -104,6 +105,8 @@
104105
<script>
105106
let highestZIndex = 1000;
106107

108+
const jsonExample = "{\r\n \"data\": [\r\n {\r\n \"x\": [\r\n \"giraffes\",\r\n \"orangutans\",\r\n \"monkeys\"\r\n ],\r\n \"y\": [\r\n 20,\r\n 14,\r\n 23\r\n ],\r\n \"type\": \"bar\"\r\n }\r\n ]\r\n}";
109+
107110
document.getElementById('add-box-btn').addEventListener('click', addNewBox);
108111

109112
function addNewBox() {
@@ -173,6 +176,8 @@
173176
box.querySelector('.btn-beautify').addEventListener('click', () => beautifyJson(box));
174177

175178
box.querySelector('#input-type').addEventListener('change', (event) => switchInputType(box, event.target.value));
179+
180+
box.querySelector('.json-input').value = jsonExample;
176181
}
177182

178183
function switchInputType(box, type) {

0 commit comments

Comments
 (0)