Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Maják
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Maják
Commits
37560ba0
Commit
37560ba0
authored
2 years ago
by
Štěpán Farka
Browse files
Options
Downloads
Patches
Plain Diff
[FIX] article first
parent
bb0dee95
No related branches found
No related tags found
2 merge requests
!607
Pirati.cz
,
!575
Feature/pirati cz
Pipeline
#9604
passed
2 years ago
Stage: build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
main/models.py
+4
-1
4 additions, 1 deletion
main/models.py
main/templates/main/blocks/news_block.html
+16
-14
16 additions, 14 deletions
main/templates/main/blocks/news_block.html
with
20 additions
and
15 deletions
main/models.py
+
4
−
1
View file @
37560ba0
...
...
@@ -165,7 +165,10 @@ class MainHomePage(MenuMixin, ExtendedMetadataHomePageMixin, MetadataPageMixin,
context
[
"
article_data_list
"
]
=
MainArticlePage
.
objects
.
filter
(
region__isnull
=
False
).
order_by
(
"
-date
"
)[:
3
]
context
[
"
article_carousel_list
"
]
=
MainArticlePage
.
objects
.
order_by
(
"
-date
"
)[:
8
]
articles_for_article_section
=
MainArticlePage
.
objects
.
order_by
(
"
-date
"
)
context
[
"
article_main
"
]
=
articles_for_article_section
[:
1
]
context
[
"
article_carousel_list
"
]
=
articles_for_article_section
[
1
:
8
]
return
context
...
...
This diff is collapsed.
Click to expand it.
main/templates/main/blocks/news_block.html
+
16
−
14
View file @
37560ba0
...
...
@@ -5,14 +5,15 @@
<h2
class=
"head-7xl xl:text-center mb-6 xl:mb-28"
>
{{ self.title }}
</h2>
{% if article_main %}
<div
class=
"flex flex-wrap mb-5 lg:mb-10"
>
{% image article_
data_list.0
.image original as article_img %}
{% image article_
main
.image original as article_img %}
<img
src=
"{{ article_img.url }}"
draggable=
"false"
alt=
""
class=
"lg:max-w-lg lg:mr-11 h-fit"
>
<div
class=
"flex flex-col max-w-xl items-start"
>
<span
class=
"text-green-500 head-3xl mt-10 mb-4 lg:mb-8"
>
{{ article_
data_list.0
.date }}
</span>
<h5
class=
"head-4xl mb-5 lg:mb-10"
>
{{ article_
data_list.0
.title }}
</h5>
<p
class=
"leading-6 mb-4 lg:mb-8"
>
{{ article_
data_list.0
.perex }}
</p>
{% include 'main/includes/button_animated.html' with btn_link=article_
data_list.0
.url btn_text="Číst dále" %}
<span
class=
"text-green-500 head-3xl mt-10 mb-4 lg:mb-8"
>
{{ article_
main
.date }}
</span>
<h5
class=
"head-4xl mb-5 lg:mb-10"
>
{{ article_
main
.title }}
</h5>
<p
class=
"leading-6 mb-4 lg:mb-8"
>
{{ article_
main
.perex }}
</p>
{% include 'main/includes/button_animated.html' with btn_link=article_
main
.url btn_text="Číst dále" %}
</div>
</div>
...
...
@@ -21,5 +22,6 @@
{% include 'main/includes/article_carousel_item.html' with article_carousel_list=article_carousel_list %}
</ui-article-carousel>
</div>
{% endif %}
</div>
</div>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment