styles.scss 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. // /!\ Large Desktop first /!\
  2. // larger desktop variables (default)
  3. $animation_style: 0.3s ease-out;
  4. $global_margins: 1.5vh 1vw 2vh 1vw;
  5. $buttons_border_width: 1.2px;
  6. $buttons_padding: 10px 12px;
  7. $buttons_padding_collapsed: 10px 10px;
  8. $buttons_inner_margin: 0px 5px 0px 10px;
  9. $buttons_margin: 14px;
  10. $main_title_margin: 0px 0px 17px 5px;
  11. $search_box_height: 2rem;
  12. $search_icon_offset: -45px;
  13. $main_color: rgb(0, 0, 0);
  14. $bg_color: rgba(255, 255, 255);
  15. $grey_inactive: rgb(110, 110, 110);
  16. $grey_hover: rgb(50, 50, 50);
  17. $UI_main_font_size: 1rem;
  18. $large_picto_size: 2rem;
  19. $medium_picto_size: 1.3rem;
  20. // smaller desktop variables
  21. $buttons_padding--sm: 8px 10px 8px 7px;
  22. $buttons_padding_collapsed--sm: 8px 2px;
  23. $buttons_inner_margin--sm: 0px 3px 0px 5px;
  24. $main_title_margin--sm: 0px 0px 8px 5px;
  25. $search_box_height--sm: 1.5rem;
  26. $search_icon_offset--sm: -23px;
  27. $UI_main_font_size--sm: 0.7rem;
  28. $large_picto_size--sm: 1.2rem;
  29. $medium_picto_size--sm: 1rem;
  30. @font-face {
  31. font-family: 'Public';
  32. font-style: normal;
  33. font-weight: 400;
  34. src: url('assets/fonts/PublicSans-Regular.ttf') format('TrueType');
  35. }
  36. @font-face {
  37. font-family: 'Public';
  38. font-style: normal;
  39. font-weight: 300;
  40. src: url('assets/fonts/PublicSans-Light.ttf') format('TrueType');
  41. }
  42. @font-face {
  43. font-family: 'Ortica';
  44. font-style: bold;
  45. font-weight: 300;
  46. src: url('assets/fonts/Ortica-Bold.woff2') format('woff2');
  47. }
  48. * {
  49. margin: 0;
  50. padding: 0;
  51. }
  52. button {
  53. all: initial;
  54. }
  55. body {
  56. font-family: 'Public', sans-serif;
  57. font-weight: 400;
  58. color: $main_color;
  59. overflow: hidden;
  60. }
  61. #content {
  62. padding: $global_margins;
  63. position: fixed;
  64. top: 0;
  65. left: 0;
  66. width: 100vw;
  67. height: 100vh;
  68. display: flex;
  69. justify-content: center;
  70. align-items: center;
  71. z-index: 1;
  72. svg {
  73. position: absolute;
  74. height: 50%;
  75. path {
  76. cursor: pointer;
  77. }
  78. }
  79. svg#fill {
  80. fill: $bg_color;
  81. /* mix blend mode est dépendant du stacking context */
  82. mix-blend-mode: overlay;
  83. opacity: 0.4;
  84. }
  85. svg#stroke {
  86. position: absolute;
  87. fill: none;
  88. stroke: $main_color;
  89. stroke-width: 1px;
  90. }
  91. }
  92. #buttons_container {
  93. position: fixed;
  94. top: 0;
  95. left: 0;
  96. z-index: 1;
  97. display: flex;
  98. align-items: center;
  99. margin: $global_margins;
  100. font-size: $UI_main_font_size;
  101. mix-blend-mode: multiply;
  102. flex-wrap: wrap;
  103. .mode {
  104. display: flex;
  105. align-items: center;
  106. justify-content: space-around;
  107. margin: 0;
  108. margin-right: $buttons_margin;
  109. padding: $buttons_padding;
  110. cursor: pointer;
  111. color: rgba(0, 0, 0, 0.5);
  112. transition: border 0.1s ease-out, color 0.1s ease-out, padding $animation_style;
  113. font-weight: 300;
  114. svg {
  115. height: $large_picto_size;
  116. .thick {
  117. transition: stroke-width $animation_style, fill $animation_style, stroke $animation_style;
  118. stroke-width: 0.8;
  119. stroke: $grey_inactive;
  120. }
  121. .thin {
  122. transition: stroke-width $animation_style, fill $animation_style, stroke $animation_style;
  123. stroke-width: 0.5;
  124. stroke: $grey_inactive;
  125. }
  126. .circle-fill {
  127. fill: $grey_inactive;
  128. }
  129. }
  130. .mode_container {
  131. overflow: hidden;
  132. width: auto;
  133. transition: max-width 0.4s ease-out, margin-left 0.4s ease-out, margin-right 0.4s ease-out;
  134. max-width: 0px;
  135. margin: $buttons_inner_margin;
  136. max-width: 200px;
  137. p {
  138. white-space: nowrap;
  139. height: fit-content;
  140. margin-bottom: 1.5px;
  141. }
  142. }
  143. }
  144. .mode.active {
  145. padding: $buttons_padding !important;
  146. font-weight: 400;
  147. color: $main_color;
  148. svg .thick {
  149. stroke-width: 1.2;
  150. stroke: $main_color;
  151. }
  152. svg .thin {
  153. stroke-width: 0.6;
  154. stroke: $main_color;
  155. }
  156. svg .circle-fill {
  157. fill: $main_color;
  158. }
  159. .mode_container {
  160. max-width: 200px !important;
  161. margin: $buttons_inner_margin !important;
  162. }
  163. }
  164. .mode:hover {
  165. padding: $buttons_padding !important;
  166. color: $grey_hover;
  167. svg .thick, svg .thin {
  168. stroke: $grey_hover;
  169. }
  170. svg .circle-fill {
  171. fill: $grey_hover;
  172. }
  173. .mode_container {
  174. max-width: 200px !important;
  175. margin: $buttons_inner_margin !important;
  176. }
  177. }
  178. .mode.collapsed {
  179. padding: $buttons_padding_collapsed;
  180. .mode_container {
  181. max-width: 0px;
  182. margin-left: 0px;
  183. margin-right: 0px;
  184. }
  185. }
  186. .mode:last-of-type {
  187. margin-right: 0;
  188. }
  189. }
  190. #global_nav {
  191. position: fixed;
  192. bottom: 0;
  193. left: 0;
  194. margin: $global_margins;
  195. z-index: 1;
  196. font-size: $UI_main_font_size;
  197. h1 {
  198. font-family: 'Ortica';
  199. font-size: 1.5em;
  200. margin: $main_title_margin;
  201. span {
  202. font-size: 1.9em;
  203. }
  204. }
  205. #menu {
  206. display: flex;
  207. align-items: center;
  208. #search {
  209. display: flex;
  210. align-items: center;
  211. input[type="search"] {
  212. height: $search_box_height;
  213. width: 10vw;
  214. padding-left: 13px;
  215. padding-right: 30px;
  216. padding-bottom: 1px;
  217. font-family: 'Public';
  218. font-weight: 300;
  219. border-radius: 20px;
  220. border: solid $grey_inactive $buttons_border_width;
  221. color: $grey_inactive;
  222. background-color: $bg_color;
  223. transition: color $animation_style;
  224. }
  225. input[type="search"]:hover {
  226. color: $grey_hover;
  227. }
  228. input[type="search"]:active {
  229. color: $main_color;
  230. }
  231. button {
  232. background: none;
  233. border: none;
  234. cursor: pointer;
  235. svg {
  236. margin-top: 5px;
  237. margin-left: $search_icon_offset;
  238. height: $medium_picto_size;
  239. fill: $grey_inactive;
  240. transition: fill $animation_style;
  241. }
  242. svg:hover {
  243. fill: $grey_hover;
  244. }
  245. }
  246. }
  247. .menu_item {
  248. font-weight: 300;
  249. color: $grey_inactive;
  250. display: flex;
  251. align-items: center;
  252. cursor: pointer;
  253. margin: 0 10px;
  254. padding-bottom: 2px;
  255. transition: color $animation_style;
  256. svg {
  257. width: $medium_picto_size;
  258. height: $medium_picto_size;
  259. margin-right: 3px;
  260. fill: $grey_inactive;;
  261. transition: fill $animation_style;
  262. }
  263. }
  264. .menu_item:hover {
  265. color: $grey_hover;
  266. svg {
  267. fill: $grey_hover;
  268. }
  269. }
  270. }
  271. }
  272. // //
  273. // smaller desktop //
  274. // //
  275. @media only screen and (max-width: 1440px) {
  276. #buttons_container, #global_nav {
  277. font-size: $UI_main_font_size--sm;
  278. }
  279. #buttons_container {
  280. .arrow svg {
  281. height: $large_picto_size--sm;
  282. }
  283. .mode {
  284. padding: $buttons_padding--sm;
  285. svg {
  286. height: $large_picto_size--sm;
  287. }
  288. .mode_container {
  289. margin: $buttons_inner_margin--sm;
  290. }
  291. }
  292. .mode.active {
  293. padding: $buttons_padding--sm !important;
  294. .mode_container {
  295. margin: $buttons_inner_margin--sm !important;
  296. }
  297. }
  298. .mode:hover {
  299. padding: $buttons_padding--sm !important;
  300. .mode_container {
  301. margin: $buttons_inner_margin--sm !important;
  302. }
  303. }
  304. .mode.collapsed {
  305. padding: $buttons_padding_collapsed--sm;
  306. }
  307. }
  308. #global_nav {
  309. h1 {
  310. margin: $main_title_margin--sm;
  311. }
  312. #menu {
  313. #search {
  314. input[type="search"] {
  315. height: $search_box_height--sm;
  316. font-size: $UI_main_font_size--sm;
  317. }
  318. button {
  319. svg {
  320. margin-left: $search_icon_offset--sm;
  321. width: $medium_picto_size--sm;
  322. }
  323. }
  324. }
  325. .menu_item {
  326. svg {
  327. width: $medium_picto_size--sm;
  328. height: $medium_picto_size--sm;
  329. }
  330. }
  331. }
  332. }
  333. }