main.css 9.0 KB

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