본문 바로가기
개발일지

소향 팬명록 2차(스파르타)

by crescent88 2022. 4. 22.

jquery

ajax

 

처음 들어보는 것들까지 해봤다..... 

1일 체험으로는 여기까지가 한계인듯 하다..... 

 

따라하는 정도인데... 만들라고 하면 전혀 백지가 된다.... 

아무래도 더 이해와 학습이 필요해보인다. 

다양하게 만들어보다보면 할 수 있지 않을까 기대해본다. 

<!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js"
            integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
            crossorigin="anonymous"></script>

    <title>스파르타코딩클럽 | 부트스트랩 연습하기</title>
        <link href="https://fonts.googleapis.com/css2?family=Nanum+Pen+Script&display=swap" rel="stylesheet">
    <style>
        * {
           font-family: 'Nanum Pen Script', cursive;
        }
        .mytitle {
            width: 100%;
            height: 250px;

            background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)), url("https://image.genie.co.kr/Y/IMAGE/IMG_MUZICAT/IV2/Genie_Magazine/8845/Mgz_Main_Top_20200820112152.jpg/dims/resize/Q_80,0");
            background-position: center;
            background-size: cover;

            color: white;

            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .mypost {
            max-width: 500px;
            width: 95%;

            margin: 20px auto 0px auto;

            box-shadow: 0px 0px 3px 0px gray;
            padding: 20px;
        }

        .mybtn > button {
            margin-top: 10px;
        }

        .mycomment {
            max-width: 500px;
            width: 95%;

            margin: 20px auto 0px auto;

            box-shadow: 0px 0px 1px 0px gray;
        }
    </style>
    <script>
        $(document).ready(function(){
            $.ajax({
                type: "GET",
                url: "http://spartacodingclub.shop/sparta_api/weather/seoul",
                data: {},
                success: function (response) {
                    let temp = response['temp']
                    $('#temp').text(temp)
                }
            })
        });
    </script>
</head>

<body>
<div class="mytitle">
    <h1>소향 팬명록</h1>
    <p>현재기온 : <span id="temp">00.0</span>도 </p>
</div>
<div class="mypost">
    <div class="form-floating mb-3">
        <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com">
        <label for="floatingInput">닉네임</label>
    </div>
    <div class="form-floating">
            <textarea class="form-control" placeholder="Leave a comment here" id="floatingTextarea2"
                      style="height: 100px"></textarea>
        <label for="floatingTextarea2">응원댓글</label>
    </div>
    <div class="mybtn">
        <button type="button" class="btn btn-dark">응원 남기기</button>
    </div>
</div>
<div class="mycomment">
    <div class="card-body">
        <blockquote class="blockquote mb-0">
            <p>새로운 앨범 너무 멋져요!</p>
            <footer class="blockquote-footer">호빵맨</footer>
        </blockquote>
    </div>
</div>
<div class="mycomment">
    <div class="card-body">
        <blockquote class="blockquote mb-0">
            <p>새로운 앨범 너무 멋져요!</p>
            <footer class="blockquote-footer">호빵맨</footer>
        </blockquote>
    </div>
</div>
<div class="mycomment">
    <div class="card-body">
        <blockquote class="blockquote mb-0">
            <p>새로운 앨범 너무 멋져요!</p>
            <footer class="blockquote-footer">호빵맨</footer>
        </blockquote>
    </div>
</div>
</body>

</html>

'개발일지' 카테고리의 다른 글

실시간 환율(스파르타)  (0) 2022.05.09
단일품 판매 웹페이지(스파르타)  (0) 2022.05.05
GUI 텍스트 위젯  (0) 2022.04.28
GUI 엔트리 위젯  (0) 2022.04.28
소향 팬명록(스파르타)  (0) 2022.04.22