Show More
@@ -35,6 +35,7 b' ThreadsPerPage = 3' | |||||
35 | PostsPerPage = 10 |
|
35 | PostsPerPage = 10 | |
36 | ImagesPerPageGallery = 20 |
|
36 | ImagesPerPageGallery = 20 | |
37 | MaxLandingThreads = 20 |
|
37 | MaxLandingThreads = 20 | |
|
38 | MaxLandingPosts = 10 | |||
38 | Themes=md:Mystic Dark,md_centered:Mystic Dark (centered),sw:Snow White,pg:Photon Grey,ad:Amanita Dark,iw:Inocibe White |
|
39 | Themes=md:Mystic Dark,md_centered:Mystic Dark (centered),sw:Snow White,pg:Photon Grey,ad:Amanita Dark,iw:Inocibe White | |
39 | ImageViewers=simple:Simple,popup:Popup |
|
40 | ImageViewers=simple:Simple,popup:Popup | |
40 |
|
41 |
@@ -588,6 +588,10 b' ul {' | |||||
588 | border-right: solid 1px #777; |
|
588 | border-right: solid 1px #777; | |
589 | } |
|
589 | } | |
590 |
|
590 | |||
|
591 | .landing-threads { | |||
|
592 | margin-bottom: 1em; | |||
|
593 | } | |||
|
594 | ||||
591 | .post[data-opening=True] > .post-info { |
|
595 | .post[data-opening=True] > .post-info { | |
592 | background: black; |
|
596 | background: black; | |
593 | padding: 4px; |
|
597 | padding: 4px; |
@@ -36,7 +36,7 b'' | |||||
36 | {% endif %} |
|
36 | {% endif %} | |
37 |
|
37 | |||
38 | {% for post in posts %} |
|
38 | {% for post in posts %} | |
39 |
{% post_view post |
|
39 | {% post_view post truncated=True need_op_data=True %} | |
40 | {% endfor %} |
|
40 | {% endfor %} | |
41 |
|
41 | |||
42 | {% if next_page_link %} |
|
42 | {% if next_page_link %} |
@@ -34,6 +34,9 b'' | |||||
34 | {% endfor %} |
|
34 | {% endfor %} | |
35 | </div> |
|
35 | </div> | |
36 | {% endif %} |
|
36 | {% endif %} | |
|
37 | {% for post in latest_posts %} | |||
|
38 | {% post_view post truncated=True need_op_data=True %} | |||
|
39 | {% endfor %} | |||
37 | </div> |
|
40 | </div> | |
38 | {% endautoescape %} |
|
41 | {% endautoescape %} | |
39 | {% endblock %} |
|
42 | {% endblock %} |
@@ -13,6 +13,7 b' from boards.views.base import BaseBoardV' | |||||
13 |
|
13 | |||
14 | PARAM_SECTION_STR = 'section_str' |
|
14 | PARAM_SECTION_STR = 'section_str' | |
15 | PARAM_LATEST_THREADS = 'latest_threads' |
|
15 | PARAM_LATEST_THREADS = 'latest_threads' | |
|
16 | PARAM_LATEST_POSTS = 'latest_posts' | |||
16 |
|
17 | |||
17 | TEMPLATE = 'boards/landing.html' |
|
18 | TEMPLATE = 'boards/landing.html' | |
18 |
|
19 | |||
@@ -37,5 +38,9 b' class LandingView(BaseBoardView):' | |||||
37 |
|
38 | |||
38 | params[PARAM_LATEST_THREADS] = ops |
|
39 | params[PARAM_LATEST_THREADS] = ops | |
39 |
|
40 | |||
|
41 | max_landing_posts = settings.get_int(SECTION_VIEW, 'MaxLandingPosts') | |||
|
42 | params[PARAM_LATEST_POSTS] = Post.objects.filter(pub_time__gt=today)\ | |||
|
43 | .order_by('-pub_time')[:max_landing_posts] | |||
|
44 | ||||
40 | return render(request, TEMPLATE, params) |
|
45 | return render(request, TEMPLATE, params) | |
41 |
|
46 |
General Comments 0
You need to be logged in to leave comments.
Login now