cards.scss 2.2 KB

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