+page.svelte 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <script>
  2. </script>
  3. <form>
  4. <input type="text" placeholder="Search Recipes">
  5. <button>
  6. <svg width="24px" height="24px" viewBox="0 0 24 24" fill="none" color="#000000">
  7. <path d="M17 17L21 21" stroke="#ffffff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
  8. <path d="M3 11C3 15.4183 6.58172 19 11 19C13.213 19 15.2161 18.1015 16.6644 16.6493C18.1077 15.2022 19 13.2053 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11Z" stroke="#ffffff" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
  9. </svg>
  10. </button>
  11. </form>
  12. <style>
  13. form{
  14. display: flex;
  15. align-items: center;
  16. justify-content: center;
  17. gap: 0.5rem;
  18. width: min(480px, 90vw);
  19. margin: 40vh auto 0;
  20. padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  21. background: #ffffff;
  22. border-radius: 999px;
  23. box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
  24. }
  25. input[type="text"]{
  26. flex: 1;
  27. border: none;
  28. outline: none;
  29. background: none;
  30. font-size: 1rem;
  31. color: #000000;
  32. }
  33. button{
  34. display: flex;
  35. align-items: center;
  36. justify-content: center;
  37. width: 2.5rem;
  38. height: 2.5rem;
  39. background: #000000;
  40. border: none;
  41. border-radius: 50%;
  42. cursor: pointer;
  43. flex-shrink: 0;
  44. transition: background 0.15s ease, transform 0.1s ease;
  45. }
  46. button:hover{
  47. background: #333333;
  48. }
  49. button:active{
  50. background: #555555;
  51. transform: scale(0.92);
  52. }
  53. </style>