main.css 8.8 KB

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