list.scss 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. // in Hugo, Page kind can be either "section" or "page".
  2. // if it is section, then it's a page with a list of items, for example /posts
  3. // if it is page, then it is a single page.
  4. body.kind-section {
  5. .wrapper {
  6. display: flex;
  7. padding: 0;
  8. margin: 0;
  9. width: 100%;
  10. }
  11. .content-section {
  12. flex: 80%;
  13. order: 2;
  14. /* background-color: lightseagreen; */
  15. padding: 0;
  16. position: relative;
  17. padding-left: 0.5rem;
  18. padding-right: 0.5rem;
  19. }
  20. .content {
  21. padding: 0;
  22. position: relative;
  23. padding-top: 2rem;
  24. min-height: 130vh;
  25. }
  26. .post-card-holder {
  27. margin-top: 32px;
  28. margin-left: auto;
  29. padding: 0;
  30. display: flex;
  31. flex-flow: wrap;
  32. }
  33. .post-card-holder .post-card {
  34. width: calc(100% / 3);
  35. display: inline-flex;
  36. }
  37. .post-card-holder .card {
  38. margin: 5px;
  39. position: relative;
  40. }
  41. .post-card-holder .card .card-footer span {
  42. font-size: 10pt;
  43. color: #6c757d !important;
  44. padding-top: 5px;
  45. }
  46. .post-card-holder .card .card-footer {
  47. background: #fff;
  48. margin-top: auto;
  49. }
  50. .post-summary {
  51. overflow: hidden;
  52. text-overflow: ellipsis;
  53. display: -webkit-box;
  54. max-height: 144px;
  55. /* fallback */
  56. -webkit-line-clamp: 5;
  57. /* number of lines to show */
  58. -webkit-box-orient: vertical;
  59. }
  60. .post-card-holder .post-card-link {
  61. text-decoration: none;
  62. }
  63. .paginator {
  64. width: -moz-fit-content;
  65. width: fit-content;
  66. margin: auto;
  67. }
  68. .paginator .page-item > a {
  69. color: #248aaa;
  70. }
  71. .paginator .page-item.active > a {
  72. background-color: #248aaa;
  73. color: #f9fafc;
  74. }
  75. .navbar-toggler {
  76. display: none;
  77. }
  78. .pagination {
  79. margin-left: auto;
  80. margin-right: auto;
  81. margin-top: 0.5rem;
  82. margin-bottom: 0.5rem;
  83. width: -moz-fit-content;
  84. width: fit-content;
  85. }
  86. /* ============= Device specific fixes ======= */
  87. /* Large screens such as TV */
  88. @media only screen and (min-width: 1824px) {
  89. .content-section {
  90. padding-left: 1rem;
  91. padding-right: 1rem;
  92. flex: 85%;
  93. max-width: 85%;
  94. }
  95. .post-card-holder .post-card {
  96. width: calc(100% / 5);
  97. }
  98. }
  99. /* Extra large devices (large desktops, 1200px and up) */
  100. @media (max-width: 1400px) {
  101. .post-card-holder {
  102. margin-left: 0px;
  103. }
  104. .post-card-holder .post-card {
  105. width: calc(100% / 3);
  106. }
  107. }
  108. @media (max-width: 1200px) {
  109. }
  110. /* IPad Pro */
  111. @media (max-width: 1024px) {
  112. .wrapper {
  113. padding-left: 0px;
  114. padding-right: 0px;
  115. }
  116. .content-section {
  117. padding: 0;
  118. flex: 60%;
  119. order: 2;
  120. padding-bottom: 0.5rem;
  121. }
  122. .content {
  123. overflow: hidden;
  124. }
  125. .container {
  126. max-width: 100%;
  127. }
  128. .navbar-toggler {
  129. display: block;
  130. }
  131. #toc-toggler {
  132. visibility: hidden;
  133. }
  134. .navbar-collapse.lang-selector {
  135. display: block !important;
  136. position: absolute;
  137. right: 0;
  138. top: 0.5rem;
  139. }
  140. .post-card-holder {
  141. margin: 0;
  142. margin-top: 1.5rem;
  143. padding-left: 0.5rem;
  144. padding-right: 0.5rem;
  145. position: relative;
  146. transition: all ease-out 0.3s;
  147. }
  148. .post-card-holder .post-card {
  149. width: calc(100% / 3);
  150. }
  151. .content-section.hide .post-card-holder .post-card {
  152. width: 50%;
  153. }
  154. }
  155. /* Large devices (desktops, 992px and up) */
  156. @media (max-width: 992px) {
  157. .post-card-holder .post-card {
  158. width: 50%;
  159. }
  160. .content-section.hide .post-card-holder .post-card {
  161. width: 100%;
  162. }
  163. }
  164. /* Medium devices (tablets, 768px and up) */
  165. @media only screen and (max-width: 768px) {
  166. }
  167. /* Small devices (landscape phones, 576px and up) */
  168. @media only screen and (max-width: 576px) {
  169. .wrapper {
  170. padding-left: 0px;
  171. padding-right: 0px;
  172. flex-flow: column;
  173. overflow: hidden;
  174. }
  175. .content-section {
  176. flex: 100%;
  177. max-width: 100%;
  178. padding-left: 0;
  179. width: 100%;
  180. }
  181. .content {
  182. width: 100%;
  183. padding-left: 0;
  184. padding-right: 0;
  185. transition: all ease-out 0.3s;
  186. }
  187. .content-section.hide .content {
  188. margin-top: 0;
  189. padding-top: 0;
  190. transition: all ease-out 0.3s;
  191. }
  192. .content-section.hide .post-card-holder {
  193. margin-top: 0.5rem;
  194. transition: all ease-out 0.3s;
  195. }
  196. .post-card-holder .post-card {
  197. margin-left: 1%;
  198. margin-right: 1%;
  199. width: 98%;
  200. }
  201. }
  202. /* iPhoneX, iPhone 6,7,8 */
  203. @media only screen and (max-width: 375px) {
  204. }
  205. /* Galaxy S5, Moto G4 */
  206. @media only screen and (max-width: 360px) {
  207. }
  208. /* iPhone 5 or before */
  209. @media only screen and (max-width: 320px) {
  210. }
  211. }