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. 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. color: var(--text-color);
  252. }
  253. #panel #content a:hover,
  254. #panel #content a:hover .spacer,
  255. #panel #content .selected {
  256. color: var(--color-blue);
  257. }
  258. #panel #content .selected {
  259. text-decoration: underline;
  260. }
  261. #panel #content .hidden {
  262. display: none !important;
  263. }
  264. body.home #panel #content h2 {
  265. margin-bottom: 2px;
  266. padding-bottom: 0px;
  267. margin-top: 18px;
  268. border-top: none;
  269. padding-top: 6px;
  270. }
  271. .spacer {
  272. color: var(--secondary-text-color);
  273. margin-left: 2px;
  274. padding-right: 2px;
  275. }
  276. #viewer,
  277. iframe {
  278. position: absolute;
  279. border: 0px;
  280. left: 0;
  281. right: 0;
  282. width: 100%;
  283. height: 100%;
  284. overflow: auto;
  285. }
  286. #viewer {
  287. padding-left: var(--panel-width);
  288. }
  289. #button {
  290. position: fixed;
  291. bottom: 16px;
  292. right: 16px;
  293. padding: 12px;
  294. border-radius: 50%;
  295. margin-bottom: 0px;
  296. background-color: #FFF;
  297. opacity: .9;
  298. z-index: 999;
  299. box-shadow: 0 0 4px rgba(0,0,0,.15);
  300. }
  301. #button:hover {
  302. cursor: pointer;
  303. opacity: 1;
  304. }
  305. #button img {
  306. display: block;
  307. width: var(--icon-size);
  308. }
  309. #button.text {
  310. border-radius: 25px;
  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. }