main.css 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516
  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. font-weight: 500;
  321. }
  322. #projects {
  323. display: grid;
  324. grid-template-columns: repeat(6, 1fr);
  325. line-height: 0;
  326. }
  327. #projects a {
  328. overflow: hidden;
  329. }
  330. #projects a img {
  331. width: 100%;
  332. transform: scale(1.0);
  333. transition: 0.15s transform;
  334. }
  335. #projects a:hover img {
  336. transform: scale(1.08);
  337. }
  338. @media all and ( min-width: 1500px ) {
  339. #projects {
  340. grid-template-columns: repeat(7, 1fr);
  341. }
  342. }
  343. @media all and ( min-width: 1700px ) {
  344. :root {
  345. --panel-width: 360px;
  346. --font-size: 16px;
  347. --line-height: 30px;
  348. --header-height: 56px;
  349. }
  350. #projects {
  351. grid-template-columns: repeat(8, 1fr);
  352. }
  353. }
  354. @media all and ( min-width: 1900px ) {
  355. #projects {
  356. grid-template-columns: repeat(9, 1fr);
  357. }
  358. }
  359. @media all and ( max-width: 1300px ) {
  360. #projects {
  361. grid-template-columns: repeat(6, 1fr);
  362. }
  363. }
  364. @media all and ( max-width: 1100px ) {
  365. #projects {
  366. grid-template-columns: repeat(5, 1fr);
  367. }
  368. }
  369. @media all and ( max-width: 900px ) {
  370. #projects {
  371. grid-template-columns: repeat(4, 1fr);
  372. }
  373. }
  374. @media all and ( max-width: 700px ) {
  375. #projects {
  376. grid-template-columns: repeat(3, 1fr);
  377. }
  378. }
  379. /* mobile */
  380. @media all and ( max-width: 640px ) {
  381. :root {
  382. --header-height: 56px;
  383. --icon-size: 24px;
  384. }
  385. #projects {
  386. grid-template-columns: repeat(2, 1fr);
  387. }
  388. #panel #expandButton {
  389. display: block;
  390. }
  391. #panel {
  392. position: absolute;
  393. left: 0;
  394. top: 0;
  395. width: 100%;
  396. right: 0;
  397. z-index: 1000;
  398. overflow-x: hidden;
  399. transition: 0s 0s height;
  400. border: none;
  401. height: var(--header-height);
  402. transition: 0s 0.2s height;
  403. }
  404. #panel.open {
  405. height: 100%;
  406. transition: 0s 0s height;
  407. }
  408. #panelScrim {
  409. pointer-events: none;
  410. background-color: rgba(0,0,0,0);
  411. position: absolute;
  412. left: 0;
  413. right: 0;
  414. top: 0;
  415. bottom: 0;
  416. z-index: 1000;
  417. pointer-events: none;
  418. transition: .2s background-color;
  419. }
  420. #panel.open #panelScrim {
  421. pointer-events: auto;
  422. background-color: rgba(0,0,0,0.4);
  423. }
  424. #contentWrapper {
  425. position: absolute;
  426. right: 0;
  427. top: 0;
  428. bottom: 0;
  429. background: white;
  430. box-shadow: 0 0 8px rgba(0,0,0,.1);
  431. width: calc(100vw - 60px);
  432. max-width: 360px;
  433. z-index: 10000;
  434. transition: .25s transform;
  435. overflow-x: hidden;
  436. margin-right: -380px;
  437. line-height: 2rem;
  438. }
  439. #panel.open #contentWrapper {
  440. transform: translate3d(-380px, 0 ,0);
  441. }
  442. #viewer,
  443. iframe {
  444. left: 0;
  445. top: var(--header-height);
  446. width: 100%;
  447. height: calc(100% - var(--header-height));
  448. }
  449. #viewer {
  450. padding-left: 0;
  451. }
  452. }