You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

464 lines
7.9 KiB

3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //
  2. // Blocks
  3. // --------------------------------------------------
  4. .block {
  5. margin-bottom: $space-base;
  6. background-color: $white;
  7. box-shadow: 0 1px 3px rgba(darken($body-bg-dark, 2.5%), .5), 0 1px 2px rgba(darken($body-bg-dark, 2.5%), .5);
  8. & &,
  9. .content-side & {
  10. box-shadow: none;
  11. }
  12. }
  13. .block-header {
  14. display: flex;
  15. flex-direction: row;
  16. justify-content: space-between;
  17. align-items: center;
  18. padding: .75rem $space-block;
  19. transition: opacity .25s ease-out;
  20. &.block-header-rtl {
  21. flex-direction: row-reverse;
  22. .block-title {
  23. text-align: right;
  24. }
  25. .block-options {
  26. padding-right: $space-block;
  27. padding-left: 0;
  28. }
  29. }
  30. &-default {
  31. background-color: $body-bg-light;
  32. }
  33. }
  34. .block-title {
  35. flex: 1 1 auto;
  36. min-height: 1.75rem;
  37. margin: 0;
  38. font-size: 1rem;
  39. font-weight: $font-weight-medium;
  40. line-height: 1.75;
  41. small {
  42. font-size: .875rem;
  43. line-height: 1.375rem;
  44. color: $gray-600;
  45. }
  46. }
  47. .block-content {
  48. transition: opacity .25s ease-out;
  49. @include content-layout($space-block, $space-block);
  50. &.block-content-sm {
  51. padding-top: $space-block * .5;
  52. > .pull-t,
  53. > .pull-y,
  54. > .pull {
  55. margin-top: -($space-block * .5);
  56. }
  57. &.block-content-full {
  58. padding-bottom: $space-block * .5;
  59. > .pull-b,
  60. > .pull-y,
  61. > .pull {
  62. margin-bottom: -($space-block * .5);
  63. }
  64. }
  65. }
  66. }
  67. // Block Variations
  68. .block {
  69. &.block-bordered {
  70. border: 1px solid $body-bg-dark;
  71. box-shadow: none;
  72. }
  73. &.block-rounded {
  74. border-radius: $border-radius;
  75. > .block-header,
  76. > .nav-tabs {
  77. @include border-top-radius($border-radius-sm);
  78. &:last-child {
  79. @include border-bottom-radius($border-radius-sm);
  80. }
  81. }
  82. &.block-mode-hidden > .block-header.block-header-default {
  83. @include border-bottom-radius($border-radius-sm);
  84. }
  85. > .block-content {
  86. &:first-child {
  87. @include border-top-radius($border-radius-sm);
  88. }
  89. &:last-child {
  90. @include border-bottom-radius($border-radius-sm);
  91. }
  92. }
  93. > .nav-tabs > .nav-item {
  94. &:first-child > .nav-link {
  95. border-top-left-radius: $border-radius-sm;
  96. }
  97. &:last-child > .nav-link {
  98. border-top-right-radius: $border-radius-sm;
  99. }
  100. }
  101. }
  102. &.block-themed > .block-header {
  103. border-bottom: none;
  104. color: $white;
  105. background-color: $primary;
  106. > .block-title {
  107. color: rgba($white, .9);
  108. small {
  109. color: rgba($white, .7);
  110. }
  111. }
  112. }
  113. &.block-transparent {
  114. background-color: transparent;
  115. box-shadow: none;
  116. }
  117. }
  118. // Block Modes
  119. .block {
  120. &.block-mode-hidden {
  121. &.block-bordered > .block-header {
  122. border-bottom: none;
  123. }
  124. > .block-content {
  125. display: none;
  126. }
  127. }
  128. &.block-mode-loading {
  129. position: relative;
  130. overflow: hidden;
  131. &::before {
  132. position: absolute;
  133. top: 0;
  134. right: 0;
  135. bottom: 0;
  136. left: 0;
  137. display: block;
  138. z-index: 9;
  139. content: " ";
  140. background-color: rgba($white, .85);
  141. }
  142. &::after {
  143. position: absolute;
  144. top: 50%;
  145. left: 50%;
  146. margin: -1.5rem 0 0 -1.5rem;
  147. width: 3rem;
  148. height: 3rem;
  149. line-height: 3rem;
  150. color: $primary;
  151. font-family: Simple-Line-Icons;
  152. font-size: 1.125rem;
  153. text-align: center;
  154. z-index: 10;
  155. content: '\e09a';
  156. animation: fa-spin 1.75s infinite linear;
  157. border-radius: 1.5rem;
  158. }
  159. &.block-mode-hidden::after {
  160. margin: -1rem 0 0 -1rem;
  161. width: 2rem;
  162. height: 2rem;
  163. line-height: 2rem;
  164. }
  165. &.block-mode-loading-dark {
  166. &::before {
  167. background-color: rgba($black, .85);
  168. }
  169. &::after {
  170. color: $white;
  171. }
  172. }
  173. &.block-mode-loading-location::after {
  174. content: '\e06e';
  175. }
  176. &.block-mode-loading-energy::after {
  177. content: '\e020';
  178. }
  179. &.block-mode-loading-refresh::after {
  180. font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro';
  181. font-weight: 900;
  182. content: '\f021';
  183. }
  184. &.block-mode-loading-sun::after {
  185. font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro';
  186. font-weight: 900;
  187. content: '\f185';
  188. }
  189. &.block-mode-loading-repeat::after {
  190. font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro';
  191. font-weight: 900;
  192. content: '\f01e';
  193. }
  194. }
  195. &.block-mode-fullscreen {
  196. position: fixed;
  197. top: 0;
  198. right: 0;
  199. bottom: 0;
  200. left: 0;
  201. z-index: $zindex-block-fullscreen;
  202. margin-bottom: 0;
  203. overflow-y: auto;
  204. backface-visibility: hidden;
  205. -webkit-overflow-scrolling: touch;
  206. &.block-bordered {
  207. border: none;
  208. }
  209. &.block-rounded {
  210. border-radius: 0;
  211. }
  212. &.block-transparent {
  213. background-color: $white;
  214. }
  215. }
  216. &.block-mode-pinned {
  217. position: fixed;
  218. right: .75rem;
  219. bottom: 0;
  220. margin-bottom: 0 !important;
  221. width: 100%;
  222. max-width: 300px;
  223. z-index: $zindex-block-pinned;
  224. box-shadow: 0 0 2rem rgba(0,0,0,.1);
  225. > .block-content {
  226. max-height: 250px;
  227. overflow-y: auto;
  228. }
  229. @include media-breakpoint-up(sm) {
  230. max-width: 400px;
  231. }
  232. }
  233. }
  234. // Block Links
  235. a.block {
  236. display: block;
  237. color: $body-color;
  238. font-weight: normal;
  239. transition: transform .15s ease-out, opacity .15s ease-out, box-shadow .15s ease-out;
  240. &:hover {
  241. color: $body-color;
  242. opacity: .65;
  243. }
  244. &:active {
  245. opacity: 1;
  246. }
  247. &.block-link-rotate {
  248. &:hover {
  249. transform: rotate(1deg);
  250. opacity: 1;
  251. }
  252. &:active {
  253. transform: rotate(0deg);
  254. }
  255. }
  256. &.block-link-pop {
  257. &:hover {
  258. box-shadow: 0 .5rem 2rem darken($body-bg, 8%);
  259. transform: translateY(-2px);
  260. opacity: 1;
  261. }
  262. &:active {
  263. box-shadow: 0 .25rem .75rem darken($body-bg, 1%);
  264. transform: translateY(0);
  265. }
  266. }
  267. &.block-link-shadow {
  268. &:hover {
  269. box-shadow: 0 0 2.25rem darken($body-bg, 8%);
  270. opacity: 1;
  271. }
  272. &:active {
  273. box-shadow: 0 0 1.125rem darken($body-bg, 4%);
  274. }
  275. }
  276. }
  277. // Block Effects
  278. .block {
  279. &.block-fx-shadow {
  280. box-shadow: 0 0 2.25rem darken($body-bg, 8%);
  281. opacity: 1;
  282. }
  283. &.block-fx-pop {
  284. box-shadow: 0 .5rem 2rem darken($body-bg, 8%);
  285. opacity: 1;
  286. }
  287. &.block-fx-rotate-right {
  288. transform: rotate(1deg);
  289. opacity: 1;
  290. }
  291. &.block-fx-rotate-left {
  292. transform: rotate(-1deg);
  293. opacity: 1;
  294. }
  295. }
  296. // Block Options
  297. .block-options {
  298. flex: 0 0 auto;
  299. padding-left: $space-block;
  300. .block-options-item {
  301. padding: 0 .25rem;
  302. line-height: 1.2;
  303. .block.block-themed & {
  304. color: $white;
  305. }
  306. }
  307. .block-options-item,
  308. .dropdown {
  309. display: inline-block;
  310. }
  311. }
  312. .block-sticky-options {
  313. position: relative;
  314. .block-options {
  315. position: absolute;
  316. top: .875rem;
  317. right: $space-block;
  318. &.block-options-left {
  319. right: auto;
  320. left: $space-block;
  321. padding-right: 10px;
  322. padding-left: 0;
  323. }
  324. }
  325. }
  326. .btn-block-option {
  327. display: inline-block;
  328. padding: .375rem .25rem;
  329. line-height: 1;
  330. color: $primary;
  331. background: none;
  332. border: none;
  333. cursor: pointer;
  334. &.dropdown-toggle:after {
  335. position: relative;
  336. top: 2px;
  337. }
  338. .si {
  339. position: relative;
  340. top: 1px;
  341. }
  342. &:hover {
  343. text-decoration: none;
  344. color: $primary-light;
  345. }
  346. @at-root {
  347. a#{&}:focus,
  348. .active > a#{&},
  349. .show > button#{&} {
  350. text-decoration: none;
  351. color: $primary-light;
  352. }
  353. }
  354. &:focus {
  355. outline: none !important;
  356. color: $primary-light;
  357. }
  358. &:active {
  359. color: $primary-lighter;
  360. }
  361. .block.block-themed & {
  362. color: $white;
  363. opacity: .7;
  364. &:hover {
  365. color: $white;
  366. opacity: 1;
  367. }
  368. @at-root {
  369. a#{&}:focus,
  370. .active > a#{&},
  371. .show > button#{&} {
  372. color: $white;
  373. opacity: 1;
  374. }
  375. }
  376. &:focus {
  377. color: $white;
  378. opacity: 1;
  379. }
  380. &:active {
  381. color: $white;
  382. opacity: .6;
  383. }
  384. }
  385. }