App.scss 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  1. :root {
  2. --font-color: lightseagreen;
  3. --primary-color: #303030;
  4. }
  5. * {
  6. margin: 0;
  7. padding: 0;
  8. }
  9. *,
  10. *::before,
  11. *::after {
  12. box-sizing: inherit;
  13. }
  14. @mixin btn {
  15. margin-top: 1rem;
  16. width: 50%;
  17. background-color: var(--primary-color);
  18. border: none;
  19. color: white;
  20. padding: 15px 32px;
  21. text-align: center;
  22. text-decoration: none;
  23. display: inline-block;
  24. font-size: 16px;
  25. letter-spacing: .2rem;
  26. transition: .2s ease-in-out;
  27. &:hover {
  28. background-color: white;
  29. color: var(--font-color);
  30. border: 1px solid var(--primary-color);
  31. }
  32. &:active {
  33. transform: translateY(4px);
  34. }
  35. }
  36. @mixin card {
  37. display: flex;
  38. flex-direction: column;
  39. text-align: center;
  40. justify-content: center;
  41. width: 23rem;
  42. height: auto;
  43. margin: 2rem;
  44. padding: 2rem;
  45. border-radius: .5rem;
  46. box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
  47. transition: 0.4s ease-out;
  48. &:hover {
  49. box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);
  50. transform: translateY(-15px)
  51. }
  52. img {
  53. max-width: 50%;
  54. height: 9rem;
  55. }
  56. }
  57. @mixin input {
  58. width: 80%;
  59. padding: 12px 20px;
  60. margin: 8px 0;
  61. box-sizing: border-box;
  62. border: 1px solid #555;
  63. outline: none;
  64. &::focus {
  65. background-color: lightblue;
  66. }
  67. }
  68. @mixin textarea {
  69. width: 95%;
  70. height: auto;
  71. outline: none;
  72. border: 2px solid #ccc;
  73. border-radius: 4px;
  74. background-color: #f8f8f8;
  75. font-size: 16px;
  76. resize: none;
  77. margin-top: .25rem;
  78. padding: .5rem;
  79. &:focus {
  80. border: 2px solid var(--primary-color);
  81. }
  82. }
  83. @mixin select {
  84. width: 100%;
  85. height: 3rem;
  86. outline: none;
  87. border: 2px solid #ccc;
  88. border-radius: 4px;
  89. background-color: #f8f8f8;
  90. font-size: 16px;
  91. margin-top: .25rem;
  92. text-align: center;
  93. &:focus {
  94. border: 2px solid var(--primary-color);
  95. }
  96. }
  97. .App {
  98. footer{
  99. background-color: #303030;
  100. .name {
  101. font-size: 10rem;
  102. }
  103. }
  104. .header {
  105. display: flex;
  106. flex-direction: row;
  107. align-items: center;
  108. justify-content: space-between;
  109. height: 4rem;
  110. background-color: var(--primary-color);
  111. border-bottom: 1px solid white;
  112. &_left {
  113. display: flex;
  114. flex-direction: row;
  115. align-items: center;
  116. &-title {
  117. text-decoration: none;
  118. letter-spacing: .3rem;
  119. color: white;
  120. margin-right: 2rem;
  121. margin-left: 2rem;
  122. transition: .2s ease-in-out;
  123. &:hover {
  124. color: var(--font-color);
  125. }
  126. }
  127. }
  128. &_right {
  129. display: flex;
  130. flex-direction: row;
  131. align-items: center;
  132. margin-right: 2rem;
  133. margin-left: 2rem;
  134. }
  135. }
  136. main {
  137. display: flex;
  138. flex-direction: row;
  139. aside {
  140. width: 30%;
  141. margin-top: 2px;
  142. background-color: var(--primary-color)
  143. }
  144. }
  145. }
  146. li {
  147. list-style-type: none;
  148. }
  149. .RootCategories {
  150. display: block;
  151. background-color: var(--primary-color);
  152. .sub-link {
  153. display: block;
  154. color: white;
  155. padding: 15px 20px;
  156. text-decoration: none;
  157. letter-spacing: .2rem;
  158. display: block;
  159. transition: .2s ease-in-out;
  160. &:hover {
  161. background-color: var(--primary-color);
  162. color: var(--font-color);
  163. border-bottom: 1px solid white;
  164. }
  165. }
  166. }
  167. .loginButtons {
  168. display: flex;
  169. flex-direction: column;
  170. .btn {
  171. width: 100%;
  172. background-color: var(--primary-color);
  173. border: none;
  174. color: white;
  175. padding: 15px 32px;
  176. text-align: center;
  177. text-decoration: none;
  178. display: inline-block;
  179. font-size: 16px;
  180. transition: .2s ease-in-out;
  181. cursor: pointer;
  182. letter-spacing: .2rem;
  183. &:hover {
  184. background-color: white;
  185. color: var(--font-color);
  186. }
  187. }
  188. }
  189. .LoginButtons {
  190. display: flex;
  191. flex: 1;
  192. flex-direction: column;
  193. .exit {
  194. display: flex;
  195. background-color: var(--primary-color);
  196. border: none;
  197. color: white;
  198. padding: 15px 32px;
  199. text-align: center;
  200. text-decoration: none;
  201. display: inline-block;
  202. font-size: 16px;
  203. letter-spacing: .2rem;
  204. transition: .2s ease-in-out;
  205. cursor: pointer;
  206. &:hover {
  207. background-color: white;
  208. color: var(--font-color);
  209. }
  210. }
  211. }
  212. .dropzone {
  213. display: flex;
  214. border: none;
  215. background-color: #fafafa;
  216. border: 1px dashed var(--primary-color);
  217. color: #bdbdbd;
  218. outline: none;
  219. transition: .24s ease-in-out;
  220. height: 3rem;
  221. text-align: center;
  222. align-items: center;
  223. transition: .2s ease-in-out;
  224. &:hover {
  225. border-width: 1px;
  226. border-radius: 2;
  227. border-style: dashed;
  228. border-color: var(--font-color);
  229. color: var(--primary-color);
  230. }
  231. }
  232. .popup {
  233. height: 100vh;
  234. width: 100%;
  235. position: fixed;
  236. top: 0;
  237. left: 0;
  238. background-color: rgba(black, .95);
  239. z-index: 9999;
  240. text-align: center;
  241. position: fixed;
  242. &_content {
  243. width: 30%;
  244. height: 25rem;
  245. box-shadow: var(--shadow-cool);
  246. border-radius: 1rem;
  247. background-color: rgba(240, 238, 238);
  248. padding: 2rem;
  249. position: absolute;
  250. top: 50%;
  251. left: 50%;
  252. transform: translate(-50%, -50%);
  253. transition: all .4s .2s;
  254. &-close {
  255. text-decoration: none;
  256. color: var(--primary-color);
  257. font-weight: bold;
  258. opacity: .7;
  259. position: absolute;
  260. top: 2rem;
  261. right: 2rem;
  262. font-size: 1rem;
  263. text-decoration: none;
  264. display: inline-block;
  265. transition: all .2s;
  266. line-height: 1;
  267. transition: .2s ease-in-out;
  268. &:hover {
  269. transform: scale(1.5);
  270. opacity: 1;
  271. color: var(--font-color);
  272. }
  273. }
  274. }
  275. &_label {
  276. color: var(--font-color);
  277. }
  278. &_loginForm {
  279. display: flex;
  280. flex-direction: column;
  281. align-items: center;
  282. &-input {
  283. @include input();
  284. }
  285. &-btn {
  286. @include btn();
  287. cursor: pointer;
  288. }
  289. }
  290. }
  291. .content {
  292. display: flex;
  293. flex: 70%;
  294. flex-direction: row;
  295. flex-wrap: wrap;
  296. .category {
  297. margin-top: 2px;
  298. margin-left: 1px;
  299. &-row {
  300. display: flex;
  301. flex-direction: row;
  302. flex-wrap: wrap;
  303. }
  304. .goodCard {
  305. @include card();
  306. &_title {
  307. display: flex;
  308. margin-bottom: 1rem;
  309. color: var(--primary-color);
  310. }
  311. &_cart {
  312. &-title {
  313. letter-spacing: .1rem;
  314. color: var(--primary-color);
  315. }
  316. &-price {
  317. display: flex
  318. }
  319. &-btns {
  320. display: flex;
  321. flex-direction: row;
  322. justify-content: space-between;
  323. margin: 1rem;
  324. &--btn {
  325. @include btn();
  326. margin-right: .1rem;
  327. }
  328. &--link {
  329. @include btn();
  330. }
  331. }
  332. }
  333. img {
  334. max-width: 50%;
  335. }
  336. &_img {
  337. display: flex;
  338. justify-content: center;
  339. }
  340. &_change {
  341. display: flex;
  342. flex-direction: column;
  343. textarea {
  344. @include textarea();
  345. }
  346. &-btn {
  347. @include btn();
  348. }
  349. }
  350. }
  351. }
  352. }
  353. .good {
  354. @include card();
  355. &_title {
  356. display: flex;
  357. padding-bottom: 1rem;
  358. color: var(--primary-color);
  359. }
  360. &_cart {
  361. &-price {
  362. display: flex
  363. }
  364. &-desc {
  365. font-size: 16px;
  366. text-indent: 50px;
  367. text-align: justify;
  368. letter-spacing: .1rem;
  369. }
  370. &-btns {
  371. display: flex;
  372. flex-direction: row;
  373. justify-content: space-between;
  374. &--btn {
  375. @include btn();
  376. margin-right: .1rem;
  377. }
  378. &--link {
  379. @include btn();
  380. }
  381. }
  382. }
  383. &_input {
  384. @include input();
  385. width: 100%;
  386. }
  387. &_delete {
  388. @include btn();
  389. }
  390. &_btns {
  391. display: flex;
  392. flex-direction: row;
  393. justify-content: space-between;
  394. &-btn {
  395. @include btn();
  396. margin-right: .1rem;
  397. &:hover {
  398. color: red;
  399. }
  400. }
  401. &-link {
  402. @include btn();
  403. }
  404. }
  405. }
  406. .cart {
  407. display: flex;
  408. flex-direction: row;
  409. flex-wrap: wrap;
  410. }
  411. .cartPage {
  412. width: 100%;
  413. &-btns {
  414. display: flex;
  415. flex-direction: row;
  416. &-btn {
  417. @include btn();
  418. }
  419. }
  420. }
  421. .order {
  422. @include card();
  423. height: 25rem;
  424. &_title {
  425. display: flex;
  426. padding-bottom: 1rem;
  427. color: var(--primary-color);
  428. }
  429. }
  430. .orderHistory {
  431. display: flex;
  432. flex-direction: row;
  433. flex-wrap: wrap;
  434. flex: 70%;
  435. }
  436. .subCats {
  437. display: flex;
  438. flex-direction: column;
  439. }
  440. .searchResult {
  441. display: flex;
  442. flex: 70%;
  443. flex-direction: row;
  444. flex-wrap: wrap;
  445. }
  446. .adminPage {
  447. display: flex;
  448. flex: 70%;
  449. flex-direction: column;
  450. &_dashboard {
  451. &-title {
  452. letter-spacing: .2rem;
  453. margin-bottom: 1rem;
  454. color: var(--primary-color);
  455. }
  456. &-goodChange {
  457. @include card();
  458. select {
  459. @include select();
  460. margin-bottom: 1rem;
  461. }
  462. }
  463. &-createCat {
  464. @include card();
  465. input {
  466. @include textarea();
  467. margin-bottom: 1rem;
  468. }
  469. button {
  470. @include btn();
  471. margin-bottom: 1rem;
  472. }
  473. select {
  474. @include select();
  475. margin-bottom: 1rem;
  476. }
  477. }
  478. &-goodAdd {
  479. @include card();
  480. &--container {
  481. display: flex;
  482. flex-direction: column;
  483. textarea {
  484. @include textarea();
  485. width: 95%;
  486. }
  487. select {
  488. @include select();
  489. margin-bottom: 1rem
  490. }
  491. button {
  492. @include btn();
  493. }
  494. }
  495. }
  496. }
  497. }
  498. .search {
  499. display: flex;
  500. flex-direction: row;
  501. align-items: center;
  502. justify-content: space-between;
  503. &-input {
  504. border: 1px solid white;
  505. padding: .4rem 2rem;
  506. border-radius: 100px;
  507. width: 3rem;
  508. transition: all .2s;
  509. &:focus {
  510. outline: none;
  511. width: 10rem;
  512. }
  513. }
  514. }
  515. .cart {
  516. display: flex;
  517. flex-direction: row;
  518. align-items: center;
  519. &_counter {
  520. display: flex;
  521. flex-direction: row;
  522. align-items: center;
  523. text-decoration: none;
  524. color: white;
  525. transition: .2s ease-in-out;
  526. &:hover {
  527. color: var(--font-color);
  528. }
  529. &-icon {
  530. color: white;
  531. font-size: 1.4rem;
  532. margin-right: .5rem;
  533. transition: .2s ease-in-out;
  534. &:hover {
  535. color: var(--font-color);
  536. }
  537. }
  538. }
  539. }