Skip to content

Commit

Permalink
Add highlight to preview pages
Browse files Browse the repository at this point in the history
  • Loading branch information
farres1 committed Apr 15, 2024
1 parent 334a049 commit 164f092
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 60 deletions.
14 changes: 0 additions & 14 deletions eq-author/src/App/history/HistoryItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,6 @@ const EventText = styled.div`
p {
margin: 0 0 1em;
word-break: break-all;
em {
background-color: ${colors.highlightGreen};
font-style: normal;
}
}
h2 {
em {
background-color: ${colors.highlightGreen};
font-style: normal;
}
}
ul {
margin-top: 0;
Expand All @@ -89,10 +79,6 @@ const EventText = styled.div`
span {
font-weight: bold;
}
em {
background-color: ${colors.highlightGreen};
font-style: normal;
}
}
}
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ const Container = styled.div`
p:last-of-type {
margin-bottom: 0;
}
em {
background-color: ${colors.highlightGreen};
padding: 0 0.125em;
font-style: normal;
}
span[data-piped] {
background-color: #e0e0e0;
padding: 0 0.125em;
Expand Down
10 changes: 4 additions & 6 deletions eq-author/src/App/page/Preview/CalculatedSummaryPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ const Container = styled.div`
p:last-of-type {
margin-bottom: 0;
}
em {
background-color: #dce5b0;
padding: 0 0.125em;
font-style: normal;
}
span[data-piped] {
background-color: #e0e0e0;
padding: 0 0.125em;
Expand Down Expand Up @@ -130,7 +125,10 @@ const CalculatedSummaryPagePreview = ({ page }) => {
<Grid>
<Column cols={7}>
<SummaryTotalLabel data-test="total-title">
{page.totalTitle.replace(/<\/?p>/g, "")}
{
/* Removes all HTML tags */
page.totalTitle.replace(/<[^>]*>/g, "")
}
</SummaryTotalLabel>
</Column>
<Column cols={3}>
Expand Down
5 changes: 0 additions & 5 deletions eq-author/src/App/page/Preview/ListCollectorPagePreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ const Container = styled.div`
p:last-of-type {
margin-bottom: 0;
}
em {
background-color: #dce5b0;
padding: 0 0.125em;
font-style: normal;
}
span[data-piped] {
background-color: #e0e0e0;
padding: 0 0.125em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ const Container = styled.div`
p:last-of-type {
margin-bottom: 0;
}
em {
background-color: ${colors.highlightGreen};
padding: 0 0.125em;
font-style: normal;
}
span[data-piped] {
background-color: ${colors.pipingGrey};
padding: 0 0.125em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ const Container = styled.div`
p:last-of-type {
margin-bottom: 0;
}
em {
background-color: ${colors.highlightGreen};
padding: 0 0.125em;
font-style: normal;
}
span[data-piped] {
background-color: ${colors.pipingGrey};
padding: 0 0.125em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ const Container = styled.div`
p:last-of-type {
margin-bottom: 0;
}
em {
background-color: ${colors.highlightGreen};
padding: 0 0.125em;
font-style: normal;
}
span[data-piped] {
background-color: ${colors.pipingGrey};
padding: 0 0.125em;
Expand Down
5 changes: 0 additions & 5 deletions eq-author/src/App/page/Preview/QuestionPagePreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ const Container = styled.div`
p:last-of-type {
margin-bottom: 0;
}
em {
background-color: #dce5b0;
padding: 0 0.125em;
font-style: normal;
}
span[data-piped] {
background-color: #e0e0e0;
padding: 0 0.125em;
Expand Down
5 changes: 0 additions & 5 deletions eq-author/src/App/questionConfirmation/Preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ const Container = styled.div`
p:last-of-type {
margin-bottom: 0;
}
em {
background-color: #dce5b0;
padding: 0 0.125em;
font-style: normal;
}
span[data-piped] {
background-color: #5f7682;
border-radius: 4px;
Expand Down
5 changes: 0 additions & 5 deletions eq-author/src/App/section/Preview/SectionIntroPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ const Wrapper = styled.div`
p:last-of-type {
margin-bottom: 0;
}
em {
background-color: #dce5b0;
padding: 0 0.125em;
font-style: normal;
}
span[data-piped] {
background-color: #e0e0e0;
padding: 0 0.125em;
Expand Down
5 changes: 5 additions & 0 deletions eq-author/src/components/preview/elements/PageTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ const Title = styled.h1`
font-size: 1.4em;
margin: 0 0 1em;
word-wrap: break-word;
strong {
background-color: #dce5b0;
padding: 0 0.125em;
font-style: normal;
}
`;

const PageTitle = ({ title, missingText = "Missing Page Title" }) => {
Expand Down

0 comments on commit 164f092

Please sign in to comment.