2021_08_19 개발일지

Yeo Eunhye·2021년 8월 19일
0

1) 학습한 내용

오늘은 트위처 라는 해외 페이지의 상단영역과 왼쪽영역 일부분을 해보았다.

1. top-nav

- html

<body>

	<nav id="top-nav">
		<div class="nav-wrap">
			<div class="nav-left">
				<h1 class="logo">
					<a href="#">
						<img src="https://via.placeholder.com/24x28">
					</a>
				</h1>
				<ul>
					<li><a href="#">탐색</a></li>
					<li><a href="#">e스포츠</a></li>
					<li><a href="#">음악</a></li>
				</ul>
				<div class="more">
					<a href="#">더보기</a>
				</div>
			</div>



			<div class="nav-center">
				<div class="search-wrap">
					<input type="text" placeholder="검색">
					<button class="btn-search"><img src="img/serch.png"></button>
				</div>
			</div>



			<div class="nav-right">
				<div class="mark-wrap">
					<i class="icon-mark"></i>
					<span class="alarm">44</span>
				</div>
				<a href="#" class="btn-login">로그인</a>
				<a href="#" class="btn-purple">회원가입</a>
				<button class="btn-profile"></button>
			</div>

		</div>
	</nav>

- css

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html, body {
	width: 100%;
	height: 100%;
}

body {
	background-color: #0e0e10;
}

ol, ul {
	list-style: none;
}

a {
	text-decoration: none;
}

img {
	vertical-align: top;
}

input {
	outline: none;
	border: none;
}

button {
	outline: none;
	border: none;
	background: transparent;
}

h1, h2, h3, h4, h5, h6, p, span, input, button, a {
	color: #ffffff;
}

.btn-purple {
	background-color: #9147ff;
	color: #ffffff;
}

.font-purple {
	color: #9147ff;
}





/* 상단 내비 영역 */
#top-nav {
	position: fixed;
	width: 100%;
	height: 50px;
	background-color: #0e0e10;
	padding: 0 15px;
	min-width: 1340px;
}

#top-nav .nav-wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
}

#top-nav .nav-wrap .nav-left {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-items: center;
}

#top-nav .nav-wrap .nav-left .logo {

}

#top-nav .nav-wrap .nav-left .logo a {

}

#top-nav .nav-wrap .nav-left .logo a img {
	width: 24px;
	height: 28px;
}

#top-nav .nav-wrap .nav-left ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-items: center;
}

#top-nav .nav-wrap .nav-left ul li {
	height: 50px;
	font-size: 18px;
	padding: 0 20px;
}

#top-nav .nav-wrap .nav-left ul li a {
	display: block;
	width: 100%;
	height: 100%;
	line-height: 50px;
}

#top-nav .nav-wrap .nav-left ul li:first-child {
	padding-right: 0;
}

#top-nav .nav-wrap .nav-left ul li:first-child a:after {
	position: relative;
	display: inline-block;
	content: '';
	width: 1px;
	height: 30px;
	background-color: grey;

	margin-left: 20px;

	top: 8px;
	/*margin-top을 사용하면 글과 함께 옮겨지므로  relative를 주고 top사용*/
}

#top-nav .nav-wrap .nav-left .more a {
	display: block;
	height: 50px;
	font-size: 18px;

	line-height: 50px;
	padding-left: 20px;
}





#top-nav .nav-center {
	position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

#top-nav .nav-center .search-wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;

	width: 380px;
	height: 36px;
	background-color: yellow;
	overflow: hidden;
	border-radius: 5px;
}

#top-nav .nav-center .search-wrap input {
    padding: 7px;
	width: calc(100% - 34px);
	height: 100%;
	background-color: grey;
}
#top-nav .nav-center .search-wrap input::placeholder {
	color: white;
}

#top-nav .nav-center .search-wrap .btn-search {
	width: 34px;
	height: 100%;
	background-color: #4c4a4a;
}
#top-nav .nav-center .search-wrap .btn-search img {
    vertical-align: top;
    background-color: rgba( 243, 241, 246, 0 );
    width: 30px;
    height: 30px;
}






#top-nav .nav-right {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
	padding: 0 57px 0 0;
}

#top-nav .nav-right .mark-wrap {
	position: relative;
}

#top-nav .nav-right .mark-wrap .icon-mark {
	display: block;
	width: 20px;
	height: 20px;
	background-color: yellow;

	cursor: pointer;
}

