Search

์ƒํ’ˆ๋ชฉ๋ก - products.jsp

โ€ข
๋ฒ„ํŠผ ๋งŒ๋“ค๊ธฐ
โ—ฆ
โ—ฆ
๋ฒ„ํŠผ
โ–ช
์ƒํ’ˆ ๋“ฑ๋ก
โ–ช
์ƒํ’ˆ ํŽธ์ง‘
โ–ช
์žฅ๋ฐ”๊ตฌ๋‹ˆ
โ€ข
์ƒํ’ˆ ๋ชฉ๋ก ๋งŒ๋“ค๊ธฐ
โ—ฆ
์ƒํ’ˆ ์นด๋“œ
โ–ช
์ด๋ฏธ์ง€ ์˜์—ญ
โ–ช
์ƒํ’ˆ๋ช…
โ–ช
์„ค๋ช…
โ–ช
๊ฐ€๊ฒฉ
โ–ช
์žฅ๋ฐ”๊ตฌ๋‹ˆ
โ–ช
์ƒ์„ธ ์ •๋ณด

๋ฒ„ํŠผ ๋งŒ๋“ค๊ธฐ

โ€ข
โ€ข
๋ฒ„ํŠผ
โ—ฆ
์ƒํ’ˆ ๋“ฑ๋ก
โ—ฆ
์ƒํ’ˆ ํŽธ์ง‘
โ—ฆ
์žฅ๋ฐ”๊ตฌ๋‹ˆ

๋ฒ„ํŠผ

โ€ข
์ƒํ’ˆ ๋“ฑ๋ก
โ€ข
์ƒํ’ˆ ํŽธ์ง‘
โ€ข
์žฅ๋ฐ”๊ตฌ๋‹ˆ
<a href="๐ŸŽช/shop/add.jsp" class="btn btn-primary btn-lg px-4 gap-3">์ƒํ’ˆ ๋“ฑ๋ก</a> <a href="๐ŸŽช/shop/editProducts.jsp" class="btn btn-success btn-lg px-4 gap-3">์ƒํ’ˆ ํŽธ์ง‘</a> <a href="๐ŸŽช/shop/cart.jsp" class="btn btn-warning btn-lg px-4 gap-3">์žฅ๋ฐ”๊ตฌ๋‹ˆ</a>
HTML
๋ณต์‚ฌ
โ€ข
btn: ๊ธฐ๋ณธ ๋ฒ„ํŠผ ์Šคํƒ€์ผ์„ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.
โ€ข
btn-primary: ํŒŒ๋ž€์ƒ‰ ๊ธฐ๋ณธ ๋ฒ„ํŠผ ์Šคํƒ€์ผ์„ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.
โ€ข
btn-success: ์ดˆ๋ก์ƒ‰ ๊ธฐ๋ณธ ๋ฒ„ํŠผ ์Šคํƒ€์ผ์„ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.
โ€ข
btn-warning: ๋…ธ๋ž€์ƒ‰ ๊ธฐ๋ณธ ๋ฒ„ํŠผ ์Šคํƒ€์ผ์„ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.
โ€ข
btn-lg: ๋ฒ„ํŠผ์„ ํฌ๊ฒŒ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
โ€ข
px-4: ๋ฒ„ํŠผ์˜ ์ขŒ์šฐ ํŒจ๋”ฉ์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
โ€ข
gap-3: ๋ฒ„ํŠผ๊ณผ ๋‹ค๋ฅธ ์š”์†Œ ์‚ฌ์ด์˜ ๊ฐ„๊ฒฉ์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

์ƒํ’ˆ ๋ชฉ๋ก ๋งŒ๋“ค๊ธฐ

