Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #16 from dof-dss/DEPT-163
Browse files Browse the repository at this point in the history
DEPT-163 Theme topics page
  • Loading branch information
ooneill547 authored Sep 27, 2022
2 parents 0354cc9 + 38278e7 commit f0cdb4b
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 6 deletions.
2 changes: 1 addition & 1 deletion css/3_components/content/cards.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/5_theme/landing.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/5_theme/views.css
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.hr-above{border-top:5px solid #0b1951;margin-top:1.8rem;padding-top:1.6rem}.older-news .card__meta{color:#4d4d4d;display:block;margin-bottom:0}
.hr-above{border-top:5px solid #0b1951;margin-top:1.8rem;padding-top:1.6rem}.older-news .card__meta{color:#4d4d4d;display:block;margin-bottom:0}.card-deck--topics{margin-top:2rem}
15 changes: 13 additions & 2 deletions src/scss/3_components/content/cards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,14 @@
color: $meta;
}

&__meta + p,
&__content {
&__meta + p {
margin-top: 0;
}

&__content {
margin: 0;
}

// Card modifiers.
&--no-shadow {
box-shadow: none;
Expand Down Expand Up @@ -412,6 +415,14 @@ a.card {
}
}

&--border-top {
.card {
box-shadow: none;
border-top: 1px solid $headings;
padding: 1.2rem;
}
}

// Layout Builder adjustments for card decks and cards.

// Cards can be dragged and dropped into card deck regions. Multiple cards in the same
Expand Down
4 changes: 4 additions & 0 deletions src/scss/5_theme/views.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@
margin-bottom: 0;
}
}

.card-deck--topics {
margin-top: 2rem;
}
2 changes: 1 addition & 1 deletion src/scss/init/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ $h6-text: (
);

$card-title: (
null: (22px, 1.364),
null: (24px, 1.364),
);

$btn-small: (
Expand Down
41 changes: 41 additions & 0 deletions templates/views/views-view-unformatted--topic-queue.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{#
/**
* @file
* Theme override to display a view of unformatted rows.
*
* Available variables:
* - title: The title of this group of rows. May be empty.
* - rows: A list of the view's row items.
* - attributes: The row's HTML attributes.
* - content: The row's content.
* - view: The view object.
* - default_row_class: A flag indicating whether default classes should be
* used on rows.
*
* @see template_preprocess_views_view_unformatted()
*/
#}
{% if title %}
<h3>{{ title }}</h3>
{% endif %}
{%
set classes = [
'card-deck',
'card-deck--x2',
'card-deck--border-top',
'card-deck--topics',
]
%}
<div{{ attributes.addClass(classes) }}>
{% for row in rows %}
{%
set row_classes = [
default_row_class ? 'views-row',
'card',
]
%}
<article{{ row.attributes.addClass(row_classes) }}>
{{- row.content -}}
</article>
{% endfor %}
</div>

0 comments on commit f0cdb4b

Please sign in to comment.