_wiki.scss 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. div.body {
  2. padding: 10px;
  3. }
  4. // hljs
  5. .wiki {
  6. @import 'hljs';
  7. }
  8. .wiki {
  9. @mixin add-left-border($width) {
  10. &:before {
  11. margin-right: 0.4em;
  12. content: '';
  13. border-left: $width solid;
  14. opacity: 0.2;
  15. }
  16. }
  17. @extend .text-break;
  18. font-size: 15px;
  19. h1,
  20. h2,
  21. h3,
  22. h4,
  23. h5,
  24. h6 {
  25. margin-top: 1.6em;
  26. margin-bottom: 0.8em;
  27. &:first-child {
  28. margin-top: 0;
  29. }
  30. }
  31. h1 {
  32. padding: 0.5em 0;
  33. margin-top: 2em;
  34. font-size: 1.9em;
  35. line-height: 1.1em;
  36. // style
  37. border-bottom: solid 1px transparent;
  38. }
  39. h2 {
  40. padding-bottom: 0.3em;
  41. font-size: 1.6em;
  42. font-weight: bold;
  43. line-height: 1.225;
  44. // style
  45. border-bottom: solid 1px transparent;
  46. }
  47. h3 {
  48. font-size: 1.4em;
  49. font-weight: bold;
  50. }
  51. h4 {
  52. font-size: 1.35em;
  53. font-weight: normal;
  54. // style
  55. @include add-left-border(6px);
  56. }
  57. h5 {
  58. font-size: 1.25em;
  59. font-weight: normal;
  60. // style
  61. @include add-left-border(4px);
  62. }
  63. h6 {
  64. font-size: 1.2em;
  65. font-weight: normal;
  66. // style
  67. @include add-left-border(2px);
  68. }
  69. p {
  70. margin: 15px 0;
  71. font-weight: normal;
  72. }
  73. blockquote {
  74. padding: 0 20px;
  75. margin: 0 0 30px 0;
  76. font-size: 0.9em;
  77. color: lighten($gray-800, 35%);
  78. border-left: 0.3rem solid #ddd;
  79. }
  80. img {
  81. max-width: 100%;
  82. margin: 5px 0;
  83. }
  84. img.emojione {
  85. margin-top: -0.3em !important;
  86. margin-bottom: 0 !important;
  87. border: none;
  88. box-shadow: none;
  89. }
  90. ul,
  91. ol {
  92. padding-left: 30px;
  93. margin: 20px 0;
  94. li {
  95. margin: 5px 0;
  96. line-height: 1.8em;
  97. pre {
  98. line-height: $line-height-base;
  99. }
  100. }
  101. ul,
  102. ol {
  103. margin: 0;
  104. }
  105. }
  106. .task-list {
  107. .task-list-item {
  108. margin: 0 0.2em 0.25em -1.6em;
  109. list-style-type: none;
  110. }
  111. .task-list-item > .task-list {
  112. margin-left: 30px;
  113. }
  114. // use awesome-bootstrap-checkbox
  115. .task-list-item .checkbox input[type='checkbox'] {
  116. // layout
  117. + label {
  118. padding-left: 0.3em;
  119. &:before {
  120. margin-top: 0.4em;
  121. }
  122. }
  123. // styles
  124. cursor: default;
  125. + label {
  126. cursor: default;
  127. opacity: 1;
  128. &:before,
  129. &:after {
  130. cursor: default;
  131. }
  132. }
  133. }
  134. }
  135. .page-template-builder {
  136. position: relative;
  137. .template-create-button {
  138. position: absolute;
  139. top: 8px;
  140. right: 8px;
  141. }
  142. }
  143. .revision-head {
  144. a {
  145. text-decoration: none;
  146. }
  147. .revision-head-link,
  148. .revision-head-edit-button {
  149. margin-left: 0.5em;
  150. font-size: 0.6em;
  151. opacity: 0;
  152. }
  153. &:hover .revision-head-link,
  154. &:hover .revision-head-edit-button {
  155. opacity: 1 !important;
  156. }
  157. }
  158. $ratio: 0.95;
  159. &.comment {
  160. font-size: 14px;
  161. line-height: 1.5em;
  162. h1,
  163. h2,
  164. h3,
  165. h4,
  166. h5,
  167. h6 {
  168. margin-top: 1.6em * $ratio;
  169. margin-bottom: 0.8em * $ratio;
  170. &:first-child {
  171. margin-top: 15px;
  172. }
  173. }
  174. h1 {
  175. padding-bottom: 0.3em * $ratio;
  176. margin-top: 2em * $ratio;
  177. font-size: 1.8em * $ratio;
  178. line-height: 1.1em * $ratio;
  179. }
  180. h2 {
  181. padding-bottom: 0.5em * $ratio;
  182. font-size: 1.4em * $ratio;
  183. line-height: 1.225 * $ratio;
  184. }
  185. h3 {
  186. font-size: 1.2em * $ratio;
  187. }
  188. blockquote {
  189. font-size: 0.9em * $ratio;
  190. }
  191. img.emojione {
  192. margin-top: -0.3em * $ratio !important;
  193. }
  194. ul,
  195. ol {
  196. padding-left: 15px;
  197. margin: 10px 0;
  198. li {
  199. line-height: $line-height-base;
  200. pre {
  201. line-height: $line-height-base;
  202. }
  203. }
  204. }
  205. .revision-head {
  206. .revision-head-link,
  207. .revision-head-edit-button {
  208. margin-left: 0.5em * $ratio;
  209. font-size: 0.6em * $ratio;
  210. }
  211. }
  212. }
  213. .grw-keep {
  214. padding: 7%;
  215. padding-bottom: 3%;
  216. margin: 0 7%;
  217. background-color: rgba(200, 200, 200, 0.2);
  218. border-radius: 10px;
  219. .grw-keep-time {
  220. float: right;
  221. font-size: 0.8em;
  222. font-weight: normal;
  223. }
  224. }
  225. }
  226. // mobile
  227. .page-mobile .wiki .revision-head {
  228. .revision-head-link,
  229. .revision-head-edit-button {
  230. opacity: 0.3;
  231. }
  232. }
  233. @include media-breakpoint-down(sm) {
  234. .main .wiki {
  235. img {
  236. max-width: 100%;
  237. }
  238. }
  239. }