main.css 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  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. overflow: hidden;
  41. color: var(--text-color);
  42. background-color: #ffffff;
  43. }
  44. a {
  45. text-decoration: none;
  46. }
  47. h1 {
  48. font-size: 18px;
  49. line-height: 24px;
  50. font-weight: 500;
  51. }
  52. h2 {
  53. padding: 0;
  54. margin: 16px 0;
  55. font-size: calc(var(--font-size) - 1px);
  56. line-height: var(--line-height);
  57. font-weight: 500;
  58. color: var(--color-blue);
  59. }
  60. h3 {
  61. margin: 0;
  62. font-weight: 500;
  63. font-size: calc(var(--font-size) - 1px);
  64. line-height: var(--line-height);
  65. color: var(--secondary-text-color);
  66. }
  67. h1 a {
  68. color: var(--color-blue);
  69. }
  70. #header {
  71. display: flex;
  72. height: var(--header-height);
  73. border-bottom: var(--border-style);
  74. align-items: center;
  75. }
  76. #header h1 {
  77. padding-left: var(--panel-padding);
  78. flex: 1;
  79. display: flex;
  80. align-items: center;
  81. color: var(--color-blue);
  82. }
  83. #header #version {
  84. border: 1px solid var(--color-blue);
  85. color: var(--color-blue);
  86. border-radius: 4px;
  87. line-height: 16px;
  88. padding: 0px 2px;
  89. margin-left: 6px;
  90. font-size: .9rem;
  91. }
  92. #panel {
  93. position: fixed;
  94. z-index: 100;
  95. left: 0px;
  96. width: var(--panel-width);
  97. height: 100%;
  98. overflow: auto;
  99. border-right: var(--border-style);
  100. display: flex;
  101. flex-direction: column;
  102. transition: 0s 0s height;
  103. }
  104. #panel #exitSearchButton {
  105. width: 48px;
  106. height: 48px;
  107. display: none;
  108. background-size: var(--icon-size);
  109. background-position: 50% 50%;
  110. background-repeat: no-repeat;
  111. background-image: url(../files/ic_close_black_24dp.svg);
  112. cursor: pointer;
  113. margin-right: 0px;
  114. }
  115. #panel.searchFocused #exitSearchButton {
  116. display: block;
  117. }
  118. #panel.searchFocused #language {
  119. display: none;
  120. }
  121. #panel.searchFocused #filter {
  122. background-image: none;
  123. padding-left: 0;
  124. }
  125. #panel #expandButton {
  126. width: 48px;
  127. height: 48px;
  128. margin-right: 4px;
  129. margin-left: 4px;
  130. display: none;
  131. cursor: pointer;
  132. background-size: var(--icon-size);
  133. background-position: 50% 50%;
  134. background-repeat: no-repeat;
  135. background-image: url(../files/ic_menu_black_24dp.svg);
  136. }
  137. #panel #sections {
  138. display: flex;
  139. justify-content: center;
  140. z-index: 1000;
  141. position: relative;
  142. height: 100%;
  143. align-items: center;
  144. font-weight: 500;
  145. }
  146. #panel #sections * {
  147. padding: 0 var(--panel-padding);
  148. height: 100%;
  149. position: relative;
  150. display: flex;
  151. justify-content: center;
  152. align-items: center;
  153. }
  154. #panel #sections .selected:after {
  155. content: "";
  156. position: absolute;
  157. left: 0;
  158. right: 0;
  159. bottom: -1px;
  160. border-bottom: 1px solid var(--text-color);
  161. }
  162. #panel #sections a {
  163. color: var(--secondary-text-color);
  164. }
  165. body.home #panel #sections {
  166. display: none;
  167. }
  168. #panel #inputWrapper {
  169. display: flex;
  170. align-items: center;
  171. height: var(--header-height);
  172. padding: 0 0 0 var(--panel-padding);
  173. position: relative;
  174. background: white;
  175. }
  176. #panel #inputWrapper:after {
  177. position: absolute;
  178. left: 0;
  179. right: 0;
  180. bottom: 0;
  181. border-bottom: var(--border-style);
  182. content: "";
  183. }
  184. #panel #filter {
  185. flex: 1;
  186. width: 100%;
  187. padding: 0 36px;
  188. font-size: 1rem;
  189. font-weight: 500;
  190. color: var(--text-color);
  191. outline: none;
  192. border: 0px;
  193. background-size: var(--icon-size);
  194. background-image: url(../files/ic_search_black_24dp.svg);
  195. background-position: 0 50%;
  196. background-repeat: no-repeat;
  197. font-family: 'Roboto Mono', monospace;
  198. }
  199. #panel #language {
  200. font-family: 'Roboto Mono', monospace;
  201. font-size: 1rem;
  202. line-height: 1rem;
  203. font-weight: 500;
  204. color: #444;
  205. border: 0px;
  206. background-image: url(ic_arrow_drop_down_black_24dp.svg);
  207. background-size: var(--icon-size);
  208. background-repeat: no-repeat;
  209. background-position: right center;
  210. background-color: white;
  211. padding: 2px 24px 4px 24px;
  212. -webkit-appearance: none;
  213. -moz-appearance: none;
  214. appearance: none;
  215. margin-right: 10px;
  216. }
  217. #panel #language:focus {
  218. outline: none;
  219. }
  220. #contentWrapper {
  221. flex: 1;
  222. overflow: hidden;
  223. display: flex;
  224. flex-direction: column;
  225. transform: translate3d(0,0,0);
  226. }
  227. #panel #content {
  228. flex: 1;
  229. overflow-y: scroll;
  230. overflow-x: hidden;
  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. 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. padding-right: 20px;
  312. padding-left: 20px;
  313. color: var(--color-blue);
  314. opacity: 1;
  315. font-weight: 500;
  316. }
  317. #projects {
  318. display: grid;
  319. grid-template-columns: repeat(6, 1fr);
  320. line-height: 0;
  321. }
  322. #projects a {
  323. overflow: hidden;
  324. }
  325. #projects a img {
  326. width: 100%;
  327. transform: scale(1.0);
  328. transition: 0.15s transform;
  329. }
  330. #projects a:hover img {
  331. transform: scale(1.08);
  332. }
  333. @media all and ( min-width: 1500px ) {
  334. #projects {
  335. grid-template-columns: repeat(7, 1fr);
  336. }
  337. }
  338. @media all and ( min-width: 1700px ) {
  339. :root {
  340. --panel-width: 360px;
  341. --font-size: 18px;
  342. --line-height: 28px;
  343. --header-height: 56px;
  344. --icon-size: 24px;
  345. }
  346. #projects {
  347. grid-template-columns: repeat(8, 1fr);
  348. }
  349. }
  350. @media all and ( min-width: 1900px ) {
  351. #projects {
  352. grid-template-columns: repeat(9, 1fr);
  353. }
  354. }
  355. @media all and ( max-width: 1300px ) {
  356. #projects {
  357. grid-template-columns: repeat(6, 1fr);
  358. }
  359. }
  360. @media all and ( max-width: 1100px ) {
  361. #projects {
  362. grid-template-columns: repeat(5, 1fr);
  363. }
  364. }
  365. @media all and ( max-width: 900px ) {
  366. #projects {
  367. grid-template-columns: repeat(4, 1fr);
  368. }
  369. }
  370. @media all and ( max-width: 700px ) {
  371. #projects {
  372. grid-template-columns: repeat(3, 1fr);
  373. }
  374. }
  375. /* mobile */
  376. @media all and ( max-width: 640px ) {
  377. :root {
  378. --header-height: 56px;
  379. --icon-size: 24px;
  380. }
  381. #projects {
  382. grid-template-columns: repeat(2, 1fr);
  383. }
  384. #panel #expandButton {
  385. display: block;
  386. }
  387. #panel {
  388. position: absolute;
  389. left: 0;
  390. top: 0;
  391. width: 100%;
  392. right: 0;
  393. z-index: 1000;
  394. overflow-x: hidden;
  395. transition: 0s 0s height;
  396. border: none;
  397. height: var(--header-height);
  398. transition: 0s 0.2s height;
  399. }
  400. #panel.open {
  401. height: 100%;
  402. transition: 0s 0s height;
  403. }
  404. #panelScrim {
  405. pointer-events: none;
  406. background-color: rgba(0,0,0,0);
  407. position: absolute;
  408. left: 0;
  409. right: 0;
  410. top: 0;
  411. bottom: 0;
  412. z-index: 1000;
  413. pointer-events: none;
  414. transition: .2s background-color;
  415. }
  416. #panel.open #panelScrim {
  417. pointer-events: auto;
  418. background-color: rgba(0,0,0,0.4);
  419. }
  420. #contentWrapper {
  421. position: absolute;
  422. right: 0;
  423. top: 0;
  424. bottom: 0;
  425. background: white;
  426. box-shadow: 0 0 8px rgba(0,0,0,.1);
  427. width: calc(100vw - 60px);
  428. max-width: 360px;
  429. z-index: 10000;
  430. transition: .25s transform;
  431. overflow-x: hidden;
  432. margin-right: -380px;
  433. line-height: 2rem;
  434. }
  435. #panel.open #contentWrapper {
  436. transform: translate3d(-380px, 0 ,0);
  437. }
  438. #viewer,
  439. iframe {
  440. left: 0;
  441. top: var(--header-height);
  442. width: 100%;
  443. height: calc(100% - var(--header-height));
  444. }
  445. #viewer {
  446. padding-left: 0;
  447. }
  448. }