list.scss 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267
  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, body.kind-term, body.kind-page{
  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. .taxonomy-terms-card {
  87. text-align: left;
  88. }
  89. .taxonomy-terms-card li {
  90. font-size: 0.5em;
  91. list-style-type: none;
  92. display: inline-block;
  93. background: #248aaa;
  94. margin-left: 0.1em;
  95. margin-right: 0.1em;
  96. }
  97. .taxonomy-terms-card a {
  98. color: #f9fafc;
  99. }
  100. /* ============= Device specific fixes ======= */
  101. /* Large screens such as TV */
  102. @media only screen and (min-width: 1824px) {
  103. .content-section {
  104. padding-left: 1rem;
  105. padding-right: 1rem;
  106. flex: 85%;
  107. max-width: 85%;
  108. }
  109. .post-card-holder .post-card {
  110. width: calc(100% / 5);
  111. }
  112. }
  113. /* Extra large devices (large desktops, 1200px and up) */
  114. @media (max-width: 1400px) {
  115. .post-card-holder {
  116. margin-left: 0px;
  117. }
  118. .post-card-holder .post-card {
  119. width: calc(100% / 3);
  120. }
  121. }
  122. @media (max-width: 1200px) {
  123. }
  124. /* IPad Pro */
  125. @media (max-width: 1024px) {
  126. .wrapper {
  127. padding-left: 0px;
  128. padding-right: 0px;
  129. }
  130. .content-section {
  131. padding: 0;
  132. flex: 60%;
  133. order: 2;
  134. padding-bottom: 0.5rem;
  135. }
  136. .content {
  137. overflow: hidden;
  138. }
  139. .container {
  140. max-width: 100%;
  141. }
  142. .navbar-toggler {
  143. display: block;
  144. }
  145. #toc-toggler {
  146. visibility: hidden;
  147. }
  148. .navbar-collapse.lang-selector {
  149. display: block !important;
  150. position: absolute;
  151. right: 0;
  152. top: 0.5rem;
  153. }
  154. .post-card-holder {
  155. margin: 0;
  156. margin-top: 1.5rem;
  157. padding-left: 0.5rem;
  158. padding-right: 0.5rem;
  159. position: relative;
  160. transition: all ease-out 0.3s;
  161. }
  162. .post-card-holder .post-card {
  163. width: calc(100% / 3);
  164. }
  165. .content-section.hide .post-card-holder .post-card {
  166. width: 50%;
  167. }
  168. }
  169. /* Large devices (desktops, 992px and up) */
  170. @media (max-width: 992px) {
  171. .post-card-holder .post-card {
  172. width: 50%;
  173. }
  174. .content-section.hide .post-card-holder .post-card {
  175. width: 100%;
  176. }
  177. }
  178. /* Medium devices (tablets, 768px and up) */
  179. @media only screen and (max-width: 768px) {
  180. }
  181. /* Small devices (landscape phones, 576px and up) */
  182. @media only screen and (max-width: 576px) {
  183. .wrapper {
  184. padding-left: 0px;
  185. padding-right: 0px;
  186. flex-flow: column;
  187. overflow: hidden;
  188. }
  189. .content-section {
  190. flex: 100%;
  191. max-width: 100%;
  192. padding-left: 0;
  193. width: 100%;
  194. }
  195. .content {
  196. width: 100%;
  197. padding-left: 0;
  198. padding-right: 0;
  199. transition: all ease-out 0.3s;
  200. }
  201. .content-section.hide .content {
  202. margin-top: 0;
  203. padding-top: 0;
  204. transition: all ease-out 0.3s;
  205. }
  206. .content-section.hide .post-card-holder {
  207. margin-top: 0.5rem;
  208. transition: all ease-out 0.3s;
  209. }
  210. .post-card-holder .post-card {
  211. margin-left: 1%;
  212. margin-right: 1%;
  213. width: 98%;
  214. }
  215. }
  216. /* iPhoneX, iPhone 6,7,8 */
  217. @media only screen and (max-width: 375px) {
  218. }
  219. /* Galaxy S5, Moto G4 */
  220. @media only screen and (max-width: 360px) {
  221. }
  222. /* iPhone 5 or before */
  223. @media only screen and (max-width: 320px) {
  224. }
  225. }