deprecated
2 months ago
block.json
1 month ago
edit.js
2 weeks ago
icon.svg
2 months ago
index.js
2 months ago
index.php
2 months ago
save.js
2 weeks ago
style.scss
1 month ago
style.scss
485 lines
| 1 | .vk_balloon { |
| 2 | display: flex; |
| 3 | align-items: normal; |
| 4 | margin-bottom: 2.2em; |
| 5 | |
| 6 | figure { |
| 7 | margin: 0; |
| 8 | } |
| 9 | |
| 10 | &_content > * { |
| 11 | color: initial; // カラーパレットのcolorがあたってしまうので初期化する |
| 12 | &:first-of-type{ |
| 13 | margin-top: 0; |
| 14 | } |
| 15 | &:last-of-type{ |
| 16 | margin-bottom: 0; |
| 17 | } |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | .vk_balloon_icon { |
| 22 | flex-shrink: 0; |
| 23 | text-align: center; |
| 24 | &:not(:empty) { |
| 25 | flex-basis: 80px; |
| 26 | } |
| 27 | &_image:not(.has-text-color) { |
| 28 | color: #ccc; |
| 29 | } |
| 30 | &_image { |
| 31 | vertical-align: bottom; |
| 32 | width: 64px; |
| 33 | height: 64px; |
| 34 | object-fit: cover; |
| 35 | display: inline-block; |
| 36 | &-type { |
| 37 | &-rounded { |
| 38 | border-radius: 4px; |
| 39 | } |
| 40 | |
| 41 | &-circle { |
| 42 | border-radius: 50%; |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | &_name { |
| 47 | display: block; |
| 48 | text-align: center; |
| 49 | font-size: 0.7rem; |
| 50 | margin-top: 0.3rem; |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | // .vk_balloon_content_outer は .vk_balloon_content の外側に 0.38.2 から追加 |
| 55 | // 本来 _outer をつけるような親要素のクラスの方が文字数が多くなる手法はとらないが、 |
| 56 | // 既存のクラス名を変更すると既存サイトではHTML構造がもとのままなので崩れてしまうため例外措置。 |
| 57 | .vk_balloon_content_outer{ |
| 58 | width:100%; |
| 59 | } |
| 60 | .vk_balloon_content { |
| 61 | max-width: calc(100% - 6.2em); |
| 62 | &::after { |
| 63 | display: block; |
| 64 | clear: both; |
| 65 | content: ""; |
| 66 | } |
| 67 | |
| 68 | .vk_balloon-position-left & { |
| 69 | float:left; |
| 70 | } |
| 71 | .vk_balloon-position-right & { |
| 72 | float:right; |
| 73 | } |
| 74 | &.vk_balloon_content_fullwidth { |
| 75 | max-width: 100%; |
| 76 | float: none; |
| 77 | } |
| 78 | position: relative; |
| 79 | text-align: left; |
| 80 | &.editor-rich-text__tinymce[data-is-placeholder-visible=true]=true] { |
| 81 | // これがないと未� |
| 82 | �力時に吹き出しが2重になる |
| 83 | position: absolute; |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | /* type |
| 88 | /*-------------------------------------------*/ |
| 89 | .vk_balloon_content { |
| 90 | background: #f5f5f5; |
| 91 | // padding: 1rem 1.2rem; |
| 92 | padding: calc( 1rem * 1 ) calc( 1rem * 1.2); |
| 93 | // コンテンツが空の時に吹き出しの矢印やもくもくの丸がはみ出さないよう最低限の高さを確保 |
| 94 | min-height: 3em; |
| 95 | } |
| 96 | |
| 97 | .vk_balloon_content_before, |
| 98 | .vk_balloon_content_after { |
| 99 | position: absolute; |
| 100 | top: 0; |
| 101 | display: block; |
| 102 | width: 0; |
| 103 | height: 0; |
| 104 | border-style: solid; |
| 105 | } |
| 106 | |
| 107 | .vk_balloon-type-speech{ |
| 108 | .vk_balloon_content{ |
| 109 | // border-color: #f5f5f5; |
| 110 | border-radius: .4em; |
| 111 | |
| 112 | .vk_balloon_content_before, |
| 113 | .vk_balloon_content_after { |
| 114 | top: 15px; |
| 115 | |
| 116 | } |
| 117 | .vk_balloon_content_after { |
| 118 | z-index: 1; |
| 119 | border-right-color: inherit; |
| 120 | } |
| 121 | .vk_balloon_content_before{ |
| 122 | z-index: 2; |
| 123 | } |
| 124 | } |
| 125 | } |
| 126 | .vk_balloon-type-think{ |
| 127 | .vk_balloon_content{ |
| 128 | border-radius: 1rem; |
| 129 | .vk_balloon_content_before, |
| 130 | .vk_balloon_content_after{ |
| 131 | position: absolute; |
| 132 | content: ''; |
| 133 | border-radius: 50%; |
| 134 | background: inherit; |
| 135 | } |
| 136 | .vk_balloon_content_before{ |
| 137 | width: 14px; |
| 138 | height: 14px; |
| 139 | } |
| 140 | .vk_balloon_content_after{ |
| 141 | width: 10px; |
| 142 | height: 10px; |
| 143 | } |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | /* position |
| 148 | /*-------------------------------------------*/ |
| 149 | .vk_balloon-position-left{ |
| 150 | &.vk_balloon-type-speech{ |
| 151 | .vk_balloon_icon{ |
| 152 | margin-right: calc( 1rem * 1.2 ); |
| 153 | } |
| 154 | .vk_balloon_content{ |
| 155 | .vk_balloon_content_before, |
| 156 | .vk_balloon_content_after{ |
| 157 | left: -10px; |
| 158 | border-width: 10px 12px 10px 0; |
| 159 | } |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | &.vk_balloon-type-think{ |
| 164 | .vk_balloon_icon{ |
| 165 | margin-right: calc( 1rem * 1.2 ); |
| 166 | } |
| 167 | .vk_balloon_content{ |
| 168 | |
| 169 | .vk_balloon_content_before{ |
| 170 | left: -18px; |
| 171 | top: 7px; |
| 172 | } |
| 173 | .vk_balloon_content_after { |
| 174 | left: -25px; |
| 175 | top: 20px; |
| 176 | } |
| 177 | } |
| 178 | } |
| 179 | }//.vk_balloon-position-left |
| 180 | |
| 181 | .vk_balloon-position-right{ |
| 182 | flex-direction: row-reverse; |
| 183 | &.vk_balloon-type-speech{ |
| 184 | .vk_balloon_icon{ |
| 185 | margin-left: calc( 1rem * 1.2 ); |
| 186 | } |
| 187 | .vk_balloon_content{ |
| 188 | .vk_balloon_content_before, |
| 189 | .vk_balloon_content_after{ |
| 190 | right: -10px; |
| 191 | border-width: 10px 0 10px 12px; |
| 192 | |
| 193 | } |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | &.vk_balloon-type-think{ |
| 198 | .vk_balloon_icon{ |
| 199 | margin-left: calc( 1rem * 1.2 ); |
| 200 | } |
| 201 | .vk_balloon_content{ |
| 202 | .vk_balloon_content_before{ |
| 203 | right: -18px; |
| 204 | top: 7px; |
| 205 | } |
| 206 | .vk_balloon_content_after{ |
| 207 | right: -25px; |
| 208 | top: 20px; |
| 209 | } |
| 210 | } |
| 211 | } |
| 212 | }//.vk_balloon-position-right |
| 213 | |
| 214 | |
| 215 | /* Border |
| 216 | /*-------------------------------------------*/ |
| 217 | |
| 218 | //Border color |
| 219 | .vk_balloon{ |
| 220 | //位置 左 |
| 221 | &-position-left{ |
| 222 | //タイプ 吹き出し |
| 223 | &.vk_balloon-type-speech { |
| 224 | .vk_balloon_content{ |
| 225 | //初期 |
| 226 | .vk_balloon_content_before:not(.has-text-color), |
| 227 | .vk_balloon_content_after:not(.has-text-color){ |
| 228 | border-color: transparent #f5f5f5 transparent transparent; |
| 229 | } |
| 230 | //カラーパレット,カスタムカラー |
| 231 | .vk_balloon_content_before, |
| 232 | .vk_balloon_content_after { |
| 233 | border-color:transparent currentColor transparent transparent; |
| 234 | } |
| 235 | } |
| 236 | } |
| 237 | //タイプ もくもく |
| 238 | &.vk_balloon-type-think { |
| 239 | .vk_balloon_content{ |
| 240 | //初期 |
| 241 | .vk_balloon_content_before:not(.has-text-color), |
| 242 | .vk_balloon_content_after:not(.has-text-color){ |
| 243 | border-color: transparent; |
| 244 | } |
| 245 | //カラーパレット,カスタムカラー |
| 246 | .vk_balloon_content_before, |
| 247 | .vk_balloon_content_after { |
| 248 | border-color:transparent currentColor transparent transparent; |
| 249 | } |
| 250 | } |
| 251 | } |
| 252 | } |
| 253 | //位置 右 |
| 254 | &-position-right{ |
| 255 | //タイプ 吹き出し |
| 256 | &.vk_balloon-type-speech { |
| 257 | .vk_balloon_content{ |
| 258 | //初期 |
| 259 | .vk_balloon_content_before:not(.has-text-color), |
| 260 | .vk_balloon_content_after:not(.has-text-color){ |
| 261 | border-color: transparent transparent transparent #f5f5f5; |
| 262 | } |
| 263 | //カラーパレット,カスタムカラー |
| 264 | .vk_balloon_content_before, |
| 265 | .vk_balloon_content_after { |
| 266 | border-color:transparent transparent transparent currentColor; |
| 267 | } |
| 268 | } |
| 269 | } |
| 270 | //タイプ もくもく |
| 271 | &.vk_balloon-type-think { |
| 272 | .vk_balloon_content{ |
| 273 | //初期 |
| 274 | .vk_balloon_content_before:not(.has-text-color), |
| 275 | .vk_balloon_content_after:not(.has-text-color){ |
| 276 | border-color: transparent; |
| 277 | } |
| 278 | //カラーパレット,カスタムカラー |
| 279 | .vk_balloon_content_before, |
| 280 | .vk_balloon_content_after { |
| 281 | border-color:transparent currentColor transparent transparent; |
| 282 | } |
| 283 | } |
| 284 | } |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | .vk_balloon{ |
| 289 | &_content, |
| 290 | &_icon_image { |
| 291 | &-border-true { |
| 292 | border-width: var( --vk-balloon-border-width, 1px ); |
| 293 | border-style: solid; |
| 294 | } |
| 295 | } |
| 296 | // デフォルトボーダー |
| 297 | &_content-border-true:not(.has-text-color) { |
| 298 | color: #cccccc; |
| 299 | } |
| 300 | &-position { |
| 301 | &-left{ //位置が左 |
| 302 | &.vk_balloon-type-speech { |
| 303 | .vk_balloon_content-border-true{ |
| 304 | .vk_balloon_content_before{ |
| 305 | left:-10px; |
| 306 | } |
| 307 | .vk_balloon_content_after{ |
| 308 | left: var( --vk-balloon-speech-offset, -12px ); |
| 309 | border-right-color: inherit !important; |
| 310 | } |
| 311 | } |
| 312 | } |
| 313 | } |
| 314 | &-right{ //位置が右 |
| 315 | &.vk_balloon-type-speech { |
| 316 | .vk_balloon_content-border-true{ |
| 317 | border-color: currentColor; |
| 318 | .vk_balloon_content_before { |
| 319 | right:-10px; |
| 320 | } |
| 321 | .vk_balloon_content_after { |
| 322 | right: var( --vk-balloon-speech-offset, -12px ); |
| 323 | border-left-color: inherit !important; |
| 324 | } |
| 325 | } |
| 326 | } |
| 327 | } |
| 328 | } |
| 329 | |
| 330 | &-type-think { |
| 331 | .vk_balloon_content-border-true{ |
| 332 | .vk_balloon_content_before, |
| 333 | .vk_balloon_content_after{ |
| 334 | border-width: var( --vk-balloon-border-width, 1px ); |
| 335 | border-style: solid; |
| 336 | border-color: inherit !important; |
| 337 | } |
| 338 | } |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | |
| 343 | /* animation |
| 344 | /*-------------------------------------------*/ |
| 345 | .vk_balloon-animation { |
| 346 | &-trembling { |
| 347 | animation: trembling 0.1s infinite; |
| 348 | } |
| 349 | @keyframes trembling { |
| 350 | 0% { |
| 351 | transform: rotate(-0.5deg); |
| 352 | } |
| 353 | 50% { |
| 354 | transform: rotate(0.5deg); |
| 355 | } |
| 356 | } |
| 357 | &-trembling-x { |
| 358 | animation: trembling-x 0.1s infinite; |
| 359 | } |
| 360 | @keyframes trembling-x { |
| 361 | 0% { |
| 362 | transform: scale(1, 1); |
| 363 | } |
| 364 | 50% { |
| 365 | transform: scale(0.99, 0.96); |
| 366 | } |
| 367 | } |
| 368 | &-pounding { |
| 369 | animation: pounding 1.5s infinite; |
| 370 | } |
| 371 | @keyframes pounding { |
| 372 | 0% { |
| 373 | transform: scale(1.05) |
| 374 | } |
| 375 | 5% { |
| 376 | transform: scale(1) |
| 377 | } |
| 378 | 95% { |
| 379 | transform: scale(1) |
| 380 | } |
| 381 | 100% { |
| 382 | transform: scale(1.05) |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | &-shaking { |
| 387 | animation: shaking 0.4s infinite; |
| 388 | } |
| 389 | @keyframes shaking { |
| 390 | 0% { |
| 391 | transform: translate(1px, 1px); |
| 392 | } |
| 393 | 25% { |
| 394 | transform: translate(1px, -1px); |
| 395 | } |
| 396 | 50% { |
| 397 | transform: translate(-1px, -1px); |
| 398 | } |
| 399 | 75% { |
| 400 | transform: translate(-1px, 1px); |
| 401 | } |
| 402 | 100% { |
| 403 | transform: translate(1px, 1px); |
| 404 | } |
| 405 | } |
| 406 | } |
| 407 | |
| 408 | .icon-image-list-note:hover{ |
| 409 | cursor: pointer; |
| 410 | } |
| 411 | |
| 412 | /********************* |
| 413 | * SmartPhone |
| 414 | 0px - 480px |
| 415 | ***********************/ |
| 416 | @media only screen and (max-width: 480px) { |
| 417 | .vk_balloon_content{ |
| 418 | max-width: calc(100% - 2em); |
| 419 | font-size: .9em; |
| 420 | padding: 1em; |
| 421 | } |
| 422 | .vk_balloon-type-think { |
| 423 | .vk_balloon_content{ |
| 424 | &::after { |
| 425 | border: 5px solid transparent; |
| 426 | } |
| 427 | } |
| 428 | } |
| 429 | |
| 430 | .vk_balloon{ |
| 431 | align-items: normal; |
| 432 | &.vk_balloon-position-left{ |
| 433 | &.vk_balloon-type-speech{ |
| 434 | .vk_balloon_icon{ |
| 435 | margin-right: 1.5rem; |
| 436 | }//.vk_balloon_icon |
| 437 | .vk_balloon_conten:not(.vk_balloon_content_fullwidth){ |
| 438 | display: inline-block; |
| 439 | }//.vk_balloon_content |
| 440 | }//&.vk_balloon-type-speech |
| 441 | |
| 442 | &.vk_balloon-type-think{ |
| 443 | .vk_balloon_icon{ |
| 444 | margin-right: 2rem; |
| 445 | |
| 446 | } |
| 447 | .vk_balloon_content:not(.vk_balloon_content_fullwidth){ |
| 448 | display: inline-block; |
| 449 | } |
| 450 | } |
| 451 | }//&.vk_balloon-position-left |
| 452 | |
| 453 | &.vk_balloon-position-right{ |
| 454 | text-align: right; |
| 455 | |
| 456 | &.vk_balloon-type-speech{ |
| 457 | .vk_balloon_icon{ |
| 458 | margin-left: 1.5rem; |
| 459 | margin-right: 0; |
| 460 | } |
| 461 | |
| 462 | .vk_balloon_content:not(.vk_balloon_content_fullwidth){ |
| 463 | display: inline-block; |
| 464 | |
| 465 | } |
| 466 | }//&.vk_balloon-type-speech |
| 467 | |
| 468 | &.vk_balloon-type-think{ |
| 469 | .vk_balloon_icon{ |
| 470 | margin-left: 2rem; |
| 471 | margin-right: 0; |
| 472 | } |
| 473 | |
| 474 | .vk_balloon_content:not(.vk_balloon_content_fullwidth){ |
| 475 | display: inline-block; |
| 476 | } |
| 477 | }//&.vk_balloon-type-think |
| 478 | }//.vk_balloon-position-right |
| 479 | }//.vk_balloon |
| 480 | |
| 481 | .vk_balloon_icon{ |
| 482 | max-width:64px; |
| 483 | } |
| 484 | } // @media only screen and (max-width: 480px) { |
| 485 |