이 프로젝트는 추가적인 CSS작업없이 부트스트랩의 CSS만 이용하는 것을 기본으로 하므로 티스토리에서 직접 생성하는 코드는 제어할 방법이 없습니다.

 

이러한 코드들은 두 번째 프로젝트에서 수정할 예정이니 여기서는 적용된 스타일 없이 그냥 두겠습니다.

 

설명

이제 부트스트랩의 CSS를 이용하여 본문을 꾸며보겠습니다.

(참고 : bootstrap - CSS, 콤포넌트  )

 

본문에서 '패이지 네비게이션 > 현재 패이지'는 CSS를 직접 수정하지 않으면 안 되기 때문에 이번 프로젝트에서는 그냥 두겠습니다.

'댓글 리스트'는 '<s_rp_container>'안에 태그를 꾸며두면 티스토리에서 다시 렌더링을 해줍니다.

앞으로 이런 식으로 렌더링되는 내용을 자주 보게 될테니 신경써주세요~

 

콘텐츠 페이지만 꾸미는 거고 방명록과 같은 다른 페이지는 다음 포스팅에서 따로 하겠습니다.

 

 

 

코드

 

티스토리 태그와 일반 html 태그를 구분해서 범위를 넣어야 합니다.

티스토리에서 자신들의 태그는 다시 렌더링을 하거나 하기 때문입니다.

bootstrap_tistory_004.txt

 

댓글 쪽 코드를 보면 미리 '<s_rp_container></s_rp_container>'안에 댓글 리스트의 템플릿을 지정한다는 것을 알 수 있습니다.

이런 방식으로 렌더링되는 티스토리 코드들이 꽤 있습니다.

