main.css 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  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-image: url(ic_arrow_drop_down_black_24dp.svg);
  230. background-size: var(--icon-size);
  231. background-repeat: no-repeat;
  232. background-position: right center;
  233. background-color: var(--background-color);
  234. padding: 2px 24px 4px 24px;
  235. -webkit-appearance: none;
  236. -moz-appearance: none;
  237. appearance: none;
  238. margin-right: 10px;
  239. }
  240. #panel #language:focus {
  241. outline: none;
  242. }
  243. #contentWrapper {
  244. flex: 1;
  245. overflow: hidden;
  246. display: flex;
  247. flex-direction: column;
  248. transform: translate3d(0,0,0);
  249. }
  250. #panel #content {
  251. flex: 1;
  252. overflow-y: auto;
  253. overflow-x: hidden;
  254. -webkit-overflow-scrolling: touch;
  255. padding: 0 var(--panel-padding) var(--panel-padding) var(--panel-padding);
  256. }
  257. #panel #content ul {
  258. list-style-type: none;
  259. padding: 0px;
  260. margin: 0px 0 20px 0;
  261. }
  262. #panel #content ul li {
  263. margin: 1px 0;
  264. }
  265. #panel #content h2 {
  266. margin-top: 32px;
  267. border-top: var(--border-style);
  268. padding-top: 12px;
  269. }
  270. #panel #content h2:first-child {
  271. margin-top: 16px !important;
  272. border-top: none;
  273. padding-top: 0;
  274. }
  275. #panel #content a {
  276. position: relative;
  277. color: var(--text-color);
  278. }
  279. #panel #content a:hover,
  280. #panel #content a:hover .spacer,
  281. #panel #content .selected {
  282. color: var(--color-blue);
  283. }
  284. #panel #content .selected {
  285. text-decoration: underline;
  286. }
  287. #panel #content .hidden {
  288. display: none !important;
  289. }
  290. body.home #panel #content h2 {
  291. margin-bottom: 2px;
  292. padding-bottom: 0px;
  293. margin-top: 18px;
  294. border-top: none;
  295. padding-top: 6px;
  296. }
  297. .spacer {
  298. color: var(--secondary-text-color);
  299. margin-left: 2px;
  300. padding-right: 2px;
  301. }
  302. #viewer,
  303. iframe {
  304. position: absolute;
  305. border: 0px;
  306. left: 0;
  307. right: 0;
  308. width: 100%;
  309. height: 100%;
  310. overflow: auto;
  311. }
  312. #viewer {
  313. padding-left: var(--panel-width);
  314. }
  315. #button {
  316. position: fixed;
  317. bottom: 16px;
  318. right: 16px;
  319. padding: 12px;
  320. border-radius: 50%;
  321. margin-bottom: 0px;
  322. background-color: #FFF;
  323. opacity: .9;
  324. z-index: 999;
  325. box-shadow: 0 0 4px rgba(0,0,0,.15);
  326. }
  327. #button:hover {
  328. cursor: pointer;
  329. opacity: 1;
  330. }
  331. #button img {
  332. display: block;
  333. width: var(--icon-size);
  334. }
  335. #button.text {
  336. border-radius: 25px;
  337. padding-right: 20px;
  338. padding-left: 20px;
  339. color: var(--color-blue);
  340. opacity: 1;
  341. font-weight: 500;
  342. }
  343. #projects {
  344. display: grid;
  345. grid-template-columns: repeat(6, 1fr);
  346. line-height: 0;
  347. }
  348. #projects a {
  349. overflow: hidden;
  350. }
  351. #projects a img {
  352. width: 100%;
  353. transform: scale(1.0);
  354. transition: 0.15s transform;
  355. }
  356. #projects a:hover img {
  357. transform: scale(1.08);
  358. }
  359. @media all and ( min-width: 1500px ) {
  360. #projects {
  361. grid-template-columns: repeat(7, 1fr);
  362. }
  363. }
  364. @media all and ( min-width: 1700px ) {
  365. :root {
  366. --panel-width: 360px;
  367. --font-size: 18px;
  368. --line-height: 28px;
  369. --header-height: 56px;
  370. --icon-size: 24px;
  371. }
  372. #projects {
  373. grid-template-columns: repeat(8, 1fr);
  374. }
  375. }
  376. @media all and ( min-width: 1900px ) {
  377. #projects {
  378. grid-template-columns: repeat(9, 1fr);
  379. }
  380. }
  381. @media all and ( max-width: 1300px ) {
  382. #projects {
  383. grid-template-columns: repeat(6, 1fr);
  384. }
  385. }
  386. @media all and ( max-width: 1100px ) {
  387. #projects {
  388. grid-template-columns: repeat(5, 1fr);
  389. }
  390. }
  391. @media all and ( max-width: 900px ) {
  392. #projects {
  393. grid-template-columns: repeat(4, 1fr);
  394. }
  395. }
  396. @media all and ( max-width: 700px ) {
  397. #projects {
  398. grid-template-columns: repeat(3, 1fr);
  399. }
  400. }
  401. /* mobile */
  402. @media all and ( max-width: 640px ) {
  403. :root {
  404. --header-height: 56px;
  405. --icon-size: 24px;
  406. }
  407. #projects {
  408. grid-template-columns: repeat(2, 1fr);
  409. }
  410. #panel #expandButton {
  411. display: block;
  412. }
  413. #panel {
  414. position: absolute;
  415. left: 0;
  416. top: 0;
  417. width: 100%;
  418. right: 0;
  419. z-index: 1000;
  420. overflow-x: hidden;
  421. transition: 0s 0s height;
  422. border: none;
  423. height: var(--header-height);
  424. transition: 0s 0.2s height;
  425. }
  426. #panel.open {
  427. height: 100%;
  428. transition: 0s 0s height;
  429. }
  430. #panelScrim {
  431. pointer-events: none;
  432. background-color: rgba(0,0,0,0);
  433. position: absolute;
  434. left: 0;
  435. right: 0;
  436. top: 0;
  437. bottom: 0;
  438. z-index: 1000;
  439. pointer-events: none;
  440. transition: .2s background-color;
  441. }
  442. #panel.open #panelScrim {
  443. pointer-events: auto;
  444. background-color: rgba(0,0,0,0.4);
  445. }
  446. #contentWrapper {
  447. position: absolute;
  448. right: 0;
  449. top: 0;
  450. bottom: 0;
  451. background: var(--background-color);
  452. box-shadow: 0 0 8px rgba(0,0,0,.1);
  453. width: calc(100vw - 60px);
  454. max-width: 360px;
  455. z-index: 10000;
  456. transition: .25s transform;
  457. overflow-x: hidden;
  458. margin-right: -380px;
  459. line-height: 2rem;
  460. }
  461. #panel.open #contentWrapper {
  462. transform: translate3d(-380px, 0 ,0);
  463. }
  464. #viewer,
  465. iframe {
  466. left: 0;
  467. top: var(--header-height);
  468. width: 100%;
  469. height: calc(100% - var(--header-height));
  470. }
  471. #viewer {
  472. padding-left: 0;
  473. }
  474. }