코딩배움일지/Web 구현
Web 5일차 4(선생님과 함께하는 Oven clone page)
karatejin
2022. 12. 26. 13:00
.btn-toggle{
display: flex;
align-items: center; /*붙어있게*/
border: 1px solid #ccc;
border-radius: 2px;
width: 80px;
}
.change-viewtype{
background-color: white;
color: #333;
border: none;
padding: 6px 12px;
width: 40px;
height: 34px;
cursor: pointer;
}
.btn-toggle .change-viewtype:first-child{
border-right: 1px solid #ccc;
}
.page-header{
display: flex;
justify-content: space-between;
}
.pull-right{
display: flex;
justify-content: space-between;
width: 325px;
height: 36px;
margin-top: 25px;
}
.btn-toggle{
display: flex;
align-items: center; /*붙어있게*/
border: 1px solid #ccc;
border-radius: 2px;
height: 34px;
width: 80px;
}
오늘 한거
Html
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/dashboard.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css" integrity="sha512-MV7K8+y+gLIBoVD59lQIYicR65iaqukzvf/nwasF0nqhPay5w/9lJmVM2hMDcnK1OnMGCdVK+iQrJ7lzPJQd1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<title>Document</title>
</head>
<body>
<header>
<div class=" container">
<nav class="navbar">
<div class="navbar-brand">
<a class="brand-text" href="#">
<span class="bt-left">Oven</span>
<span class="bt-right">BETA</span>
</a>
</div>
<ul class="nav">
<li>
<a href="#" class="dropdown-toggle">
<img class="profile-image" src="/KakaoOven/images/profile.png">
<span class="name">양진구</span>
<i class="fa-solid fa-caret-down"></i>
</a>
</li>
</ul>
</nav>
</div>
</header>
<main class="container">
<div class="page-header">
<h1 class="pull-left">프로젝트 대쉬보드</h1>
<div class="pull-right">
<div class="search-project">
<input type="text" class="form-control" placeholder="프로젝트 검색">
<i class="fa-solid fa-magnifying-glass"></i>
</div>
<div class="btn-toggle">
<button class="btn change-viewtype">
<i class="fa-solid fa-list"></i>
</button>
<button class="btn change-viewtype active">
<i class="fa-solid fa-table-cells-large"></i>
</button>
</div>
</div>
</div>
</main>
<footer class="container">
</footer>
</body>
</html>
Css
*{
box-sizing: border-box;
font-size: 14px;
}
body{
margin: 0;
}
a{
text-decoration: none;
}
.container{
margin: 0px auto;
padding: 0px 15px;
width: 1170px;
}
header {
margin-bottom: 20px;
border-bottom: 1px solid #e7e7e7;
background-color: #383d40;
}
.navbar{
display: flex;
justify-content: space-between; /* 중앙을 비운다.*/
align-items: center; /*가운데 정렬*/
width: 100%;
}
.brand-text{
display: flex;
padding: 15px;
padding-left: 0;
height: 50px;
}
.bt-left{
line-height: 18px;
font-size: 22px;
font-weight: 500;
color: white;
}
.bt-right{
padding: 1px 3px;
line-height: 9px;
font-size: 11px;
font-weight: 600;
color: #aaa;
}
.nav{
margin: 0;
padding: 0;
list-style-type: none;
}
.dropdown-toggle{
display: flex;
align-items: center; /*가운데 정렬*/
color: white;
}
.profile-image{
border-radius: 50%;
width: 30px;
height: 30px;
}
.dropdown-toggle .name{
padding: 0px 10px;
}
.dropdown-toggle .fa-caret-down{
font-size: 11px;
}
.page-header{
display: flex;
justify-content: space-between;
}
/* .page-header::before{
display: table;
content: " ";
} */
.pull-left{
margin: 20px 0px 10px;
font-size: 36px;
font-weight: 400;
}
.pull-right{
display: flex;
justify-content: space-between;
width: 325px;
height: 36px;
margin-top: 25px;
}
.search-project{
position: relative;
width: 226.5px;
height: 34px;
}
.form-control{
border: 1px solid #ccc;
border-radius: 4px;
outline: none;
height: 34px;
padding: 6px 42.5px 4px 12px;
background-color: white;
color: #555;
}
.search-project .fa-magnifying-glass{
position: absolute;
top: 0px;
right: 0px;
display: flex; /*가운데정렬*/
justify-content: center; /*주축 방향으로 가운데 정렬*/
align-items: center; /*교차축 방향으로 가운데 정렬*/
width: 34px;
height: 34px;
}
.form-control:focus{
border: 1px solid #2fafff;
box-shadow: 0px 0px 3px 1px #2fafff;
}
.btn-toggle{
display: flex;
align-items: center; /*붙어있게*/
border: 1px solid #ccc;
border-radius: 2px;
height: 34px;
width: 80px;
}
.change-viewtype{
background-color: white;
color: #333;
border: none;
padding: 6px 12px;
width: 40px;
height: 32px;
cursor: pointer;
}
.btn-toggle .change-viewtype:first-child{
border-right: 1px solid #ccc;
}
.active{
background: radial-gradient(circle,#f0f0f0, #e6e6e6,#ccc)
}
.change-viewtype:not([type=active]):hover{
background-color: #e6e6e6;
}