page list 업데이트

This commit is contained in:
lbard
2026-01-05 16:59:20 +09:00
parent 7f8b372ed9
commit 8e759144bf
4 changed files with 134 additions and 7 deletions

View File

@@ -28,11 +28,11 @@
<div class="menu__close"><button class="uk-icon" uk-icon="icon: close"></button></div>
<div class="menu__box">
<ul>
<li><a href="#a">최신테크뉴스</a></li>
<li><a href="#a">WXN 뉴스</a></li>
<li><a href="#a">IT 요즘</a></li>
<li><a href="#a">IT활용자료(윅슨전용)</a></li>
<li><a href="#a">ETC</a></li>
<li><a href="/list">최신테크뉴스</a></li>
<li><a href="/list/NEWS">WXN 뉴스</a></li>
<li><a href="/list/IT">IT 요즘</a></li>
<!-- <li><a href="/list">IT활용자료(윅슨전용)</a></li> -->
<li><a href="/list/ETC">ETC</a></li>
</ul>
</div>
<ul class="login__section">
@@ -72,8 +72,8 @@
$(this).find("span").attr("uk-icon","icon: triangle-down");
check_state = 0;
}else{
$(this).find("span").attr("uk-icon","icon: triangle-up");
check_state = 1;
$(this).find("span").attr("uk-icon","icon: triangle-up");
check_state = 1;
}
$(".login_nav").toggle(300);
});

92
templates/list.html Normal file
View File

@@ -0,0 +1,92 @@
{% extends 'base.html' %}
{% block content %}
<div class="container">
<div class="content">
{% if not posts %}
<h4 style="margin-top: 100px">작성된 포스트가 없습니다.</h4>
{% else %}
<div class="content__inner">
<ul class="list__posts list__posts0">
</ul>
<ul class="list__posts list__posts1">
</ul>
<ul class="list__posts list__posts2">
</ul>
</div>
<ul class="fake__lists">
{% for r_post in posts %}
<li>
<a href="{{ url_for('post', post_id=r_post.id) }}">
<div class="lists__img">
<img src="{{ r_post.thumbnail_img | default('https://via.placeholder.com/300x200', true) }}" alt="{{ r_post.title }}" onerror="this.onerror=null; this.src='https://via.placeholder.com/300x200';" />
</div>
<div class="lists__desc">
<p class="lists__category">{{ r_post.category }}</p>
<h3 class="lists__title">{{ r_post.title }}</h3>
<p class="lists__content">
{{ r_post.contents | safe }}
</p>
{# <p class="lists__content">{{ r_post.contents | safe }}</p> #}
<p class="lists__date">
<b>{{ (r_post.add_date).strftime("%b %d") }}</b> / {{ (r_post.add_date).strftime("%Y") }}
</p>
</div>
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</div>
</div>
<footer>
<div class="footer__inner">
<div class="footer__info">
<p class="footer__tel">
TEL 02-3141-1305 / 1306 E-mail cser@wixon.co.kr / 기업부설연구소 제 2021154317호
</p>
<address>
서울시 마포구 동교로 215-1 한사 스튜디오 406 (주)윅슨어소시에이츠 / #406 , HANSA Studio, 215-1, Donggyo-ro, Mapo-gu, Seoul, Korea
</address>
<p class="copywriter">
&copy; wixon associates Inc. 2022
</p>
<p class="slogan">
wixon. Who Invariable eXistence On the New era " wixon associates Inc. "
</p>
<ul>
<li><a href="/"><img src="/static/images/opusclam.png" alt="WIXON" /></a></li>
<li><a href="/"><img src="/static/images/lpstock.png" alt="WIXON" /></a></li>
</ul>
</div>
<h2 class="footer__logo">
<a href="/"><img src="/static/images/logo.png" alt="WIXON" /></a>
</h2>
</div>
</footer>
<script>
moment.locale('en');
console.log(moment().format('ll'));
$(document).ready(function() {
const count__lists = $(".fake__lists li").length;
for (let i = 0; i < count__lists; i++) {
let n_1 = i % 3;
switch (n_1) {
case 1.:
$(".list__posts1").append($(".fake__lists li:first-child"));
break;
case 2:
$(".list__posts2").append($(".fake__lists li:first-child"));
break;
case 0:
$(".list__posts0").append($(".fake__lists li:first-child"));
break;
}
}
})
</script>
{% endblock %}
</div>
</body>
</html>