Skip to content

Commit

Permalink
Merge pull request #533 from nih-sparc/Fix-event-details-page-css
Browse files Browse the repository at this point in the history
Fixed CSS for event and event details pages
  • Loading branch information
benrogboe authored Sep 21, 2022
2 parents c733ea8 + bfe9e85 commit c105ddd
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 18 deletions.
20 changes: 9 additions & 11 deletions components/NewsEventsResourcesPage/NewsEventsResourcesPage.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<div>
<div class="page">
<breadcrumb :breadcrumb="breadcrumb" :title="heroTitle" />
<page-hero>
<h1>{{ heroTitle }}</h1>
<p>
<div class="body2">
{{ heroSummary }}
</p>
</div>
</page-hero>
<div class="page-wrap container">
<div class="subpage">
Expand Down Expand Up @@ -148,15 +148,9 @@ export default {
</script>

<style lang="scss" scoped>
@import '@/assets/_variables.scss';
@import '@nih-sparc/sparc-design-system-components/src/assets/_variables.scss';
.content {
& ::v-deep {
color: $vestibular;
}
& ::v-deep p {
margin-bottom: 1em;
}
& ::v-deep img,
& ::v-deep video {
height: auto;
Expand Down Expand Up @@ -185,7 +179,11 @@ export default {
}
}
.back-link {
color: $navy;
color: $darkBlue;
font-weight: 700;
}
.page {
background-color: $background;
padding-bottom: 2rem;
}
</style>
26 changes: 21 additions & 5 deletions pages/news-and-events/events/_eventId/event-details/index.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<template>
<div>
<div class="page pb-32">
<breadcrumb :breadcrumb="breadcrumb" title="Event Details" />
<page-hero>
<h1>{{ heroTitle }}</h1>
<p>
<div class="body2">
{{ heroSummary }}
</p>
</div>
</page-hero>
<div class="page-wrap container">
<div class="page-wrap container pt-32">
<div class="subpage">
<div class="header mb-32">
<h2>Event Details</h2>
Expand All @@ -17,7 +17,7 @@
</div>
<!-- eslint-disable vue/no-v-html -->
<!-- marked will sanitize the HTML injected -->
<div v-html="parseMarkdown(htmlDetails)" />
<div class="content" v-html="parseMarkdown(htmlDetails)" />
</div>
</div>
</div>
Expand Down Expand Up @@ -148,3 +148,19 @@ export default {
}
</script>
<style lang="scss" scoped>
@import '@nih-sparc/sparc-design-system-components/src/assets/_variables.scss';
.page {
background-color: $background;
}
.content {
::v-deep img {
height: auto;
margin: 0.5em 0;
max-width: 100%;
}
}
.subpage {
margin: 0;
}
</style>
4 changes: 2 additions & 2 deletions pages/news-and-events/events/_id.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
<h3>Location</h3>
<p>{{ page.fields.location }}</p>

<h3>External Link</h3>
<p>
<h3 v-if="page.fields.url">External Link</h3>
<p v-if="page.fields.url">
<a :href="page.fields.url" target="_blank">{{ page.fields.url }}</a>
</p>
</news-events-resources-page>
Expand Down

0 comments on commit c105ddd

Please sign in to comment.