_main.less 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. .l_main {
  2. width: 100%;
  3. padding-right: @side-width + @gap;
  4. float: left;
  5. .post-list {
  6. position: relative;
  7. margin: 0px auto;
  8. columns: 400px;
  9. column-gap: 0;
  10. margin: -@gap /2;
  11. @media(max-width: @on-phone) {
  12. margin: 0;
  13. }
  14. }
  15. #comments {
  16. position: relative;
  17. padding-top: 1.5*@gap;
  18. background: white;
  19. @media (max-width: @on-phone) {
  20. padding-top: @gap;
  21. }
  22. }
  23. .post-wrapper{
  24. // for firefox
  25. column-break-inside: avoid;
  26. break-inside: avoid-column;
  27. }
  28. .mobile-post() {
  29. .post {
  30. padding: 1.5 * @gap @gap;
  31. .meta {
  32. margin-bottom: @gap;
  33. .title {
  34. font-size: @article-title-size-sm;
  35. }
  36. }
  37. .full-width {
  38. margin-left: -@gap;
  39. margin-right: -@gap;
  40. padding-left: @gap;
  41. padding-right: @gap;
  42. width:~"calc(100% + 2 * @{gap})"
  43. }
  44. .auto-padding {
  45. padding-left: @gap;
  46. padding-right: @gap;
  47. }
  48. img,
  49. .highlight {
  50. margin-left: -@gap;
  51. margin-right: -@gap;
  52. width:~"calc(100% + 2 * @{gap})";
  53. max-width: none;
  54. }
  55. }
  56. }
  57. .post-wrapper {
  58. padding: @gap /2;
  59. .mobile-post();
  60. .tags {
  61. margin-bottom: -1.5*@gap;
  62. }
  63. @media(max-width:@on-phone) {
  64. padding-left: 0;
  65. padding-right: 0;
  66. }
  67. }
  68. .post {
  69. position: relative;
  70. margin: 0 auto;
  71. padding: 2 * @gap 1.5*@gap;
  72. //max-width: 768px;
  73. background: white;
  74. &:extend(.z-depth-1);
  75. .meta {
  76. margin-bottom: 2*@gap;
  77. .title {
  78. left: 0;
  79. font-size: @article-title-size;
  80. @media(max-width: @on-phone) {
  81. font-size: @article-title-size-sm;
  82. }
  83. &:before {
  84. content: none
  85. }
  86. a {
  87. display: inline;
  88. line-height: 1.25;
  89. font-weight: normal;
  90. color: lighten(@black, 2%);
  91. &:hover {
  92. color: @accent-color;
  93. }
  94. }
  95. }
  96. time,
  97. .cats {
  98. display: inline-block;
  99. font-size: .75rem;
  100. }
  101. .cats {
  102. &:before {
  103. display: inline-block;
  104. margin: 0 5px;
  105. @border-width: 8px;
  106. content: '';
  107. border-top: @border-width/2 solid transparent;
  108. border-bottom: @border-width/2 solid transparent;
  109. border-left: @border-width solid @secondary-color;
  110. }
  111. a {
  112. font-weight: bold;
  113. color: @secondary-color;
  114. }
  115. }
  116. time {
  117. color: lighten(@grey-color, 20%);
  118. }
  119. }
  120. .full-width,.highlight{
  121. margin-left: -1.5* @gap;
  122. margin-right: -1.5* @gap;
  123. padding-left: 1.5* @gap;
  124. padding-right: 1.5* @gap;
  125. width:~"calc(100% + 3 * @{gap})";
  126. }
  127. img {
  128. max-width: 100%;
  129. }
  130. }
  131. @media(max-width:@on-phone) {
  132. padding-right: 0;
  133. .mobile-post();
  134. }
  135. }