
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>나만의 추억앨범</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous"
/>
<style>
@import url("https://fonts.googleapis.com/css2?family=Orbit&display=swap");
* {
font-family: "Orbit", sans-serif;
}
.mytitle {
height: 250px;
color: white;
display: flex;
flex-direction: column;
/*row는 왼쪽부터 ㅇㅇㅇㅇ, column은 위부터
ㅇ
ㅇ
ㅇ*/
align-items: center;
/*세로축 flex-start 최상단 flex-end 최하단 center 세로축의 중앙 baseline 시작위치에 정렬 stretch 컨테이너에 맞게 늘림*/
justify-content: center;
/*가로축 flex-start 왼쪽, flex-end 우측, center 중앙 space-between 사이에 동일한 간격, space-around 주위에 동일한 간경
space-evenly 첫번째로 오는 정렬 대상 전에 두개의 인접한 정렬 대상 사이의 간격과 마지막 정렬 대상 이후의 간격이 같도록 항목이 분산된다고함..*/
background-image: url("https://images.unsplash.com/photo-1511992243105-2992b3fd0410?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80");
background-position: center;
/*요소의 배경에 추가한 이미지의 위치 설정*/
background-size: cover;
/*요소의 배경에 추가한 이미지의 크기 설정*/
}
.mytitle > button {
width: 150px;
height: 50px;
background-color: transparent;
color: white;
border: 1px solid white;
border-radius: 5px;
/*동그랗게~~*/
margin-top: 20px;
/*상단 여백*/
}
.mycards {
width: 1200px;
margin: 30px auto 0px auto;
/*-top, -right, -bottom, -left 이렇게 정해서 써도 되고 margin 으로 써서 네면에 대해 값줘도 되고*/
}
.mypostingbox {
width: 500px;
margin: 30px auto 0px auto;
padding: 20px;
box-shadow: 0px 0px 3px 0px skyblue;
border-radius: 5px;
}
.mybtn{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.mybtn > button {
margin-right: 5px;
}
</style>
<script>
function openclose(){
$('#postiongbox').toggle();
}
function makeCard(){
let image = $('image').val();
alert(image);
}
</script>
</head>
<body>
<div class="mytitle">
<h1>나만의 추억앨범</h1>
<button onclick="openclose()">추억 저장하기</button>
</div>
<div class="mypostingbox" id="postiongbox">
<div class="form-floating mb-3">
<input
type="email"
class="form-control"
id="image"
placeholder="앨범이미지"
/>
<label for="floatingInput">앨범이미지</label>
</div>
<div class="form-floating mb-3">
<input
type="email"
class="form-control"
id="title"
placeholder="앨범제목"
/>
<label for="floatingInput">앨범제목</label>
</div>
<div class="form-floating mb-3">
<input
type="email"
class="form-control"
id="content"
placeholder="앨범내용"
/>
<label for="floatingInput">앨범내용</label>
</div>
<div class="form-floating mb-3">
<input
type="email"
class="form-control"
id="date"
placeholder="앨범날짜"
/>
<label for="floatingInput">앨범날짜</label>
</div>
<div class="mybtn">
<button onclick="makeCard()" type="button" class="btn btn-dark">기록하기</button>
<button type="button" class="btn btn-outline-dark">닫기</button>
</div>
</div>
<div class="mycards">
<div class="row row-cols-1 row-cols-md-4 g-4">
<div class="col">
<div class="card h-100">
<img
class="card-img-top"
alt="..."
/>
<div class="card-body">
<h5 class="card-title">앨범제목</h5>
<p class="card-text">앨범내용</p>
</div>
<div class="card-footer">
<small class="text-body-secondary">앨범날짜</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<img
class="card-img-top"
alt="..."
/>
<div class="card-body">
<h5 class="card-title">앨범제목</h5>
<p class="card-text">앨범내용</p>
</div>
<div class="card-footer">
<small class="text-body-secondary">앨범날짜</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<img
class="card-img-top"
alt="..."
/>
<div class="card-body">
<h5 class="card-title">앨범제목</h5>
<p class="card-text">앨범내용</p>
</div>
<div class="card-footer">
<small class="text-body-secondary">앨범날짜</small>
</div>
</div>
</div>
<div class="col">
<div class="card h-100">
<img
class="card-img-top"
alt="..."
/>
<div class="card-body">
<h5 class="card-title">앨범제목</h5>
<p class="card-text">앨범내용</p>
</div>
<div class="card-footer">
<small class="text-body-secondary">앨범날짜</small>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
