
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
안녕하세요.
강의는 다 들었고 시간과 명언 까진 완료했습니다.
다만 강사님과 다르게 배경화면이 바둑판 배열로 되어있습니다.
꽉차게 활용할수는 없는건가요?

// index.html
<!DOCTYPE html>
<html lang="en">
<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">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<title>오늘도 잘지냈어 몰리스?</title>
<script src="index.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap');
* {
font-family: 'Poppins', sans-serif;
}
body {
background-image: url("https://static01.nyt.com/images/2020/10/29/style/28MOON-01/oakImage-1603985177355-jumbo.jpg?quality=75&auto=webp");
background-position: center;
color : white
}
.time{
font-size: 120px;
font-weight: bold;
}
.greeting{
font-size: 50px;
}
.todo{
font-size: 30px;
}
.author{
font-size: 25px;
font-style: italic;
}
.main {
width: 100vw;
height: 80vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.quote{
width: 100vw;
height: 20vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
</style>
<script>
</script>
</head>
<body>
<div class="main">
<div class="greeting">환영해</div>
<div id="time" class="time">12:25</div>
<div class="todo">코딩 SQL 대회준비 경영학사</div>
</div>
<div class="quote">
<div id="author" class="author">- 징기스칸 - </div>
<div id="content" class="content">" The merit of an action lies in finishing it to the end " </div>
</div>
</body>
</html>
//index.js
$(document).ready(function () {
renderTime()
renderQoute()
});
//현재 시간
function renderTime() {
let url = `https://worldtimeapi.org/api/timezone/Asia/Seoul`
fetch(url)
.then(res => res.json()).then((data) => {
let datetime = data["datetime"].substr(11,5)
$('#time').text(datetime)
})
}
// 명언
// https://api.quotable.io/random
function renderQoute() {
let url = `https://api.quotable.io/random`
fetch(url)
.then(res => res.json()).then((data) => {
let content =`" ${data['content']} "`
let author =`- ${data['author']}-`
$('#content').text(content)
$('#author').text(author)
})
}