꼭 숙지하고 갑시다~

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
<!-- 2. 콘텐츠 -->
<div id="content">
    <!-- 2-1. 검색 결과 리스트 -->
    <s_list>
        <div>
            <h3>'[##_list_conform_##]'에 해당되는 글 [##_list_count_##]건</h3>
            <ol class="list-group">
                <s_list_rep>
                    <li class="list-group-item">
                        <small>[##_list_rep_regdate_##]</small>
                        <a href="[##_list_rep_link_##]">[##_list_rep_title_##]</a>
                        <span class="author"> by [##_list_rep_author_##] </span>
                        <span class="badge">[##_list_rep_rp_cnt_##]</span>
                    </li>
                </s_list_rep>
            </ol>
        </div>
    </s_list>
    <!-- /2-1. 검색 결과 리스트 -->
    <!-- 2-3. 위치로그 -->
    <s_local>
        <div class="localog">
            <h3>위치로그</h3>
            <ul class="list-group">
                <s_local_spot_rep>
                    <li class="list-group-item">
                        <div style="margin-left: [##_local_spot_depth_##]px">
                            [##_local_spot_##]
                        </div>
                    </li>
                </s_local_spot_rep>
                <s_local_info_rep>
                    <li class="list-group-item">
                        <div class="info" style="margin-left: [##_local_info_depth_##]px">
                            <a href="[##_local_info_link_##]">[##_local_info_title_##]</a>
                        </div>
                    </li>
                </s_local_info_rep>
            </ul>
        </div>
    </s_local>
    <!-- /2-3. 위치로그 -->
    <!-- 2-4. 태그 클라우드 -->
    <s_tag>
        <div class="taglog">
            <h3>태그</h3>
            <s_tag_rep>
                <div class="col-xs-3 col-md-4">
                    <a href="[##_tag_link_##]" class="[##_tag_class_##]">[##_tag_name_##]</a>
                </div>
            </s_tag_rep>
 
        </div>
    </s_tag>
    <!-- /2-4. 태그 클라우드 -->
    <!-- 2-5. 방명록 -->
    <s_guest>
        <div class="guestbook">
            <h3>방명록</h3>
            <!-- 15-1. 방명록 글쓰기 -->
            <s_guest_input_form>
                <div class="guestWrite">
                    <div class="input-group">
                        <span class="input-group-addon" id="basic-addon1">비밀글</span>
                        <lable class="form-control "><input type="checkbox" class="checkbox" id="guestsecret" name="secret" /></lable>
                    </div>
                    <s_guest_member>
                        <s_guest_form>
                            <div class="input-group">
                                <span class="input-group-addon" id="basic-addon1"> 이 름 </span>
                                <input type="text" class="form-control" aria-describedby="basic-addon1" name="[##_guest_input_name_##]" value="[##_guest_name_##]" />
                            </div>
                            <div class="input-group">
                                <span class="input-group-addon" id="basic-addon1">패스워드</span>
                                <input type="password" class="form-control" aria-describedby="basic-addon1" name="[##_guest_input_password_##]" value="" />
                            </div>
                            <div class="input-group">
                                <span class="input-group-addon" id="basic-addon1">홈페이지</span>
                                <input type="text" class="form-control " aria-describedby="basic-addon1" name="[##_guest_input_homepage_##]" value="[##_guest_homepage_##]" />
                            </div>
                        </s_guest_form>
                    </s_guest_member>
                    <p>
                        <textarea name="[##_guest_textarea_body_##]" class="form-control" cols="50" rows="6"> </textarea>
                    </p>
                    <p class="text-center">
                        <input type="submit" value="안부 남기기" onclick="[##_guest_onclick_submit_##]" class="btn btn-default submit" />
                    </p>
                </div><!-- guestWrite close -->
            </s_guest_input_form>
            <!-- /15-1. 방명록 글쓰기 -->
            <!-- 15-2. 방명록 리스트 -->
            <s_guest_container>
                <div class="guestList">
                    <ol class="list-group">
                        <s_guest_rep>
                            <li id="[##_guest_rep_id_##]" class="list-group-item">
                                <div class="[##_guest_rep_class_##]">
                                    <strong>[##_guest_rep_name_##]</strong>
                                    <small> [##_guest_rep_date_##]</small>
                                    <span class="control">
                                        <a href="#" onclick="[##_guest_rep_onclick_delete_##]" class="btn btn-default btn-xs">&nbsp;<span>Edit/Delete</span></a>
                                        <a href="#" onclick="[##_guest_rep_onclick_reply_##]" class="btn btn-default btn-xs">&nbsp;<span>Reply</span></a>
                                    </span>
                                    <p>[##_guest_rep_desc_##]</p>
                                </div>
                                <s_guest_reply_container>
                                    <ul class="list-group">
                                        <s_guest_reply_rep>
                                            <li id="[##_guest_rep_id_##]" class="list-group-item">
                                                <div class="[##_guest_rep_class_##]">
                                                    <strong>[##_guest_rep_name_##]</strong>
                                                    <small> [##_guest_rep_date_##]</small>
                                                    <span class="control">
                                                        <a href="#" onclick="[##_guest_rep_onclick_delete_##]" class="btn btn-default btn-xs">&nbsp;<span>Edit/Delete</span></a>
                                                    </span>
                                                    <p>[##_guest_rep_desc_##]</p>
                                                </div>
                                            </li>
                                        </s_guest_reply_rep>
                                    </ul>
                                </s_guest_reply_container>
                            </li>
                        </s_guest_rep>
                    </ol>
                </div>
            </s_guest_container>
            <!-- /15-2. 방명록 리스트 -->
        </div>
    </s_guest>
    <!-- /2-5. 방명록 -->
    <!-- 2-6. 공지사항 글 -->
    <s_notice_rep>
        <div class="entryNotice">
            <div class="titleWrap">
                <h2><a href="[##_notice_rep_link_##]">[##_notice_rep_title_##]</a></h2>
                <span class="category">공지사항</span><span class="date">[##_notice_rep_date_##]</span>
            </div>
            <div class="article">
                [##_notice_rep_desc_##]
                <div class="author"> <span class="text">Posted by </span>[##_notice_rep_author_##] </div>
            </div>
        </div>
    </s_notice_rep>
    <!-- /2-6. 공지사항 글 -->
    <!-- 2-7. 보호 글 -->
    <s_article_protected>
        <div class="entryProtected">
            <div class="titleWrap">
                <h2><a href="[##_article_rep_link_##]">[##_article_rep_title_##]</a></h2>
                <span class="date">[##_article_rep_date_##]</span>
                <span class="author">  by [##_article_rep_author_##]</span>
            </div>
            <p class="text">
                보호되어 있는 글입니다. <br />
                내용을 보시려면 비밀번호를 입력하세요.
            </p>
            <p>
                <label for="[##_article_password_##]">비밀번호 ::</label>
                <input id="[##_article_password_##]" name="[##_article_password_##]" type="password" onkeydown="if (event.keyCode == 13) [##_article_dissolve_##]" />
                <input type="button" class="submit" value="확인" onclick="[##_article_dissolve_##]" />
            </p>
        </div>
    </s_article_protected>
    <!-- /2-7. 보호 글 -->
    <!-- 2-8. 글, 본문 -->
    <s_article_rep>
        <div class="entry">
            <!-- 2-8-1. 글 관련 정보 : 글제목, 카테고리, 날짜, 관리자  -->
            <div class="page-header">
                <h3>
                    <a href="[##_article_rep_link_##]">[##_article_rep_title_##]</a>
                </h3>
                <a href="[##_article_rep_category_link_##]"><span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span> [##_article_rep_category_##]</a>
                <small><span class="glyphicon glyphicon-calendar" aria-hidden="true"></span> [##_article_rep_date_##]</small>
                <s_ad_div>
                    <div class="admin">
                        <a href="[##_s_ad_m_link_##]">수정</a> :
                        <a href="#" onclick="[##_s_ad_m_onclick_##]">수정(창으로)</a> |
                        ([##_s_ad_s1_label_##])→<a href="#" onclick="[##_s_ad_s2_onclick_##]">[##_s_ad_s2_label_##]</a> |
                        <a href="#" onclick="[##_s_ad_t_onclick_##]">관련글(트랙백)</a> |
                        <a href="#" onclick="[##_s_ad_d_onclick_##]">삭제</a>
                    </div>
                </s_ad_div>
            </div>
            <!-- /2-8-1. 글 관련 정보 : 글제목, 카테고리, 날짜, 관리자  -->
            <!-- 2-8-2. 블로그 글  -->
            <div class="article">
                [##_article_rep_desc_##]
                <div class="author">
                    <p class="text-right">Posted by [##_article_rep_author_##]</p>
                </div>
            </div>
            <!-- /2-8-2. 블로그 글  -->
            <!-- 2-8-3. 글 관련 태그 -->
            <s_tag_label>
                <span class="glyphicon glyphicon-tags"></span> [##_tag_label_rep_##]
            </s_tag_label>
            <!-- /2-8-3. 글 관련 태그 -->
            <!-- 2-8-4. 트랙백과 댓글 보이기/감추기  -->
            <div>
                <a href="#rp" onclick="[##_article_rep_rp_link_##]"><mark><span class="glyphicon glyphicon-phone-alt" aria-hidden="true"></span> 댓글</mark> <span class="badge">[##_article_rep_rp_cnt_##]</span></a>
                <a href="#tb" onclick="[##_article_rep_tb_link_##]"><span class="glyphicon glyphicon-send" aria-hidden="true"></span> 트랙백 <span class="badge">[##_article_rep_tb_cnt_##]</span></a>
            </div>
            <!-- /2-8-4. 트랙백과 댓글 보이기/감추기  -->
            <!-- 2-8-5. 트랙백 -->
            <s_tb>
                <div class="trackback">
                    <h4>트랙백 주소 :: [##_tb_address_##]</h4>
                    <s_tb_container>
                        <ol>
                            <s_tb_rep>
                                <li id="[##_tb_rep_id_##]">
                                    <h4>Subject: <a href="[##_tb_rep_url_##]" onclick="window.open(this.href); return false" rel="external nofollow">[##_tb_rep_title_##]</a></h4>
                                    <span class="from">Tracked from <span class="name">[##_tb_rep_site_##]</span></span>
                                    <span class="date">[##_tb_rep_date_##]</span>
                                    <a href="#" onclick="[##_tb_rep_onclick_delete_##]; return false" class="delete">&nbsp;<span>삭제</span></a>
                                    <p>[##_tb_rep_desc_##]</p>
                                </li>
                            </s_tb_rep>
                        </ol>
                    </s_tb_container>
                </div>
            </s_tb>
            <!-- /2-8-5. 트랙백 -->
            <!-- 2-8-6. 댓글 -->
            <s_rp>
                <br />
                <div class="comment">
                    <!-- 18-4-2-1. 댓글 리스트 -->
                    <div class="commentList">
                        <s_rp_container>
                            <ol class="list-group">
                                <s_rp_rep>
                                    <li id="[##_rp_rep_id_##]" class="list-group-item">
                                        <div class="[##_rp_rep_class_##]">
                                            <strong>[##_rp_rep_name_##]</strong>
                                            <small> [##_rp_rep_date_##]</small>
                                            <span class="control">
                                                <a href="[##_rp_rep_link_##]" class="btn btn-default btn-xs">&nbsp;<span>Address</span></a>
                                                <a href="#" onclick="[##_rp_rep_onclick_delete_##]" class="btn btn-default btn-xs">&nbsp;<span>Edit/Delete</span></a>
                                                <a href="#" onclick="[##_rp_rep_onclick_reply_##]" class="btn btn-default btn-xs">&nbsp;<span>Reply</span></a>
                                            </span>
                                            <p>[##_rp_rep_desc_##]</p>
                                        </div>
                                        <s_rp2_container>
                                            <!-- 18-4-2-1. 댓글의 댓글 -->
                                            <ul class="list-group">
                                                <s_rp2_rep>
                                                    <li id="[##_rp_rep_id_##]" class="list-group-item">
                                                        <div class="[##_rp_rep_class_##]">
                                                            <strong>[##_rp_rep_name_##]</strong>
                                                            <small> [##_rp_rep_date_##]</small>
                                                            <span class="control">
                                                                <a href="[##_rp_rep_link_##]" class="btn btn-default btn-xs">&nbsp;<span>Address</span></a>
                                                                <a href="#" onclick="[##_rp_rep_onclick_delete_##]" class="btn btn-default btn-xs">&nbsp;<span>Edit/Delete</span></a>
                                                            </span>
                                                            <p>[##_rp_rep_desc_##]</p>
                                                        </div>
                                                    </li>
                                                </s_rp2_rep>
                                            </ul>
                                        </s_rp2_container>
                                    </li>
                                </s_rp_rep>
                            </ol>
                        </s_rp_container>
                    </div>
                    <!-- 여기까지 - 18-4-2-1. 댓글 리스트 -->
                    <!-- 18-4-2-2. 댓글 쓰기 -->
                    <s_rp_input_form>
                        <br />
                        <div class="commentWrite">
                            <div class="panel panel-info">
                                <div class="panel-heading">
                                    <h2 class="panel-title"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> 댓글 작성</h2>
                                </div>
                                <div class="panel-body">
                                    <s_rp_member>
                                        <s_rp_guest>
                                            <div class="input-group">
                                                <span class="input-group-addon" id="basic-addon1"> 이 름 </span>
                                                <input type="text" class="form-control" aria-describedby="basic-addon1" name="[##_rp_input_name_##]" value="[##_guest_name_##]" />
                                            </div>
                                            <div class="input-group">
                                                <span class="input-group-addon" id="basic-addon1">패스워드</span>
                                                <input type="password" class="form-control" aria-describedby="basic-addon1" name="[##_rp_input_password_##]" value="" />
                                            </div>
                                            <div class="input-group">
                                                <span class="input-group-addon" id="basic-addon1">홈페이지</span>
                                                <input type="text" class="form-control " aria-describedby="basic-addon1" name="[##_rp_input_homepage_##]" value="[##_guest_homepage_##]" />
                                            </div>
                                        </s_rp_guest>
                                        <div class="input-group">
                                            <span class="input-group-addon" id="basic-addon1">비밀글</span>
                                            <lable class="form-control "><input type="checkbox" name="[##_rp_input_is_secret_##]" class="checkbox" /></lable>
                                        </div>
                                    </s_rp_member>
                                    <p>
                                        <textarea name="[##_rp_input_comment_##]" class="form-control" rows="10" cols="50"></textarea>
                                    </p>
                                    <p class="text-center">
                                        <input type="submit" class="btn btn-default" value="댓글 달기" onclick="[##_rp_onclick_submit_##]" class="submit" />
                                    </p>
                                </div>
                            </div>
                        </div>
                    </s_rp_input_form>
                    <!-- 여기까지 - 18-4-2-2. 댓글 쓰기 -->
                </div>
            </s_rp>
            <!-- /2-8-6. 댓글 -->
        </div>
    </s_article_rep>
    <!-- /2-8. 글, 본문 -->
    <!-- 2-9. 페이징  -->
    <s_paging>
        <div class="paging text-center ">
            <ul class="pagination">
                <li>
                    <a [##_prev_page_##] class="[##_no_more_prev_##]" aria-label="Previous">&laquo;</a>
                </li>
                <s_paging_rep>
                    <li>
                        <a [##_paging_rep_link_##] class="num"> [##_paging_rep_link_num_##]</a>
                    </li>
                </s_paging_rep>
                <li>
                    <a [##_next_page_##] class="[##_no_more_next_##]">&raquo;</a>
                </li>
            </ul>
            <span class="numbox">
                <s_paging_rep>
                    <a [##_paging_rep_link_##] class="num"> [##_paging_rep_link_num_##]</a>
                </s_paging_rep>
            </span>
        </div>
    </s_paging>
    <!-- /2-9. 페이징  -->
</div>
<!-- /2. 콘텐츠 -->
cs

 

댓글 작성

이름
패스워드
홈페이지
비밀글

티스토리 툴바