โ€ข
์ƒํ’ˆ ์นด๋“œ
โ—ฆ
์ด๋ฏธ์ง€ ์˜์—ญ
โ—ฆ
์ƒํ’ˆ๋ช…
โ—ฆ
์„ค๋ช…
โ—ฆ
๊ฐ€๊ฒฉ
โ—ฆ
์žฅ๋ฐ”๊ตฌ๋‹ˆ
โ—ฆ
์ƒ์„ธ ์ •๋ณด
<div class="row gy-4"> <div class="col-md-6 col-xl-4 col-xxl-3"> <div class="card p-3"> <!-- ์ด๋ฏธ์ง€ ์˜์—ญ --> <div class="img-content"> <img src="img?id=P100001" class="w-100 p-2"> </div> <!-- ์ปจํ…์ธ  ์˜์—ญ --> <div class="content"> <h3 class="text-center">์ž๋ฐ” ํ”„๋กœ๊ทธ๋ž˜๋ฐ</h3> <p>์•ˆ๋…•ํ•˜์„ธ์š” ์ž๋ฐ”ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๊ฐ•์˜์ž…๋‹ˆ๋‹ค.</p> <p class="text-end price">โ‚ฉ 50000</p> <p class="d-flex justify-content-between"> <a href="./cart_pro.jsp?id=P100001" class="btn btn-outline-primary"><i class="material-symbols-outlined">shopping_bag</i></a> <a href="./product.jsp?id=P100001" class="btn btn-outline-primary">์ƒ์„ธ ์ •๋ณด</a> </p> </div> </div> </div> <div class="col-md-6 col-xl-4 col-xxl-3"> <div class="card p-3"> <!-- ์ด๋ฏธ์ง€ ์˜์—ญ --> <div class="img-content"> <img src="img?id=P100002" class="w-100 p-2"> </div> <!-- ์ปจํ…์ธ  ์˜์—ญ --> <div class="content"> <h3 class="text-center">์˜ค๋ผํด ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค</h3> <p>์˜ค๋ผํด ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ž…๋‹ˆ๋‹ค.</p> <p class="text-end price">โ‚ฉ 20000</p> <p class="d-flex justify-content-between"> <a href="./cart_pro.jsp?id=P100002" class="btn btn-outline-primary"><i class="material-symbols-outlined">shopping_bag</i></a> <a href="./product.jsp?id=P100002" class="btn btn-outline-primary">์ƒ์„ธ ์ •๋ณด</a> </p> </div> </div> </div> <div class="col-md-6 col-xl-4 col-xxl-3"> <div class="card p-3"> <!-- ์ด๋ฏธ์ง€ ์˜์—ญ --> <div class="img-content"> <img src="img?id=P100003" class="w-100 p-2"> </div> <!-- ์ปจํ…์ธ  ์˜์—ญ --> <div class="content"> <h3 class="text-center">HTML CSS JAVASCRIPT</h3> <p>์›น ๊ธฐ์ดˆ ๊ฐ•์˜์ž…๋‹ˆ๋‹ค.</p> <p class="text-end price">โ‚ฉ 15000</p> <p class="d-flex justify-content-between"> <a href="./cart_pro.jsp?id=P100003" class="btn btn-outline-primary"><i class="material-symbols-outlined">shopping_bag</i></a> <a href="./product.jsp?id=P100003" class="btn btn-outline-primary">์ƒ์„ธ ์ •๋ณด</a> </p> </div> </div> </div> <div class="col-md-6 col-xl-4 col-xxl-3"> <div class="card p-3"> <!-- ์ด๋ฏธ์ง€ ์˜์—ญ --> <div class="img-content"> <img src="img?id=P100004" class="w-100 p-2"> </div> <!-- ์ปจํ…์ธ  ์˜์—ญ --> <div class="content"> <h3 class="text-center">JSP</h3> <p>JSP ๊ฐ•์˜์ž…๋‹ˆ๋‹ค.</p> <p class="text-end price">โ‚ฉ 80000</p> <p class="d-flex justify-content-between"> <a href="./cart_pro.jsp?id=P100004" class="btn btn-outline-primary"><i class="material-symbols-outlined">shopping_bag</i></a> <a href="./product.jsp?id=P100004" class="btn btn-outline-primary">์ƒ์„ธ ์ •๋ณด</a> </p> </div> </div> </div> </div>
HTML
๋ณต์‚ฌ
<div class="row gy-4"> <div class="col-md-6 col-xl-4 col-xxl-3"> </div> </div>
HTML
๋ณต์‚ฌ
โ€ข
<div class="row gy-4">:
โ—ฆ
row: Bootstrap์˜ ๊ทธ๋ฆฌ๋“œ ์‹œ์Šคํ…œ์—์„œ ํ–‰(row)์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๋“œ ์‹œ์Šคํ…œ์€ ํ–‰๊ณผ ์—ด์„ ์‚ฌ์šฉํ•˜์—ฌ ๋ ˆ์ด์•„์›ƒ์„ ๊ตฌ์„ฑํ•ฉ๋‹ˆ๋‹ค.
โ—ฆ
gy-4: ํ–‰ ๋‚ด์˜ ์—ด ์‚ฌ์ด์— ์ˆ˜์ง ๊ฐ„๊ฒฉ(gutter)์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.ย gy-4๋Š” 4๋‹จ์œ„์˜ ์ˆ˜์ง ๊ฐ„๊ฒฉ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.
โ€ข
<div class="col-md-6 col-xl-4 col-xxl-3">:
โ—ฆ
col-md-6: ์ค‘๊ฐ„ ํฌ๊ธฐ ํ™”๋ฉด(md) ์ด์ƒ์—์„œ ์ด ์—ด์ด 12์—ด ์ค‘ 6์—ด์„ ์ฐจ์ง€ํ•˜๋„๋ก ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค (์ฆ‰, ๋„ˆ๋น„์˜ 50%).
โ—ฆ
col-xl-4: ํฐ ํฌ๊ธฐ ํ™”๋ฉด(xl) ์ด์ƒ์—์„œ ์ด ์—ด์ด 12์—ด ์ค‘ 4์—ด์„ ์ฐจ์ง€ํ•˜๋„๋ก ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค (์ฆ‰, ๋„ˆ๋น„์˜ 33.33%).
โ—ฆ
col-xxl-3: ๋งค์šฐ ํฐ ํฌ๊ธฐ ํ™”๋ฉด(xxl) ์ด์ƒ์—์„œ ์ด ์—ด์ด 12์—ด ์ค‘ 3์—ด์„ ์ฐจ์ง€ํ•˜๋„๋ก ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค (์ฆ‰, ๋„ˆ๋น„์˜ 25%).
<div class="card p-3"> <!-- ์ด๋ฏธ์ง€ ์˜์—ญ --> <div class="img-content"> <img src="https://via.placeholder.com/256x144" class="w-100 p-2"> <img src="" class="w-100 p-2"> </div> <!-- ์ปจํ…์ธ  ์˜์—ญ --> <div class="content"> <h3 class="text-center">์ปจํ…์ธ  ์ œ๋ชฉ</h3> <p>์•ˆ๋…•ํ•˜์„ธ์š” ์ปจํ…์ธ  ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค.</p> <p class="text-end price">โ‚ฉ 50000</p> <p class="d-flex justify-content-between"> <a href="./cart_pro.jsp?id=P100001" class="btn btn-outline-primary"> <i class="material-symbols-outlined">shopping_bag</i> </a> <a href="./product.jsp?id=P100001" class="btn btn-outline-primary">์ƒ์„ธ ์ •๋ณด</a> </p> </div> </div>
HTML
๋ณต์‚ฌ
<div class="card p-3"> <!-- ์ด๋ฏธ์ง€ ์˜์—ญ --> <div class="img-content"> </div> <!-- ์ปจํ…์ธ  ์˜์—ญ --> <div class="content"> </div> </div>
HTML
๋ณต์‚ฌ
โ€ข
<div class="card p-3">:
โ—ฆ
card: Bootstrap์˜ ์นด๋“œ ์ปดํฌ๋„ŒํŠธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ฝ˜ํ…์ธ ๋ฅผ ๋ฐ•์Šค ํ˜•ํƒœ๋กœ ๊ฐ์Œ‰๋‹ˆ๋‹ค.
โ—ฆ
p-3: ์นด๋“œ ๋‚ด๋ถ€์— 3๋‹จ์œ„์˜ ํŒจ๋”ฉ์„ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.
โ€ข
<div class="img-content">:
โ—ฆ
์ด๋ฏธ์ง€๋“ค์„ ํฌํ•จํ•˜๋Š” ์˜์—ญ์ž…๋‹ˆ๋‹ค.
โ€ข
<div class="content">:
โ—ฆ
์ปจํ…์ธ ๋ฅผ ํฌํ•จํ•˜๋Š” ์˜์—ญ์ž…๋‹ˆ๋‹ค.
<p class="d-flex justify-content-between"> <a href="./cart_pro.jsp?id=P100001" class="btn btn-outline-primary"> <i class="material-symbols-outlined">shopping_bag</i> </a> <a href="./product.jsp?id=P100001" class="btn btn-outline-primary">์ƒ์„ธ ์ •๋ณด</a> </p>
HTML
๋ณต์‚ฌ
โ€ข
<p class="d-flex justify-content-between">:
โ—ฆ
d-flex: ์ดย pย ์š”์†Œ๋ฅผ Flex ์ปจํ…Œ์ด๋„ˆ๋กœ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค. Flex ์ปจํ…Œ์ด๋„ˆ๋Š” ์ž์‹ ์š”์†Œ๋“ค์„ ํ–‰ ๋˜๋Š” ์—ด ๋ฐฉํ–ฅ์œผ๋กœ ๋ฐฐ์น˜ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
โ—ฆ
justify-content-between: ์ž์‹ ์š”์†Œ๋“ค์„ ์ฃผ ์ถ•(๊ฐ€๋กœ์ถ•) ์–‘ ๋์— ๋ฐฐ์น˜ํ•˜๊ณ , ๊ทธ ์‚ฌ์ด์— ๋™์ผํ•œ ๊ฐ„๊ฒฉ์„ ๋‘ก๋‹ˆ๋‹ค.
โ€ข
<a href="./cart_pro.jsp?id=P100001" class="btn btn-outline-primary">:
โ—ฆ
href="./cart_pro.jsp?id=P100001": ์ด ๋งํฌ๋ฅผ ํด๋ฆญํ•˜๋ฉดย cart_pro.jspย ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•˜๋ฉฐ,ย idย ํŒŒ๋ผ๋ฏธํ„ฐ๋กœย P100001์„ ์ „๋‹ฌํ•ฉ๋‹ˆ๋‹ค.
โ—ฆ
class="btn btn-outline-primary": Bootstrap์˜ ์•„์›ƒ๋ผ์ธ ๋ฒ„ํŠผ ์Šคํƒ€์ผ์„ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.
โ–ช
btn: ๊ธฐ๋ณธ ๋ฒ„ํŠผ ์Šคํƒ€์ผ์„ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.
โ–ช
btn-outline-primary: ํŒŒ๋ž€์ƒ‰ ํ…Œ๋‘๋ฆฌ ๋ฒ„ํŠผ ์Šคํƒ€์ผ์„ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.
โ€ข
<i class="material-symbols-outlined">shopping_bag</i>:
โ—ฆ
material-symbols-outlined: Material Icons์˜ ์•„์›ƒ๋ผ์ธ ์Šคํƒ€์ผ์„ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.
โ—ฆ
shopping_bag: ์‡ผํ•‘๋ฐฑ ์•„์ด์ฝ˜์„ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.
โ€ข
<a href="./product.jsp?id=P100001" class="btn btn-outline-primary">์ƒ์„ธ ์ •๋ณด</a>:
โ—ฆ
href="./product.jsp?id=P100001": ์ด ๋งํฌ๋ฅผ ํด๋ฆญํ•˜๋ฉดย product.jspย ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•˜๋ฉฐ,ย idย ํŒŒ๋ผ๋ฏธํ„ฐ๋กœย P100001์„ ์ „๋‹ฌํ•ฉ๋‹ˆ๋‹ค.
โ—ฆ
class="btn btn-outline-primary": Bootstrap์˜ ์•„์›ƒ๋ผ์ธ ๋ฒ„ํŠผ ์Šคํƒ€์ผ์„ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.
โ–ช
btn: ๊ธฐ๋ณธ ๋ฒ„ํŠผ ์Šคํƒ€์ผ์„ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.
โ–ช
btn-outline-primary: ํŒŒ๋ž€์ƒ‰ ํ…Œ๋‘๋ฆฌ ๋ฒ„ํŠผ ์Šคํƒ€์ผ์„ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.
โ—ฆ
์ƒ์„ธ ์ •๋ณด: ๋ฒ„ํŠผ์— ํ‘œ์‹œ๋˜๋Š” ํ…์ŠคํŠธ์ž…๋‹ˆ๋‹ค.