cards.scss 2.0 KB

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