main.css 9.7 KB

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