style.css 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. :root {
  2. --color-brand--1: #ffb545;
  3. --color-brand--2: #00c46a;
  4. --color-dark--1: #2d3439;
  5. --color-dark--2: #42484d;
  6. --color-light--1: #aaa;
  7. --color-light--2: #ececec;
  8. --color-light--3: rgb(214, 222, 224);
  9. }
  10. * {
  11. margin: 0;
  12. padding: 0;
  13. box-sizing: inherit;
  14. }
  15. html {
  16. font-size: 62.5%;
  17. box-sizing: border-box;
  18. }
  19. body {
  20. font-family: 'Manrope', sans-serif;
  21. color: var(--color-light--2);
  22. font-weight: 400;
  23. line-height: 1.6;
  24. height: 100vh;
  25. overscroll-behavior-y: none;
  26. background-color: #fff;
  27. padding: 2.5rem;
  28. display: flex;
  29. }
  30. /* GENERAL */
  31. a:link,
  32. a:visited {
  33. color: var(--color-brand--1);
  34. }
  35. /* SIDEBAR */
  36. .sidebar {
  37. flex-basis: 50rem;
  38. background-color: var(--color-dark--1);
  39. padding: 3rem 5rem 4rem 5rem;
  40. display: flex;
  41. flex-direction: column;
  42. }
  43. .logo {
  44. height: 5.2rem;
  45. align-self: center;
  46. margin-bottom: 4rem;
  47. }
  48. .workouts {
  49. list-style: none;
  50. height: 77vh;
  51. overflow-y: scroll;
  52. overflow-x: hidden;
  53. }
  54. .workouts::-webkit-scrollbar {
  55. width: 0;
  56. }
  57. .workout {
  58. background-color: var(--color-dark--2);
  59. border-radius: 5px;
  60. padding: 1.5rem 2.25rem;
  61. margin-bottom: 1.75rem;
  62. cursor: pointer;
  63. display: grid;
  64. grid-template-columns: 1fr 1fr 1fr 1fr;
  65. gap: 0.75rem 1.5rem;
  66. }
  67. .workout--running {
  68. border-left: 5px solid var(--color-brand--2);
  69. }
  70. .workout--cycling {
  71. border-left: 5px solid var(--color-brand--1);
  72. }
  73. .workout__title {
  74. font-size: 1.7rem;
  75. font-weight: 600;
  76. grid-column: 1 / -1;
  77. }
  78. .workout__details {
  79. display: flex;
  80. align-items: baseline;
  81. }
  82. .workout__icon {
  83. font-size: 1.8rem;
  84. margin-right: 0.2rem;
  85. height: 0.28rem;
  86. }
  87. .workout__value {
  88. font-size: 1.5rem;
  89. margin-right: 0.5rem;
  90. }
  91. .workout__unit {
  92. font-size: 1.1rem;
  93. color: var(--color-light--1);
  94. text-transform: uppercase;
  95. font-weight: 800;
  96. }
  97. .form {
  98. background-color: var(--color-dark--2);
  99. border-radius: 5px;
  100. padding: 1.5rem 2.75rem;
  101. margin-bottom: 1.75rem;
  102. display: grid;
  103. grid-template-columns: 1fr 1fr;
  104. gap: 0.5rem 2.5rem;
  105. /* Match height and activity boxes */
  106. height: 9.25rem;
  107. transition: all 0.5s, transform 1ms;
  108. }
  109. .form.hidden {
  110. transform: translateY(-30rem);
  111. height: 0;
  112. padding: 0 2.25rem;
  113. margin-bottom: 0;
  114. opacity: 0;
  115. }
  116. .form__row {
  117. display: flex;
  118. align-items: center;
  119. }
  120. .form__row--hidden {
  121. display: none;
  122. }
  123. .form__label {
  124. flex: 0 0 50%;
  125. font-size: 1.5rem;
  126. font-weight: 600;
  127. }
  128. .form__input {
  129. width: 100%;
  130. padding: 0.3rem 1.1rem;
  131. font-family: inherit;
  132. font-size: 1.4rem;
  133. border: none;
  134. border-radius: 3px;
  135. background-color: var(--color-light--3);
  136. transition: all 0.2s;
  137. }
  138. .form__input:focus {
  139. outline: none;
  140. background-color: #fff;
  141. }
  142. .form__btn {
  143. display: none;
  144. }
  145. .copyright {
  146. margin-top: auto;
  147. font-size: 1.3rem;
  148. text-align: center;
  149. color: var(--color-light--1);
  150. }
  151. .twitter-link:link,
  152. .twitter-link:visited {
  153. color: var(--color-light--1);
  154. transition: all 0.2s;
  155. }
  156. .twitter-link:hover,
  157. .twitter-link:active {
  158. color: var(--color-light--2);
  159. }
  160. /* Buttonds */
  161. .btn--hidden {
  162. display: none;
  163. }
  164. /* MAP */
  165. #map {
  166. flex: 1;
  167. height: 100%;
  168. background-color: var(--color-light--1);
  169. }
  170. /* Popup width is defined in JS using options */
  171. .leaflet-popup .leaflet-popup-content-wrapper {
  172. background-color: var(--color-dark--1);
  173. color: var(--color-light--2);
  174. border-radius: 5px;
  175. padding-right: 0.6rem;
  176. }
  177. .leaflet-popup .leaflet-popup-content {
  178. font-size: 1.5rem;
  179. }
  180. .leaflet-popup .leaflet-popup-tip {
  181. background-color: var(--color-dark--1);
  182. }
  183. .running-popup .leaflet-popup-content-wrapper {
  184. border-left: 5px solid var(--color-brand--2);
  185. }
  186. .cycling-popup .leaflet-popup-content-wrapper {
  187. border-left: 5px solid var(--color-brand--1);
  188. }