TIL

220512 TIL

Vince_rf 2022. 5. 15. 22:16

#진자코드를 style -> background image linear

<div class="hero" style="margin:auto">
            <div class="hero-body" style="margin:150px auto auto auto;max-width: 400px; background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)) , url("{{ url_for('static', filename=user_info.profile_pic_real) }}");">
                <article class="media">

                    <figure class="media-left" style="align-self: center">
                        <a class="image is-96x96" href="#">
                            <img class="is-rounded" src="{{ url_for('static', filename=user_info.profile_pic_real) }}">
                        </a>
                    </figure>
                    <div class="media-content">
                        <div class="content">
                            <p>
                                <strong style="font-color:white">{{ user_info.profile_name }}</strong> <small style="font-color:white">@{{ user_info.username }}</small>
                                <br>
                                {{ user_info.profile_info }}
                            </p>
                        </div>
                    </div>

#마지막으로 ec2에 올리고 가비아랑 연동해서 구동시켰는데
function sign_out() {           
                $.removeCookie('mytoken', {path: '/'});
                alert('로그아웃!')
                window.location.href = "/login"
            }
코드에 문제가 생겨서 로그아웃이 안됐다..
고민하다가 코드를 읽으러 파이참으로 가서 코드에 오른쪽 클릭하고 빠른 해결?을
눌렀더니 
function sign_out() {
                $.removeCookie = function (mytoken, param2) {
                }
                $.removeCookie('mytoken', {path: '/'});
                alert('로그아웃!')
                window.location.href = "/login"
            }
자동으로 이런 코드가 생성되어서 로그아웃이 다시 구동됐다.
대체 왜 이런건지는 모르겠다.

'TIL' 카테고리의 다른 글

220514 TIL  (0) 2022.05.15
220513 TIL  (0) 2022.05.15
220511 TIL  (0) 2022.05.15
220510 TIL  (0) 2022.05.15
220509 TIL  (0) 2022.05.15