cards.scss 2.0 KB

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