Skip to content

Commit 764df80

Browse files
committed
UHF-11756: Changed tag styles to use hds tag styles
1 parent 1d6f4a5 commit 764df80

5 files changed

Lines changed: 67 additions & 30 deletions

File tree

conf/cmi/views.view.article.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ display:
445445
trim_whitespace: false
446446
alt: ''
447447
rel: ''
448-
link_class: ''
448+
link_class: 'hds-tag hds-tag--action'
449449
prefix: ''
450450
suffix: ''
451451
target: ''

conf/cmi/views.view.keyword_links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ display:
7777
link: false
7878
group_column: target_id
7979
group_columns: { }
80-
group_rows: true
80+
group_rows: false
8181
delta_limit: 0
8282
delta_offset: 0
8383
delta_reversed: false

public/themes/custom/hdbt_subtheme/dist/css/styles.min.css

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,43 @@
1-
.keywords__container a {
2-
@include tag('base');
3-
@include tag('interactive');
4-
@include font('special.helper_text');
5-
6-
--line-height: 1.5;
7-
background-color: $color-black;
8-
border-radius: 24px;
9-
color: $color-white;
10-
line-height: var(--line-height);
11-
margin: 4px;
12-
padding: 8px 32px;
13-
text-decoration: none;
1+
.keywords__container {
2+
margin-bottom: $spacing-triple;
3+
4+
.hds-tag {
5+
background-color: $color-black;
6+
border-color: $color-black;
7+
8+
&:hover {
9+
background-color: $color-white;
10+
border-color: $color-black;
11+
12+
a {
13+
color: $color-black;
14+
}
15+
}
16+
}
17+
18+
.hds-tag a {
19+
color: $color-white;
20+
}
1421
}
1522

1623
.views-field-field-keywords {
1724
ul {
18-
list-style: none;
19-
margin: $spacing 0 0 0;
20-
padding: 0;
25+
@include tag-container();
2126
}
2227

2328
li {
24-
background: $color-black;
25-
border-radius: $spacing;
26-
display: inline-block;
27-
font-size: remify(14px);
28-
line-height: 2.2;
29-
margin-bottom: $spacing-half;
30-
margin-right: $spacing-half;
31-
margin-top: 0;
32-
padding: 0 $spacing;
29+
@include tag-parent();
3330
}
3431

35-
li a {
32+
.hds-tag {
33+
background-color: $color-black;
34+
border-color: $color-black;
3635
color: $color-white;
37-
text-decoration: none;
36+
37+
&:hover {
38+
background-color: $color-white;
39+
border-color: $color-black;
40+
color: $color-black;
41+
}
3842
}
3943
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{#
2+
/**
3+
* @file
4+
* Theme override to display a view of unformatted rows.
5+
*
6+
* Available variables:
7+
* - title: The title of this group of rows. May be empty.
8+
* - rows: A list of the view's row items.
9+
* - attributes: The row's HTML attributes.
10+
* - content: The row's content.
11+
* - view: The view object.
12+
* - default_row_class: A flag indicating whether default classes should be
13+
* used on rows.
14+
*
15+
* @see template_preprocess_views_view_unformatted()
16+
*/
17+
#}
18+
{% if title %}
19+
<h3>{{ title }}</h3>
20+
{% endif %}
21+
{% for row in rows %}
22+
{%
23+
set row_classes = [
24+
default_row_class ? 'views-row',
25+
'hds-tag',
26+
'hds-tag--action',
27+
]
28+
%}
29+
<div{{ row.attributes.addClass(row_classes) }}>
30+
{{- row.content -}}
31+
</div>
32+
{% endfor %}

0 commit comments

Comments
 (0)