Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EREGCSC-2585 -- Update display of resources on site homepage #1458

Merged
merged 10 commits into from
Nov 4, 2024
Prev Previous commit
Next Next commit
feat: get SubjectChips working properly on homepage
PhilR8 committed Oct 29, 2024
commit 5aa862cf40ea2e9838b277df4722ed52ddbfa491
Original file line number Diff line number Diff line change
@@ -61,6 +61,7 @@
<div class="resources__container">
<recent-resources
api-url={{ API_BASE }}
home-url="{% url 'homepage' %}"
>
</div>
<div class="policy-materials__container">
28 changes: 18 additions & 10 deletions solution/ui/regulations/css/scss/partials/_site_homepage.scss
Original file line number Diff line number Diff line change
@@ -510,18 +510,26 @@
font-weight: 400;
}

.supplemental-content-date {
color: $mid_gray;
font-weight: 400;
padding-right: $spacer-1;
margin-right: $spacer-1;
font-size: $font-size-sm;
.supplemental-content {
margin-bottom: unset;

.supplemental-content-date {
color: $mid_gray;
font-weight: 400;
padding-right: $spacer-1;
margin-right: $spacer-1;
font-size: $font-size-sm;
}

.supplemental-content-title {
color: $mid_gray;
font-weight: 400;
font-size: $font-size-sm;
}
}

.supplemental-content-title {
color: $mid_gray;
font-weight: 400;
font-size: $font-size-sm;
.document__subjects {
margin-bottom: var(--spacer-4);
}
}

37 changes: 17 additions & 20 deletions solution/ui/regulations/css/scss/partials/_subjects.scss
Original file line number Diff line number Diff line change
@@ -370,7 +370,6 @@
}
}
}

}

.loading__span {
@@ -527,28 +526,26 @@
.error-msg__container {
padding: 0 1rem;
}
}

.doc-list__document {
.document__subjects {
margin-top: 0.75rem;
display: flex;
flex-wrap: wrap;
gap: 4px;
.document__subjects {
margin-top: 0.75rem;
display: flex;
flex-wrap: wrap;
gap: 4px;

.subject__chip {
@include common-chip-styles;
.subject__chip {
@include common-chip-styles;

text-decoration: none;
font-size: 11px;
line-height: 18px;
height: unset;
padding: 2px 8px;

&:hover,
&:focus {
background-color: #e7f4fa;
}
}
text-decoration: none;
font-size: 11px;
line-height: 18px;
height: unset;
padding: 2px 8px;

&:hover,
&:focus {
background-color: #e7f4fa;
}
}
}
Original file line number Diff line number Diff line change
@@ -21,6 +21,11 @@ export default {
type: String,
required: true,
},
homeUrl: {
type: String,
required: false,
default: "/",
},
type: {
type: String,
required: false,
@@ -48,7 +53,9 @@ export default {

provide() {
return {
homeUrl: this.homeUrl,
itemTitleLineLimit: 9,
currentRouteName: "homepage",
};
},

Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<script>
import CategoryLabel from "sharedComponents/results-item-parts/CategoryLabel.vue";
import SupplementalContentObject from "./SupplementalContentObject.vue";
import SubjectChips from "../../../eregs-vite/src/components/subjects/SubjectChips.vue";

export default {
name: "RecentSupplementalContent",

components: {
CategoryLabel,
SubjectChips,
SupplementalContentObject,
},

@@ -46,6 +48,7 @@ export default {
:url="content.url"
>
</SupplementalContentObject>
<SubjectChips :subjects="content.subjects" />
</template>
</div>
</template>