Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bdk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hebotek
bdk
Commits
4666858e
Commit
4666858e
authored
Dec 28, 2023
by
Michael Apfelthaler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Fact Image Height
parent
e67d9410
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
24 deletions
+26
-24
facts.twig
templates/components/facts.twig
+6
-6
_entry.twig
templates/facts/_entry.twig
+20
-18
No files found.
templates/components/facts.twig
View file @
4666858e
<h2>
{%
if
craft.app.language
==
'de'
%}
Facts zur Daseinsvorsorge
Facts zur Daseinsvorsorge
{%
elseif
craft.app.language
==
'en'
%}
Facts about Daseinsvorsorge
Facts about Daseinsvorsorge
{%
endif
%}
</h2>
<div
class=
"news mt16"
>
{%
for
newsElement
in
craft.entries.section
(
'facts'
)
.
limit
(
3
)
%}
{%
set
image
=
newsElement.teaserImage.one
()
%}
<div
class=
"wm-card wm-card--m wm-card--linked"
data-wm-card
>
<h3
class=
"wm-card__heading "
>
<a
href=
"
{{
newsElement.url
}}
"
class=
"wm-card__link wm-link--unstyled "
>
{{
newsElement.title
}}
</a>
</h3>
<div
class=
"wm-card__media "
>
<img
class=
"wm-image wm-card__image"
loading=
"lazy"
src=
"
{{
craft.app.sites.primarySite.baseUrl
}}
/
{{
image.url
}}
"
width=
"350
"
height=
"197"
data-src=
""
alt=
"Bildbeschreibung"
>
<div
class=
"wm-card__media
center-image
"
>
<img
class=
"wm-image wm-card__image"
loading=
"lazy"
src=
"
{{
craft.app.sites.primarySite.baseUrl
}}
/
{{
image.url
}}
"
height=
"195
"
data-src=
""
alt=
"Bildbeschreibung"
>
</div>
<div
class=
"wm-card__content wm-rich-text "
>
{{
newsElement.teaser
}}
...
...
templates/facts/_entry.twig
View file @
4666858e
...
...
@@ -3,23 +3,25 @@
{%
set
baseurl
=
craft.app.sites.primarySite.baseUrl
%}
{%
set
siteurl
=
currentSite.baseUrl
%}
{%
block
content
%}
<div
class=
"mt32"
>
<div
class=
"maxWidthLimit wm-rich-text"
>
<h1>
{{
entry.title
}}
</h1>
<div
class=
"fact-filters wm-nav-tag__list mt16"
>
{%
for
thema
in
craft.entries.section
(
'themen'
)
%}
{%
if
thema.slug
|
t
in
entry.kategorien
%}
<a
id=
"
{{
thema.slug
}}
"
href=
"
{{
siteurl
}}
facts?category=
{{
thema.slug
}}
"
class=
"wm-nav-tag__link"
value=
"
{{
thema.slug
}}
"
>
{{
thema.title
}}
</a>
{%
endif
%}
{%
endfor
%}
</div>
<div
class=
"wm-row mt32"
>
<div>
{{
entry.teaser
}}
</div>
<div><img
class=
"wm-image wm-card__image"
loading=
"lazy"
src=
"
{{
baseurl
}}
/
{{
image.url
}}
"
width=
"350"
height=
"197"
data-src=
""
alt=
"Bildbeschreibung"
></div>
</div>
<div
class=
"wm-row column mt32"
>
{{
entry.richText
}}
</div>
<div
class=
"mt32"
>
<div
class=
"maxWidthLimit wm-rich-text"
>
<h1>
{{
entry.title
}}
</h1>
<div
class=
"fact-filters wm-nav-tag__list mt16"
>
{%
for
thema
in
craft.entries.section
(
'themen'
)
%}
{%
if
thema.slug
|
t
in
entry.kategorien
%}
<a
id=
"
{{
thema.slug
}}
"
href=
"
{{
siteurl
}}
facts?category=
{{
thema.slug
}}
"
class=
"wm-nav-tag__link"
value=
"
{{
thema.slug
}}
"
>
{{
thema.title
}}
</a>
{%
endif
%}
{%
endfor
%}
</div>
<div
class=
"wm-row mt32"
>
<div>
{{
entry.teaser
}}
</div>
<div><img
class=
"wm-image wm-card__image"
loading=
"lazy"
src=
"
{{
baseurl
}}
/
{{
image.url
}}
"
height=
"200"
data-src=
""
alt=
"Bildbeschreibung"
></div>
</div>
<div
class=
"wm-row column mt32"
>
{{
entry.richText
}}
</div>
</div>
{%
endblock
%}
</div>
{%
endblock
%}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment