20.12.21 게시판 사이트 프로젝트(사이드바,top버튼 적용, 홈화면 애니메이션 적용, 로고, open graph, favicon 적용 등)
2020. 12. 21. 19:21ㆍJAVA/Blog 사이트 프로젝트
DEV_J BLOG
DEV_J의 BLOG
blog.devj.me
<head.html>
<!-- Open Graph Tag -->
<meta property="og:url" content="https://blog.devj.me/"/>
<meta property="og:type" content="blog"/>
<meta property="og:title" content="DEV_J BLOG"/>
<meta property="og:description" content="DEV_J의 BLOG"/>
<meta property="og:image" content="images/Dev_J_logo/logo.png"/>
<!-- 사이트 타이틀 -->
<title>DEV_J BLOG</title>
<!-- 파비콘 -->
<link rel="shortcut icon" href="images/favicon/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon/favicon.ico" type="image/x-icon">
<side-bar.html>
<!-- 사이드바 시작 -->
<header class="side-bar flex flex-column">
<div class="side-bar__status-icon">
<div>Menu<i class="fas fa-stream"></i></div>
<div>▶</div>
<div>▼</div>
</div>
<nav class="side-bar__menu">
<ul>
<li>
<a href="index.html" class="block">
<i class="fas fa-home"></i>
<span>HOME</span>
</a>
</li>
<li>
<a class="block">
<i class="fas fa-list"></i>
<span>ARTICLES</span>
</a>
<ul>
[게시판 메뉴 링크 블록]
</ul>
</li>
<li>
<a class="block">
<i class="fas fa-link"></i>
<span>LINK</span>
</a>
<ul>
<li>
<a href="https://cjy324.tistory.com/" target="_blank" class="block">
<i class="fas fa-rss-square"></i>
<span>T-STORY</span>
</a>
</li>
<li>
<a href="https://github.com/cjy324/TIL_Jooyoung" target="_blank" class="block">
<i class="fab fa-github"></i>
<span>GITHUB</span>
</a>
</li>
</ul>
</li>
<li>
<a href="stat.html" class="block">
<i class="fas fa-chart-pie"></i>
<span>STATISTICS</span>
</a>
</li>
</ul>
</nav>
</header>
<!-- 사이드바 끝 -->
<top-button.html>
<!-- 맨 위 버튼 시작 -->
<nav class="top-button flex flex-jc-c flex-ai-c">
<div class="">
<a href="#header">▲ TOP</a>
</div>
</nav>
<!-- 맨 위 버튼 끝 -->
<CSS>
/* 폰트 1*/
@font-face {
font-family: 'LotteMartDream';
font-style: normal;
font-weight: 400;
src: url('https://cdn.jsdelivr.net/korean-webfonts/1/corps/lottemart/LotteMartDream/LotteMartDreamMedium.woff2') format('woff2'), url('https://cdn.jsdelivr.net/korean-webfonts/1/corps/lottemart/LotteMartDream/LotteMartDreamMedium.woff') format('woff');
}
@font-face {
font-family: 'LotteMartDream';
font-style: normal;
font-weight: 700;
src: url('https://cdn.jsdelivr.net/korean-webfonts/1/corps/lottemart/LotteMartDream/LotteMartDreamBold.woff2') format('woff2'), url('https://cdn.jsdelivr.net/korean-webfonts/1/corps/lottemart/LotteMartDream/LotteMartDreamBold.woff') format('woff');
}
@font-face {
font-family: 'LotteMartDream';
font-style: normal;
font-weight: 300;
src: url('https://cdn.jsdelivr.net/korean-webfonts/1/corps/lottemart/LotteMartDream/LotteMartDreamLight.woff2') format('woff2'), url('https://cdn.jsdelivr.net/korean-webfonts/1/corps/lottemart/LotteMartDream/LotteMartDreamLight.woff') format('woff');
}
/* 폰트 2 */
@import url('https://fonts.googleapis.com/css2?family=Arvo&display=swap');
html, .tui-editor-contents {
font-family: 'LotteMartDream', sans-serif !important;
}
/* 노말라이즈 */
body, ul, li, h1, h2, h3 {
margin:0;
padding:0;
list-style:none;
}
a {
color:inherit;
text-decoration:none;
}
/* 라이브러리 */
.flex {
display:flex;
}
.flex-jc-c {
justify-content:center;
}
.flex-ai-c {
align-items:center;
}
.flex-wrap {
flex-wrap:wrap;
}
.flex-column {
flex-direction:column;
}
.flex-grow-1 {
flex-grow:1;
}
.con {
margin-left:auto;
margin-right:auto;
}
.min-height-100vh {
min-height:100vh;
}
.min-height-50vh {
min-height:50vh;
}
.bg-pink {
background-color:pink;
}
.bd-green {
border:3px solid green;
}
.bd-red {
border:3px solid red;
}
.bd-purple {
border:3px solid purple;
}
.bg-red {
background-color:red;
}
.bg-blue {
background-color:blue;
}
.height-100p {
height:100%;
}
.height-70p{
height:70%;
}
.height-500px{
height:500px;
}
.block {
display:block;
}
.hover-underline:hover{
text-decoration:underline;
}
/* 커스텀 */
.con-min-width {
min-width:1200px;
padding:0 20px;
}
.con {
width:1200px;
}
.side-bar-header{
position:relative;
}
.side-bar-header_con{
position:relative;
}
/* 로고 시작 */
.logo {
font-family: 'Arvo', serif;
font-size:4rem;
font-weight:bold;
}
.logo > span {
}
.logo > span > span {
margin-right:5%;
color:red;
}
.logo__img{
width:200px;
margin-right:10px;
}
.logo--mini {
font-size:2rem;
}
.logo--mini__img{
width:150px;
}
/* 로고 끝 */
/* 로고바 시작 */
.logo-bar {
background-color:black;
color:white;
height:150px;
}
/* 로고바 끝 */
/* 메뉴바 시작 */
.menu-bar {
background-color:black;
color:white;
font-weight:bold;
}
.menu-bar__menu-1 > ul > li {
width:25%;
position:relative;
}
.menu-bar__menu-1 ul > li > a {
text-align:center;
padding:20px 0;
}
.menu-bar__menu-1 ul > li:hover > a {
background-color:white;
color:black;
}
.menu-bar__menu-1 > ul > li > a {
border-radius:10px 10px 0 0;
}
.menu-bar__menu-1 > ul ul {
display:none;
position:absolute;
top:100%;
left:-5px;
width:100%;
background-color:black;
border:5px solid black;
border-top-width:0;
border-radius:0 0 16px 16px;
z-index:10;
}
.menu-bar__menu-1 > ul > li:hover > ul {
display:block;
}
.menu-bar__menu-1 > ul ul > li:last-child > a {
border-radius:0 0 10px 10px;
}
/* 메뉴바 끝 */
/* 타이틀바 시작 */
.title-bar {
margin-top:30px;
margin-bottom:30px;
}
/* 타이틀바 끝 */
/* 메인-index 페이지 시작 */
.section-home{
font-size:1.2rem;
font-weight:bold;
padding:20px;
}
.section-home > div{
position:relative;
height:560px;
}
.section-home >div > *{
position:absolute;
}
.section-home nav{
top:220px;
right:0px;
font-size:3rem;
text-align:center;
}
.section-home nav > span:last-child{
font-size:1.5rem;
}
.img1{
height:300px;
animation:fadein 3s;
}
.img2{
height:260px;
top:310px;
left:160px;
animation:fadein 4s;
}
.img3{
height:280px;
top:120px;
left:450px;
animation:fadein 6s;
}
@keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* 메인-index 페이지 끝 */
/* 게시물 상세페이지 시작 */
.section-2{
font-size:1.1rem;
}
.article-detail-cell__body{
border-top:7px solid black;
border-bottom:7px solid black;
padding:30px;
}
.article-list-bottom-cell > div{
padding:15px;
padding-top:25px;
padding-bottom:5px;
}
.article-detail-cell__title{
font-size:2rem;
padding:15px 0;
}
.article-detail-cell__body .tui-editor-contents{
font-size:1.1rem;
}
/* 게시물 상세페이지 끝 */
/* 게시물 상세페이지 하단 메뉴 시작 */
.article-list-bottom-cell{
font-size:1.2rem;
font-weight:bold;
}
/* 게시물 상세페이지 하단 메뉴 끝 */
/* 하단바 시작 */
.bottom-bar {
margin-top:30px;
background-color:black;
color:white;
padding-top:30px;
padding-bottom:30px;
}
.bottom-bar__site-info {
margin-left:3%;
}
/* 하단바 끝 */
/* 게시물 리스트 페이지 시작*/
:root {
--article-list__cell-id__width:100px;
--article-list__cell-reg-date__width:220px;
--article-list__cell-writer__width:150px;
--article-list__cell-title__width:calc(100% - var(--article-list__cell-id__width) - var(--article-list__cell-reg-date__width) - var(--article-list__cell-writer__width));
}
.article-list{
font-size:1.1rem;
}
.article-list > * > div {
display:flex;
}
.article-list > header > div > div {
position:relative;
}
.article-list > header > div > div:not(:last-child):after {
content:"";
position:absolute;
top:50%;
transform:translateY(-50%);
right:0;
width:2px;
height:15px;
background-color:black;
}
.article-list > * > div > div {
box-sizing:border-box;
text-align:center;
padding-top:10px;
padding-bottom:10px;
}
.article-list__cell-body > div> .article-list__cell-title{
text-align:left;
padding-left:30px;
}
.article-list__cell-id {
width:var(--article-list__cell-id__width);
}
.article-list__cell-reg-date {
width:var(--article-list__cell-reg-date__width);
}
.article-list__cell-writer {
width:var(--article-list__cell-writer__width);
}
.article-list__cell-title {
width:var(--article-list__cell-title__width);
}
.article-list > main > div {
border-top:1px solid black;
}
/* 게시물 리스트 페이지 끝 */
/* 게시물 리스트 하단 메뉴 시작 */
.article-page-menu {
margin-top:20px;
font-size:1.2rem;
}
.article-page-menu > ul > li > a {
border:1px solid transparent;
padding:7px;
font-weight:bold;
}
.article-page-menu > ul > li:not(:first-child):not(:last-child) > a {
padding-left:0;
padding-right:0;
min-width:30px;
justify-content:center;
}
.article-page-menu > ul > li:not(:first-child):not(:last-child):hover > a {
border-color:#afafaf;
}
.article-page-menu__link--selected {
color:red;
}
.article-page-menu > ul > li:hover > a {
color:red;
}
/* 게시물 리스트 하단 메뉴 끝 */
/* 사이드바 메뉴 시작 */
.side-bar{
background-color:black;
position:fixed;
width:170px;
height:100%;
left:-133px;
/*사이드바 고정 left:0;*/
transition:left 1s;
color:white;
}
.side-bar:hover{
left:0;
}
.side-bar > .side-bar__status-icon > div{
text-align:right;
padding:10px;
font-size:1.5rem;
}
.side-bar > .side-bar__status-icon > div:first-child{
padding-top:30px;
}
.side-bar > .side-bar__status-icon > div:first-child >i{
padding-left:40px;
}
.side-bar > .side-bar__status-icon > div:nth-child(2){
display:none;
}
.side-bar:hover > .side-bar__status-icon > div:last-child{
display:none;
}
.side-bar:hover > .side-bar__status-icon > div:nth-child(2){
display:block;
}
.side-bar__menu ul{
}
.side-bar__menu ul ul{
background-color:black;
display:none;
position:absolute;
}
.side-bar__menu ul > li{
position:relative;
}
.side-bar__menu > ul > li::after{
content:"";
text-align:center;
height:2px;
width:75%;
bottom:0%;
background-color:white;
position:absolute;
}
.side-bar__menu ul > li > a{
display:block;
padding:15px 20px;
white-space:nowrap;
}
.side-bar__menu ul> li> ul > li:first-child > a{
border-radius:0 10px 0 0;
}
.side-bar__menu ul> li> ul > li:last-child > a{
border-radius:0 0 10px 0;
}
.side-bar__menu ul > li > a:not(:only-child):after{
content:"[+]";
margin-left:5px;
}
.side-bar__menu ul > li:hover > a:not(:only-child):after{
content:"[-]";
}
.side-bar__menu ul > li:hover > a{
background-color:white;
color:black;
}
.side-bar__menu ul > li:hover > ul{
display:block;
}
.side-bar__menu ul > li > ul{
left:100%;
top:-5px;
border:5px solid black;
border-left:0px;
border-radius:0 15px 15px 0;
}
@media ( min-width:1300px ) {
.side-bar {
width:170px;
}
}
/* 미디어의 크기가 1300px이상일때만 side-bar 보이기 */
@media ( max-width:1299px ) {
.side-bar {
width:0px;
}
}
/* 사이드바 메뉴 끝 */
/* 맨 위 버튼 시작 */
.top-button{
position:fixed;
bottom:80px;
right:20px;
width:70px;
height:30px;
text-align:center;
}
.top-button > div{
width:100%;
height:100%;
font-size:1.1rem;
border-radius:10px;
}
.top-button > div > a{
display:inline-block;
width:100%;
height:85%;
background-color:black;
color:white;
border-radius:10px;
border:3px solid;
padding-top:7px;
}
.top-button > div:hover > a{
background-color:white;
color:black;
}
/* 맨 위 버튼 끝 */
'JAVA > Blog 사이트 프로젝트' 카테고리의 다른 글
20.12.30 Disqus api 적용 - 댓글수, 추천수 동기화 기능 추가( + 이모지 적용)(feat.jackson) (0) | 2020.12.30 |
---|---|
20.12.27 사이트 메타태그 적용(상세페이지 내용 나오게 하기 등) (0) | 2020.12.27 |
20.12.18 게시판 사이트 프로젝트(댓글 유틸(disqus) 추가,검색엔진 등록, 구글 애널리틱스 적용, 구글 ad 추가 등) (0) | 2020.12.18 |
20.12.17 게시판 사이트 프로젝트(toastui-viewer 적용) (1) | 2020.12.17 |
20.12.16 게시판 사이트 프로젝트(Github 페이지 도메인 연결) (0) | 2020.12.16 |