diff options
| author | Hsieh Chin Fan <pham@topo.tw> | 2024-09-18 23:45:07 +0800 |
|---|---|---|
| committer | Hsieh Chin Fan <pham@topo.tw> | 2024-09-18 23:52:49 +0800 |
| commit | 95d295f472309fee903720276dff864f12858bc6 (patch) | |
| tree | 165e474299fe63ebd05c6ae9b1401d64cb49ea7b /src | |
| parent | 4cf84d2fe96c004fef3b508ce344885db74917e2 (diff) | |
feat: improve CSS for draggable block
Diffstat (limited to 'src')
| -rw-r--r-- | src/css/dumbymap.css | 55 | ||||
| -rw-r--r-- | src/css/style.css | 8 |
2 files changed, 30 insertions, 33 deletions
diff --git a/src/css/dumbymap.css b/src/css/dumbymap.css index 03c6c2a..1c6d92b 100644 --- a/src/css/dumbymap.css +++ b/src/css/dumbymap.css | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | &.geolink { | 17 | &.geolink { |
| 18 | background-color: rgb(248, 248, 129); | 18 | background-color: rgb(248, 248, 129); |
| 19 | } | 19 | } |
| 20 | |||
| 20 | &.doclink { | 21 | &.doclink { |
| 21 | background-color: #9ee7ea; | 22 | background-color: #9ee7ea; |
| 22 | } | 23 | } |
| @@ -54,18 +55,6 @@ | |||
| 54 | overflow-y: scroll; | 55 | overflow-y: scroll; |
| 55 | width: 100%; | 56 | width: 100%; |
| 56 | 57 | ||
| 57 | > .draggable-block { | ||
| 58 | width: 100%; | ||
| 59 | pointer-events: auto; | ||
| 60 | border-radius: 0.5rem; | ||
| 61 | background-color: white; | ||
| 62 | margin-bottom: 3rem; | ||
| 63 | |||
| 64 | .draggable { | ||
| 65 | display: none; | ||
| 66 | } | ||
| 67 | } | ||
| 68 | |||
| 69 | pre { | 58 | pre { |
| 70 | width: 100%; | 59 | width: 100%; |
| 71 | 60 | ||
| @@ -85,16 +74,6 @@ | |||
| 85 | } | 74 | } |
| 86 | } | 75 | } |
| 87 | 76 | ||
| 88 | #mapPlaceholder { | ||
| 89 | flex: 1; | ||
| 90 | display: flex; | ||
| 91 | justify-content: center; | ||
| 92 | align-items: center; | ||
| 93 | background-color: lightgray; | ||
| 94 | > * { | ||
| 95 | width: fit-content; | ||
| 96 | flex: 0 0; | ||
| 97 | } | ||
| 98 | [data-placeholder] { | 77 | [data-placeholder] { |
| 99 | box-sizing: border-box; | 78 | box-sizing: border-box; |
| 100 | border: 5px solid white; | 79 | border: 5px solid white; |
| @@ -102,15 +81,25 @@ | |||
| 102 | margin: 0; | 81 | margin: 0; |
| 103 | } | 82 | } |
| 104 | } | 83 | } |
| 84 | } | ||
| 105 | 85 | ||
| 106 | :has(> .map-container) { | 86 | .draggable-block { |
| 107 | display: flex; | 87 | pointer-events: auto; |
| 108 | width: fit-content; | 88 | background-color: white; |
| 89 | margin-bottom: 3rem; | ||
| 90 | |||
| 91 | .draggable { | ||
| 92 | display: none; | ||
| 109 | } | 93 | } |
| 94 | } | ||
| 110 | 95 | ||
| 111 | .Showcase .map-container { | 96 | /* Left border to indicate there is a block */ |
| 112 | width: 100% !important; | 97 | .DumbyMap[data-layout]:not([data-layout=overlay]) { |
| 113 | height: 100% !important; | 98 | .draggable-block{ |
| 99 | width: calc(100% + 0.5em); | ||
| 100 | border-left: #f0f0f0 0.5em solid; | ||
| 101 | padding-left: 0.5em; | ||
| 102 | margin-left: -0.5em; | ||
| 114 | } | 103 | } |
| 115 | } | 104 | } |
| 116 | 105 | ||
| @@ -162,14 +151,11 @@ | |||
| 162 | max-width: 25vw; | 151 | max-width: 25vw; |
| 163 | overflow: scroll; | 152 | overflow: scroll; |
| 164 | border: solid gray; | 153 | border: solid gray; |
| 154 | border-radius: 0.5rem; | ||
| 165 | padding-top: 0.5rem; | 155 | padding-top: 0.5rem; |
| 166 | padding-bottom: 0; | 156 | padding-bottom: 0; |
| 167 | resize: both; | 157 | resize: both; |
| 168 | 158 | ||
| 169 | > * { | ||
| 170 | padding-inline: 0.5rem; | ||
| 171 | } | ||
| 172 | |||
| 173 | &[style*="height"], | 159 | &[style*="height"], |
| 174 | &[style*="width"] { | 160 | &[style*="width"] { |
| 175 | max-height: unset; | 161 | max-height: unset; |
| @@ -178,7 +164,10 @@ | |||
| 178 | 164 | ||
| 179 | .map-container { | 165 | .map-container { |
| 180 | min-width: 200px; | 166 | min-width: 200px; |
| 181 | padding-inline: 0; | 167 | } |
| 168 | |||
| 169 | > :not(.draggable) { | ||
| 170 | margin-inline: 0.5rem; | ||
| 182 | } | 171 | } |
| 183 | 172 | ||
| 184 | .draggable { | 173 | .draggable { |
diff --git a/src/css/style.css b/src/css/style.css index 83b8045..ca53403 100644 --- a/src/css/style.css +++ b/src/css/style.css | |||
| @@ -111,3 +111,11 @@ img { | |||
| 111 | max-width: 100%; | 111 | max-width: 100%; |
| 112 | height: auto; | 112 | height: auto; |
| 113 | } | 113 | } |
| 114 | |||
| 115 | /* TODO */ | ||
| 116 | blockquote { | ||
| 117 | color: gray; | ||
| 118 | font-size: 1.2rem; | ||
| 119 | font-style: italic; | ||
| 120 | text-align: center; | ||
| 121 | } | ||