_components.scss 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. // Various components used on pages
  2. //-------------------------------
  3. // Post list (and related on post page) container
  4. .related {
  5. padding-top: 2rem;
  6. padding-bottom: 2rem;
  7. margin-bottom: 4em; // visible under post only
  8. }
  9. // <ul> style for Archive and in 'Related' under posts
  10. .related-posts {
  11. padding-left: 0;
  12. list-style: none;
  13. font-weight: normal;
  14. a {
  15. color: var(--text-color);
  16. }
  17. li {
  18. margin-top: 1rem;
  19. small {
  20. font-size: .75em;
  21. color: var(--text-color-light);
  22. }
  23. }
  24. li+li {
  25. margin-top: 0rem;
  26. }
  27. }
  28. // Tag list boxes
  29. .tag-box {
  30. margin: 2rem 0;
  31. span {
  32. text-align: center;
  33. display: block;
  34. }
  35. ul {
  36. text-align: center;
  37. color: var(--text-color-light);
  38. list-style-type: none;
  39. margin: .5em 0 1.5em 0;
  40. padding: 0px;
  41. li {
  42. display: inline-block;
  43. font-weight: $base-font-weight-bold;
  44. font-size: $mobile-font-size;
  45. margin: 0 .5rem;
  46. a {
  47. color: var (--text-color)
  48. }
  49. }
  50. }
  51. hr:first-child {
  52. margin-top: 4em;
  53. margin-bottom: 1.5em; //reset
  54. }
  55. }
  56. // Searchbox in Archive
  57. .searchbox {
  58. position: relative;
  59. overflow: hidden;
  60. margin-top: .3rem;
  61. text-align: center;
  62. input {
  63. outline: none;
  64. }
  65. input[type=search] {
  66. -webkit-appearance: textfield;
  67. -webkit-box-sizing: content-box;
  68. }
  69. input::-webkit-search-decoration,
  70. input::-webkit-search-cancel-button {
  71. display: none;
  72. }
  73. span.icon-search {
  74. color: inherit;
  75. position: absolute;
  76. margin-left: 0.6em;
  77. margin-top: 0.6em;
  78. z-index: 1;
  79. }
  80. input[type=search] {
  81. width: 50%;
  82. color: var(--text-color-light);
  83. background: var(--code-bg-color);
  84. box-shadow: 0 1px 2px var(--shadow-color);
  85. padding: 9px 10px 9px 38px;
  86. font-size: $base-font-size;
  87. -webkit-transition: all .5s;
  88. -moz-transition: all .5s;
  89. transition: all .5s;
  90. opacity: .5;
  91. }
  92. input[type=search]:focus {
  93. color: var(--text-color);
  94. background: var(--code-bg-color);
  95. box-shadow: 0 1px 2px var(--shadow-color);
  96. width: 70%;
  97. opacity: 1;
  98. }
  99. input:-moz-placeholder {
  100. color: var(--text-color-light);
  101. }
  102. input::-webkit-input-placeholder {
  103. color: var(--text-color-light);
  104. }
  105. @media (max-width: 48rem) {
  106. input[type=search] {
  107. width: 70%;
  108. }
  109. input[type=search]:focus {
  110. width: 80%;
  111. }
  112. }
  113. }
  114. // Photo in About page
  115. .me {
  116. width: 6.5rem;
  117. border-radius: 100%;
  118. position: relative;
  119. }
  120. @media (max-width: 50em) {
  121. .me {
  122. width: 6.5rem;
  123. margin-top: -4.8rem;
  124. }
  125. }
  126. // Read more link on blog page with gradient overlay
  127. .readmore {
  128. position: relative;
  129. text-align: right;
  130. // margin-bottom: -2.5rem;
  131. a {
  132. font-size: $lead-font-size;
  133. color: var(--link-color);
  134. @include border-slide(left);
  135. }
  136. &::before {
  137. position: absolute;
  138. top: -125px;
  139. width: 100%;
  140. height: 125px;
  141. content: '';
  142. display: block;
  143. background: -moz-linear-gradient(bottom, var(--bg-color) 0%, rgba(255,255,255,0) 100%); /* FF3.6-15 */
  144. background: -webkit-linear-gradient(bottom, var(--bg-color) 0%,rgba(255,255,255,0) 100%); /* Chrome10-25,Safari5.1-6 */
  145. background: linear-gradient(to top, var(--bg-color) 0%,rgba(255,255,255,0) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
  146. z-index: 10 // it needs to cover everything, footnote buttons included
  147. }
  148. }