Download checkout.html from Parkcas/Shopp: direct link, hf CLI and curl.
- Browser
- Download file 3.69 kB
-
https://huggingface.co/spaces/Parkcas/Shopp/resolve/main/checkout.html
- Command line
-
hf download hf://spaces/Parkcas/Shopp/checkout.html
-
curl -L -o checkout.html https://huggingface.co/spaces/Parkcas/Shopp/resolve/main/checkout.html
3.69 kB
| <html lang="ko"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>๊ฒฐ์ ํ์ด์ง</title> | |
| <style> | |
| :root { | |
| --main-color: #6cdce4; /* ๋ฏผํธ */ | |
| --secondary-color: #447790; /* ๋ณด์กฐ์ */ | |
| } | |
| body { | |
| margin: 0; | |
| font-family: 'Noto Sans KR', sans-serif; | |
| background-color: #f9f9f9; | |
| color: #333; | |
| } | |
| header { | |
| background-color: var(--secondary-color); | |
| color: var(--main-color); | |
| padding: 15px 30px; | |
| text-align: center; | |
| font-size: 24px; | |
| } | |
| .container { | |
| max-width: 600px; | |
| margin: 30px auto; | |
| padding: 20px; | |
| background-color: #fff; | |
| border-radius: 8px; | |
| box-shadow: 0 2px 6px rgba(0,0,0,0.1); | |
| } | |
| h2 { | |
| color: var(--secondary-color); | |
| margin-bottom: 15px; | |
| } | |
| .cart-summary { | |
| margin-bottom: 20px; | |
| } | |
| .cart-summary div { | |
| display: flex; | |
| justify-content: space-between; | |
| margin-bottom: 5px; | |
| } | |
| label { | |
| display: block; | |
| margin: 10px 0 5px; | |
| } | |
| input { | |
| width: 100%; | |
| padding: 8px; | |
| font-size: 14px; | |
| border-radius: 5px; | |
| border: 1px solid #ccc; | |
| margin-bottom: 10px; | |
| } | |
| button { | |
| width: 100%; | |
| padding: 10px; | |
| background-color: var(--main-color); | |
| color: #fff; | |
| font-size: 16px; | |
| border: none; | |
| border-radius: 5px; | |
| cursor: pointer; | |
| } | |
| button:hover { | |
| background-color: var(--secondary-color); | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <header>๊ฒฐ์ ํ์ด์ง</header> | |
| <div class="container"> | |
| <h2>์ฅ๋ฐ๊ตฌ๋ ํ์ธ</h2> | |
| <div class="cart-summary" id="cart-summary"> | |
| <!-- ์ฅ๋ฐ๊ตฌ๋ ์ํ ๋ชฉ๋ก ํ์ --> | |
| </div> | |
| <h2>๊ฒฐ์ ์ ๋ณด ์ ๋ ฅ</h2> | |
| <form id="payment-form"> | |
| <label for="name">์ด๋ฆ</label> | |
| <input type="text" id="name" required placeholder="ํ๊ธธ๋"> | |
| <label for="card">์นด๋ ๋ฒํธ</label> | |
| <input type="text" id="card" required placeholder="0000-0000-0000-0000"> | |
| <label for="expiry">์ ํจ๊ธฐ๊ฐ</label> | |
| <input type="text" id="expiry" required placeholder="MM/YY"> | |
| <button type="submit">๊ฒฐ์ ์๋ฃ</button> | |
| </form> | |
| </div> | |
| <script> | |
| // localStorage์์ ์ฅ๋ฐ๊ตฌ๋ ๋ฐ์ดํฐ ๊ฐ์ ธ์ค๊ธฐ | |
| let cart = JSON.parse(localStorage.getItem('cartData')) || []; | |
| const cartSummary = document.getElementById('cart-summary'); | |
| function renderCartSummary(){ | |
| cartSummary.innerHTML = ''; | |
| let total = 0; | |
| cart.forEach(item => { | |
| total += item.price; | |
| const div = document.createElement('div'); | |
| div.innerHTML = `<span>${item.name}</span><span>โฉ${item.price}</span>`; | |
| cartSummary.appendChild(div); | |
| }); | |
| const totalDiv = document.createElement('div'); | |
| totalDiv.style.fontWeight = 'bold'; | |
| totalDiv.innerHTML = `<span>ํฉ๊ณ</span><span>โฉ${total}</span>`; | |
| cartSummary.appendChild(totalDiv); | |
| } | |
| renderCartSummary(); | |
| const form = document.getElementById('payment-form'); | |
| form.addEventListener('submit', function(e){ | |
| e.preventDefault(); | |
| alert('๊ฒฐ์ ๊ฐ ์๋ฃ๋์์ต๋๋ค!'); | |
| localStorage.removeItem('cartData'); // ๊ฒฐ์ ํ ์ฅ๋ฐ๊ตฌ๋ ์ด๊ธฐํ | |
| window.location.href = 'index.html'; // ๋ฉ์ธ ํ์ด์ง๋ก ์ด๋ | |
| }); | |
| </script> | |
| </body> | |
| </html> | |