๐Ÿ‘ป [WHYGRAM] | bootstrap.zip

0

๐Ÿ‘ป WHYGRAMย 

๋ชฉ๋ก ๋ณด๊ธฐ
9/16
post-thumbnail

๐ŸŸฆ MODAL

        <span class="followerCnt" data-bs-toggle="modal" data-bs-target="#followModal">ํŒ”๋กœ์›Œ : </span>
        <span class="followerCnt" th:text="${profile.users_follower_count}" data-bs-toggle="modal" data-bs-target="#followModal"></span>
        <span class="followCnt" data-bs-toggle="modal" data-bs-target="#followModal">ํŒ”๋กœ์šฐ : </span>
        <span class="followCnt" th:text="${profile.users_follow_count}" data-bs-toggle="modal" data-bs-target="#followModal"></span>


    <div class="modal" id="followModal" tabindex="-1">
        <div class="modal-dialog modal-dialog-centered">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="modalTitle"></h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body" id="modalList">
                    <p>12345678</p>
                </div>
            </div>
        </div>
    </div>

โœ… <div class="modal" id="followModal" tabindex="-1">์ด๋ž‘

โœ… ๋ˆ„๋ฅด๋ฉด ๋ชจ๋‹ฌ ํŠ€์–ด๋‚˜์™€์•ผ ํ•˜๋Š” ๊ณณ์ด๋ž‘ ์—ฐ๊ฒฐํ•ด์ค˜์•ผ ํ•œ๋‹ค.

โœ… data-bs-toggle="modal" data-bs-target="#followModal"

๐ŸŸฆ MODAL - ๋‚˜์—๊ฒŒ ๋งž๊ฒŒ

  • ์•„๋ž˜ ์†Œ์Šค๋ฅผ ๋Š˜ ์“ฐ๋ฉด ๋œ๋‹ค.
    <div class="modal fade" tabindex="-1" id="12345678">
        <div class="modal-dialog modal-dialog-centered">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="modalTitle">12345678</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body" id="modalList">
                    <p>12345678</p>
                </div>
            </div>
        </div>
    </div>
  • <div class="modal" id="mypageDetailModal" tabindex="-1">์ด๋ž‘
  • ๋ˆ„๋ฅด๋ฉด ๋ชจ๋‹ฌ ํŠ€์–ด๋‚˜์™€์•ผ ํ•˜๋Š” ๊ณณ์ด๋ž‘ ์—ฐ๊ฒฐํ•ด์ค˜์•ผ ํ•œ๋‹ค.
  • data-bs-toggle="modal" data-bs-target="#mypageDetailModal"

๐ŸŸฆ ๋ชจ๋‹ฌ + ์ด๋ฏธ์ง€ ์Šฌ๋ผ์ด๋“œ + grid + overflow + table + floating lables

    <div class="modal fade" tabindex="-1" id="mypageDetailModal">
        <div class="modal-dialog modal-dialog-centered">
            <div class="modal-content container">
                <div class="modal-header">
                    <h5 class="modal-title" id="modalTitle"></h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <div class="modal-body row row-cols-2 " id="modalList">

                    <!---1. ์ด๋ฏธ์ง€ --->
                    <div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="carousel">
                      <div class="carousel-indicators" id="imgBtnDiv"> 
                        <!--- ์ด๋ฏธ์ง€ ๋ฐ‘ ๋ฒ„ํŠผ ๋ฐ˜๋ณต 
                        <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
                        --->                        
                      </div>
                      <div class="carousel-inner"  id="imgDiv">
                        <!--- ์ด๋ฏธ์ง€ ๋ฐ˜๋ณต
                        <div class="carousel-item active">
                          <img src="ใ„ฒใ„ฒใ„ฒใ„ฒ" class="d-block w-100">
                        </div>
                        --->
                      </div>
                      <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev">
                        <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                        <span class="visually-hidden">Previous</span>
                      </button>
                      <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next">
                        <span class="carousel-control-next-icon" aria-hidden="true"></span>
                        <span class="visually-hidden">Next</span>
                      </button>
                    </div>

                    <!--- 2. ๋Œ“๊ธ€ + ์ข‹์•„์š” --->
                    <div id="favCmtDiv">
                        <!-- 2-1.๋Œ“๊ธ€๋ฆฌ์ŠคํŠธ -->
                        <div class="overflow-auto table-responsive">
                            <table class="table align-middle table-borderless table-hover"  id="cmtDiv">
                                <!---๋Œ“๊ธ€ (ํ”„๋กœํ•„,๋‹‰๋„ค์ž„,๋‚ด์šฉ,์ข‹์•„์š”,์ข‹์•„์š” ์ˆ˜) ๋ฐ˜๋ณต
                                <tr> 
                                  <th scope="row">ใ„ฒใ„ฒใ„ฒใ„ฒ</th>
                                  <td>ใ„ฒใ„ฒใ„ฒใ„ฒ</td>
                                  <td>ใ„ฒใ„ฒใ„ฒใ„ฒ</td>
                                  <td>ใ„ฒใ„ฒใ„ฒใ„ฒ</td>
                                </tr>
                                --->
                            </table>
                        </div>
                        <!--- 2-2. ์•„์ด์ฝ˜ --->
                        <div  id="icnDiv"></div>
                        <!---๋Œ“๊ธ€ ์“ฐ๊ธฐ--->
                        <div class="form-floating">
                          <input type="text" class="form-control" id="floatingInput" placeholder="๋‚ด ์ƒ๊ฐ์€....">
                          <label for="floatingInput">๋Œ“๊ธ€ ์“ฐ๊ธฐ</label>
                          <button type="button" class="btn btn-primary" id="cntBtn"><i class="bi bi-vector-pen"></i></button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

๐ŸŸฆ display: none

  • visually-hidden ์„ ์จ์•ผํ•œ๋‹ค.
  • elem.classList.add('visually-hidden')

๐ŸŸฆ ๊ฐ€๋กœ์˜์—ญ ๋‹ค ์ฐจ์ง€ํ•˜๊ธฐ , flex ์ทจ์†Œํ•˜๊ธฐ

  • ํƒœ๊ทธ์— ์ง์ ‘์ ์œผ๋กœ style์†์„ฑ์„ ์„ค์ •ํ•ด์•ผ ํ•œ๋‹ค.
  • ๊ฐ€๋กœ์˜์—ญ์„ ๋‹ค ์ฐจ์ง€ํ•˜๋Š” display์˜ ์†์„ฑ์€ block์ด๋‹ค.
<div class="modal-footer" style="display: block">

๐ŸŸฆ ์Šคํฌ๋กค

  • ๊ผญ ์Šคํฌ๋กค์ด ์žˆ์–ด์•ผ ํ•˜๋Š” ๊ณณ์— max-height์ด ์žˆ์–ด์•ผ ํ•œ๋‹ค. ์•ˆ๊ทธ๋Ÿผ ์ž‘๋™ํ•˜์ง€ ์•Š๋Š”๋‹ค
 <div class="overflow-auto" style="max-height: 500px">
profile
๋ช‡ ๋ฒˆ์„ ๋„˜์–ด์ ธ๋„ ์•ž์œผ๋กœ ๊ณ„์† ๋‚˜์•„๊ฐ€์ž

0๊ฐœ์˜ ๋Œ“๊ธ€