2
0

main.css 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513
  1. :root {
  2. --color-blue: #049EF4;
  3. --text-color: #444;
  4. --secondary-text-color: #9e9e9e;
  5. --font-size: 16px;
  6. --line-height: 26px;
  7. --border-style: 1px solid #E8E8E8;
  8. --header-height: 48px;
  9. --panel-width: 300px;
  10. --panel-padding: 16px;
  11. --icon-size: 20px;
  12. }
  13. @font-face {
  14. font-family: 'Roboto Mono';
  15. src: local('Roboto Mono'), local('RobotoMono-Regular'), url('../files/RobotoMono-Regular.woff2') format('woff2');
  16. font-style: normal;
  17. font-weight: 400;
  18. }
  19. @font-face {
  20. font-family: 'Roboto Mono';
  21. src: local('Roboto Mono Medium'), local('RobotoMono-Medium'), url('../files/RobotoMono-Medium.woff2') format('woff2');
  22. font-style: normal;
  23. font-weight: 500;
  24. }
  25. * {
  26. box-sizing: border-box;
  27. -webkit-font-smoothing: antialiased;
  28. -moz-osx-font-smoothing: grayscale;
  29. }
  30. html, body {
  31. height: 100%;
  32. }
  33. html {
  34. font-size: calc(var(--font-size) - 1px);
  35. line-height: calc(var(--line-height) - 1px);
  36. }
  37. body {
  38. font-family: 'Roboto Mono', monospace;
  39. margin: 0px;
  40. color: var(--text-color);
  41. background-color: #ffffff;
  42. }
  43. a {
  44. text-decoration: none;
  45. }
  46. h1 {
  47. font-size: 18px;
  48. line-height: 24px;
  49. font-weight: 500;
  50. }
  51. h2 {
  52. padding: 0;
  53. margin: 16px 0;
  54. font-size: calc(var(--font-size) - 1px);
  55. line-height: var(--line-height);
  56. font-weight: 500;
  57. color: var(--color-blue);
  58. }
  59. h3 {
  60. margin: 0;
  61. font-weight: 500;
  62. font-size: calc(var(--font-size) - 1px);
  63. line-height: var(--line-height);
  64. color: var(--secondary-text-color);
  65. }
  66. h1 a {
  67. color: var(--color-blue);
  68. }
  69. #header {
  70. display: flex;
  71. height: var(--header-height);
  72. border-bottom: var(--border-style);
  73. align-items: center;
  74. }
  75. #header h1 {
  76. padding-left: var(--panel-padding);
  77. flex: 1;
  78. display: flex;
  79. align-items: center;
  80. color: var(--color-blue);
  81. }
  82. #header #version {
  83. border: 1px solid var(--color-blue);
  84. color: var(--color-blue);
  85. border-radius: 4px;
  86. line-height: 16px;
  87. padding: 0px 2px;
  88. margin-left: 6px;
  89. font-size: .9rem;
  90. }
  91. #panel {
  92. position: fixed;
  93. z-index: 100;
  94. left: 0px;
  95. width: var(--panel-width);
  96. height: 100%;
  97. overflow: auto;
  98. border-right: var(--border-style);
  99. display: flex;
  100. flex-direction: column;
  101. transition: 0s 0s height;
  102. }
  103. #panel #exitSearchButton {
  104. width: 48px;
  105. height: 48px;
  106. display: none;
  107. background-size: var(--icon-size);
  108. background-position: 50% 50%;
  109. background-repeat: no-repeat;
  110. background-image: url(../files/ic_close_black_24dp.svg);
  111. cursor: pointer;
  112. margin-right: 0px;
  113. }
  114. #panel.searchFocused #exitSearchButton {
  115. display: block;
  116. }
  117. #panel.searchFocused #language {
  118. display: none;
  119. }
  120. #panel.searchFocused #filter {
  121. background-image: none;
  122. padding-left: 0;
  123. }
  124. #panel #expandButton {
  125. width: 48px;
  126. height: 48px;
  127. margin-right: 4px;
  128. margin-left: 4px;
  129. display: none;
  130. cursor: pointer;
  131. background-size: var(--icon-size);
  132. background-position: 50% 50%;
  133. background-repeat: no-repeat;
  134. background-image: url(../files/ic_menu_black_24dp.svg);
  135. }
  136. #panel #sections {
  137. display: flex;
  138. justify-content: center;
  139. z-index: 1000;
  140. position: relative;
  141. height: 100%;
  142. align-items: center;
  143. font-weight: 500;
  144. }
  145. #panel #sections * {
  146. padding: 0 var(--panel-padding);
  147. height: 100%;
  148. position: relative;
  149. display: flex;
  150. justify-content: center;
  151. align-items: center;
  152. }
  153. #panel #sections .selected:after {
  154. content: "";
  155. position: absolute;
  156. left: 0;
  157. right: 0;
  158. bottom: -1px;
  159. border-bottom: 1px solid var(--text-color);
  160. }
  161. #panel #sections a {
  162. color: var(--secondary-text-color);
  163. }
  164. body.home #panel #sections {
  165. display: none;
  166. }
  167. #panel #inputWrapper {
  168. display: flex;
  169. align-items: center;
  170. height: var(--header-height);
  171. padding: 0 0 0 var(--panel-padding);
  172. position: relative;
  173. background: white;
  174. }
  175. #panel #inputWrapper:after {
  176. position: absolute;
  177. left: 0;
  178. right: 0;
  179. bottom: 0;
  180. border-bottom: var(--border-style);
  181. content: "";
  182. }
  183. #panel #filter {
  184. flex: 1;
  185. width: 100%;
  186. padding: 0 36px;
  187. font-size: 1rem;
  188. font-weight: 500;
  189. color: var(--text-color);
  190. outline: none;
  191. border: 0px;
  192. background-size: var(--icon-size);
  193. background-image: url(../files/ic_search_black_24dp.svg);
  194. background-position: 0 50%;
  195. background-repeat: no-repeat;
  196. font-family: 'Roboto Mono', monospace;
  197. }
  198. #panel #language {
  199. font-family: 'Roboto Mono', monospace;
  200. font-size: 1rem;
  201. line-height: 1rem;
  202. font-weight: 500;
  203. color: #444;
  204. border: 0px;
  205. background-image: url(ic_arrow_drop_down_black_24dp.svg);
  206. background-size: var(--icon-size);
  207. background-repeat: no-repeat;
  208. background-position: right center;
  209. background-color: white;
  210. padding: 2px 24px 4px 24px;
  211. -webkit-appearance: none;
  212. -moz-appearance: none;
  213. appearance: none;
  214. margin-right: 10px;
  215. }
  216. #panel #language:focus {
  217. outline: none;
  218. }
  219. #contentWrapper {
  220. flex: 1;
  221. overflow: hidden;
  222. display: flex;
  223. flex-direction: column;
  224. transform: translate3d(0,0,0);
  225. }
  226. #panel #content {
  227. flex: 1;
  228. overflow-y: auto;
  229. overflow-x: hidden;
  230. padding: 0 var(--panel-padding) var(--panel-padding) var(--panel-padding);
  231. }
  232. #panel #content ul {
  233. list-style-type: none;
  234. padding: 0px;
  235. margin: 0px 0 20px 0;
  236. }
  237. #panel #content ul li {
  238. margin: 1px 0;
  239. }
  240. #panel #content h2 {
  241. margin-top: 32px;
  242. border-top: var(--border-style);
  243. padding-top: 12px;
  244. }
  245. #panel #content h2:first-child {
  246. margin-top: 16px !important;
  247. border-top: none;
  248. padding-top: 0;
  249. }
  250. #panel #content a {
  251. position: relative;
  252. color: var(--text-color);
  253. }
  254. #panel #content a:hover,
  255. #panel #content a:hover .spacer,
  256. #panel #content .selected {
  257. color: var(--color-blue);
  258. }
  259. #panel #content .selected {
  260. text-decoration: underline;
  261. }
  262. #panel #content .hidden {
  263. display: none !important;
  264. }
  265. body.home #panel #content h2 {
  266. margin-bottom: 2px;
  267. padding-bottom: 0px;
  268. margin-top: 18px;
  269. border-top: none;
  270. padding-top: 6px;
  271. }
  272. .spacer {
  273. color: var(--secondary-text-color);
  274. margin-left: 2px;
  275. padding-right: 2px;
  276. }
  277. #viewer,
  278. iframe {
  279. position: absolute;
  280. border: 0px;
  281. left: 0;
  282. right: 0;
  283. width: 100%;
  284. height: 100%;
  285. overflow: auto;
  286. }
  287. #viewer {
  288. padding-left: var(--panel-width);
  289. }
  290. #button {
  291. position: fixed;
  292. bottom: 16px;
  293. right: 16px;
  294. padding: 12px;
  295. border-radius: 50%;
  296. margin-bottom: 0px;
  297. background-color: #FFF;
  298. opacity: .9;
  299. z-index: 999;
  300. box-shadow: 0 0 4px rgba(0,0,0,.15);
  301. }
  302. #button:hover {
  303. cursor: pointer;
  304. opacity: 1;
  305. }
  306. #button img {
  307. display: block;
  308. width: var(--icon-size);
  309. }
  310. #button.text {
  311. border-radius: 25px;
  312. padding-right: 20px;
  313. padding-left: 20px;
  314. color: var(--color-blue);
  315. opacity: 1;
  316. font-weight: 500;
  317. }
  318. #projects {
  319. display: grid;
  320. grid-template-columns: repeat(6, 1fr);
  321. line-height: 0;
  322. }
  323. #projects a {
  324. overflow: hidden;
  325. }
  326. #projects a img {
  327. width: 100%;
  328. transform: scale(1.0);
  329. transition: 0.15s transform;
  330. }
  331. #projects a:hover img {
  332. transform: scale(1.08);
  333. }
  334. @media all and ( min-width: 1500px ) {
  335. #projects {
  336. grid-template-columns: repeat(7, 1fr);
  337. }
  338. }
  339. @media all and ( min-width: 1700px ) {
  340. :root {
  341. --panel-width: 360px;
  342. --font-size: 18px;
  343. --line-height: 28px;
  344. --header-height: 56px;
  345. --icon-size: 24px;
  346. }
  347. #projects {
  348. grid-template-columns: repeat(8, 1fr);
  349. }
  350. }
  351. @media all and ( min-width: 1900px ) {
  352. #projects {
  353. grid-template-columns: repeat(9, 1fr);
  354. }
  355. }
  356. @media all and ( max-width: 1300px ) {
  357. #projects {
  358. grid-template-columns: repeat(6, 1fr);
  359. }
  360. }
  361. @media all and ( max-width: 1100px ) {
  362. #projects {
  363. grid-template-columns: repeat(5, 1fr);
  364. }
  365. }
  366. @media all and ( max-width: 900px ) {
  367. #projects {
  368. grid-template-columns: repeat(4, 1fr);
  369. }
  370. }
  371. @media all and ( max-width: 700px ) {
  372. #projects {
  373. grid-template-columns: repeat(3, 1fr);
  374. }
  375. }
  376. /* mobile */
  377. @media all and ( max-width: 640px ) {
  378. :root {
  379. --header-height: 56px;
  380. --icon-size: 24px;
  381. }
  382. #projects {
  383. grid-template-columns: repeat(2, 1fr);
  384. }
  385. #panel #expandButton {
  386. display: block;
  387. }
  388. #panel {
  389. position: absolute;
  390. left: 0;
  391. top: 0;
  392. width: 100%;
  393. right: 0;
  394. z-index: 1000;
  395. overflow-x: hidden;
  396. transition: 0s 0s height;
  397. border: none;
  398. height: var(--header-height);
  399. transition: 0s 0.2s height;
  400. }
  401. #panel.open {
  402. height: 100%;
  403. transition: 0s 0s height;
  404. }
  405. #panelScrim {
  406. pointer-events: none;
  407. background-color: rgba(0,0,0,0);
  408. position: absolute;
  409. left: 0;
  410. right: 0;
  411. top: 0;
  412. bottom: 0;
  413. z-index: 1000;
  414. pointer-events: none;
  415. transition: .2s background-color;
  416. }
  417. #panel.open #panelScrim {
  418. pointer-events: auto;
  419. background-color: rgba(0,0,0,0.4);
  420. }
  421. #contentWrapper {
  422. position: absolute;
  423. right: 0;
  424. top: 0;
  425. bottom: 0;
  426. background: white;
  427. box-shadow: 0 0 8px rgba(0,0,0,.1);
  428. width: calc(100vw - 60px);
  429. max-width: 360px;
  430. z-index: 10000;
  431. transition: .25s transform;
  432. overflow-x: hidden;
  433. margin-right: -380px;
  434. line-height: 2rem;
  435. }
  436. #panel.open #contentWrapper {
  437. transform: translate3d(-380px, 0 ,0);
  438. }
  439. #viewer,
  440. iframe {
  441. left: 0;
  442. top: var(--header-height);
  443. width: 100%;
  444. height: calc(100% - var(--header-height));
  445. }
  446. #viewer {
  447. padding-left: 0;
  448. }
  449. }