Part5 - TOP
Harvest Restaurant
home
concept
menu
info
CONCEPT
MENU
INFORMATION
HTML記述例
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>【コーディング練習】TOP | Harvest Restaurant</title>
<link rel="stylesheet" href="css/top.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Catamaran:wght@400;700&family=Noto+Sans+JP:wght@400;700&display=swap" rel="stylesheet">
</head>
<body id="topPage">
<header class="header">
<h1><img src="img/top_logo.svg" alt="Harvest Restaurant"></h1>
ここにハンバーメニューが入る
</header>
<main class="main-content">
<ul class="link-list">
<li>
<a href="concept.html">
<img src="img/top_ph01.jpg" alt="">
<h2>CONCEPT</h2>
</a>
</li>
<li>
<a href="menu.html">
<img src="img/top_ph02.jpg" alt="">
<h2>MENU</h2>
</a>
</li>
<li>
<a href="info.html">
<img src="img/top_ph03.jpg" alt="">
<h2>INFORMATION</h2>
</a>
</li>
</ul>
</main>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="js/script.js"></script>
</body>
</html>
@charset "URF-8";
*, *::before, *::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
ul, li {
list-style: none;
}
a {
color: inherit;
text-decoration: none;
}
img {
max-width: 100%;
vertical-align: bottom;
}
body {
color: #333;
font-size: 16px;
font-family: 'Catamaran', 'Noto Sans JP', sans-serif;
line-height: 1.0;
}
#topPage > .header {
height: 100vh;
background: url(../img/top_bg.jpg) no-repeat center top;
background-size: cover;
padding-top: 50px;
margin-bottom: 64px;
}
#topPage h1 {
text-align: center;
}
#topPage h1 img {
width: 240px;
}
@media screen and (min-width: 768px) {
#topPage {
display: grid;
grid-template-columns: 38% 1fr;
gap: 0;
align-items: center;
}
#topPage > .header {
height: 100vh;
margin-bottom: 0;
}
}
.main-content {
width: min(100%, 1240px);
}
.link-list {
padding: 0 20px;
}
.link-list h2 {
padding: 16px 15px 14px;
font-size: 18px;
font-weight: normal;
}
.link-list li {
margin-bottom: 40px;
font-size: 12px;
}
.link-list li a {
display: block;
background-color: #ececec;
}
.link-list li a:hover {
filter: brightness(105%);
}
@media screen and (min-width: 768px) {
.main-content > .link-list {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20px;
max-width: 100%;
padding: 0 30px;
}
.link-list::before {
grid-column: 1 / 2;
grid-row: 1 / 2;
content: "";
background: url(../img/top_pclogo.svg) no-repeat center center;
background-size: 72%;
}
.link-list li {
margin-bottom: 0;
}
}