_article.less 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. .article {
  2. color: lighten(@black, 2%);
  3. font-size: 1rem;
  4. line-height: 1.6;
  5. word-break: break-all;
  6. word-wrap: break-word;
  7. em {
  8. position: relative;
  9. &:before {
  10. position: absolute;
  11. top: 0.65em;
  12. left: 0;
  13. width: 100%;
  14. overflow: hidden;
  15. white-space: nowrap;
  16. content: "・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・";
  17. }
  18. }
  19. img {
  20. position: relative;
  21. display: block;
  22. margin: 0 auto;
  23. background: white;
  24. transition: all 0.24s ease;
  25. @media (max-width: @on-phone) {
  26. box-shadow: none;
  27. }
  28. }
  29. hr {
  30. border: 0;
  31. border-bottom: 1px solid #ddd;
  32. }
  33. p.small-img,
  34. div.small-img {
  35. img {
  36. width: auto;
  37. max-width: 100%;
  38. margin: 0;
  39. box-shadow: none;
  40. }
  41. }
  42. p {
  43. margin: 20px 0px;
  44. }
  45. ul,
  46. ol {
  47. list-style: initial;
  48. padding-left: 20px;
  49. & > li{
  50. list-style: initial;
  51. }
  52. margin: 20px 0px;
  53. }
  54. a {
  55. color: darken(@accent-color, 2%);
  56. &:hover {
  57. color: darken(@accent-color, 3%);
  58. background: fade(@accent-color, 10%);
  59. }
  60. &:active {
  61. background: fade(@accent-color, 20%);
  62. color: @white;
  63. }
  64. }
  65. h1,
  66. h2,
  67. h3,
  68. h4,
  69. h5,
  70. h6 {
  71. position: relative;
  72. font-family: @base-font-family;
  73. font-weight: normal;
  74. margin: 20px auto 10px;
  75. left: 20px;
  76. &::before {
  77. position: absolute;
  78. left: -20px;
  79. top: 0px;
  80. content: "#";
  81. color: @secondary-color;
  82. font-weight: normal;
  83. }
  84. &.title {
  85. left: 0;
  86. &:before {
  87. content: none;
  88. }
  89. }
  90. }
  91. figure {
  92. figcaption {
  93. span {
  94. display: inline-block;
  95. margin-right: 5px;
  96. }
  97. }
  98. }
  99. blockquote {
  100. position: relative;
  101. width: 100%;
  102. margin: 20px 0px;
  103. padding: 0px 20px;
  104. border-left: 4px solid @material-green;
  105. footer {
  106. strong {
  107. margin-right: 7px;
  108. }
  109. }
  110. }
  111. pre {
  112. display: block;
  113. -moz-box-sizing: border-box;
  114. box-sizing: border-box;
  115. font-family: @code-font-family;
  116. }
  117. code {
  118. font-family: @code-font-family;
  119. color: @secondary-color;
  120. padding: 3px 5px;
  121. margin: 0px 2px;
  122. border-radius: 2px;
  123. font-size: 1em;
  124. background: lighten(@background-color, 5%);
  125. }
  126. .readmore {
  127. // display: none; // howtodesign?
  128. font-size: 1.2rem;
  129. margin-top: @gap;
  130. a {
  131. display: inline-block;
  132. vertical-align: middle;
  133. line-height: 2rem;
  134. }
  135. }
  136. .tags {
  137. position: relative;
  138. padding-top: @gap/2;
  139. padding-bottom: @gap/2;
  140. font-size: 1rem;
  141. line-height: 1.5rem;
  142. margin-top: @gap;
  143. background: @qoute-background-color;
  144. &.article-tags {
  145. background: transparent;
  146. }
  147. word-spacing: @gap/2;
  148. a {
  149. position: relative;
  150. display: inline-block;
  151. word-spacing: 0;
  152. // &+a{
  153. // margin-left: @gap/2;
  154. // }
  155. .enable-trans(.1s);
  156. //background:@material-light-grey;
  157. color: @grey-color;
  158. &:hover {
  159. color: @accent-color;
  160. background: transparent;
  161. }
  162. &::before {
  163. content: "#";
  164. }
  165. }
  166. }
  167. table:not('.highlight table') {
  168. width: 100%;
  169. td,
  170. th {
  171. padding: 12px 24px
  172. }
  173. tr {
  174. border-bottom: 1px solid #ddd;
  175. }
  176. &>thead>th {
  177. border-bottom-width: 2px;
  178. }
  179. }
  180. @media (max-width: @on-phone) {
  181. h1,
  182. h2,
  183. h3 {
  184. margin: 20px 0px;
  185. }
  186. h4,
  187. h5,
  188. h6 {
  189. margin: 10px 0px;
  190. }
  191. h1 {
  192. font-size: 1.5em;
  193. }
  194. h2 {
  195. font-size: 1.4em;
  196. }
  197. h3 {
  198. font-size: 1.3em;
  199. }
  200. h4 {
  201. font-size: 1.2em;
  202. }
  203. h5 {
  204. font-size: 1.1em;
  205. }
  206. h6 {
  207. font-size: 1em;
  208. }
  209. figure {
  210. font-size: 13px;
  211. line-height: 1.6em;
  212. }
  213. }
  214. }
  215. /* Tomorrow Night Eighties Theme */
  216. /* Original theme - https://github.com/chriskempson/tomorrow-theme */
  217. /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
  218. .tomorrow-comment, pre .comment, pre .title {
  219. color: #999999;
  220. }
  221. .tomorrow-red, pre .variable, pre .attribute, pre .tag, pre .regexp, pre .ruby .constant, pre .xml .tag .title, pre .xml .pi, pre .xml .doctype, pre .html .doctype, pre .css .id, pre .css .class, pre .css .pseudo {
  222. color: #f2777a;
  223. }
  224. .tomorrow-orange, pre .number, pre .preprocessor, pre .built_in, pre .literal, pre .params, pre .constant {
  225. color: #f99157;
  226. }
  227. .tomorrow-yellow, pre .class, pre .ruby .class .title, pre .css .rules .attribute {
  228. color: #ffcc66;
  229. }
  230. .tomorrow-green, pre .string, pre .value, pre .inheritance, pre .header, pre .ruby .symbol, pre .xml .cdata {
  231. color: #99cc99;
  232. }
  233. .tomorrow-aqua, pre .css .hexcolor {
  234. color: #66cccc;
  235. }
  236. .tomorrow-blue, pre .function, pre .python .decorator, pre .python .title, pre .ruby .function .title, pre .ruby .title .keyword, pre .perl .sub, pre .javascript .title, pre .coffeescript .title {
  237. color: #6699cc;
  238. }
  239. .tomorrow-purple, pre .keyword, pre .javascript .function {
  240. color: #cc99cc;
  241. }
  242. .highlight {
  243. width: 100%;
  244. margin: 20px 0px;
  245. overflow: auto;
  246. display: block;
  247. background: #2d2d2d;
  248. color: #cccccc;
  249. font-size: .9rem;
  250. font-family:@code-font-family;
  251. line-height: 1.5;
  252. border: 1px solid #ccc;
  253. padding: 10px;
  254. .gutter{
  255. color: #999999;
  256. padding-right: 20px;
  257. text-align: right;
  258. }
  259. .code{
  260. vertical-align: top;
  261. }
  262. &::-webkit-scrollbar {
  263. height: 6px;
  264. width: 6px;
  265. }
  266. // /* Track */
  267. &::-webkit-scrollbar-track-piece {
  268. background: transparent;
  269. }
  270. /* Handle */
  271. &::-webkit-scrollbar-thumb {
  272. background: #ccc;
  273. cursor: pointer;
  274. transition: all .2s ease-out;
  275. &:hover {
  276. background: darken(#ccc, 10%);
  277. }
  278. }
  279. }
  280. .art-item-footer{
  281. height: 40px;
  282. line-height: 40px;
  283. .art-item-left,.art-item-right{
  284. width:50%;
  285. height: 40px;
  286. line-height: 40px;
  287. text-overflow: ellipsis;
  288. white-space: nowrap;
  289. overflow: hidden;
  290. }
  291. .art-item-left{
  292. float: left;
  293. text-align: left;
  294. }
  295. .art-item-right{
  296. width:50%;
  297. float: right;
  298. text-align: right;
  299. }
  300. }