cards.scss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. .card {
  2. box-shadow: none;
  3. @include transition();
  4. overflow: hidden;
  5. background: get-light-color('bg-card');
  6. &:hover,
  7. &:focus {
  8. box-shadow: $box-shadow;
  9. border: 1px solid get-light-color('bg-primary');
  10. @include transition();
  11. }
  12. .card-head {
  13. height: 172px;
  14. display: flex;
  15. overflow: hidden;
  16. }
  17. .card-body {
  18. text-align: justify;
  19. }
  20. .card-img-top {
  21. @include transition();
  22. }
  23. .card-img-sm {
  24. width: 32px;
  25. height: 32px;
  26. }
  27. .card-img-xs {
  28. width: 24px;
  29. height: 24px;
  30. }
  31. .card-footer {
  32. background: get-light-color('bg-card') !important;
  33. a.btn {
  34. text-decoration: none !important;
  35. }
  36. }
  37. }
  38. .post-card {
  39. width: 24rem;
  40. display: inline-flex;
  41. .post-card-link {
  42. text-decoration: none !important;
  43. }
  44. .card {
  45. margin: 5px;
  46. position: relative;
  47. &:hover,
  48. &:focus {
  49. .card-img-top {
  50. transform: scale(1.2);
  51. @include transition();
  52. }
  53. }
  54. .card-body {
  55. padding: 1.25rem !important;
  56. padding-bottom: 0 !important;
  57. .post-summary {
  58. overflow: hidden;
  59. text-overflow: ellipsis;
  60. display: -webkit-box;
  61. max-height: 144px;
  62. /* fallback */
  63. -webkit-line-clamp: 5;
  64. /* number of lines to show */
  65. -webkit-box-orient: vertical;
  66. }
  67. }
  68. .card-footer {
  69. margin-top: auto;
  70. span {
  71. font-size: 10pt;
  72. color: get-light-color('muted-text-color') !important;
  73. padding-top: 5px;
  74. }
  75. }
  76. }
  77. }
  78. html[data-theme='dark'] {
  79. .card {
  80. background: get-dark-color('bg-card');
  81. &:hover,
  82. &:focus {
  83. border: 1px solid rgba(get-dark-color('accent-color'), 0.2);
  84. }
  85. .card-footer {
  86. background: get-dark-color('bg-card') !important;
  87. }
  88. }
  89. .post-card {
  90. .card {
  91. .card-footer {
  92. span {
  93. color: get-dark-color('muted-text-color') !important;
  94. }
  95. }
  96. }
  97. }
  98. }