728x90
๋ฐ์ํ
ํ๋ก๊ทธ๋๋ฐ ์ธ๊ณ๋ฅผ ํ๊ตฌํฉ์๋ค.
Spring Boot๋ฅผ ํ์ฉํ์ฌ ํ์ด์ง์ ์๋จ ๋ฐ์ ์นดํ ๊ณ ๋ฆฌ๋ฅผ ๊ตฌํํ ์ ์์ต๋๋ค.
5๊ฐ์ ์นดํ ๊ณ ๋ฆฌ๋ก ๊ตฌ์ฑ๋์ด ์๊ณ , ํ์ ํญ๋ชฉ์ด ์๋ ์นดํ ๊ณ ๋ฆฌ์ผ ๊ฒฝ์ฐ ๋ง์ฐ์ค๋ฅผ ์ฌ๋ฆฌ๋ฉด ํ์ ํญ๋ชฉ์ด ๋ด๋ ค์ต๋๋ค.
๊ตฌํ ํ๋ฉด
์์ฑ ์ฝ๋
header.html
<!DOCTYPE html>
<html>
<head>
</head>
<style>
.my-bg-color {
background-color: none;
}
.my-text-size {
font-size: 50px;
font-weight: bold;
color: rgb(255, 179, 0);
}
.title {
width: 20rem;
}
.title:hover {
text-decoration: none;
color: rgb(255, 179, 0);
}
.nav-color {
background-color: none;
}
.nav-link {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
color: rgb(255, 179, 0);
font-size: 20px;
transition-duration: .3s;
}
.nav-link:hover {
color: 255, 179, 0 !important;
}
.link-dark {
text-decoration: none;
}
.dropdown-submenu {
position: relative;
}
.dropdown-menu {
border-color: none;
border: none !important;
text-align: center;
width: 13rem;
margin: 1rem;
margin-top: -1rem;
background-color: rgb(255, 179, 0, 0.45);
}
.navbar-nav .dropdown-menu {
border-top: 3px solid rgb(255, 179, 0) !important;
position: fixed;
}
.dropdown-toggle::after {
display: none;
}
.navbar-nav.ml-auto li a {
font-size: 15px;
}
.navbar-nav .nav-link {
margin: 0rem 0rem -3rem 1rem;
width: 13rem;
height: 10rem;
}
.navbar-nav {
flex-direction: row;
}
.dropdown-item {
font-weight: 50;
width: 13rem;
color: white;
}
</style>
<body>
<div class="p-5 my-bg-color text-white d-flex justify-content-between">
<h1 class="my-text-size">
<a href="/"><img class="title" th:src="@{/logo.png}" alt=""></a>
</h1>
<ul class="navbar-nav mx-auto">
<li class="nav-item dropdown mr-3">
<a class="nav-link dropdown-toggle active" href="/map" id="infoDropdown" role=" button" aria-haspopup="true"
aria-expanded="false" style="color: rgb(255, 179, 0);">์ถฉ์ ์ ์ฐพ๊ธฐ</a>
</li>
<li class="nav-item dropdown mr-3">
<a class="nav-link dropdown-toggle active" href="#" id="postsDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false" style="color: rgb(255, 179, 0);">๊ฒ์ํ</a>
<div class="dropdown-menu" aria-labelledby="infoDropdown">
<a class='dropdown-item' href='/board/list'>๊ณต์ง์ฌํญ</a>
<div class="dropdown">
<a class='dropdown-item' href='/qna/list'>Q&A</a>
</div>
</div>
</li>
<li class="nav-item dropdown mr-3">
<a class="nav-link dropdown-toggle active" href="#" id="postsDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false" style="color: rgb(255, 179, 0);">์ ๋ณด๋ง๋น</a>
<div class="dropdown-menu" aria-labelledby="infoDropdown">
<a class='dropdown-item' href='/statistic/chargerStatus'>ํต๊ณ์ ๋ณด</a>
<div class="dropdown">
<a class='dropdown-item' href='/statistic/ChargerExpense'>์๋น์ค์๋ด</a>
</div>
</div>
</li>
<li class="nav-item dropdown mr-3">
<a class="nav-link dropdown-toggle active" href="#" id="infoDropdown" role=" button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false" style="color: rgb(255, 179, 0);">๋ฏธ๋์ด</a>
<div class="dropdown-menu" aria-labelledby="infoDropdown">
<a class='dropdown-item' href='/media/news?searchText=์ ๊ธฐ์ฐจ'>์ ๊ธฐ์ฐจ ๋ด์ค</a>
<div class="dropdown">
<a class='dropdown-item' href='/media/reels'>์ ๊ธฐ์ฐจ ์์</a>
<div class="dropdown">
<a class='dropdown-item' href='http://localhost:3000/'>์ ๊ธฐ์ฐจ ์ฃผํ๊ฑฐ๋ฆฌ</a>
<div class="dropdown">
<a class='dropdown-item' th:href='@{/media/gamepage}'>์ ๊ธฐ์ฐจ ๊ฒ์</a>
</div>
</div>
</div>
</div>
</li>
<li class="nav-item dropdown mr-3">
<a class="nav-link dropdown-toggle active" href="#" id="postsDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false" style="color: rgb(255, 179, 0);">๋ฉค๋ฒ์ญ</a>
<div class="dropdown-menu" aria-labelledby="infoDropdown">
<a class='dropdown-item' th:href='@{/exchange}'>์ฝ์ธ๊ตํ</a>
<div class="dropdown">
<a class='dropdown-item' th:href='@{/coupon}'>์ฟ ํฐํจ</a>
<div class="dropdown">
<a class='dropdown-item' th:href='@{/membership}'>๊ฐ์
ํ๊ธฐ</a>
<div class="dropdown">
<a th:if="${session != null and session.user_info != null and session.has_membership}"
class='dropdown-item' th:href='@{/mymembership}'>๋์ ๋ฉค๋ฒ์ญ</a>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script type='text/javascript'>
$(document).ready(function () {
$('.dropdown').on('mouseenter', function () {
$(this).find('.dropdown-menu').first().stop(true, true).slideDown();
});
$('.dropdown').on('mouseleave', function () {
$(this).find('.dropdown-menu').first().stop(true, true).slideUp();
});
});
</script>
</body>
</html>
header2.html
<!DOCTYPE html>
<html>
<head>
</head>
<style>
.my-bg-color {
background-color: none;
}
.my-text-size {
font-size: 50px;
font-weight: bold;
color: rgb(255, 179, 0);
}
.title {
width: 20rem;
}
.title:hover {
text-decoration: none;
color: rgb(255, 179, 0);
}
.nav-color {
background-color: none;
}
.nav-link {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
color: rgb(255, 179, 0);
font-size: 20px;
transition-duration: .3s;
}
.nav-link:hover {
color: 255, 179, 0 !important;
}
.link-dark {
text-decoration: none;
}
.dropdown-submenu {
position: relative;
}
.dropdown-menu {
border-color: none;
border: none !important;
text-align: center;
width: 13rem;
margin: 1rem;
margin-top: -1rem;
background-color: rgb(255, 179, 0, 0.45);
}
.navbar-nav .dropdown-menu {
border-top: 3px solid rgb(255, 179, 0) !important;
position: fixed;
}
.dropdown-toggle::after {
display: none;
}
.navbar-nav.ml-auto li a {
font-size: 15px;
}
.navbar-nav .nav-link {
margin: 0rem 0rem -3rem 1rem;
width: 13rem;
height: 10rem;
}
.navbar-nav {
flex-direction: row;
}
.dropdown-item {
font-weight: 50;
width: 13rem;
color: white;
}
</style>
<body>
<div class="p-5 my-bg-color text-white d-flex justify-content-between">
<h1 class="my-text-size">
<a href="/"><img class="title" th:src="@{/logo.png}" alt=""></a>
</h1>
<ul class="navbar-nav mx-auto">
<li class="nav-item dropdown mr-3">
<a class="nav-link dropdown-toggle active" href="/map" id="infoDropdown" role=" button"
aria-haspopup="true" aria-expanded="false" style="color: rgb(255, 179, 0);">์ถฉ์ ์ ์ฐพ๊ธฐ</a>
</li>
<li class="nav-item dropdown mr-3">
<a class="nav-link dropdown-toggle active" href="#" id="postsDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false" style="color: rgb(255, 179, 0);">๊ฒ์ํ</a>
<div class="dropdown-menu" aria-labelledby="infoDropdown">
<a class='dropdown-item' href='/board/list'>๊ณต์ง์ฌํญ</a>
<div class="dropdown">
<a class='dropdown-item' href='/qna/list'>Q&A</a>
</div>
</div>
</li>
<li class="nav-item dropdown mr-3">
<a class="nav-link dropdown-toggle active" href="#" id="postsDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false" style="color: rgb(255, 179, 0);">์ ๋ณด๋ง๋น</a>
<div class="dropdown-menu" aria-labelledby="infoDropdown">
<a class='dropdown-item' href='/statistic/chargerStatus'>ํต๊ณ์ ๋ณด</a>
<div class="dropdown">
<a class='dropdown-item' href='/statistic/ChargerExpense'>์๋น์ค์๋ด</a>
</div>
</div>
</li>
<li class="nav-item dropdown mr-3">
<a class="nav-link dropdown-toggle active" href="#" id="infoDropdown" role=" button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false" style="color: rgb(255, 179, 0);">๋ฏธ๋์ด</a>
<div class="dropdown-menu" aria-labelledby="infoDropdown">
<a class='dropdown-item' href='/media/news?searchText=์ ๊ธฐ์ฐจ'>์ ๊ธฐ์ฐจ ๋ด์ค</a>
<div class="dropdown">
<a class='dropdown-item' href='/media/reels'>์ ๊ธฐ์ฐจ ์์</a>
<div class="dropdown">
<a class='dropdown-item' th:href='@{/media/gamepage}'>์ ๊ธฐ์ฐจ ๊ฒ์</a>
</div>
</div>
</div>
</li>
<li class="nav-item dropdown mr-3">
<a class="nav-link dropdown-toggle active" href="#" id="postsDropdown" role="button" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false" style="color: rgb(255, 179, 0);">๋ฉค๋ฒ์ญ</a>
<div class="dropdown-menu" aria-labelledby="infoDropdown">
<a class='dropdown-item' th:href='@{/exchange}'>์ฝ์ธ๊ตํ</a>
<div class="dropdown">
<a class='dropdown-item' th:href='@{/coupon}'>์ฟ ํฐํจ</a>
<div class="dropdown">
<a class='dropdown-item' th:href='@{/membership}'>๊ตฌ๋
ํ๊ธฐ</a>
<div class="dropdown">
<a class='dropdown-item' th:href='@{/mymembership}'>๋์ ๋ฉค๋ฒ์ญ</a>
</div>
</div>
</div>
</div>
</li>
</ul>
</div>
<!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script type='text/javascript'>
$(document).ready(function () {
$('.dropdown').on('mouseenter', function () {
$(this).find('.dropdown-menu').first().stop(true, true).slideDown();
});
$('.dropdown').on('mouseleave', function () {
$(this).find('.dropdown-menu').first().stop(true, true).slideUp();
});
});
</script>
</body>
</html>
์์ ๊ฐ์ ์ฝ๋๋ฅผ ์์ฑํ์ฌ ํ์ด์ง์ ์๋จ ๋ฐ๋ฅผ ๊ตฌํํ ์ ์์ต๋๋ค.
728x90
๋ฐ์ํ
'IT > Java - Spring Boot' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Spring Boot] ๊ฒ์ํ ๋ง๋ค๊ธฐ (1) | 2023.11.01 |
---|---|
[Spring Boot] ์นด์นด์ค ์ง๋ api ํ์ฉํ์ฌ ์ง๋ ์ถ๋ ฅํ๊ธฐ (1) | 2023.11.01 |
[Spring Boot] ํ์ด์ง์ ์ฌ์ด๋ ๋ฐ ์ฝ๋ฉํ๊ธฐ (0) | 2023.11.01 |
[Spring Boot] ํ์ด์ง์ ํ์ ์ฐฝ ๋์ฐ๊ธฐ (0) | 2023.11.01 |
[HTML/CSS/JS] codepen ํ์ด์ง์ ๋ฒ๊ฐ ํจ๊ณผ ๊ตฌํํ๊ธฐ (2) | 2023.10.30 |