From 19957db17dc74af8fe44c09ba56090833ce6fca3 Mon Sep 17 00:00:00 2001 From: Nikita Stepochkin Date: Tue, 6 Aug 2024 22:28:27 +0300 Subject: [PATCH] feat: resizable box --- index.html | 140 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 88 insertions(+), 52 deletions(-) diff --git a/index.html b/index.html index 4f0482e..dc0535c 100644 --- a/index.html +++ b/index.html @@ -15,6 +15,7 @@ overflow: hidden; font-family: Arial, sans-serif; } + #sidebar { width: 300px; padding: 15px; @@ -22,22 +23,30 @@ overflow-y: auto; flex-shrink: 0; } - #div-plotly { - flex-grow: 1; - padding: 15px; - overflow: auto; - min-width: 200px; - min-height: 300px; + + .box { + width: 300px; + height: 200px; + background-color: #fff; + border: 1px solid dodgerblue; + border-radius: 5px; + box-shadow: 0 15px 15px lightgrey; } - .resizer { - width: 10px; - background: #ddd; - cursor: ew-resize; - position: relative; - z-index: 1; + + .box-header { + color: #fff; + background-color: dodgerblue; + padding: 10px 15px; } - .resizer:hover { - background: #bbb; + + .drag-handle { + cursor: pointer; + } + + .box-header { + color: #fff; + background-color: dodgerblue; + padding: 5px 10px; } @@ -52,10 +61,14 @@

Plotly JSON Visualizer

-
-
+
+
Drag here
+
+