Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_wcms_gesso
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
WCMS
uw_wcms_gesso
Commits
e63c3809
Commit
e63c3809
authored
3 years ago
by
Eric Bremner
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-4704: adding logic for featured image
parent
20afada4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!66
ISTWCMS-4704: adding date component with ability to handle multiple dates and...
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/_patterns/04-components/card/card--node/card--node.twig
+1
-0
1 addition, 0 deletions
...e/_patterns/04-components/card/card--node/card--node.twig
source/_patterns/04-components/card/card.twig
+7
-1
7 additions, 1 deletion
source/_patterns/04-components/card/card.twig
with
8 additions
and
1 deletion
source/_patterns/04-components/card/card--node/card--node.twig
+
1
−
0
View file @
e63c3809
...
...
@@ -21,4 +21,5 @@
'additional_info'
:
node.additional_info
,
'contact_for'
:
node.contact_for
,
'groups'
:
node.groups
,
'featured_image'
:
'yes'
,
}
%}
This diff is collapsed.
Click to expand it.
source/_patterns/04-components/card/card.twig
+
7
−
1
View file @
e63c3809
{%
import
'@base/macros/uw.macro.twig'
as
macros
%}
<article
class=
"card
{{
modifier_classes
}}
{%
if
show_hover
%}
card--show-hover
{%
endif
%}
{{
type
}}
"
>
{%
if
featured_image
and
img_element
%}
<div
class=
"card__featured-image"
style=
"background-image: url(
{{
img_element
}}
);"
role=
"img"
aria-label=
"
{{
alt
}}
"
>
</div>
{%
endif
%}
<div
class=
"card__body"
>
{%
if
title
or
author
or
date
or
sub_title
%}
<div
class=
"card__header"
>
...
...
@@ -41,7 +47,7 @@
{%
endif
%}
</div>
{%
endif
%}
{%
if
sources
or
img_element
%}
{%
if
not
featured_image
and
(
sources
or
img_element
)
%}
<div
class=
"card__media"
>
{%
if
url
%}
<a
href=
"
{{
url
}}
"
>
...
...
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