#top-nav .nav-right .mark-wrap .alarm{
	position: absolute;
	border-radius: 15px;
	background-color: red;
	color: #ffffff;
	font-size: 14px;

	padding: 4px 8px 2px;

	top: -12px;
    right: -20px;
}

#top-nav .nav-right .btn-login {
	width: 53px;
	height: 30px;
	background-color: grey;
	border-radius: 5px;
	margin-left: 20px;

	text-align: center;
	line-height: 30px;
	font-size: 11px;
}

#top-nav .nav-right .btn-purple {
	width: 53px;
	height: 30px;
	border-radius: 5px;
	margin-left: 10px;

	text-align: center;
	line-height: 30px;
	font-size: 11px;
}

#top-nav .nav-right .btn-profile {
	cursor: pointer;
	width: 20px;
	height: 20px;
	background-color: #ffffff;
	margin-left: 10px;
}

2. left - channel-wrap

- html

	<div class="main-container">
		<div class="left-area">
			<div class="channel-wrap">
				<div class="channel-header">
					<h3>추천채널</h3>
					<i class="icon-arrow"></i>
				</div>
				<div class="channel-body">
					<ul>
						<li>
							<a href="#">
								<img src="https://via.placeholder.com/30">
								<div class="txt-wrap">
									<h4>기발자(gi_balja)</h4>
									<span class="source">Just Chatting</span>
								</div>
								<span class="count">10,000</span>
							</a>
						</li>
						<li>
							<a href="#">
								<img src="https://via.placeholder.com/30">
								<div class="txt-wrap">
									<h4>기발자(gi_balja)</h4>
									<span class="source">Just Chatting</span>
								</div>
								<span class="count">10,000</span>
							</a>
						</li>
						<li>
							<a href="#">
								<img src="https://via.placeholder.com/30">
								<div class="txt-wrap">
									<h4>기발자(gi_balja)</h4>
									<span class="source">Just Chatting</span>
								</div>
								<span class="count">10,000</span>
							</a>
						</li>
						<li>
							<a href="#">
								<img src="https://via.placeholder.com/30">
								<div class="txt-wrap">
									<h4>기발자(gi_balja)</h4>
									<span class="source">Just Chatting</span>
								</div>
								<span class="count">10,000</span>
							</a>
						</li>
						<li>
							<a href="#">
								<img src="https://via.placeholder.com/30">
								<div class="txt-wrap">
									<h4>기발자(gi_balja)</h4>
									<span class="source">Just Chatting</span>
								</div>
								<span class="count">10,000</span>
							</a>
						</li>
						<li>
							<a href="#">
								<img src="https://via.placeholder.com/30">
								<div class="txt-wrap">
									<h4>기발자(gi_balja)</h4>
									<span class="source">Just Chatting</span>
								</div>
								<span class="count">10,000</span>
							</a>
						</li>
						<li>
							<a href="#">
								<img src="https://via.placeholder.com/30">
								<div class="txt-wrap">
									<h4>기발자(gi_balja)</h4>
									<span class="source">Just Chatting</span>
								</div>
								<span class="count">10,000</span>
							</a>
						</li>
						<li>
							<a href="#">
								<img src="https://via.placeholder.com/30">
								<div class="txt-wrap">
									<h4>기발자(gi_balja)</h4>
									<span class="source">Just Chatting</span>
								</div>
								<span class="count">10,000</span>
							</a>
						</li>
						<li>
							<a href="#">
								<img src="https://via.placeholder.com/30">
								<div class="txt-wrap">
									<h4>기발자(gi_balja)</h4>
									<span class="source">Just Chatting</span>
								</div>
								<span class="count">10,000</span>
							</a>
						</li>
						<li>
							<a href="#">
								<img src="https://via.placeholder.com/30">
								<div class="txt-wrap">
									<h4>기발자(gi_balja)</h4>
									<span class="source">Just Chatting</span>
								</div>
								<span class="count">10,000</span>
							</a>
						</li>
					</ul>
				</div>
			</div>

- css

/* 메인 영역 */
.main-container {
	position: relative;
	width: 100%;
	height: 100%;
	min-width: 1340px;
}

/* 왼쪽 */
.left-area {
	position: fixed;
    width: 240px;
    background-color: #202024;
    top: 50px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
}
.left-area .channel-wrap {

}

.left-area .channel-wrap .channel-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;

	padding: 10px;
}

.left-area .channel-wrap .channel-header h3 {
	font-size: 15px;
}

.left-area .channel-wrap .channel-header .icon-arrow {
	display: inline-block;
	width: 30px;
	height: 30px;
	background-color: #ffffff;
}

.left-area .channel-wrap .channel-body {

}

.left-area .channel-wrap .channel-body ul {

}

.left-area .channel-wrap .channel-body li {
	
}

.left-area .channel-wrap .channel-body a {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;

	padding: 5px 10px;
}

.left-area .channel-wrap .channel-body img {
	width: 30px;
	height: 30px;
	border-radius: 50%;
}

.left-area .channel-wrap .channel-body .txt-wrap {
	width: 110px;
	margin-left: 10px;
}

.left-area .channel-wrap .channel-body .txt-wrap h4 {
	font-size: 12px;
}

.left-area .channel-wrap .channel-body .txt-wrap .source {
	font-size: 11px;
	color: grey;
}

.left-area .channel-wrap .channel-body .count {
	display: block;
	width: 53px;
	font-size: 11px;
}

.left-area .channel-wrap .channel-body .count:before {
	content: '';
	position: relative;
	display: inline-block;
	width: 10px;
	height: 10px;
	background-color: red;
	border-radius: 50%;

	margin-right: 5px;
	top: 1px;
}

3. left - join-wrap

- html

			<div class="join-wrap">
				
				<div class="txt-wrap">
					<h2><span class="font-purple">Twitch</span> 커뮤니티와 함께하세요!</h2>
					<p>어디서나 최고의 생방송을 즐겨보세요.</p>
					<button type="button" class="btn-purple">회원가입</button>
				</div>
			</div>

- css

.left-area .join-wrap {
	margin: 10px;
}

.left-area .join-wrap .txt-wrap {
	background-color: #18181a;
	padding: 20px;
}

.left-area .join-wrap .txt-wrap h2 {
	font-size: 24px;
}

.left-area .join-wrap .txt-wrap h2 span{

}

.left-area .join-wrap .txt-wrap p {
	margin-top: 10px;
	font-size: 13px;
}

.left-area .join-wrap .txt-wrap .btn-purple {
	width: 53px;
    height: 30px;
    border-radius: 5px;
    text-align: center;
    line-height: 30px;
    font-size: 12px;

	margin-top: 10px;
}

4. left - info-wrap

- html

			<div class="info-wrap">

				<p>상호명: 동해물과 백두산이</p>
				<p>대표자명: 동해물</p>
				<p>동해물과 백두산이 마르고 닳도록 하난님이 보우하사 우리 나라만세</p>

				<ul>
					<li><a href="#">지원팀에 문의</a></li>
					<li><a href="#">판매약관</a></li>
					<li><a href="#">사업자 정</a></li>
				</ul>			
			</div>

- css

.left-area .info-wrap {
	font-size: 12px;
	margin: 0 10px 10px 10px;
}

.left-area .info-wrap p {
	color: grey;
}

.left-area .info-wrap ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;

	margin-top: 10px;
}

.left-area .info-wrap li {
	
}

.left-area .info-wrap li a {
	color: grey;
}

.left-area .info-wrap li a:after {
	content: '';
	position: relative;
	display: inline-block;
	width: 2px;
	height: 10px;
	background-color: grey;

	margin: 0 5px;
}



.left-area .info-wrap li:last-child a:after {
	content: none;
}

2) 학습내용 중 어려웠던 점 및 해결방법

해외 사이트를 카피캣을 하다보니 조금 보기가 어려웠던것 같다. 이렇게 나라들 마다 각자의 스타일이 있는가 하는 생각이 들었다. 강사님께서하시는 말씀은 카피캣을 못하게 약간더 자신들만의 언어를 쓰는 것 같다.
그래서 나도 조금 더 디테일하게 하고 싶은 부분들을 조금은 따라하기가 어려웠던것 같다.
그래도 계속 보다보면 조금씩 알 수 있을 것 같다. 보는눈을 조금더 길러야겠다.

3) 학습소감

해외 사이트는 처음으로 해보는 거라 조금더 흥미로웠다. 특히나 트위처라는 페이지를 이전에는 알지 못했던 곳이라 이런 페이지가 있다는 것도 알게 되어 좋았던것 같다 :)
점점 9월이 다가 오는데, 9월부터는 팀 프로젝트가 있다고 하는데 이런것이 처음이라 떨리기도 하고 무섭기도 한것같다. 이걸 위해 무엇을 준비하면 될지..!!
열심히 공부해야겠다!!!

profile
아직 여백이 많은 개린이입니다.

0개의 댓글

관련 채용 정보